Friday, November 4, 2016

Listing LWPs sorted by CPU usage on Linux

Here's a quick an simple way of showint the top CPU consumers on Linux:
# while true; do
        sleep 1;
        ps -Leo pcpu,pid,lwp,user,args --no-headers| sort -t. -nk1,2 -k4,4 -r  | head; echo "";
done

No comments:

Post a Comment