-1

Is there any single linux command or single system call through which I can get all 4 information(Total,used,free,reserved) ?

I have checked following:

df: does not give reserve disk space
stat(): does not give reserve disk space
statfs(): gives total and free only 

I tried using "tune2fs -l /dev/vda1" for reserved ,but there is some discrepancy between outputs of tune2fs and df command.The total is not coming as sum of used,free and reserved.

Ek1234
  • 407
  • 3
  • 7
  • 17
  • Might be available in the `/proc` or `/sys` file-systems? – Some programmer dude Oct 26 '17 at 08:09
  • 3
    SO is for programming questions, not questions about using or configuring Linux. SuperUser.com or unix.stackexchange.com would be better places for questions like this. – Barmar Oct 26 '17 at 08:09
  • have you tried using vmstat -s ? – danglingpointer Oct 26 '17 at 08:22
  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Oct 26 '17 at 08:28
  • Hi sorry..it is not programming or dev question,is it possible to port directly to stack exchange or need to close this and raise a new question there. – Ek1234 Oct 26 '17 at 08:37
  • @LethalProgrammer vmstat -s is not giving reserved disk space – Ek1234 Oct 26 '17 at 08:40

1 Answers1

0

Do a calculation with df output :

reserved=total-used-free

mick
  • 197
  • 3