[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file/directory/device services
From: |
Martin Pala |
Subject: |
Re: file/directory/device services |
Date: |
Wed, 06 Aug 2003 11:45:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030711 |
df reports blocks free for non-superuser and uses 1k blocks, monit uses
1m blocks.
df to monit key:
1.) total blocks:
1k-blocks=25197220 => 25197220/1024 = 24606.7 MB (equal to monit report)
2.) Available blocks (for non-superuser):
1k-blocks=17318780 => 17318780/1024 = 16912.9 MB (equal to monit report)
Non-superuser free percentage is 68.73%: 4329703/62993.05 ==
16912.9/246.067 == 17318780/251972.2 = 68.73
I used presumption that the usage is the usage of non-superuser
available space:
100% - 68.73% = 31.27% (this is non-superuser available space usage)
the real (total) usage is:
100% - 73.81% = 26.19% (this is total space usage - only root is allowed
to use the rest)
I can fix it to report and utilize total usage, however for the user
must be aware and set the monitoring limit to reflect superuser reserved
blocks => though the filesystem could have free reserved blocks,
non-superuser could fail to write because of space usage.
Though this problem/conflict, there is still percentage difference from
df, i don't know the reason - it seems that monit is reporting the
percentage well and there is some strange reason in df for this output
(if you'll look above on the percentage, you can see that the monit
result is corect).
What do you think, shall i change it?
Martin
Jan-Henrik Haukeland wrote:
I also noticed that the numbers from df and from monit for my harddisk
are different; about 1 Gigabyte. Do you know what the reason could be?
hauk:[~]df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda5 25197220 6598464 17318780 28% /
monit:
status:
Device 'disk' is accessible
Space: 31.3% [7693.8 MB] Inodes: 8.4% [269686 objects]
HTML:
Blocks total 6299305 [24606.7 MB]
Blocks free for non superuser 4329703 [16912.9 MB] [68.7%]
Blocks free total 4649697 [18162.9 MB] [73.8%]
Block size 4096 B
Inodes total 3204992
Inodes free 2935306 [91.6%]