Topic 101: System Architecture
101.1 Determine and configure hardware settings
- Weight: 2
- Description: Candidates should be able to determine and configure fundamental system hardware.
Key Knowledge Areas
- Enable and disable integrated peripherals.
- Configure systems with or without external peripherals such as keyboards.
- Differentiate between the various types of mass storage devices.
- Set the correct hardware ID for different devices, especially the boot device.
- Know the differences between coldplug and hotplug devices.
- Determine hardware resources for devices.
- Tools and utilities to list various hardware information (e.g. lsusb, lspci, etc.)
- Tools and utilities to manipulate USB devices
- Conceptual understanding of sysfs, udev, hald, dbus
Terms and Utilities
General System Information Tools/Utilities
- cat /var/log/messages — is the same as dmesg
- dmesg — kernel messages given during booting.
- tail -f /var/log/messages – shows last 10 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
- top — real-time RAM and CPU utilization printout
- free — current memory/swap utilization.
CPU Diagnostic Tools/Utilities
- hwinfo –cpu — static information about your CPU
Disk and File System Diagnostic Tools/Utilities
- cat /etc/fstab — show configuration file for file system mounting.
- df -h — current disk space usage (“-h” gives human-readable output)
- du -h — determine how much disk space is being used by current working directory, or any directory you specify after the du command (as in df, the “-h” means human-readable)
- fdisk -l [/dev/hda] — show partition table(s), leave off device name to list all
- mount or cat /etc/mtab — show currently mounted file systems.
- hwinfo –block –short — show what hard drives are available on the system
Local Devices Diagnostic Tools/Utilities
- dmidecode — get all bios information, e.g. computer type.
- hwinfo –pci — list devices on the pci bus.
- hwinfo –scsi — list all scsi devices.
- hwinfo –usb — list all usb devices.
- lsdev — list all installed hardware.
- lspci — list devices on the pci bus.
- lsscsi — list all scsi devices.
- lsusb — list all usb devices.
- setserial -bg /dev/ttyS[0-9]* — list all active serial devices(/dev/ttyS*).
- lsmod — list kernel modules currently loaded.
- modprobe is a Linux program originally written by Rusty Russell and used to add a loadable kernel module (LKM) to the Linux kernel or to remove a LKM from the kernel.
Network Diagnostic Tools/Utilities
- 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.
- ethtool $interface — show the card’s speed, capabilities and if a link is detected
- hwinfo –netcard — show the module name, driver activation command, network card name etc.
- ifconfig -a — show all current network interface information
- ifconfig $interface — show the information for $interface (usually something like ifconfig eth0)
- 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“
- route -n — show routing table, using numerical addresses.
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.
Conceptual understanding of sysfs, udev, hald, dbus
sysfs is a virtual file system provided by the Linux kernel. By using virtual files, sysfs exports information about various kernel subsystems, hardware devices and associated device drivers from the kernel’s device model to user space.
udev is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the /dev directory.
hald (hald – HAL daemon) is a daemon that maintains a database of the devices connected to the system system in real-time. The daemon connects to the D-Bus system message bus to provide an API that applications can use to discover, monitor and invoke operations on devices.
D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a “single instance” application or daemon, and to launch applications and daemons on demand when their services are needed.