Useful Commands/System Status: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{| class="wikitable" ! 情境 || 指令 |- | 觀察 CPU 使用狀態,每個 core 數據分開 || <source lang="bash"> vmstat -P 1 # FreeBSD mpstat -P ALL 1 # Linux </sou...") |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{| class="wikitable" | {| class="wikitable" | ||
! | ! Purpose || Command | ||
|- | |- | ||
| | | Get Ubuntu version || | ||
< | <syntaxhighlight lang="bash"> | ||
lsb_release -a | |||
</syntaxhighlight> | |||
|- | |||
| Cet CPU usage by core. || | |||
<syntaxhighlight lang="bash"> | |||
vmstat -P 1 # FreeBSD | vmstat -P 1 # FreeBSD | ||
mpstat -P ALL 1 # Linux | mpstat -P ALL 1 # Linux | ||
</ | </syntaxhighlight> | ||
|- | |- | ||
| | | Get info of SNMP v3 with encryption || | ||
< | <syntaxhighlight lang="bash"> | ||
snmpwalk -v 3 -l authPriv -u ${USERNAME} \ | snmpwalk -v 3 -l authPriv -u ${USERNAME} \ | ||
-a SHA -A ${PASSWORD} \ # | -a SHA -A ${PASSWORD} \ # hash | ||
-x AES -X random123 \ # | -x AES -X random123 \ # cipher | ||
${HOST} \ | ${HOST} \ | ||
${OID} | ${OID} | ||
</ | </syntaxhighlight> | ||
[http://www.alvestrand.no/objectid/top.html OID | [http://www.alvestrand.no/objectid/top.html OID Query] | ||
|- | |- | ||
| | | Get info of SNMP v2 || | ||
< | <syntaxhighlight lang="bash"> | ||
snmpwalk -v2c -cpublic 192.168.93.172 system | snmpwalk -v2c -cpublic 192.168.93.172 system | ||
</ | </syntaxhighlight> | ||
|} | |} | ||
Latest revision as of 03:56, 22 July 2026
| Purpose | Command |
|---|---|
| Get Ubuntu version |
lsb_release -a
|
| Cet CPU usage by core. |
vmstat -P 1 # FreeBSD
mpstat -P ALL 1 # Linux
|
| Get info of SNMP v3 with encryption |
snmpwalk -v 3 -l authPriv -u ${USERNAME} \
-a SHA -A ${PASSWORD} \ # hash
-x AES -X random123 \ # cipher
${HOST} \
${OID}
|
| Get info of SNMP v2 |
snmpwalk -v2c -cpublic 192.168.93.172 system
|