NZBGet Shows -2146640073.00mb Disk Space

Get help, report and discuss bugs.
kiityman
Posts: 7
Joined: 18 Mar 2020, 07:10

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by kiityman » 30 Apr 2020, 20:32

sanderj wrote:
30 Apr 2020, 20:22
Ouch: my https://drive.google.com/drive/my-drive says "55.8 GB of 101 GB used". Ah, so in my case the "df -h" is showing the correct space.

So ... how do you get the 1PB and 2PB? Is that goolge language for a unlimited plan?
I pay for gsuite, so I have unlimited storage

edit - rclone sets it to the largest size possible for the os

sanderj
Posts: 164
Joined: 10 Feb 2014, 21:46

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by sanderj » 01 May 2020, 04:50

OK, as I don't have the unlimited aka 1PB ... back to you:

With this python3 script named show_free_diskspace.py

Code: Select all

#!/usr/bin/python3
import os, sys
mydir = sys.argv[1]
st = os.statvfs(mydir)
print(st)
myfree = st.f_bavail * st.f_frsize
print("Free:", myfree)
print("Free GB:", int(myfree/(1024*1024*1024)))
what is the output

Code: Select all

./show_free_diskspace.py /mnt/unionfs
Proof it works on my system:

Code: Select all

sander@witte2004:~$ ./show_free_diskspace.py .
os.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=30507684, f_bfree=4792177, f_bavail=3231717, f_files=7782400, f_ffree=7247807, f_favail=7247807, f_flag=4096, f_namemax=255)
Free: 13237112832
Free GB: 12

Code: Select all

sander@witte2004:~$ ./show_free_diskspace.py /home/sander/myGoogleDrive_LinuxDocs/
os.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=26476544, f_bfree=24572577, f_bavail=11839067, f_files=1000000000, f_ffree=0, f_favail=0, f_flag=4102, f_namemax=255)
Free: 48492818432
Free GB: 45

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests