- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Monitoring nfiles
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
07-03-2006 06:33 AM
07-03-2006 06:33 AM
- Linux
- HP-UX
- Solaris
- AIX
We are running out of nfiles and we must monitor how much we are using at a specific time and how much we have available.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2006 06:50 AM
07-03-2006 06:50 AM
Re: Monitoring nfiles
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2006 07:03 AM
07-03-2006 07:03 AM
Re: Monitoring nfiles
------------------
if `uname -s`=SunOS
then
total=nfiles_total_sun()
used=nfiles_used_sun()
elif `uname -s`=linux
etc etc etc
----------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2006 07:08 AM
07-03-2006 07:08 AM
Re: Monitoring nfiles
You can run glance output to a file and then grep for the information you want.
There may be one script in my monitor set that does the job. Even if not, it will show you how to collect data and parse it.
http://www.hpux.ws/system.perf.sh
Please be patient with the performance of this site. We've had some pretty greivous hardware/networking issues over the past few months and are just coming back online with brand new Internet and routers.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2006 06:17 PM
07-03-2006 06:17 PM
Solutionif you have a Glance license (are there still 60 days trial versions available?) then you can get those kernel stats through Glance's adviser interface.
There's no need to run glance interactively.
Simply create a so called adviser syntax file where you would specify the metrics you are interested in
(you find a full list of available metrics including short descriptions in
/opt/perf/paperdocs/gp/C/metrics.txt
Actually, while you run glance interactively you can scan its online help (press h), go to adviser section.
There you'll find a short intro into syntax etc.
For instance if I were after available, used, and percentage usage of the system tables' nfile I could do such
(n.b. 2 iterations is the minimum, you could average in your script or discard the all except the last record)
$ echo "print tbl_file_table_avail,tbl_file_table_used,tbl_file_table_util" >/tmp/nfile.adv
$ glance -syntax /tmp/nfile.adv -j 5 -iterations 2 -adviser_only glance 2>/dev/null
248138 2925 1.2
248138 2925 1.2
As for Solaris it has a wonderful Kstat interface which unlike HP's glance you get access to for free.
But the selection of metrics is bewildering and there seems little documentation about them available.
Probably you get a reference on Solaris systems programming or look up the header files to get a grasp at?
For instance on one of our Solaris boxes I get more than 10000 metrics from kstat.
$ uname -sirmv; kstat -pl|wc -l
SunOS 5.8 Generic_108528-27 sun4us FJSV,GPUZC-M
12752
Once you have identified the metric you are interested you can narrow kstat's output by many flags you supply (see man kstat).
It can also handle regex kind of globs.
On the other hand you could get the tables from sar on both systems.
As for Linux access to kstats is very easy through the procfs.
On one of our RHEL boxes I would get the nfile stats like
$ cat /proc/sys/fs/file-nr
1110 0 206104
See "man proc" for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2006 01:30 AM
07-04-2006 01:30 AM
Re: Monitoring nfiles
sar -v 1
will give you the current and maximum values. If you want just the current and maximum values, use this:
sar -v 1|tail -1|awk '{print $8}'
Note that the nfile parameter should be doubled whenever it gets close to being full. nfile will always be too small for a large server that is growing is usage. Setting nfile to 50 or 100 thousand (or one million) is not a problem for HP-UX. Note that setting nfile tgo a massively lrge value will waste RAM space. Just keep the maximum value under about 70-75% full.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2006 02:23 PM
07-05-2006 02:23 PM