sysstat使用及字段说明

sysstat使用

参考sysstat的man手册



前言

介绍sysstat的常用命令,以及各字段含义


一、sysstat是什么?

github: link
sysstat包 包含许多商业 Unix 通用的各种实用程序,用于监控系统性能和使用活动

sar是系统活动报告器。通过解释 sar 生成的报告,可以定位系统瓶颈并针对这些烦人的性能问题提出一些可能的解决方案。Linux 内核维护内部计数器,用于跟踪请求、完成时间、I/O 块计数等。根据这些信息和其他信息,sar 计算速率和比率,从而深入了解瓶颈所在。

sadf -d 以关系数据库可以轻松获取的格式提取数据。
pidstat命令用于监控当前由 Linux 内核管理的进程和线程。它还可以监视那些进程和线程的子进程。

二、常用命令

1.监控cpu

命令如下(示例):

import numpy as np

2.监控内存

命令如下(示例):

import numpy as np

三、字段说明

1. cpu相关

2. memory相关

字段名含义
kbmemfreeAmount of free memory available in kilobytes.
kbavailEstimate of how much memory in kilobytes is available for starting new applications, without swapping.The estimate takes into account that the system needs some page cache to function well, and that not all reclaimable slab will be reclaimable, due to items being in use. The impact of those factors will vary from system to system.
kbmemusedAmount of used memory in kilobytes (calculated as total installed memory - kbmemfree - kbbuffers - kbcached - kbslab).
%memusedPercentage of used memory.
kbbuffersAmount of memory used as buffers by the kernel in kilobytes.
kbcachedAmount of memory used to cache data by the kernel in kilobytes.
kbcommitAmount of memory in kilobytes needed for current workload.This is an estimate of how much RAM/swap is needed to guarantee that there never is out of memory.
%commitPercentage of memory needed for current workload in relation to the total amount of memory (RAM+swap). This number may be greater than 100% because the kernel usually overcommits memory.
kbactiveAmount of active memory in kilobytes (memory that has been used more recently and usually not reclaimed unless absolutely necessary).
kbinactAmount of inactive memory in kilobytes (memory which has been less recently used. It is more eligible to be reclaimed for other purposes).
kbdirtyAmount of memory in kilobytes waiting to get written back to the disk.

总结

提示:这里对文章进行总结:

例如:xxx。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值