System Administration
Showing results for 
Search instead for 
Do you mean 

To find highly memory utilized processes

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
Highlighted
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!
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

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.
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!
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
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.

Outstanding Contributor 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
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!
Acclaimed Contributor 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...

Occasional Advisor

Re: To find highly memory utilized processes

AS Naj suggested i have tried by seting alias.

still i could'nt retrive the processes, any other method to retrive the high memory / swap utilized processes

uctvp628% nexec -e alias ps="UNIX95= /usr/bin/ps"
uctvp628% nexec -e ps -e -o "user,vsz,pid,ppid,args" | awk 'NR>1' | sort -rnk2 | head -10
ps: illegal option -- o
usage: ps [-edaxzflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup] [-Z psetidlist]
uctvp628%
Trusted Contributor Trusted Contributor

Re: To find highly memory utilized processes

try these.

 

ps auwx |sort –r +2 | head –x  (where x =5, 10, 15, etc..)   à         this is to see top CPU using processes
ps auwx |sort –r +3 | head –x (where x =5, 10, 15, etc..)    à         this is to see top Memory using processes


-------------------------------------------
Like it or worked !! Click kudos !!
Occasional Advisor

Re: To find highly memory utilized processes

 

Pls find the below outputs , still not able to retrieve

uctvp628% nexec -e ps auwx |sort -r +2 | head -5
 16363 pts/2     0:00 ps
   PID TTY       TIME COMMAND
uctvp628% nexec -e ps auwx |sort -r +2 | head -10
 16435 pts/2     0:00 ps
   PID TTY       TIME COMMAND
uctvp628% nexec -e ps auwx |sort -r +3 | head -15
 16663 pts/3     0:00 ps
   PID TTY       TIME COMMAND

Acclaimed Contributor Acclaimed Contributor

Re: To find highly memory utilized processes

>pls suggest any other method to get the highly memory utilized process. also to find the exact swap utilization and the process consuming swap.

 

First try using the provided ps(1) commands without this nexec.

 

swapinfo -tam will give you the big picture.

Exalted Contributor Exalted Contributor

Re: To find highly memory utilized processes

Shalom,

 

See this article.

 

http://www.hpux.ws/?p=8

 

Regards,

 

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Occasional Advisor

Re: To find highly memory utilized processes

i cannot execute command with out nexec -e , am not connecting the servers via putty , we have separate interface to connect servers .
Acclaimed Contributor Acclaimed Contributor

Re: To find highly memory utilized processes

>I cannot execute command without nexec -e

 

You can't logon at all just to try the experiment?

Exalted Contributor Exalted Contributor

Re: To find highly memory utilized processes

Shalom,

 

Are you logged in on console?

 

Doesn't matter whether you are using putty or not. We need to see command output to assist.

 

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Exalted Contributor Exalted Contributor

Re: To find highly memory utilized processes

Setting UNIX95 in the root command profile will cause among other bad things, checksums on patches to fail. You will not be able to create depots.  Only set UNIX95 when you need to set UNIX95

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Honored Contributor Honored Contributor

Re: To find highly memory utilized processes

[ Edited ]

another alternative to use glance OR full-path /opt/perf/bin/glance if you have, it is talented tool, also Steven 's mem.mon script is great.

but I suspect your connection issue what kind of connection you try ?