How to find Top CPU% or Memory% consumer PIDs in Linux system?
Ans:
[oracle@example01]$ ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem |head
PID PPID CMD %MEM %CPU
1 0 /sbin/init 0.0 0.7
2 0 [kthreadd] 0.0 0.0
3 2 [migration/0] 0.0 0.0
4 2 [ksoftirqd/0] 0.0 0.0
5 2 [migration/0] 0.0 0.0
6 2 [watchdog/0] 0.0 0.0
7 2 [migration/1] 0.0 0.0
8 2 [migration/1] 0.0 0.0
9 2 [ksoftirqd/1] 0.0 0.0
[oracle@example01]$ ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu |head
PID PPID CMD %MEM %CPU
45297 44930 oraclesdmprd3 (DESCRIPTION= 0.0 260
5668 1 /u01/app/12.1.0.2/grid/bin/ 0.0 22.6
121288 1 /u01/app/12.1.0.2/grid/bin/ 0.0 19.5
42679 1 /u01/app/12.1.0.2/grid/jdk/ 0.1 11.5
33439 104190 /u01/app/oracle/product/12c 0.1 9.4
107668 1 /u01/app/12.1.0.2/grid/bin/ 0.8 8.9
110681 1 oraclestrlmval3 (LOCAL=NO) 0.0 6.4
105402 1 /u01/app/12.1.0.2/grid/bin/ 0.0 2.9
67776 1 oraclecimprd3 (LOCAL=NO) 0.1 2.7
[oracle@example ~]$
Ans:
[oracle@example01]$ ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem |head
PID PPID CMD %MEM %CPU
1 0 /sbin/init 0.0 0.7
2 0 [kthreadd] 0.0 0.0
3 2 [migration/0] 0.0 0.0
4 2 [ksoftirqd/0] 0.0 0.0
5 2 [migration/0] 0.0 0.0
6 2 [watchdog/0] 0.0 0.0
7 2 [migration/1] 0.0 0.0
8 2 [migration/1] 0.0 0.0
9 2 [ksoftirqd/1] 0.0 0.0
[oracle@example01]$ ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu |head
PID PPID CMD %MEM %CPU
45297 44930 oraclesdmprd3 (DESCRIPTION= 0.0 260
5668 1 /u01/app/12.1.0.2/grid/bin/ 0.0 22.6
121288 1 /u01/app/12.1.0.2/grid/bin/ 0.0 19.5
42679 1 /u01/app/12.1.0.2/grid/jdk/ 0.1 11.5
33439 104190 /u01/app/oracle/product/12c 0.1 9.4
107668 1 /u01/app/12.1.0.2/grid/bin/ 0.8 8.9
110681 1 oraclestrlmval3 (LOCAL=NO) 0.0 6.4
105402 1 /u01/app/12.1.0.2/grid/bin/ 0.0 2.9
67776 1 oraclecimprd3 (LOCAL=NO) 0.1 2.7
[oracle@example ~]$
No comments:
Post a Comment