Original connection:
Administrator-required Linux system monitoring tools
#1: top-process activity
Top provides a real-time, dynamic view of the current running system, which is the running process. By default, displays the task with the highest CPU utilization in the system and refreshes every 5 seconds.
#2: Vmstat-system activity, hardware and system Information
Use the Vmstat command to get information about processes, memory, memory paging, blocking IO, traps, and CPU activity.
#3: W-show who is logged in, what are they doing?
The W command displays information about the current user of the system and its running process.
#4: Uptime-Tell the system how long it has been running?
The uptime command used to show only how long the system was running. Now, you can show how long the system is running, how many users are currently logged in, and what the average load is in the last 1, 5, 15 minutes.
#5: PS-Show process
The PS command displays a snapshot of the currently running process. Displays all processes using-a or-E. PS is very similar to top, but PS provides more information.
#6: Free-memory usage
The free command displays the idle, used physical memory and swap memory in the system, and the buffer used by the kernel.
#7: iostat-cpu average load, HDD activity
The Iostat command reports statistics on the central Processing Unit (CPU), various devices, partitions, and network file system input/output statistics.
#8: Sar-collecting and reporting system activities
The SAR command is used to collect, report, and store system activity information.
#9: Mpstat-Multi-processor utilization
The Mpstat command displays the usage of all available processors, starting with the processor number 0. Mpstat-p all shows the average usage per processor.
#10: PMAP-memory usage for processes
The PMAP command displays the memory map of the process, and uses this command to identify the cause of the memory bottleneck.
#11: netstat-network related information
Netstat can display network links, routing table information, interface statistics, spoofing links, and multicast members (multicast memberships)
#12: SS-Network-related information
The SS command is used to display network socket information, which allows you to display information similar to netstat.
#13: Iptraf-Network real-time information
The Iptraf is an interactive IP network monitoring tool. It can generate a variety of network statistics including: TCP information, UDP number, ICMP and OSPF information, Ethernet load information, node status, IP checksum error, and so on.
#14: tcpdump: Detailed network traffic analysis
Tcpdump is a simple network traffic dump tool, but it is very familiar to the TCP/IP protocol to use well.
#15: Strace-System call
Track system calls and models, which is useful for debugging Web servers and other servers. Learn how to track processes and features.
#16:/proc file System-Various kernel information
The files in the/proc directory provide detailed information on many different hardware devices and cores.
#17: Nagios-Server and network monitoring
Nagios is a very popular system and network monitoring software. You can easily monitor all of your hosts, network devices and services. It can send alerts after a failure and recovery.
#18: Cacti-web-based monitoring tools
Cacti is a complete network graphics solution based on RRDtool data storage and graphical capabilities. Cacti provides a fast polling, advanced graphical templates, a variety of data acquisition methods and user management functions. These features have a very user-friendly interface that ensures they can be deployed in a complex network of hundreds of devices. It provides information about network CPUs, memory, logged-in users, Apache, DNS, and more.
#19: KDE System Guard
Ksysguard is the next networked system monitoring tool on the KDE desktop. This tool can be run through an SSH session. It offers many features, such as a client/server architecture that monitors both native and remote hosts, and the front-end graphical interface uses so-called sensors to get information and display it. The sensor can return a simple numeric value or a set of tabular information. Provides one or more displays for different types of information. These displays are organized in multiple worksheets, and worksheets can be monolithic stored and loaded. So, Ksysguard is not just a simple task manager, but also a powerful tool to control multiple servers.
#20: Gnome System Monitor
System Monitor can display the basic information, monitor system processes, system resources, and file system usage. You can also use System Monitor to monitor and modify the behavior of your systems. Although not as powerful as the KDE System Guard, the basic information it provides is very useful for getting started users.
Introduction to Linux Common monitoring commands
-Top
Instruction Introduction
-B: Batch mode runs.
-C: Displays the command line that performs the task.
-D: Set delay time
-H: Help
-H: Displays the thread. The threads generated by all processes are displayed.
-I: Shows the idle process.
-N: Number of executions. Commonly used with-B
-U: Monitor specified user-related processes
-U: Monitor specified user-related processes
-P: monitors the specified process.
-S: Safe mode operation
-S: Cumulative time mode
-V: Displays the top version and then exits.
-M: Automatic display of memory units (k/m/g)
top as the most commonly used and most important in daily management work one of the Linux system monitoring tools, you can dynamically observe the system into process conditions. The top command displays a number of items, with the default value being updated every 5 seconds and pressing the Q key to exit. The items shown are :
The output value is interpreted as:
15:06:57 up 129 days, 19:03, 5 users, load average:1.21, 1.20, 1.25
uptime This item shows the system boot time, elapsed time, and three average load values (last 1 seconds, 5 seconds, 15 seconds of load value).
222 processes:219 sleeping, 2 running, 1 zombie, 0 stopped
Processes the total number of running processes since the most recent refresh. These processes are divided into running, dormant, and stopped.
CPU states:cpu user Nice system IRQ SOFTIRQ iowait Idle
Total 0.9% 0% 27.4% 0% 0% 0.2% 71.2%
cpu00 1.9% 0% 19.4% 0% 0% 0% 78.6%
Cpu01 0% 0% 33% 0% 0% 0% 66.9%
cpu02 1.9% 0% 22.3% 0% 0% 0.9% 74.7%
cpu03 0% 0% 35.2% 0% 0% 0% 64.7%
CPU states shows the percentage of CPU time consumed by user mode, System mode, priority process (only the priority is negative) and idle, etc. The time consumed by the priority process is also included in the user and system time, so the total percentage will be greater than 100%.
mem:16214336k av, 15682832k used, 531504k free, 0k shrd, 215016k Buff
10896844k ACTV, 3379680k in_d, 446432k In_c
Mem memory usage statistics, which includes total available memory, free memory, memory used, shared memory, and memory occupied by the cache.
swap:10482404k av, 0k used, 10482404k free 14856500k Cached
Swap swap space statistics, which includes total swap space, usable swap space, and swap space.
PID USER PRI NI SIZE rss SHARE STAT%cpu%MEM time CPU COMMAND
27869 Root 0 460M 460M 455M R 25.0 2.9 12559m 1 VMWARE-VMX
31819 Root 0 6016 6016 5048 S 1.6 0.0 17573m 2 Magicdev
27837 root 15-10 460M 460M 455M S < 0.7 2.9 1328m 0 VMWARE-VMX
27868 root 15-10 460M 460M 455M S < 0.3 2.9 644:35 3 VMWARE-VMX
The ID of each process of the PID. PPID the parent process ID of each process. UID of each process owner.
User name for each process owner.
PRI the priority level of each process.
The priority value of the process for NI.
Size the number of the process's code plus the data size plus the total stack space size. Unit is KB.
Tsize the code size of the process. This is a very strange value for kernel processes.
Dsize the size of the data and stack.
TRS text resident size.
D is marked as "dirty" page item.
The size of the library page that LIB uses. does not work for elf processes.
RES the total amount of physical memory that the process occupies, in kilobytes.
SHARE The amount of shared memory that the process uses.
STAT the status of the process. s= Hibernate, d= dormant, r= run, z= Zombie, t= stop or trace.
The total CPU time that the process has occupied since it started. If the cumulative mode is entered, the time also includes the time taken by the process subprocess. And the title will become CTime.
%cpu the percentage of CPU time and total time that the process has occupied since the most recent refresh.
%mem the percentage of total memory that the process occupies in physical memory.
command name of the process, and if one line does not appear, it will be intercepted. The in-memory process will have a complete command line.
: Linux Common Monitoring Command introduction –VMSTAT,PS, etc.
Vmstat [-A] [-n] [delay [count]]
Vmstat [-F] [-S] [-M]
Vmstat [-S unit]
Vmstat [-d]
Vmstat [-P disk partition]
Vmstat [-v]
Instruction Introduction
-A: Show active and inactive memory
-F: Displays the number of fork from the system since it was started.
-M: Display Slabinfo
-N: Displays the field names only once at the beginning.
-S: Displays memory-related statistics and the number of system activities.
Delay: Refresh time interval. If not specified, displays only
a result.
Count: Number of refreshes. If you do not specify the number of refreshes, but
The refresh interval is specified, and the number of refreshes is infinite.
-D: Displays disk-related statistics.
-P: Display specified disk partition statistics
-S: Displayed using the specified units. Parameters are K, K, M, M,
Represent 1000, 1024, 1000000, 1048576, respectively
Bytes. The default unit is K (1024x768 bytes)
-V: Displays Vmstat version information.
Recommended for easy usage
Output one result every 2 seconds
Vmstat 2
Show active and inactive memory
Vmstat-a 2
Output numerical interpretation
(procs) R: Number of processes in the running queue
(procs) B: Number of processes waiting for IO
(memory) SWPD: Using virtual memory size
(memory) Free: Available RAM size
(memory) Buff: The amount of RAM used as a buffer
Cache cache: The size of memory used as a buffer
(swap) Si: Write to memory size per second from swap area
(swap) So: The amount of memory written to the swap area per second
(IO) Bi: Number of blocks read per second
(IO) Bo: Number of blocks written per second
(System) In: Number of interrupts per second, including clock interrupts.
(System) CS: The number of context switches per second.
(CPU) US: User Process Execution Time
(CPU) SY: System Process Execution time
(CPU) ID: idle time (including IO wait time)
(CPU) WA: Waiting io time
PS command
PS [Options]
Instruction Introduction
-e Displays all processes.
-F full format.
-H does not display the caption.
-L long format.
-W wide output.
A displays all processes on the terminal, including other users '
R displays only the processes that are running.
X shows the process with no control of the terminal.
Recommended for easy usage
View processes running with the Vivek user name
# ps-u vivek-u Vivek U
Show only the LIGHTTPD process ID
# ps-c Lighttpd-o pid=
Identify the top 10 processes that consume the most memory
# PS-AUXF | Sort-nr-k 4 | Head-10
Find the top 10 processes with the most CPU
# PS-AUXF | Sort-nr-k 3 | Head-10
Free command
free [-b|-k|-m][-o][-s delay][-t][-v]
Instruction Introduction
-B Displays memory usage in bytes.
-K displays memory usage in kilobytes.
-m displays memory usage in megabytes.
-O does not display buffer throttling columns.
-s< interval seconds > Continuous observation of memory usage.
-T displays the memory sum column.
-V Displays version information.
Output numerical interpretation
Total used free shared buffers Cached
mem:3266180 3250004 16176 0 110652
2668236
-/+ buffers/cache:471116 2795064
swap:2048276 80160 1968116
Total: The amount of physical memory.
Used: How large is used.
Free: How much is available.
Shared: The total amount of memory shared by multiple processes.
Buffers/cached: The size of the disk cache.
Used: How large is used.
Free: How much is available.
Uptime command
Uptime
Uptime [-V]
Output numerical interpretation
18:02:41 up, 23:42, 1 user,
Load average:0.00, 0.00, 0.00
10:19:04: System Current time
Up 257 days, 18:56: The more time the host has run, the more stable your machine is.
User: Number of connections, which is the total number of connections, not the number of users
Load average: Average system load, statistics of the last 1, 5, 15 minutes of the system average load, if the current number of active processes per CPU core is not greater than 3, then the performance of the system is good. If the number of tasks per CPU core is greater than 5, then there is a serious problem with the performance of this machine.
"Go" Administrator-required Linux system monitoring tools