Linux system status commands

These are some of my favorite commands for understanding what’s going on inside of a Debian Linux client/server.

Random list of commands

top
htop

ps -A
ps -A –sort -rss -o comm,pcpu,pmem | head -n 11
ps -a -x -u

vmstat -S M
vmstat -S m

free -g
free -m

df -h

sudo du -hs /*

cat /proc/cpuinfo
cat /proc/cpuinfo |grep Intel
cat /proc/meminfo
cat /proc/meminfo |grep Swap

dmesg |more
dmesg > dmesg.txt
dmesg | grep mysql

lspci

lshw
lshw > lshw.txt

cd /var ; du -B m | sort -n | tail
cd /usr ; du -B m | sort -n | tail
cd /home ; du -B m | sort -n | tail

sudo apt-get install sysstat
iostat
iostat -x 2
iostat 10 5
iostat 1 5
iostat 5 20
iostat –d –x 5
iostat 5 20
iostat -m /dev/xvda
iostat -m /dev/xvda 5

sudo apt-get install dstat
dstat

sudo apt-get install iotop
sudo iotop -aoP

sudo apt-get install apachetop
sudo apachetop

Advertisements