You are not logged in.
Hi,
i use conky and the standard fs_used command in my case return the same result as in my NAS there is 3 mounted points sharing the same NAS disks
However, i would like to have the disk space used by each mounted point
/mnt/perso
/mnt/work
/mnt/storage
du -sh /mnt/perso requires about 10-15 minutes to return results which is not good at all and it is CPU consumming
is there a better way to get accurate value faster ? i mean on NAS volume of data change every time as some backup/sync are done and it is necessary for me to have an quickly overview.
thx
Offline
Moved to GUI & Apps ... see here
Since fs_{something} uses mount points and you have three: /mnt/perso, /mnt/work, /mnt/storage I don't understand why they don't work.
With my partitions this works:
15 Jun 16 @ 20:09:53 ~
$ du -sh /media/5
49G /media/5
15 Jun 16 @ 20:20:16 ~
$ du -sh /media/10
4.8G /media/10
15 Jun 16 @ 20:20:24 ~
$ du -sh /home/sector11
2.3G /home/sector11
15 Jun 16 @ 20:21:09 ~
$
${alignc}${color7}/S11${color}
${alignc}${fs_used /home}
${alignc}${fs_free /home}
${alignc}${fs_size /home}
${alignc}${color7}M/5${color}
${alignc}${fs_used /media/5}
${alignc}${fs_free /media/5}
${alignc}${fs_size /media/5}
${alignc}${color7}M/10${color}
${alignc}${fs_used /media/10}
${alignc}${fs_free /media/10}
${alignc}${fs_size /media/10}
This doesn't work for you?
${alignc}${color7}/mnt/perso${color}
${alignc}${fs_used /mnt/perso}
${alignc}${fs_free /mnt/perso}
${alignc}${fs_size /mnt/perso}
${alignc}${color7}mnt/work${color}
${alignc}${fs_used /mnt/work}
${alignc}${fs_free /mnt/work}
${alignc}${fs_size /mnt/work}
${alignc}${color7}mnt/storage${color}
${alignc}${fs_used /mnt/storage}
${alignc}${fs_free /mnt/storage}
${alignc}${fs_size /mnt/storage}
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
in fact, du as fs_something do not work with NAS and my mounted points, as NAS is 1 filesystem but with several directory mounted as /mnt/perso, /mnt/work etc...
fs_used for /mnt/perso and /mnt/work returns the same values but in fact /mnt/perso should return 850GB and /mnt/work should returns 480GB
df returns also the same value for all mounted points.
everything works great when they should return value from different disk/drive, ut if 2 mounted points are on the same fs, it returns the same values....
like ${fs_used /home} and ${fs_used /} returns in conky script.... du does not, but du does not return correct value on NAS
Offline
df gets its information from the filesystem 'superblock', which is updated after each operation on the filesystem, so that it contains up-to-date figures for space used.
There is no such info kept current and available per directory.
To know how much space a directory, and all its subfiles and subdirectories take up, you need to run 'du' on the directory, and that will inevitable take some time to compute.
If you want that info displayed in conky, one acceptable way to get it is ro run du on the directories you are interested in at regular intervals using a cron job, capture the 'du' output in a file and parse that file in conky.
Offline
But even 'du' returns wrong value... it returns 255TB instead of 850GB (returned by Double COmmander - which is the correct value by the way)
Offline
I've stepped back - but watching - as I have never seen this issue before. Hope you find a solution alain.roger
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
But even 'du' returns wrong value... it returns 255TB instead of 850GB
255TB looks like 'du' ran into some limit...
You don't have 255TB online, do you?
I did not know 'double commander' before you mentioned it. I have it installed now, but obviously I lack expertise on it. Is it possible to export that info to a file that can easily be scanned by conky?
Offline
for sur no or should I ?
in fact my NAS is 4x4TB max in JBOD but it is mounted as raid6 so i have a lot less.
in fact to have a correct value from du i must:
1. run it with sudo
2. use --apparent-size
but till now i didn't find any better solution and result
Offline
Perhaps you should look into reorganizing your directory setup and split it up in static directories that don't change much in size on the one side and directories that do change in size more frequently.
Then you can run 'du' un the first type of directories less frequently than on the more dynamic libraries, and still have a means to follow up your global file usage?
Offline
ok so in fact, to make it work correctly you have to:
1. sudo chmod u+s /usr/bin/du
2. now you can get right value with du -hs /mnt/perso
Offline