-bash: iostat: command not found解决办法

本文介绍在Linux环境下如何解决iostat命令不可用的问题,通过安装sysstat包来启用iostat、mpstat、sar等监控工具,并解析了iostat输出的CPU和磁盘活动指标含义。

[root@testhost ~]# iostat
-bash: iostat: command not found

IOSTAT 命令不可用,首先确认sysstat包是否安装,sysstat包中包括iostat,mpstat,sar,sa

[root@testhost ~]#yum install -y sysstat

安装完成后,再执行iostat命令。

 

解释:

avg-cpu段:
%user: 在用户级别运行所使用的CPU的百分比.
%nice: nice操作所使用的CPU的百分比.
%sys: 在系统级别(kernel)运行所使用CPU的百分比.
%iowait: CPU等待硬件I/O时,所占用CPU百分比.
%idle: CPU空闲时间的百分比.


Device段:
tps: 每秒钟发送到的I/O请求数.
Blk_read /s: 每秒读取的block数.
Blk_wrtn/s: 每秒写入的block数.
Blk_read:   读入的block总数.
Blk_wrtn:  写入的block总数.

转载于:https://www.cnblogs.com/insane-Mr-Li/p/11209363.html

【负载】 01:45:14 up 2 min, 1 user, load average: 0.13, 0.15, 0.07 【内存】 total used free shared buff/cache available Mem: 31Gi 657Mi 30Gi 1.0Mi 273Mi 30Gi Swap: 0B 0B 0B 【磁盘】 Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext4 387G 3.5G 383G 1% / /dev/sda16 ext4 881M 115M 705M 14% /boot /dev/sda15 vfat 105M 6.2M 99M 6% /boot/efi 【网络】 default via 185.199.52.254 dev eth0 proto static 185.199.52.0/24 dev eth0 proto kernel scope link src 185.199.52.219 开放端口: tcp LISTEN 0 4096 127.0.0.1:65529 0.0.0.0:* tcp LISTEN 0 4096 127.0.0.54:53 0.0.0.0:* tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* tcp LISTEN 0 4096 *:22 *:* root@srv771551:~# $ uptime # 查看1/5/15分钟平均负载 01:43:01 up 10 days, load average: 0.74, 0.68, 0.55 $ top # 实时进程监控(按1查看多核) %Cpu(s): 0.5 us, 0.3 sy, 0.0 ni, 99.2 id, 0.0 wa, 0.0 hi, 0.0 si $: command not found 01:43:01: command not found $: command not found -bash: syntax error near unexpected token `s' root@srv771551:~# $ free -h total used free shared buff/cache available Mem: 386G 0.2G 385G 16M 683M 385G Swap: 0B 0B 0B $: command not found Command 'total' not found, did you mean: command 'topal' from deb topal (81-2ubuntu2.1) Try: apt install <deb name> Mem:: command not found Swap:: command not found root@srv771551:~# # 安装I/O监控工具 $ sudo apt install sysstat -y # 实时I/O性能监控 (每2秒刷新,共5次) $ iostat -dxm 2 5 Device r/s w/s rMB/s wMB/s avgqu-sz await %util sda 0.25 1.32 0.01 0.03 0.02 1.23 0.05 $: command not found $: command not found Device: command not found Command 'sda' not found, but there are 15 similar ones. root@srv771551:~# 帮我修复服务器的问题
最新发布
07-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值