Overview:
Monitoring system resources is crucial for ensuring the stability and performance of your Linux server. This guide outlines various tools and commands available on Linux systems that allow you to monitor CPU usage, memory consumption, disk space, and network activity. Keeping an eye on these metrics can help you identify and resolve potential issues before they impact your operations.
CPU Usage Monitoring:
•top: Provides a real-time overview of CPU usage, processes, and system load. Allows sorting of processes by CPU or memory usage and killing processes directly from the interface.
•htop: An enhanced version of top, offering a more user-friendly interface with color-coded resource usage and process information.
•mpstat: Part of the sysstat package, mpstat provides detailed CPU usage statistics on a per-processor basis.
Memory Usage Monitoring:
•free: Displays the total, used, and available memory on the system. Also shows swap memory usage.
•vmstat: Reports information about processes, memory, paging, block IO, traps, and CPU activity, offering insights into memory usage patterns over time.
•smem: Provides a more detailed view of memory usage, breaking it down by process and showing actual physical memory usage, including shared memory.
Disk Usage Monitoring:
•df: Reports the amount of disk space used and available on all mounted filesystems.
•du: Summarizes disk usage of files and directories.
•iostat: Monitors system input/output device loading, reporting CPU and I/O statistics.
Network Usage Monitoring:
•ifstat: Displays network interface statistics, providing detailed information on bytes transferred and the speed of each network interface.
•ip -s link: Shows statistics on network interfaces, including errors and dropped packets.
•nload: A visual tool that displays incoming and outgoing traffic separately.
•iftop: Monitors network bandwidth usage by listing the connections and showing the data rate.
Comments
0 comments
Please sign in to leave a comment.