cancel
Showing results for 
Search instead for 
Did you mean: 

Useful Commands....

 
SOLVED
Go to solution
Scott McDade
Frequent Advisor

Useful Commands....

I am new to HPUX 11i and I am doing some porting of a C based application from Win32 to HPUX and I am looking for some commands that help me monitor the applications usage and efficiency. I am looking for the proper commands that allow me to -

Monitor # of files open
Monitor # of pipes open
Monitor Process statistics (ie Proc usage, memory usage).
Keep it Simple!~
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: Useful Commands....

Hi Scott:

For monitoring open files, use 'fuser' (part of the core Unix command set, or download and install 'lsof':

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.77/

For monitoring process statistics, use 'glance' if it is installed on your server. You can also use 'ps'. Arm the UNIX95 option and you can create your own list of data to be returned. For instance, to sort processes' memory use in descending amounts:

# UNIX95= ps -e -o vsz -o pid -o args |sort -k1nr | more

Note that a space (blank) follows the equal sign after 'UNIX95'. This sets the variable *only* for the duration of the command line.

See the manpages for 'fuser' and 'ps' for more information. Manpages also come with 'lsof' if you install it.

Lastly, you can find up-to-date, complete manpages along with other documentation here:

http://www.docs.hp.com/

Regards!

...JRF...
Michael Steele_2
Honored Contributor

Re: Useful Commands....



lsof # open files / pipes(?) (sockets)?
lsof -p pid (processes
lsof -u uid (user
lsof /dir
lsof -c daemon
lsof -i tcp:23 (socket
lsof -i udp:123 (socket

lsof download link: http://gatekeep.cs.utah.edu/

sar -u 5 5 (*cpu
vmstat 5 5 (* virtual mem
sar -b 5 5 (* cache
sar -d 5 5 (* disk
swapinfo -tam (* swap
UNIX95= ps -e -o ruser,pid
kmeminfo
Support Fatherhood - Stop Family Law