Linux 关键信息查看(内存,硬盘,网络,CPU)

查看内存总体使用状况:

XXXX@XXXXXXXX:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          1517        848        669          0         36        410
-/+ buffers/cache:        401       1116
Swap:            0          0          0
XXXX@XXXXXXXX:~$ free
             total       used       free     shared    buffers     cached
Mem:       1554088     868768     685320          0      37500     420784
-/+ buffers/cache:     410484    1143604
Swap:            0          0          0

 查看单个进程内存使用状况:

XXXX@XXXXXXXX:~$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1   2844  1688 ?        Ss   15:14   0:01 /sbin/init
......

 查看内存详细信息:

XXXX@XXXXXXXX:~$ more /proc/meminfo 
MemTotal:      1554088 kB
MemFree:        681264 kB
Buffers:         38232 kB
Cached:         422212 kB
SwapCached:          0 kB
Active:         515496 kB
Inactive:       301408 kB
HighTotal:      653888 kB
HighFree:         1064 kB
LowTotal:       900200 kB
LowFree:        680200 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:      356560 kB
Mapped:          71532 kB
Slab:            24132 kB
SReclaimable:    15080 kB
SUnreclaim:       9052 kB
PageTables:       2024 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    777044 kB
Committed_AS:   821772 kB
VmallocTotal:   114680 kB
VmallocUsed:     53584 kB
VmallocChunk:    59380 kB

 

查看硬盘详细信息: more /proc/diskstats

查看文件大小:du -sh

 

查看分区使用: df -lh

 

查看网络总体信息:ifconfig

查看实际流量:sudo iftop

 

查看CPU详细信息:more /proc/cpuinfo

你可能感兴趣的:(linux,cache)