- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: find out the high process
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
Discussions
Discussions
Forums
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
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
тАО04-06-2010 08:10 AM
тАО04-06-2010 08:10 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2010 08:19 AM
тАО04-06-2010 08:19 AM
Re: find out the high process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2010 08:26 AM
тАО04-06-2010 08:26 AM
Re: find out the high process
Use 'ps' and sort:
# UNIX95= ps -e -ovsz= -opid= -ocomm=|sort -knr1,1
There is nothing but whitespace after the 'UNIX95=' and before the 'ps'. This keeps UNIX95 behavior set only for the commandline. To do otherwise may lead to different behavior than you want. The '-o' option selects the fields to display and the trailing '=' suppresses the field headers. The sort orders the process list in descending virtual memory size.
For the CPU usage, I assume that you mean the cumulative execution time as returned by 'ps':
# UNIX95= ps -e -otime= -opid= -ocomm= | sort -kr1,1
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2010 08:41 AM
тАО04-06-2010 08:41 AM
Re: find out the high process
I used the above commands, but i am not ablt differentiate between the CPU usage and memory usage;
below is the pasted O/P :
UNIX95= ps -e -otime= -opid= -ocomm= | sort -kr1,1
6-11:57:33 263 syncer
302-01:32:36 457 sar
276-15:49:27 27578 userProfileLogin
265-11:53:37 18228 sar
2-19:27:01 903 awk
2-10:17:33 6892 focusVM
2-04:40:16 535 snmpdm
2-02:55:51 3 statdaemon
2-00:42:15 77 netisr
14-15:15:32 427 ypserv
12-14:27:33 76 netisr
1-17:11:17 7 ttisr
====================================================================
UNIX95= ps -e -ovsz= -opid= -ocomm=|sort -knr1,1
11896 5982 queryEvents
6508 606 rpcd
4256 8573 confOmReport
4244 299 swagentd
4240 26961 perl
2880 27578 userProfileLogin
2400 6892 focusVM
1924 26979 top
1916 26949 top
Pls help me out on this..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2010 08:46 AM
тАО04-06-2010 08:46 AM
Solution> I used the above commands, but i am not ablt differentiate between the CPU usage and memory usage;
I don't understand what you are missing. If you drop the '-o' parts of the 'ps' arguments you have 'time, 'pid' and 'comm' for the CPU utilization run and 'vsz', 'pid' and 'comm' for the memory report.
Consult the 'ps' manpages for the meaning of these fields.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2010 10:00 AM
тАО04-06-2010 10:00 AM
Re: find out the high process
Try this out: same thing with ps :
Yes it is possible to find out.
#To see top 20 processes consuming cpu resource and memory:
# UNIX95=1 ps -e -o pcpu,pid,ppid,args | sort -rn | head -20 # In terms of CPU.
# UNIX95=1 ps -e -o vsz,pid,ppid,args | sort -rn | head -20 # In terms of Memory.
# UNIX95=1 ps -e -o pcpu,pid,ppid,user,args | sort -rn | head -20 # Top CPU Usage + user details.
#---------------------------------------------
Cheers,Have fun!.
Raj,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2010 05:00 PM
тАО04-06-2010 05:00 PM
Re: find out the high process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2010 11:53 AM
тАО05-12-2010 11:53 AM
Re: find out the high process
I have two Doubt
1)I used the below command for find out the high process (24889).
In UNIX95 command it showing 20.53 but in TOP 45.84% showing for same PID 24889
is there any differences on that.
UNIX95=1 ps -e -o pcpu,pid,ppid,user,args | sort -rn | head -20
20.53 24889 24880 oracle oracleagentdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
10.46 9312 1 oracle /u01/app/oracle/product/9.2/bin/tnslsnr LISTENER -inherit
5.21 6162 1 oracle oracleagentdb (LOCAL=NO)
1.27 4671 4670 root /opt/ignite/bin/print_manifest
==================================
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
1 ? 24889 aspire 233 22 2440M 34168K run 5:30 45.92 45.84 oracleagentdb
2 ? 9312 oracle 154 20 1610M 1591M sleep 37167:15 10.60 10.58 tnslsnr
4 ? 15246 oracle 154 20 2407M 4100K sleep 0:00 24.37 3.39 oracleagentdb
5 ? 43 root 152 20 7456K 7456K run 12346:24 1.64 1.63 vxfsd
1 ? 15050 aspire 149 22 32K 32K zomb 0:00 1.19 0.73 ssh
2 ? 7881 root 127 20 48180K 16604K sleep 2683:45 0.66 0.66 scopeux
3 ? 7795 root -16 20 40572K 18808K run 22759:32 0.61 0.61 midaemon
===================================================================
2).For the memory usage is used the below command, but the thing is what is 1592700and 9312 in the first and second column
$ UNIX95=1 ps -e -o vsz,pid,ppid,user,args | sort -rn | head -20
1592700 9312 1 oracle /u01/app/oracle/product/9.2/bin/tnslsnr LISTENER -inherit
906540 21807 1 root /opt/tivoli/tsm/client/ba/bin/dsmc sched
531048 7544 1 root /usr/sbin/snmpdm
476800 8014 1 root /opt/VRTSsal/bin/vxsald
121152 16861 1 oracle ora_dbw0_dm2c2hdb
119872 16879 1 oracle ora_mmon_dm2c2hdb
119360 16881 1 oracle ora_mmnl_dm2c2hdb
Can any body clarrify this one, Thanks in advance!!!!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2010 11:35 PM
тАО05-12-2010 11:35 PM
Re: find out the high process
UNIX95= ps -eo user,pid,pcpu,comm | sort -nrbk3 | head -5
For Memory
UNIX95= ps -eo user,pid,vsz,comm | sort -nrbk3 | head -5