top
The top command dynamically monitors information such as process activity and system load.
Example of use:
top
The effect is as follows:
The output view of the above command is divided into two areas, a statistical information area and a process information area.
Statistics area:
The first line of information is: system time, running time, number of logged-in terminals, and system load (the three values are the average within 1 minute, 5 minutes, and 15 minutes, and the smaller the value, the lower the load).
The second line of information is: the total number of processes, the number of running processes, the number of sleeping processes, the number of stopped processes, and the number of dead processes.
The information in the third line is: the percentage of resources occupied by the user, the percentage of resources occupied by the system kernel, the percentage of process resources whose priorities have been changed, the percentage of idle resources, and so on.
The fourth line of information is: the total amount of physical memory, the amount of memory used, the amount of free memory, and the amount of memory used as the kernel cache.
The fifth line of information is: total virtual memory, virtual memory usage, virtual memory free, and preloaded memory.
Process information area:
column name | meaning |
---|---|
PID | Process ID |
USER | Username of the process owner |
PR | Process priority |
NI | nice value. Negative values indicate high priority, positive values indicate low priority |
VIRT | The total amount of virtual memory used by the process, in kb |
RES | The size of the physical memory used by the process but not swapped out, in kb |
SHR | Shared memory size, in kb |
S | Process state, D: uninterruptible sleep state, R: running, S: sleep, T: stopped, Z: zombie process |
%CPU | The percentage of CPU time used since the last update |
%MEM | The percentage of physical memory used by the process |
TIME+ | The total CPU time used by the process, in 1/100 second |
COMMAND | command name |
Press q to exit the monitoring page.
uptime
uptime is used to view the load information of the system.
Example of use:
View system load information.
uptime
The effect is as follows:
Output description:
Current server time: 11:06:57
Current server running time: 59 min
Current number of users: 1 users
Current load situation: load average: 0.00, 0.04, 0.08 (respectively take the average of 1min, 5min, 15min)
free
free is used to display the memory usage information in the current system.
Command syntax:free [-bkmotV][-s <间隔秒数>]
Parameter Description:
parameter | illustrate |
---|---|
-b | Displays memory usage in Bytes |
-k | Displays memory usage in KB |
-m | Displays memory usage in MB |
-h | Displays memory usage in appropriate units, up to three digits, and automatically calculates the corresponding unit value. |
Example of use:
Displays the current system memory usage information.
free -h
The effect is as follows:
Output description:
parameter | illustrate |
---|---|
Mem | physical memory |
Swap | Virtual Memory |
total | total memory |
used | memory used |
free | number of free memory |
share | Total memory shared by multiple processes |
buff/cache | The amount of memory used by the application |
available | amount of memory available |
ifconfig
The ifconfig command is used to obtain information such as network card configuration and network status.
Example of use:
Get information such as network card configuration and network status.
ifconfig
The effect is as follows:
Output description:
The first line of the first section displays NIC status information.
eth0 represents the first network card.
UP means the network card is turned on.
RUNNING means that the network cable of the network card is connected.
MULTICAST indicates that multicast is supported.
The second line displays the network information of the network card.
inet (IP address): 172.16.67.50.
netmask (mask address): 255.255.0.0.
broadcast (broadcast address): 172.16.255.255.
RX indicates the case of receiving packets, and TX indicates the case of sending packets.
lo represents the loopback network card of the host, which is a special network interface that is not connected to any actual device, but is completely implemented by software. Unlike the loopback address (127.0.0.0/8 or ::1/128), the loopback card appears to the system as a piece of hardware. Any data sent to this network card will be immediately received by the same network card.
Finally, thank you for being so handsome, and for giving me likes and attention .