Operating System - HP-UX
1748201 Members
3140 Online
108759 Solutions
New Discussion юеВ

Re: To find highly memory utilized processes

 
Memory
Occasional Advisor

To find highly memory utilized processes

MY swap utilization is very high ., i just need to find the top memory utilization processes.

am using below command to retrieve , but due to shell problm am getting error UNIX95 not found , pls suggest.

 

 

my command : UNIX95=1 ps -eo pid,ppid,vsz,args | sort -nr | head -10

 

also can anyone help me to find high swap utilized processes, its an HPUX 11.31 OS.

19 REPLIES 19
Naj
Valued Contributor

Re: To find highly memory utilized processes

Hi

Try below

UNIX95= ps -eo sz,comm,args | sed 1d | sort -rn | awk '{size=$1/1024; printf("%dMb %s\n", size,$2);}'

or

UNIX95= ps -eo vsz,comm,args | sed 1d | sort -rn | more

Thanks

BR
Naj

____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
Memory
Occasional Advisor

Re: To find highly memory utilized processes

Hello Naj , Thanks for you reply..



still am getting the error : UNIX95= not uctvp628%

nexec -e UNIX95= ps -eo vsz,comm,args | sed 1d | sort -rn | more

/sbin/sh: UNIX95=: not found. uctvp628%



uctvp628% nexec -e UNIX95= ps -eo sz,comm,args | sed 1d | sort -rn | awk '{size=$1/1024; printf("%dMb %s\n", size,$2);}'

/sbin/sh: UNIX95=: not found.



am not connecting via putty, we have separate tool to connect the servers with out giving any username / password. suspect the issue is with some terminal issue , pls suggest

Memory
Occasional Advisor

Re: To find highly memory utilized processes

or pls suugest any other method to get the highly memory utilizewd process . also to find the exact swap utilization and the process consuming swap.
Naj
Valued Contributor

Re: To find highly memory utilized processes

Hi

#machinfo
Send me output

Thanks

____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
Memory
Occasional Advisor

Re: To find highly memory utilized processes

uctvp628% nexec -e machinfo
CPU info:
4 Intel(R) Itanium 2 9000 series processors (1.6 GHz, 12 MB)
533 MT/s bus, CPU version C2
6 logical processors

Memory: 51150 MB (49.95 GB)

Firmware info:
Firmware revision: 9.48
FP SWA driver revision: 1.18
IPMI is supported on this system.
Invalid combination of manageability firmware has been installed on this system.
Unable to provide accurate version information about manageability firmware

Platform info:
Model: "ia64 hp superdome server SD64B"
Machine ID number: e1e5bca6-6c59-11dc-aaee-556ef2dbb276
Machine serial number: USE473436M

OS info:
Nodename: uctvp628
Release: HP-UX B.11.31
Version: U (unlimited-user license)
Machine: ia64
ID Number: 3789929638
vmunix _release_version:
@(#) $Revision: vmunix: B.11.31_LR FLAVOR=perf
Arunabha Banerjee
Valued Contributor

Re: To find highly memory utilized processes

Try this $ UNIX95= ps -e -o "user,vsz,pid,ppid,args" | awk 'NR>1' | sort -rnk2 | head -10

 

Or if you can check top output also.

AB
Pete Randall
Outstanding Contributor

Re: To find highly memory utilized processes

When using the UNIX95 syntax, it is important to remember that there is a space between the equal sign (=) and the ps command.  I think that may be why you were getting errors when you tried the command Naj gave you.


Pete
Naj
Valued Contributor

Re: To find highly memory utilized processes

Hi,

 

Sorry being late to reply,

 

I'd tested all the command above and was working fine from my end.

I do not sure what exactly problem that you have facing but you can try execute below command

 

alias ps="UNIX95= /usr/bin/ps"

 

Now, all your ps commands will have the extra options available.

Next step is try execute ps command without UNIX95

 

root@twst2a / # ps -e -o "user,vsz,pid,ppid,args" | awk 'NR>1' | sort -rnk2 | head -10
root      503800 16579 15163 /opt/OV/lbin/perf/coda
root       48540 11899     1 /opt/wbem/lbin/cimprovagt 3 9 SFMProviderModule
root       33488 16073     1 /opt/perf/bin/midaemon
root       19384 16054     1 /opt/perf/bin/scopeux
root       18664 25255     1 /opt/omni/lbin/crs
root       16944 15907 12997 sort -n

Good luck!

 

Thanks

 

BR

Naj


____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
James R. Ferguson
Acclaimed Contributor

Re: To find highly memory utilized processes


@Naj wrote:
...

Next step is try execute ps command without UNIX95

 

root@twst2a / # ps -e -o "user,vsz,pid,ppid,args" | awk 'NR>1' | sort -rnk2 | head -10


That isn't going to work in HP-UX.  The '-o' argument applies only to XPG4 (UNIX95).  You have given it the appearance of working by setting the environmental variable in your alias.

 

Don't think, either, about setting UNIX95 in your login profile.  There may be side effects with other commands of which you are not aware and which will lead you into trouble.  Setting the variable locallly for the duration of the command line is what the variable declaration does when followed by whitespace and a command.  This is safe.

 

Regards!

 

...JRF...