I am trying to capture process name which are using high memory on my box. I ran below command to get that
while [ 1 ] do ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head sleep 5 done
But the issue it is not giving me the full cmd details which is running against the PID. Output I am getting is like this :
PID PPID CMD %MEM %CPU 916 915 /usr/bin/perl /release/data/ 11.9 0.2 831 830 /usr/bin/perl -w /release/da 6.5 0.0 608 607 /etc/alternatives/java_sdk_ 2.4 1.2 135 134 /etc/alternatives/java_sdk_ 1.4 1.6
I want to capture the full cmd of the PID.