The following command
ps -eo pid,pcpu,args
will display the details as:
PID CPU Percentage the process command
Example for the following command:
$ ps -eo pid,pcpu,args | head -n 6
PID %CPU COMMAND
1 0.0 init
2 0.0 [migration/0]
3 0.0 [migration/1]
4 0.0 [migration/2]
5 0.0 [migration/3]
This will list for all the process and the output is redirected as input to head command.
From the head command the first six lines needs to be displayed.
Similarly the command:
ps -eo pid,pcpu,args | grep PROCESS_NAME
Display for all the process
the output will be redirected to grep command
Display the line containing the name(using grep command) "PROCESS_NAME", if that process (PROCESS_NAME) running.