如何利用spotlight for unix对linux进行系统性能监控

网友投稿 546 2022-09-25

如何利用spotlight for unix对linux进行系统性能监控

如何利用spotlight for unix对linux进行系统性能监控

首先要启动SSHsystem-config-service将SSHD启动并设置为系统自动启动一定要安装system-system tools下的sysstat包,以安装sar和iostat包(此包非默认安装)然后连接spotlight即可

要注意的是spotlight显示出来的内存是不对的原因如下:spotlight利用vmstat命令的mem中的free作为空余内存-bash-3.00$ vmstatprocs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa 0  0    160 746116  50016  64124    0    0     2     2    3     2  2  1 96 linux的的内存分配类似于vista,会有一部分空闲内存作为buffer和cacheA buffer is something that has yet to be "written" to disk. A cache is something that has been "read" from the disk and stored for later use.所以这里的free的内存并不是我们传统意义上的"free memory"要想看真正的"free memory"在linux下需要用如下命令-bash-3.00$ free -m             total       used       free     shared    buffers     cachedMem:          1010        287        722          0         49         67-/+ buffers/cache:        170        839Swap:         2047          0       2047

FREE命令参考freefree 命令相对于top 提供了更简洁的查看系统内存使用情况:

$ freetotal used free shared buffers cachedMem: 255268 238332 16936 0 85540 126384-/+ buffers/cache: 26408 228860Swap: 265000 0 265000Mem:表示物理内存统计 -/+ buffers/cached:表示物理内存的缓存统计 Swap:表示硬盘上交换分区的使用情况,这里我们不去关心。系统的总物理内存:255268Kb(256M),但系统当前真正可用的内存b并不是第一行free 标记的 16936Kb,它仅代表未被分配的内存。

我们使用total1、used1、free1、used2、free2 等名称来代表上面统计数据的各值,1、2 分别代表第一行和第二行的数据。

total1:表示物理内存总量。 used1:表示总计分配给缓存(包含buffers 与cache )使用的数量,但其中可能部分缓存并未实际使用。 free1:未被分配的内存。 shared1:共享内存,一般系统不会用到,这里也不讨论。 buffers1:系统分配但未被使用的buffers 数量。 cached1:系统分配但未被使用的cache 数量。buffer 与cache 的区别见后面。 used2:实际使用的buffers 与cache 总量,也是实际使用的内存总量。 free2:未被使用的buffers 与cache 和未被分配的内存之和,这就是系统当前实际可用内存。可以整理出如下等式:

total1 = used1 + free1total1 = used2 + free2used1 = buffers1 + cached1 + used2free2 = buffers1 + cached1 + free1buffer 与cache 的区别

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:优惠券营销效果不好?你真的用对了吗?(优惠券促销有什么优缺点)
下一篇:write file to pc/unix -function module
相关文章

 发表评论

暂时没有评论,来抢沙发吧~