Linux 系统信息监控统计命令.docVIP

  • 2
  • 0
  • 约 18页
  • 2016-09-20 发布于河南
  • 举报
Linux 系统信息监控统计命令

Linux 系统信息监控统计命令 Linux 系统信息监控统计命令小结 . linuxsystemsocketsstatisticsreportdiskLINUX Operating System 监控统计信息: free 内存管理: free 结果: total used free shared buffers cached Mem: 2025356 1469320 556036 0 226972 961492 -/+ buffers/cache: 280856 1744500 Swap: 4194232 45912 4148320 结果中的第一行是从内核角度看内存使用的情况, 只有556036k内存可用 第二行:从应用层的角度看内存使用的情况,其中: 1744500 = 556036 + 0 + 226972 + 961492, 1744500+280856=2025356 从应用的角度来说,buffer和cached的内存是可用的, buffer/cached是用来提高文件读取的性能, buffer/cached的区别: buffers是指用来给块设备做的缓冲大小,他只记录文件系统的metadata以及 tracking in-flight pages. cached是用来给文件做缓冲。 那就是说:buffers是用来存储,目录里面有什么内容,权限等等。而cached直接用来记忆我们打开的文件,如果你想知道他是不是真的生效,你可以试一下,先后执行两次命令#man X ,你就可以明显的感觉到第二次的开打的速度快很多。 mpstat:处理器的相关信息的统计。 如果server有多个processors, mpstat可以统计出每个processor的使用统计情况 mpstat -P [ALL | {number}] mpstat -P ALL: 结果: 17时49分54秒 CPU %user %nice %system %iowait %irq %soft %idle intr/s 17时49分54秒 all 0.89 0.00 1.41 1.43 0.01 0.40 95.87 395.84 17时49分54秒 0 0.06 0.00 0.11 0.11 0.00 0.03 99.69 25.47 17时49分54秒 1 0.08 0.00 0.11 0.11 0.00 0.04 99.66 25.07 17时49分54秒 2 0.06 0.00 0.11 0.11 0.00 0.03 99.69 25.19 17时49分54秒 3 0.07 0.00 0.11 0.11 0.00 0.03 99.68 25.21 可以看到该server有四个cpu iostat:用于生成cpu utilization report和 Device utilization report netstat:输出网络连接、路由表、接口统计、masquerade connections(?)和multicast memberships. vmstat:用来报告关于进程状态、内存消耗、分页活动、blocking I/O 操作、interrupts、context switches、和内存的使用率。 vmstat -a:显示active和inactive内存统计来代替buffer和cache内存统计 vmstat -a procs memory swap io system cpu r b swpd free inact active si so bi bo in cs us sy id wa 0 0 45912 556396 529708 561632 0 0 0 15 1 65 1 1 97 1 vmstat procs memory s

文档评论(0)

1亿VIP精品文档

相关文档