2昼浦、系統(tǒng)狀態(tài)檢測(cè)命令
#ifconfig
獲取網(wǎng)卡配置以及網(wǎng)絡(luò)狀態(tài)等信息,格式為“ifconfig [網(wǎng)絡(luò)設(shè)備][參數(shù)]”
ens32: flags=4163mtu 1500
inet 192.168.59.136 netmask 255.255.255.0 broadcast 192.168.59.255
inet6 fe80::c49c:482c:4b78:4636 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:7c:7a:2a txqueuelen 1000 (Ethernet)
RX packets 433907 bytes 639292139 (609.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 150409 bytes 9169466 (8.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens32為網(wǎng)卡名稱
inet:192.168.59.136為IP地址
ether:后面的是物理網(wǎng)卡
RX藻雌、TX:接受的數(shù)據(jù)包以及發(fā)送的數(shù)據(jù)包的個(gè)數(shù)以及累計(jì)流量
#name
查看系統(tǒng)內(nèi)核以及系統(tǒng)版本等信息,格式為"uname [-a]"
#uname -a
Linux localhost.localdomain 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
#uptime
用于查看系統(tǒng)的負(fù)載信息
09:43:36 up 16 min, 3 users, load average: 0.01, 0.14, 0.18
當(dāng)前系統(tǒng)時(shí)間、系統(tǒng)已經(jīng)運(yùn)行時(shí)間潘酗、啟用終端數(shù)瞭空、以及平均值負(fù)載信息(1揪阿、5疗我、15分鐘內(nèi)的壓力情況)
#free
顯示當(dāng)前系統(tǒng)中內(nèi)存使用量,格式為free[-h]
free -h 命令可以更加人性化的輸出
???????????????????? total??????? used?????????? free?????? shared ? ? ? ? buff/cache ? ?? available
??????????????????? 內(nèi)存?????? 已用??????????? 可用 ? ?? 進(jìn)程共享??????? 磁盤緩存??????
??????????????????? 總量????????? 量????????????? 量??????? 內(nèi)存量???????????? 的內(nèi)存量
Mem:? ? ? ? ? 3.7G? ? ? ? 754M? ? ? ? 1.2G? ? ? ? 9.8M? ? ? ??????????? 1.8G? ? ? ? ? 2.6G
Swap:? ? ? ? ? 3.9G? ? ? ? ? 0B? ? ? ? 3.9G
#who
用于查看當(dāng)前登入主機(jī)的用戶終端信息
用戶名?? 終端設(shè)備???? 登陸到系統(tǒng)時(shí)間
wjl?????? ? ? ? :0??????????? 2018-08-11 09:28 (:0)
wjl? ? ???????? pts/0? ? ? ? 2018-08-11 09:30 (:0)
wjl? ? ????????? pts/1? ? ? ? 2018-08-11 09:39 (192.168.59.1)
#last
用于查看所有系統(tǒng)的登陸記錄
wjl pts/1 192.168.59.1 Sat Aug 11 09:39 still logged in
wjl? ? ? pts/0? ? ? ? :0? ? ? ? ? ? ? Sat Aug 11 09:30? still logged in?
wjl? ? ? :0? ? ? ? ? :0? ? ? ? ? ? ? Sat Aug 11 09:28? still logged in?
#history
用于查看歷史執(zhí)行過的命令南捂,顯示最近使用的1000條命令吴裤,還可以自定義
57 uname -a
? 58? update
? 59? uptime
? 60? free -h
? 61? who
? 62? last
? 63? history
#histroy -c
會(huì)清空所有的命令歷史記錄
#sosreport
收集系統(tǒng)配置以及架構(gòu)信息并輸出診斷文檔。
敲擊三次回車確認(rèn)收集信息溺健,輸出如下
Setting up archive ...
Setting up plugins ...
Running plugins. Please wait ...
? Running 1/1: npm...? ? ? ? caught exception in plugin method "npm.collect()"
writing traceback to sos_logs/npm-plugin-errors.txt
Creating compressed archive...
Your sosreport has been generated and saved in:
? /var/tmp/sosreport-localhost.localdomain-20180811100207.tar.xz
The checksum is: 25f506d8b78e804e3d57e9f6617ccb91
Please send this file to your support representative.
# cd /var/tmp/
#ls