Operating System - HP-UX
1840234 Members
2895 Online
110162 Solutions
New Discussion

Re: check ninode and nfile by command

 
Chen Yingjie
Frequent Advisor

check ninode and nfile by command

Can someone advise me how to check ninode and nfile by command? not the SAM.

Thank you.
13 REPLIES 13
federico_3
Honored Contributor

Re: check ninode and nfile by command

use :


sysdef | grep -e ninode -e nfile

federico
federico_3
Honored Contributor

Re: check ninode and nfile by command

You can use als":

echo "ninode/D"|adb -k /stand/vmunix /dev/kmem

echo "nfile/D"|adb -k /stand/vmunix /dev/kmem

regards,
federico
Carlos Fernandez Riera
Honored Contributor

Re: check ninode and nfile by command


with sar -v 5 5 you will see :
number inodes / configured inodes
number opened file / number of files
unsupported
Vladislav Demidov
Honored Contributor

Re: check ninode and nfile by command

Try to perform the next procedure:
1. Create a sar daily data directory
mkdir /var/adm/sa/sa`date +%d`
2. run the sar command
sar -v 1
refer to sar man page for additional information
CHRIS_ANORUO
Honored Contributor

Re: check ninode and nfile by command

Use sar -v 5 5 => This will show ninode as inod-sz (current size and set value) Same with nfile file-sz. You can also querry the running kernel with the adb command as foolows: echo "ninode/D"|adb -k /stand/vmunix /dev/kmem
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
James R. Ferguson
Acclaimed Contributor

Re: check ninode and nfile by command

Hi:

Glance's table option (toggled with 't') will show this.

...JRF...
Alan Riggs
Honored Contributor

Re: check ninode and nfile by command

I think that should be enough options for you (I use sar -v personally). Just a reminder: the ninode limit is a hard limit only for hfs filesystems. vxfs filesystems will dynamically allocate more inodes when needed.
Wodisch
Honored Contributor

Re: check ninode and nfile by command

Hello,
I do not agree with Alan, "ninode" has nothing to about how many inodes may
exist on a file system. It is just a cache (not a table, like "nfile") for used inodes.
Hence it is not possible to guess/check, if it is "full" - even if all "slots" in that
cache are used, usually some are just occupied by already closed inodes, making
access to them faster - if they are used again. Use the mentioned "sar" option to
test for overflows! And for the "nfile" - that is a table, "sar" is correct about it, but
if you are about to experience trouble you could "reserve" some entries in there
for super-user processes, by increasing the kernel parameter "file_pad".
HTH,
Wodisch
Wodisch
Honored Contributor

Re: check ninode and nfile by command

Hello,
I do not agree with Alan, "ninode" has nothing to about how many inodes may
exist on a file system. It is just a cache (not a table, like "nfile") for used inodes.
Hence it is not possible to guess/check, if it is "full" - even if all "slots" in that
cache are used, usually some are just occupied by already closed inodes, making
access to them faster - if they are used again. Use the mentioned "sar" option to
test for overflows! And for the "nfile" - that is a table, "sar" is correct about it, but
if you are about to experience trouble you could "reserve" some entries in there
for super-user processes, by increasing the kernel parameter "file_pad".
HTH,
Wodisch
Wodisch
Honored Contributor

Re: check ninode and nfile by command

Hello,
I do not agree with Alan, "ninode" has nothing to about how many inodes may
exist on a file system. It is just a cache (not a table, like "nfile") for used inodes.
Hence it is not possible to guess/check, if it is "full" - even if all "slots" in that
cache are used, usually some are just occupied by already closed inodes, making
access to them faster - if they are used again. Use the mentioned "sar" option to
test for overflows! And for the "nfile" - that is a table, "sar" is correct about it, but
if you are about to experience trouble you could "reserve" some entries in there
for super-user processes, by increasing the kernel parameter "file_pad".
HTH,
Wodisch
Wodisch
Honored Contributor

Re: check ninode and nfile by command

Hello,
I do not agree with Alan, "ninode" has nothing to about how many inodes may
exist on a file system. It is just a cache (not a table, like "nfile") for used inodes.
Hence it is not possible to guess/check, if it is "full" - even if all "slots" in that
cache are used, usually some are just occupied by already closed inodes, making
access to them faster - if they are used again. Use the mentioned "sar" option to
test for overflows! And for the "nfile" - that is a table, "sar" is correct about it, but
if you are about to experience trouble you could "reserve" some entries in there
for super-user processes, by increasing the kernel parameter "file_pad".
HTH,
Wodisch
Alan Riggs
Honored Contributor

Re: check ninode and nfile by command

Wodisch, I think you may have misinterpreted what I wrote. Perhaps I was not clear.

I was saying that the ninode results reported by sar are not a meaningful measure of any limit on a vxfs filesystem.
Alan Riggs
Honored Contributor

Re: check ninode and nfile by command

Wodisch, I think you may have misinterpreted what I wrote. Perhaps I was not clear.

I was saying that the ninode results reported by sar are not a meaningful measure of any limit on a vxfs filesystem.