Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
All commands need to be executed only with support ID, except few commands under supervision of any
senior
CPU / Process
top -n1
mpstat
mpstat -P ALL
sar 1 3
sar -u 2 5
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -5 //To top 5 process
ps -eo pcpu,pid,user,args | sort -r -k1 | less
ps -auxf | sort -nr -k 3 | head -10 //Find Out top 10 CPU Consuming Process
ps -axuwww |sort -n +2 |tail -20
iostat
vmstat 1 5
top -n1
uptime
iostat //Average CPU Load, Disk Activity
Informati/status
Disk Related
df h
du sh * /home //To details
du -ah | sort -n
du -shk * | sort -rn
du -sh dir1
df -h -T
du -ah | sort n
du -H --max-depth=1 /var | sort -n r //To sort directory by size of contents (Ex: /var)
Memory Related
Swap Related
cat /proc/swaps
swapoff /dev/sda3 //Ex: to disable swap
swapon /dev/sda3 //Ex: to enable swap
swapon/swapoff commands will be executed with root ID only and under supervision of seniors
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ps aux | head -1; ps aux | sort -rn +2 | head -10 Displaying top CPU_consuming processes:
ps aux | head -1; ps aux | sort -rn +3 | head Displaying top 10 memory-consuming processes:
ps -eakl | head -1; ps -eakl | sort -rn +5 Displaying process in order of being penalized:
ps -eakl | sort -n +6 | head Displaying process in order of priority:
ps -eakl | sort -n +7 Displaying process in order of nice value
ps vx | head -1;ps vx | grep -v PID | sort -rn +3 | head -10 //Displaying the process in order of time
ps vx | head -1; ps vx | grep -v PID | sort -rn +6 | head -10 //Displaying the process in order of real
memory use
ps vx | head -1; ps vx | grep -v PID | sort -rn +4 | head -10 //Displaying the process in order of I/O
ps -a -o pid, user, class, pcpu, pmem, args //Displaying WLM classes
ps vg | head -1; ps vg | grep -w wait //Determinimg process ID of wait processes:
ps -mo THREAD -p <PID> //Wait process bound to CPU