System information

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 =


 * cat /var/log/messages -- is the same as dmesg
 * dmesg -- kernel messages given during booting.
 * kinfocenter -- good overview
 * tail -f /var/log/messages -- show the last couple of lines and keep outputting new lines
 * uname -a -- brief OS and kernel information.

= Memory Diagnostic Tools/Utilities =


 * cat /proc/meminfo -- static information about your RAM
 * ksysguard -- real-time RAM and CPU utilization printout and process table
 * top</tt> -- real-time RAM and CPU utilization printout
 * free</tt> -- current memory/swap utilization.

= CPU Diagnostic Tools/Utilities =
 * hwinfo --cpu</tt> -- static information about your CPU

= Disk and File System Diagnostic Tools/Utilities =


 * cat /etc/fstab</tt> -- show configuration file for file system mounting.
 * df -h</tt> -- current disk space usage ("-h" gives human-readable output)
 * du -h</tt> -- 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)
 * fdisk -l [/dev/hda]</tt> -- show partition table(s), leave off device name to list all
 * mount</tt> or cat /etc/mtab</tt> -- show currently mounted file systems.

= Local Devices Diagnostic Tools/Utilities =


 * dmidecode</tt> -- get all bios information, e.g. computer type.
 * hwinfo --pci</tt> -- list devices on the pci bus.
 * hwinfo --scsi</tt> -- list all scsi devices.
 * hwinfo --usb</tt> -- list all usb devices.
 * lsdev</tt> -- list all installed hardware.
 * lspci</tt> -- list devices on the pci bus.
 * lsscsi</tt> -- list all scsi devices.
 * <tt>lsusb</tt> -- list all usb devices.
 * <tt>setserial -bg /dev/ttyS[0-9]*</tt> -- list all active serial devices(/dev/ttyS*).

= Kernel and Kernel Module Diagnostic Tools/Utilities =


 * <tt>lsmod</tt> -- list kernel modules currently loaded.

= Network Diagnostic Tools/Utilities =


 * <tt>Directory /proc/net/</tt>
 * 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.
 * <tt>Directory /proc/sys/net/ipv4/</tt>
 * 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.
 * <tt>ethtool $interface</tt> -- show the card's speed, capabilities and if a link is detected
 * <tt>hwinfo --netcard</tt> -- show the module name, driver activation command, network card name etc.
 * <tt>ifconfig -a</tt> -- show all current network interface information
 * <tt>ifconfig $interface</tt> -- show the information for $interface (usually something like <tt>ifconfig eth0</tt>)
 * <tt>ping $host</tt> -- 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"
 * <tt>route -n</tt> -- show routing table, using numerical addresses.

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?
 * xosview -- CPU, network load etc. to get an overview
 * ksysguard -- CPU, network load etc. comprehensively
 * vmstat -- CPU load, swapping and I/O
 * top -- top CPU consuming processes
 * lm-sensors -- read CPU temperature etc.
 * ethereal -- a network sniffer
 * iptraf -- show network packets by size, interface etc.
 * netstAt -- show established and listening network connections
 * iostAt -- show count of read blocks in a given time etc.
 * blktRace -- sniff scsi commands etc.

= X-Windows Troubleshooting Tools/Utilities =


 * <tt>cat /var/log/XFree86.0.log</tt> -- print out the XFree86 error log.
 * Note that some systems do not store this log in /var/log. Use either <tt>locate XFree86.0.log</tt> or <tt> find / -name XFree86.0.log</tt> to find it.
 * <tt>glxinfo</tt> -- show the status of your OpenGL subsystem.