Main Menu

Search

Linux: "ps" Command To Check Process Details Like Number Of Threads, State, Process Command, Start Time, Uptime, Arguments, CPU & Memory Usage (How To Doc)

Below ps command can be executed to get the details about process like number of threads, state, process command, start time, uptime, arguments, CPU & memory usage.
ps -eo pid,thcount,state,comm,lstart,etime,args,%cpu,%mem,cmd

Below is how to interpret each file.


thcount - thread count
state - process state
command - short description of process whether it is java, apache, httpd etc.
lstart - Exact date and time when the process started. Shown in Day Mon DD HH:MM:SS format
etime - Uptime of the process which is shows in Days, HH, MM and Seconds
etime - Startup arguments of the process.
%cpu - CPU utilized by the process.
%mem - Memory utilized by the process.
cmd - Complete command options of the process.

Below is sample output of java process using above ps command.
7413 215 S java  Tue Jul 30 09:55:46 2019 25-02:18:47 04:57:37 /usr/java/bin/  0.8  4.5 /usr/java/bin/java -Xms200M -Xmx8192M -server -XX:StringTableSize=27001 -XX:PermSize=128m -XX:MaxPermSize=384m -Xss256k -XX:+UseParallelOldGC -XX:SoftRefLRUPolicyMSPerMB=10000 


Products to which Article Applies


All UNIX environments

Additional References



No comments:

Post a Comment