- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- bdf and df -g output in HP-UX 11.23
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2012 04:17 PM - edited 11-30-2012 03:03 PM
11-29-2012 04:17 PM - edited 11-30-2012 03:03 PM
Hello folks,
Please take a look at the bdf and df -g output on the same filesystem below. The size of the filesystem is 1000GB, but if you see the "total blocks" output of dg -g. Insted of showing the total number of blocks, it is populating the size of the filesystem itself in KBs. my server monitoring SW uses df -g to query the filesystem sizes and it uses this field and treats it total number of blocks (as it should) and multiplies it by 8 ( 8 K blocks) and reports 8 time the actual size of the filesystem.
what could be the reason df -g is not reporting correctly? i know that df is depricated in HPUX. One thing to mention is that it is not happening for all the filesystems. it reports the correct size for a number of filesystem. one of them is root FS, output in below.
# bdf /new_archive6
Filesystem kbytes used avail %used Mounted on
/dev/vgARCHIVE/lvarchive6
1048576000 968833794 74758326 93% /new_archive6
# df -g /new_archive6
/new_archive6 (/dev/vgARCHIVE/lvarchive6) :
8192 file system block size 1024 fragment size
1048576000 total blocks 79742206 total free blocks
74758326 allocated free blocks 20243232 total i-nodes
19935551 total free i-nodes 19935551 allocated free i-nodes
1074003974 file system id vxfs file system type
0x10 flags 255 file system name length
It reports correct for root FS
# bdf /
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 430288 1653920 21% /
root@cmdb1 - [/root]
# df -g /
/ (/dev/vg00/lvol3 ) :
8192 file system block size 8192 fragment size
262144 total blocks 208358 total free blocks
206740 allocated free blocks 55648 total i-nodes
52077 total free i-nodes 52077 allocated free i-nodes
1073741827 file system id vxfs file system type
0x10 flags 255 file system name length
/ file system specific string
OS version 11.23
filsystem : vxfs 4.1 onlinejfs
what could be the reason?
Thanks in advance,
Regards/Ajay
Solved! Go to Solution.
- Tags:
- df
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2012 11:20 AM
12-02-2012 11:20 AM
Re: bdf and df -g output in HP-UX 11.23
"man df" says the option -g is "Report the entire structure described in statvfs(2)."
And "man 2 statvfs" says:
The statvfs structure contains the following members: fsblkcnt_t f_blocks; /* total blocks of f_frsize on file system */
fsblkcnt_t f_bfree; /* free blocks */ fsblkcnt_t f_bavail; /* blocks available to non-superusers or users without the LIMIT privilege */ fsfilcnt_t f_files; /* total file nodes in file system */ fsfilcnt_t f_ffree; /* free file nodes in file system */ fsfilcnt_t f_favail; /* file nodes available to non-superusers or users without the LIMIT privilege */ ulong f_bsize; /* preferred file system block size */ ulong f_frsize; /* fundamental file system block size */
[...
"f_frsize" looks suspiciously like "fragment size" to me.
And the description of f_blocks, "total blocks of f_frsize on file system", means you should multiply f_blocks with f_frsize to get the size in bytes.
If the implementation of "df -g" just dumps out the values of the statvfs structure without doing any arithmetic on them, it looks like you should be multiplying the "total blocks" value with the "fragment size", not with the "file system block size".
For your root filesystem, your monitoring software works by accident, since your root filesystem has "file system block size" equal to "fragment size".
According to the statvfs structure comments, f_bsize (= what is reported as "file system block size" by df -g) is actually preferred file system block size, and f_frsize (= "fragment size") is the fundamental file system block size.
- Tags:
- statvfs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2012 02:50 PM
12-05-2012 02:50 PM
SolutionThanks very much MK for explaining this to me. i didn't looked at the fragment size earlier. now i have to find a way how i can make it work so that "total blocks' do the math by multiplying it to "fragment size " and not the "file system block size".
I appreciate your time for looking into this.
Regards/Ajay