Ad Widget

Collapse

Problem with incorrect byte counts for vfs.*

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clahti
    Senior Member
    • Jan 2007
    • 126

    #1

    Problem with incorrect byte counts for vfs.*

    I have the following templates defined and populated on a server:

    Disk free space on / vfs.fs.size[/,free]
    Disk free swap space system.swap.size[,free]
    Disk total disk space on / vfs.fs.size[/,total]
    Disk total swap space system.swap.size[,total]
    Disk used space on / vfs.fs.size[/,used]

    All are defined as 64bit integers, units of B, data stored and shown as-is. When I apply this template to a server I seem to be getting wacky values:

    Description (Last value)
    Disk free space on / (4.61 MB)
    Disk free swap space (1.54 GB)
    Disk total disk space on / (17.70 MB)
    Disk total swap space (1.99 GB)
    Disk used space on / (13.09 MB)

    It seems the swap information of free and total are correct but the disk ones are not, going to the server here is the actuals on /:


    [root@cooks root]# df -k /
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sda2 18556080 13551464 4062004 77% /

    [root@cooks root]# df -h /
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 18G 13G 3.9G 77% /


    So the above total should read 17.7GB, not MB and the free space should show almost 4GB, not 4.61MB, the used should be 13GB not 13MB. What do I need to change to get these to display the correct values? Available disk space seems to be off no matter about the MB/GB issue as well.

    /Chris
Working...