USB Storage usage on Status page + New status bar

I would be surprised if a df call would cause filesystem activity. As far as I know, df uses the statfs() system call to get the size/free information about the mounted filesystems. I think the linux kernel calculates these values (or better lets the fs driver do it) when first mounting the fs and on subsequent sync operations. The normal linux df does not cause a sync by default (though there is an option to do so), so I think the bb-df also wouldn't do that.
 
I don't understand much, but i guess that i agree with McNetic,
here is the source code of the df of busybox:
http://busybox.net/cgi-bin/viewcvs....1_9_stable/coreutils/df.c?rev=20678&view=auto

I don't understand much of those strucs and pointers, but i see no loops.

anyway, i tried to use MaxMuster method, but i can't get it draw the stat_bar, i either get the word "stat_bar" on the status page or just nothing:
Code:
63044 KB von 505440 KB auf uStor01 belegt
stat_bar 12
 
The question is not what "df" does, but what the statfs syscall does.

And I have seen "df" display filesystems with some delay, even on an direct attached hard disk, without USB1.1 in between.

A second call to df will be faster, because by then all necessary info is in memory.
 
...i can't get it draw the stat_bar, i either get the word "stat_bar" on the status page or just nothing
My fault. I thought, you just needed "the words" in the resulting page, but you need to call your "function" stat_bar.
So at the moment you might try this one
Code:
my_func (){
echo "<p>$3 KB von $2 KB auf $6 belegt</p>"
stat_bar $5
}

df -k | sed -n ' s/[ ]\+/ /g ; s%/var/media/ftp/%%p' | tr -d '%' | while read i ; do my_func $i; done

Jörg
 
Zuletzt bearbeitet:
There is a patch to show all partitions on the status page
 
Zuletzt bearbeitet:
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.