- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Getting current utilization value of tunable k...
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
01-12-2006 06:56 AM
01-12-2006 06:56 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 07:05 AM
01-12-2006 07:05 AM
Re: Getting current utilization value of tunable kernel parameters
For example:
Tunable vxfs_bc_bufhwm
Description VxFS metadata buffer cache high water mark
Module vxfs
Current Value 0 [Default]
Value at Next Boot 0 [Default]
Value at Last Boot 0
Default Value 0
Constraints vxfs_bc_bufhwm == 0 or vxfs_bc_bufhwm >= 6144
Can Change At Next Boot Only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 07:24 AM
01-12-2006 07:24 AM
Re: Getting current utilization value of tunable kernel parameters
11.23 you can use kcusage to see the current values and probably could parse out the information you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 07:25 AM
01-12-2006 07:25 AM
Re: Getting current utilization value of tunable kernel parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 07:28 AM
01-12-2006 07:28 AM
Re: Getting current utilization value of tunable kernel parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 07:32 AM
01-12-2006 07:32 AM
Re: Getting current utilization value of tunable kernel parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 07:39 AM
01-12-2006 07:39 AM
Re: Getting current utilization value of tunable kernel parameters
you can use adb to get some of this information
# adb64 -k /stand/vmunix /dev/kmem
$> /tmp/something
$e
$q
#
# grep nfile /tmp/something
- Sundar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 08:40 AM
01-12-2006 08:40 AM
Re: Getting current utilization value of tunable kernel parameters
I tried the "adb64" command as you gave it and searched the output file. For nfile and nflocks, the values given were the same as the max parameter (in hex), not the current usage value. This file doesn't appear to have actual usage towards the max values.
------------
Clay,
I would need a quick primer on how to use glance in "advisor_only" mode, but doesn't this just report on actual metrics recorded by measureware? The only related metrics in MW are those beginning with "TBL_" and there are only 8 of these for HPUX, the same ones reported by "glance -t".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 09:26 AM
01-12-2006 09:26 AM
Re: Getting current utilization value of tunable kernel parameters
For nfile, you want pstat_getdynamic(). psd_activefiles is the field within there which is the current number of active file table entries (which is what nfile bounds). Similarly, nproc's usage is reflected in psd_activeprocs, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 09:44 AM
01-12-2006 09:44 AM
Re: Getting current utilization value of tunable kernel parameters
I checked the adb log file and there were no such variables (xxx.psd_activefiles, etc) in there. We don't have any of the special API's installed, so perhaps we are barking up the wrong tree using this approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 10:09 AM
01-12-2006 10:09 AM
SolutionTrust me, you have pstat(). Read pstat(2) for more details.
Here's an example (ignore the horrid formatting -- I'm not going to figure out how to get this web interface to tab nicely... :) ):
# cat nfile_usage.c
#include
#include
#include
#include
int
main(int argc, char **argv)
{
struct pst_dynamic psd;
int rv;
rv = pstat_getdynamic(&psd, sizeof(struct pst_dynamic), 1, 0);
if ( rv > 0 ) {
printf("Number of files in use: %ld.\n",
psd.psd_activefiles);
} else {
printf("pstat_getdynamic failure: %d.\n", rv);
}
exit(0);
}
Compiled with:
# cc +DD64 -D_PSTAT64 -o nfile_usage nfile_usage.c
# ./nfile_usage
Number of files in use: 307.
Not every kernel tunable usage can be easily determined -- a list of the ones you want would be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2006 03:46 AM
01-13-2006 03:46 AM
Re: Getting current utilization value of tunable kernel parameters
GREAT! It works (needed to tweek code since we must have a gnu C compiler rather than an ANSI compiler).
Our Progress DBA wanted to know high water usage values for the following kernel parameters in addition to those reported in glance/MW:
shmseg, shmmax, semmsl, semmns, semmnu, msgmap, msgmax, msgmnb, msgmni, msgseg, msgssz, msgtql.
Thanks - Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2006 03:51 AM
01-13-2006 03:51 AM
Re: Getting current utilization value of tunable kernel parameters
That was a pretty elegant solution.
Throw the guy bone - assign points.
It's the right thing to do.
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 06:40 AM
06-27-2006 06:40 AM
Re: Getting current utilization value of tunable kernel parameters
This looks like a very useful script, unfortunately, I am not able to compile it.
Apparantly, my compile does not like the following line:
main(int argc, char **argv)
Is there no other way to get this info?
I am not sure which compiler we are using (I'm pretty new to this).
Any help would be appreciated.
Raymond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 03:27 AM
07-06-2006 03:27 AM
Re: Getting current utilization value of tunable kernel parameters
int
main ( argc, argv )
int argc;
char **argv;
(The code before and after are the same)
Unfortunately, most of the kernel highwater values are not available under HPUX 11.11. I found this out when I called HP. They said that more of these are available under 11.23
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 04:52 AM
07-06-2006 04:52 AM
Re: Getting current utilization value of tunable kernel parameters
shmseg, shmmax, semmsl, semmns, semmnu, msgmap, msgmax, msgmnb, msgmni, msgseg, msgssz, msgtql
Many of these parameters are limits or fences so they are not 'consumed' like nfile or nproc. Therefore, there is no concept of a highwater mark. If a program asks for a shared memory segment that is less than shmmax, then the program works. If it asks for more than the limit, the call fails. The best solution is to use ipcs (with lots of options) to monitor IPC metrics.
Bill Hassell, sysadmin