Firebird Flight Wiki: Resource Usage & System Checks
Firebird Flight

Resource Usage & System Checks

Understanding hardware details and monitoring system resources is critical for diagnosing performance issues and ensuring your Linux environment runs smoothly. This page covers commands to examine CPU, memory, disk usage, and more.

1. System Information

These commands provide a general overview of your system’s kernel, CPU info, and hardware sensors.

1a. uname

uname prints system information such as the kernel name, version, and machine architecture.

Flag / Usage Description
uname -a Displays all available info (kernel name, version, release, machine, etc.).
uname -r Shows the kernel release version only.
uname -m Displays the machine hardware name (e.g., x86_64).
Table 1: Common uname Usage

1b. lscpu

lscpu gathers CPU architecture details from /proc/cpuinfo, displaying the number of cores, threads, and various CPU features.

Flag / Usage Description
lscpu Prints a summary of CPU info (model, cores, threads, CPU MHz, etc.).
lscpu --extended Displays additional fields like node, socket, thread, and core IDs in a table format.
Table 2: Common lscpu Usage

1c. sensors

sensors (provided by the lm-sensors package) checks temperature and voltage readings from your motherboard, CPU, and GPU sensors.

Usage Description
sensors Prints current sensor readings (CPU/GPU temps, fan speeds, etc.). Requires lm-sensors to be installed and configured.
Table 3: Common sensors Usage

2. Device Inspection

These commands list connected devices such as USB and PCI hardware, providing vendor, product, and driver details that help identify installed components.

2a. lsusb

lsusb displays information about USB buses and the devices connected to them. Helpful for identifying peripherals like keyboards, mice, or USB storage.

Flag / Usage Description
lsusb Lists all USB devices with vendor and product IDs.
lsusb -v Verbose mode, shows detailed descriptors. Usually requires root privileges.
Table 4: Common lsusb Usage

2b. lspci

lspci lists all PCI devices, including internal adapters such as network cards, graphics cards, and SATA controllers.

Flag / Usage Description
lspci Shows a summary of each PCI device (bus ID, vendor, device name).
lspci -v Verbose info about each device, including driver details.
lspci -k Displays kernel modules in use for each PCI device.
Table 5: Common lspci Usage

3. Memory & Disk Usage

Keeping an eye on memory usage and disk utilization is crucial for maintaining a healthy system. These commands quickly show you where resources are allocated.

3a. free

free displays memory usage, showing how much RAM and swap space is used and available.

Flag / Usage Description
free -h Shows memory usage in human-readable units (KB, MB, GB).
free -m Displays memory usage in MB, including total, used, and available memory.
Table 6: Common free Usage

3b. df

df (disk free) reports file system disk space usage, showing how full each mounted partition is.

Flag / Usage Description
df -h Human-readable format, e.g., /dev/sda1 might show "10G/15G used".
df -T Displays the file system type (ext4, xfs, etc.).
df -i Shows inode usage instead of block usage.
Table 7: Common df Usage

3c. du

du (disk usage) calculates how much space each file/directory uses, making it easy to find large directories or files.

Flag / Usage Description
du -h [path] Shows the disk usage of [path] in human-readable sizes.
du -sh [dir] Displays a summarized total size for [dir] and its contents.
du -a Shows usage for all files, not just directories.
Table 8: Common du Usage

4. Process Monitoring

When performance issues arise, knowing which processes are consuming CPU or memory is critical. These commands let you see real-time usage and manage processes effectively.

4a. top

top provides a dynamic, real-time view of running processes, showing CPU and memory usage at a glance.

Key / Usage Description
top Launches the interactive console listing running processes by CPU usage.
k (within top) Prompts for a process ID to kill. Be cautious!
Shift + M Sorts running processes by memory usage (while top is running).
Table 9: Common top Interactions

4b. htop

htop is an interactive process viewer, similar to top but with a more user-friendly interface, customizable display, and mouse interactions.

Key / Usage Description
htop Displays CPU, memory, and swap usage in colorful bars. Processes can be killed or re-niced with function keys or mouse clicks.
F2 (Setup) Within htop, configure display options, meters, and colors.
F3 (Search) Search for a process by name or PID.
Table 10: Common htop Interactions

5. Conclusion

By mastering these commands—covering system info, device inspection, memory and disk usage, and real-time process monitoring—you’ll be well equipped to diagnose resource bottlenecks and performance issues on Linux systems. For deeper analysis, consider exploring network usage, log files, and advanced profiling tools.