Notes to Self

Alex Sokolsky's Notes on Computers and Programming

Useful Linux Commands

Processes

Use ps (man page) to show the top 10 CPU consumers:

ps -eo pcpu,pid,user,args|sort -k 1 -nr|head -10

Process Command Line

Given pid, show the process’ command line:

cat /proc/_pid_/cmdline|xargs -0