Here are a number of example commands to check various points of a Linux system, disk, swap, memory, CPU, network and other system information. This covers basic hardware and core system commands. This is considered fundamental knowledge for any Linux System Administrator
CPU Information
This is all contained in /proc/cpuinfo
which can be viewed with
cat /proc/cpuinfo
- Check Number of Cores
egrep '^processor' /proc/cpuinfo
- Check Processor for 64bit
grep ' lm ' /proc/cpuinfo
- Check for Virtualization
egrep '^flags.*(vmx|svm)' /proc/cpuinfo
Memory Information
- Kernel Memory Details
cat /proc/meminfo
- System Memory Details
free -m
- Swap Information
cat /proc/swaps
Also /etc/fstab
Disk Information
- Disks List
- Use one of the following
ls /sys/block ld /dev/sd* dmesg |grep disk
- Mounted Disk Space / Size
- Most commonly using
df -h
.df -h Filesystem Size Used Avail Use% Mounted on rootfs 145G 109G 29G 79% / /dev/root 145G 109G 29G 79% / devtmpfs 2.0G 240K 2.0G 1% /dev rc-svcdir 1.0M 92K 932K 9% /lib64/rc/init.d shm 2.0G 3.7M 2.0G 1% /dev/shm tmpfs 2.0G 0 2.0G 0% /lib64/firmware c:raid 917G 725G 146G 84% /mnt/raid
Kernel Information
uname -a find /boot/ cat /boot/syslinux.cfg cat /boot/grub/menu.lst lsmod
Network Information
Devices have names like eth0, wlan0, ath0, br0
ifconfig route traceroute ping dig host brctl tunctl netstat -tanpu cat /etc/resolv.conf cat /etc/conf.d/net cat /etc/conf.d/hostname cat /etc/hostname cat /etc/network/*