One, W, uptime
Command W, uptime
[[Email protected] ~]# W 04:02:31 up 1 day, 8:25, 1 user, Load average:0.00, 0.00, 0.00USER TTY from [Email protected] IDLE jcpu PCPU whatroot pts/0 192.168.21.103 23:38 0.00s 0.47s 0.13s W
System load averages: Number of processes active in the unit time period
The first set of numbers: represents the average load for the last 1 minutes, which if it is larger than the number of cores in the CPU, it means that the resources are insufficient
Second word number: represents the last 5 minutes average load
Third set of numbers: represents the average load for the last 15 minutes
Ab-n 10000-c ' http://www.ypl.cc/forum.php '
It means that at the same time 100 people go to visit this picture, altogether lasts 10,000 times
-N: How many times are requested
-C: How much is concurrency
View the number of CPUs and the number of cores
Cat/proc/cpuinfo
Cat/proc/cpuinfo |grep ' core ID '
Viewing CPU emulation threads
Uptime: Shows how long the system has been running and the average load on the system
Second, Vmstat command
Vmstat: Displays the status of virtual memory, Syntax Vmstat (options) (parameters)
Vmstat 1: Show status every 1 seconds
Vmstat 1 10: Show every 1 seconds, perform 10 auto-end
Procs: Process-related
Memory: RAM-related
Swap: associated with the swap partition
System: Systems-related
IO: HDD-related
Vmstat the meaning of each indicator:
R: Indicates the number of processes running and waiting for CPU time slices, if the long-term is greater than the number of server CPUs, it indicates that the CPU is not enough;
B: Indicates the number of processes waiting for a resource, such as waiting for I/O, memory, and so on, if the value of this column is greater than 1 for a long time, then you need to look at
Si: The amount of memory entered by the switching zone;
So: the number of memory into the swap area;
BI: The amount of data read from a block device (read disk);
Bo: The amount of data written from a block device (write disk);
In: Number of interrupts per second, including clock interrupts;
CS: The number of context switches per second;
WA: Represents the percentage of CPU time consumed by I/O waits.
Percentage of Us:cpu
Third, top command
The system resources used for dynamic monitoring processes change every 3 seconds.
RES: This is the amount of memory that the process occupies,
%MEM: Percentage of memory to use. In the top state, press SHIFT + M to sort by memory usage size.
Press the number ' 1 ' to list the usage status of each CPU.
TOP-BN1: Represents non-dynamic printing system resource usage, which can be used in shell scripts
TOP-C: Can display more detailed information
RT: Real-time priority
Iv. SAR Command
The system does not install this command by default and requires installation
Yum Install-y Sysstat
Network card traffic
Sar-n DEV 1
Check the network card traffic status for 1 seconds
Sar-n DEV 1 10
Check traffic conditions like 1 seconds, perform 10 consecutive times
Sar-n dev-f/var/log/sa/sa24
View network card traffic history for the 24th day
View Historical Load Sar-q
View disk read-write Sar-b
V. FREE command
Free to view system memory usage
Free is displayed as a unit of K
Free-m in units of M
Free-g in G
MEM (total): Number of memory;
MEM (used): already allocated memory;
Mem (free): unallocated memory;
MEM (Buffers): system-assigned but not used buffers;
MEM (cached) system allocated but not used cache
Buffers/cache (used): actual use of buffers and cache total, but also the actual use of memory, Buffers/cache (free): unused buffers and cache and unallocated memory of the sum, This is the current actual memory available to the system
The buffers is about to be written to the disk, and the cache is read from the disk.
Six, PS View system process
PS aux/ps-elf
PS aux: List all processes of the system
Ps-l: Displays only the processes running in the foreground under the current user
PID: The ID of the process, this ID is very useful, in Linux kernel management process relies on PID to identify and manage a certain process, such as I want to terminate a certain processes, then the ' kill process pid ' sometimes do not kill, you need to add a-9 option kill-9 process PID
STAT: Indicates the status of the process, and the process state is divided into the following
D a process that cannot be interrupted (usually IO)
R Running Process
S has been interrupted, and most of the process in the system is this state
T has stopped or paused the process, if we are running a command, say sleep 10 if we press Ctrl-z to let him pause, then we will show the status of T in PS view
X already dead process (this never appears)
Z zombie process, can't kill, fight the garbage process, the system a small resource, but no relationship. If too many, there is a problem.
< high-priority processes
N Low-priority processes
L was locked in memory paging
S master Process
L Multithreading Process
+ Process in the foreground
Pstree Tree Show All Processes
Netstat viewing network conditions
NETSTAT-LNP View current system-enabled ports and sockets
Netstat-an View all connections to the current system
This article is from the It Exchange Learning blog, so be sure to keep this source http://sxct168.blog.51cto.com/824373/1658807
Linux system daily management 1 W,VMSTAT,TOP,SAR,FREE,PS monitoring command