码迷,mamicode.com
首页 > 其他好文 > 详细

监控操作系统的CPU、内存、磁盘

时间:2018-12-19 23:24:32      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:nbsp   vmalloc   cal   mit   系统   name   blocks   ima   table   

Linux

CPU

  就像人的大脑,主要负责相关事情的判断以及实际处理的机制。  

  查询指令:cat /proc/cpuinfo 

[root@besttest ~]# cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 60
model name    : Intel(R) Core(TM) i5-4200H CPU @ 2.80GHz
stepping    : 3
cpu MHz        : 2793.600
cache size    : 3072 KB
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss nx pdpe1gb rdtscp lm constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb pln pts dts fsgsbase smep
bogomips    : 5587.20
clflush size    : 64
cache_alignment    : 64
address sizes    : 40 bits physical, 48 bits virtual
power management:

 

内存

  大脑中的记忆区块,将皮肤、眼睛等所收集到的信息记录起来的地方,以供CPU进行判断。
  查询指令:cat /proc/meminfo

[root@besttest ~]# cat /proc/meminfo
MemTotal:        1030684 kB
MemFree:          582612 kB
Buffers:           13980 kB
Cached:           203776 kB
SwapCached:            0 kB
Active:           220116 kB
Inactive:         172660 kB
Active(anon):     175152 kB
Inactive(anon):      828 kB
Active(file):      44964 kB
Inactive(file):   171832 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:        141256 kB
HighFree:            280 kB
LowTotal:         889428 kB
LowFree:          582332 kB
SwapTotal:       2064376 kB
SwapFree:        2064376 kB
Dirty:                28 kB
Writeback:             0 kB
AnonPages:        175044 kB
Mapped:            35000 kB
Shmem:               956 kB
Slab:              38844 kB
SReclaimable:       7696 kB
SUnreclaim:        31148 kB
KernelStack:        2328 kB
PageTables:         4460 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2579716 kB
Committed_AS:    1906944 kB
VmallocTotal:     122880 kB
VmallocUsed:        4744 kB
VmallocChunk:     104020 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       10232 kB
DirectMap2M:      897024 kB

 

磁盘

  大脑中的记忆区块,将重要的数据记录起来,以便未来再次使用这些数据。
  查询指令:fdisk -l (需要root权限)

[root@besttest ~]# fdisk -l 

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b18c2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        2611    20458496   8e  Linux LVM

Disk /dev/mapper/vg_besttest-lv_root: 18.8 GB, 18832424960 bytes
255 heads, 63 sectors/track, 2289 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_besttest-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

 

监控操作系统的CPU、内存、磁盘

标签:nbsp   vmalloc   cal   mit   系统   name   blocks   ima   table   

原文地址:https://www.cnblogs.com/xiaowenshu/p/10146871.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!