From LQWiki
There are several ways to gather system information. It is a good idea to keep abreast of your machine's utilization and capacities.
General System Information Tools/Utilities
- uname -a -- brief OS and kernel information.
- dmesg -- kernel messages given during booting.
- cat /var/log/messages -- is the same as dmesg
- tail -f /var/log/messages -- show the last couple of lines and keep outputting new lines
- kinfocenter -- good overview
Memory Diagnostic Tools/Utilities
- cat /proc/meminfo -- static information about your RAM
- ksysguard -- real-time RAM and CPU utilization printout and process table
- top -- real-time RAM and CPU utilization printout
- free -- current memory/swap utilization.
CPU Diagnostic Tools/Utilities
- cat /proc/cpuinfo -- static information about your CPU
- hwinfo --cpu -- static information about your CPU
Disk and File System Diagnostic Tools/Utilities
- df -h -- current disk space usage ("-h" gives human-readable output)
- du -h -- determine how much disk space is being used by Cwd, or any directory you specify after the du command (as in df, the "-h" means human-readable)
- mount or cat /etc/mtab -- show currently mounted file systems.
- cat /etc/fstab -- show configuration file for file system mounting.
- fdisk -l [/dev/hda] -- show partition table(s), leave off device name to list all
Local Devices Diagnostic Tools/Utilities
- lspci -- list devices on the pci bus.
- hwinfo --pci -- list devices on the pci bus.
- lsusb -- list all usb devices.
- hwinfo --usb -- list all usb devices.
- lsscsi -- list all scsi devices.
- hwinfo --scsi -- list all scsi devices.
- lsdev -- list all installed hardware.
- setserial -bg /dev/ttyS[0-9]* -- list all active serial devices(/dev/ttyS*).
- dmidecode -- get all bios information, e.g. computer type.
Kernel and Kernel Module Diagnostic Tools/Utilities
- lsmod -- list kernel modules currently loaded.
Network Diagnostic Tools/Utilities
- route -n -- show routing table, using numerical addresses.
- ifconfig $interface -- show the information for $interface (usually something like ifconfig eth0)
- ifconfig -a -- show all current network interface information
- ping $host -- use ping to determine if $host is alive on the network (for troubleshooting your local machine $host can equal "127.0.0.1" or "localhost"
- hwinfo --netcard -- show the module name, driver activation command, network card name etc.
- ethtool $interface -- show the card's speed, capabilities and if a link is detected
- Directory /proc/net/
- File arp: arp cache. Maps IP address to MAC address
- File dev: byte and packet statistics on a per device basis.
- File netstat: various statistics
- File tcp: established connections.
- Directory /proc/sys/net/ipv4/
- File: ip_forward: read/write. Whether or not the kernal will forward IP packets from one interface to another. This is turned on if you want the machine to work as a router or a firewall.
If you want to set up a proxy firewall, this should be off, as it will be the application that forwards traffic, not the kernel.
- File: ip_local_port_range: read/write. The range of ports that are used as source ports for outgoing connections.
- File: tcp_sack: read/write. Whether or not TCP connections use selective acknowledgement. One=yes, zero=no.
- File: tcp_timestamps: read/write. Whether or not TCP connections add timestamps to their connections. One=yes, zero=no.
Dynamic information
Or: What does my hardware do?
- lm-sensors -- read CPU temperature etc.
- top -- top CPU consuming processes
- ksysguard -- CPU, network load etc. comprehensively
- xosview -- CPU, network load etc. to get an overview
- vmstat -- CPU load, swapping and I/O
- ethereal -- a network sniffer
X-Windows Troubleshooting Tools/Utilities
- cat /var/log/XFree86.0.log -- print out the XFree86 error log.
- Note that some systems do not store this log in /var/log. Use either locate XFree86.0.log or find / -name XFree86.0.log to find it.
- glxinfo -- show the status of your OpenGL subsystem.

This page is available under a