System Status Detection commands
1. ifconfig : Used to obtain network card configuration and networking status information, format: ifconfig [network Devices] [parameters]
One of the following lo is a local loopback port
2. uname : Used to view the kernel version information of the system, in the format:uname [ -A]
View the kernel name of the system, kernel release, kernel version, node name, hardware name
Hardware platform, processor type, operating system, etc.
Uname-r View Kernel release version number
uname-a View all information
3. uptime : Used to view the load situation of the system, in the form of: uptime
You can use "Watch-n 1 uptime" To refresh the system load every second
4. free: Used to display the current system memory usage in the format: free [-m/-g]
|
Total amount of memory |
Amount already used |
Available dosage |
The amount of memory that the process shares |
Amount of disk cache memory |
Amount of memory Cached |
Total |
Used |
Free |
Shared |
Buffers |
Cached |
Mem: |
1483 |
885 |
598 |
9 |
0 |
255 |
Swap: |
2047 |
0 |
2047 |
|
|
|
5. who: Used to view the current logged in host user situation, in the format: Who[ parameters]
[email protected] ~]# who
User name Terminal Equipment time to log on to the system
root:0 2017-09-14 14:05 (: 0)
Root PTS/1 2017-09-14 14:30 (192.168.23.6)
6. Last: Used to view all system registration records in the format: last [parameter]
[Email protected] ~]# last
Root PTS/3 192.168.23.6 Mon 14:30 still logged in
Root pts/1 192.168.23.6 Thu Sep 14:30 still logged in
Root PTS/2 192.168.200.2 Thu Sep 14:10 still logged in
Root PTS/1 192.168.200.2 Thu Sep 14 14:08-14:10 (00:02)
Root pts/0:0 Thu Sep 14:06 still logged in
root:0:0 Thu Sep 14:05 still logged in
(unknown:0:0 Thu Sep 14 14:05-14:05 (00:00)
Reboot system boot 3.10.0-229.el7.x Thu Sep 14 22:04-15:19 ( -31+-6:-45)
BDQN pts/0:0 Tue Nov 24 10:49-10:49 (00:00)
BDQN pts/0:0 Tue Nov 24 10:48-10:48 (00:00)
bdqn:0:0 Tue Nov 24 10:47-10:49 (00:01)
(unknown:0:0 Tue Nov 24 10:46-10:47 (00:01)
Reboot system boot 3.10.0-229.el7.x Tue Nov 24 18:45-10:49 ( -7:-56)
Wtmp begins Tue Nov 24 18:45:30 2015
7. History: Used to display historical executed commands in the form of:[-c]
[Email protected] ~]# history
...
History
If you use the parameter-C, the history will be saved to the ". Bash_history" File (save 1000 by default)
linux[Basic]-06--System State Detection command [01]