...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
uname -a # Displays kernel version and system architecture. lscpu # Provides detailed information about the CPU. lsblk # Lists all available block devices. lsusb # Shows USB devices connected to the system. lspci # Lists PCI devices. |
Div | ||
---|---|---|
| ||
2. CPU and Memory Diagnostics |
Monitoring CPU and memory usage helps in identifying performance bottlenecks.Commands:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
top/htop |
...
# Real-time process monitoring. |
...
...
vmstat |
...
# Reports virtual memory statistics. |
...
...
free -h |
...
Displays memory usage. |
...
mpstat: Reports CPU usage. |
Div | ||
---|---|---|
| ||
3. Disk Usage and Health |
Keeping track of disk usage and health is crucial for preventing data loss and ensuring efficient storage management.
Code Block | ||||||
---|---|---|---|---|---|---|
|
...
...
df -h |
...
# Shows disk space usage. |
...
...
du -sh /path/to/directory |
...
# Displays the size of a specific directory. |
...
...
fdisk -l |
...
# Lists all partitions. |
...
...
smartctl -a /dev/sda |
...
# Checks the health of a disk (requires smartmontools). |
...
...
iostat |
...
# Reports CPU and I/O statistics. |
...
Div |
---|
...
|
...
4. Network Diagnostics
Network issues can significantly impact system performance and connectivity.
Commands:
ifconfig: Displays network interfaces and their configurations.
ip addr: Shows IP addresses assigned to the network interfaces.
ping google.com: Checks connectivity to an external site.
netstat -tuln: Lists open ports and services.
traceroute google.com: Traces the route packets take to a destination.
dig google.com: Performs DNS lookup.
bash
ifconfig
ip addr
ping google.com
netstat -tuln
traceroute google.com
dig google.com
| |
5. Process and Service Management |
Managing processes and services is essential for maintaining system stability.
Commands:
...
dmesg: Prints kernel ring buffer messages.
journalctl: Views systemd logs.
tail -f /var/log/syslog: Continuously displays system log updates.
sar: Collects, reports, and saves system activity information (requires sysstat).
uptime: Shows how long the system has been running and load averages.
bash
dmesg
journalctl
tail -f /var/log/syslog
sar
uptime
To run a ping test, we’ll open the same command line and type ping (host) with (host) being the website you’re trying to connect to. You’ll get something like this (we’ll use veesp.com again as an example):
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Pinging veesp.com [104.22.74.140] with 32 bytes of data:
Reply from 104.22.74.140: bytes=32 time=ms TTL=56
Reply from 104.22.74.140: bytes=32 time=ms TTL=56
Reply from 104.22.74.140: bytes=32 time=ms TTL=56
Reply from 104.22.74.140: bytes=32 time=ms TTL=56
Ping statistics for 104.22.74.140:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms |
...
.