Search found 14 matches

by Spark
July 17th, 2011, 3:59 pm
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

[ root@Synology: ~ ] $ /usr/local/python26/bin/python -V
Python 2.6.6
by Spark
July 17th, 2011, 2:30 pm
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

Just another problem, the icon showing the left space seems to not working. Or it is the 8To limit which slaps again :D
by Spark
July 17th, 2011, 2:27 pm
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

I made a small modification. I replace int by float and return result by return round(result,2). It looks much better. I expect the return value should be a float because it was displayed with 2 digits, and in the exception code we have : except : return 0.0
by Spark
July 17th, 2011, 1:36 pm
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

I made a dirty modification to my misc.py (and after deleted misc.pyo) def diskfree(_dir): """ Return amount of free diskspace in GBytes """ try: proc=subprocess.Popen( "df -kP "+_dir, stdout=subprocess.PIPE, shell=True ) result=int(proc.stdout.read().split(&q...
by Spark
July 17th, 2011, 11:24 am
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

I understand. But I'm pretty sure that statvfs calls df or wathever system call backsides :p
by Spark
July 17th, 2011, 11:02 am
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

[ root@Synology: ~ ] $ df -P /volume1/downloads/ Filesystem 1024-blocks Used Available Capacity Mounted on /dev/vg1/volume_1 12455575744 980708 12454492636 0% /volume1 [ root@Synology: ~ ] $ df -Pk /volume1/downloads/ Filesystem 1024-blocks Used Available Capacity Mounted on /dev/vg1/volume_1 124555...
by Spark
July 17th, 2011, 11:01 am
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

Here is the result : posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=-1181073360, f_bfree=-1181318537, f_bavail=-1181344137, f_files=790888448, f_ffree=790887260, f_favail=790887260, f_flag=0, f_namemax=255) With df , then -P is a posix standard [ root@Synology: ~ ] $ df --help BusyBox v1...
by Spark
July 17th, 2011, 10:08 am
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

I looked the sabnzb sources and I found where freespace where used : misc.py, line 1222 : #------------------------------------------------------------------------------ # Diskfree try: os.statvfs import statvfs # posix diskfree def diskfree(_dir): """ Return amount of free diskspace ...
by Spark
July 17th, 2011, 9:41 am
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

http://docs.python.org/library/statvfs.html

Deprecated since version 2.6: The statvfs module has been deprecated for removal in Python 3.0. [-_-]' how to replace this ? visibly it doesn't work with big filesystems
by Spark
July 17th, 2011, 7:53 am
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

I made another test: [ root@Synology: ~ ] $ cat test3.py import os disk = os.statvfs("/volume1/downloads"); capacity = disk.f_bsize * disk.f_blocks available = disk.f_bsize * disk.f_bavail used = disk.f_bsize * (disk.f_blocks - disk.f_bavail) print capacity print available print used [ roo...
by Spark
July 17th, 2011, 7:44 am
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

[ root@Synology: ~ ] $ cat test.py import os import statvfs s = os.statvfs("/volume1/downloads") print s[statvfs.F_BAVAIL], s[statvfs.F_FRSIZE] [ root@Synology: ~ ] $ /usr/local/python26/bin/python test.py -1181344137 4096 [ root@Synology: ~ ] $ df -kP /volume1/downloads/ Filesystem 1024-b...
by Spark
July 16th, 2011, 4:53 pm
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

[ root@Synology: ~ ] $ df -kP /volume1/downloads/ Filesystem 1024-blocks Used Available Capacity Mounted on /dev/vg1/volume_1 12455575744 980716 12454492628 0% /volume1 [ root@Synology: ~ ] $ cat test.py import os import statvfs s = os.statvfs("/volume1/downloads") print (s[statvfs.F_BAVAI...
by Spark
July 15th, 2011, 8:55 pm
Forum: Bug Reports
Topic: SABnzbd fails to regist correct disk space
Replies: 41
Views: 28609

Re: SABnzbd fails to regist correct disk space

I've the same problem ! How can we fix it ? In ssh, df commands works, can someone help me to try to find where sabnzbd search the free space ?

Thx