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

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

 

查看内存总体使用状况:

Shell代码 复制代码
  1. XXXX@XXXXXXXX:~$ free -m   
  2.              total       used       free     shared    buffers     cached   
  3. Mem:          1517        848        669          0         36        410  
  4. -/+ buffers/cache:        401       1116  
  5. Swap:            0          0          0  
  6. XXXX@XXXXXXXX:~$ free   
  7.              total       used       free     shared    buffers     cached   
  8. Mem:       1554088     868768     685320          0      37500     420784  
  9. -/+ buffers/cache:     410484    1143604  
  10. Swap:            0          0          0  
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

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

Shell代码 复制代码
  1. XXXX@XXXXXXXX:~$ ps aux   
  2. USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND   
  3. root         1  0.0  0.1   2844  1688 ?        Ss   15:14   0:01 /sbin/init   
  4. ......  
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
......

 查看内存详细信息:

Shell代码 复制代码
  1. XXXX@XXXXXXXX:~$ more /proc/meminfo    
  2. MemTotal:      1554088 kB   
  3. MemFree:        681264 kB   
  4. Buffers:         38232 kB   
  5. Cached:         422212 kB   
  6. SwapCached:          0 kB   
  7. Active:         515496 kB   
  8. Inactive:       301408 kB   
  9. HighTotal:      653888 kB   
  10. HighFree:         1064 kB   
  11. LowTotal:       900200 kB   
  12. LowFree:        680200 kB   
  13. SwapTotal:           0 kB   
  14. SwapFree:            0 kB   
  15. Dirty:               0 kB   
  16. Writeback:           0 kB   
  17. AnonPages:      356560 kB   
  18. Mapped:          71532 kB   
  19. Slab:            24132 kB   
  20. SReclaimable:    15080 kB   
  21. SUnreclaim:       9052 kB   
  22. PageTables:       2024 kB   
  23. NFS_Unstable:        0 kB   
  24. Bounce:              0 kB   
  25. CommitLimit:    777044 kB   
  26. Committed_AS:   821772 kB   
  27. VmallocTotal:   114680 kB   
  28. VmallocUsed:     53584 kB   
  29. VmallocChunk:    59380 kB  
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

 

查看网络总体信息:ifconfig

查看实际流量:sudo iftop

 

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

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