晶羽科技-解读点评影视小说作品

微信
手机版

生产机器负载告警发现用iostat竟没有此工具

2023-12-14 19:13 作者:岑岑 围观:

系统报警,登录机器查看io情况,突然发现没有iostat。

[root @ Mao MySQL]# iostat-bash:iostat:command not found[root @ Mao MySQL]#不要安装这个工具包。

然后使用rpm-QA | grepsystat *进行检查和确认,如果没有的话。

上次登录:Satfeb 12 20: 07: 42 2022发自120.229.47.177[root @欧玛~] # rpm-QA | grepsystat * [root @欧玛~] #此时使用配置好的yum安装这个组合工具包或者直接上传包用rpm -ivh安装。

因为sysstat包中包含了iostat、mpstat、sar和sa工具。

直接启动,用yum源码一键安装:

首先检查可用的来源:

[root @欧玛~]# yum repolist loaded plugins:fastest mirror,langpacks,product-id,search-disabled-repos,subscription-manager此系统未向授权服务器注册。您可以使用subscription-manager进行注册。配置中不止一次列出了存储库epel存储库数据已超过两周。安装yum-cron?或者运行:yum makecache确定最快的mirrorsrepo id repo name status!epel/7/x86 _ 64 EPEL for red hat/centos 7-x86 _ 64 13,709!extras/7/x86 _ 64 q cloud centos extras-x86 _ 64 500!MySQL-Connectors-Community/x86 _ 64 MySQL Connectors社区221!MySQL-Tools-Community/x86 _ 64 MySQL工具社区135!MySQL 80-社区/x86_64 MySQL 8.0社区服务器301!OS/7/x86 _ 64 q cloud centos OS-x86 _ 64 10,072!pgdg-common/7/x86_64适用于RHEL的PostgreSQL通用rpm/CentOS 7-x86 _ 64 357!pgdg 10/7/x86 _ 64 PostgreSQL 10 for RHEL/CentOS 7-x86 _ 64 1,007!pgdg 11/7/x86 _ 64 PostgreSQL 11 for RHEL/CentOS 7-x86 _ 64 1,115!适用于RHEL的pgdg 12/7/x86 _ 64 PostgreSQL 12/CentOS 7-x86 _ 64 702!适用于RHEL的pgdg 13/7/x86 _ 64 PostgreSQL 13/CentOS 7-x86 _ 64 444!适用于RHEL的pgdg 96/7/x86 _ 64 PostgreSQL 9.6/CentOS 7-x86 _ 64 960!updates/7/x86 _ 64 q cloud centos updates-x86 _ 64 3,242 report list:32,765[root @ 192 ~]# yum install sysstat * Loaded plugins:product-id,search-disabled-repos,subscription-manager此系统未向授权服务器注册。您可以使用subscription-manager进行注册。base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00更新| 2.9 kB 00:00:00解析依赖关系-& gt;正在运行事务检查-& gt;将安装sysstat.x86_64 0:10.1.5-19.el7软件包-& gt;程序包的处理依赖项:lib sensors . so . 4()(64位):sysstat-10 . 1 . 5-19 . el7 . x86 _ 64-& gt;正在运行事务检查-& gt;将安装软件包lm _ sensors-libs . x86 _ 64 0:3 . 4 . 0-8.2016 06 01 gitf 9185 e 5 . el7-& gt;已完成依赖项解析dependencies Resolved = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =包拱版本库大小= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =安装:sysstat x86_64 10.1.5-19.el7 base0-8.2016 06 01 gitf 9185 e 5 . el7 . x86 _ 64 1/2安装:sysstat-10 . 1 . 5-19 . el7 . x86 _ 64 2/2验证:sysstat-10 . 1 . 5-19 . el7 . x86 _ 64 1/2验证:lm _ sensors-libs-3 . 4 . 0-8.2016 06 01 gitf 9185 e 5 . el7 . x86 _ 64 2/2安装:sys检查成功安装的软件包:

rpm-QA | grep sysstat * sysstat-10 . 1 . 5-19 . el7 . x86 _ 64如果要删除软件包,请使用:

root @ 192 ~]# rpm-e sysstat-10 . 1 . 5-19 . el7 . x86 _ 64[root @ 192 ~]# rpm-QA | grep sysstat-10 . 1 . 5-19 . el7 . x86 _ 64[root @ 192 ~]

[root @ 192 ~]# sar-u 5 Linux 3 . 10 . 0-1160 . el7 . x86 _ 64(192 . 168 . 10 . 248)02/12/2022 _ x86 _ 64 _(1个CPU)08:52:39PM CPU % user % nice % system % iowait % steal % idle 08:52:44PM all 0.00 0.00 0.20 0 0.00 0.00 99 08:53:45PM CPU % usr % nice % sys % iowait % IRQ % soft % steal % guest % gnice % idle 08:53:45PM all 0.06 0.00 0.11 0.01 0.0 0 0.00 0 0.00 0 0.00 99.81[root @ 192 ~]# iostat-x 1 5 Linux 3 . 10 . 0-1160.17 . x86 _ 64(192 s avgrq-SZ avgqu-SZ await r _ await w _ await SVC TM % utilsda 0.00 0.01 0.10 0.09 3.57 2.20 58.83 0.00 8.61 4.88 12.74 2.00 0 0.04 SCD 0.00 0 0.00 0 0.00 0 0.02 0.00 114.22 0 0.00 0 0.50 0 0 s avgrq-SZ avgqu-SZ await r _ await w _ await SVC TM % utilsda 0.00 0.00 0.00 0.00 17.00 17.00 0.00 0.00 1.00 0.50 0 0.10 SCD 0.00 0 0.00 0 0.00 0 0.00 0 0.00 0 0.00 0 0 0.00 0 0 s avgrq-SZ avgqu-SZ await r _ await w _ await SVC TM % utilsda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 0 0.00 0.00 SCD 0.00 0 0.00 0 s avgrq-SZ avgqu-SZ await r _ await w _ await SVC TM % utilsda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 0 0.00 0.00 SCD 0.00 0 0.00 0 s avgrq-SZ avgqu-SZ await r _ await w _ await SVC TM % utilsda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 0 0.00 0.00 SCD 0.00 0 0.00 0

相关文章