【RHCA+】dstat命令(监控系统资源)

" 目录:RHCA+ -> 12 系统监控 -> 9 dstat命令(监控系统资源) "

查看CPU、网络、磁盘等监控信息;语法格式:dstat 参数

|------------|--------------|
| 参数 | 作用 |
| --help | 查看帮助 |
| -c, --cpu | 只查看CPU统计信息 |
| -d, --disk | 只查看磁盘统计信息 |
| -m, --mem | 只查看内存统计信息 |
| -n, --net | 只查看网络统计信息 |
| --tcp | 只查看TCP状态统计信息 |
| --top-cpu | 查看占用CPU最高的进程 |
| --top-mem | 查看占用内存最高的进程 |
| --top-io | 查看占用IO最高的进程 |

一、安装

root@wuzuniao \~# yum -y install dstat #安装软件包

二、使用

root@wuzuniao \~# dstat #查看系统监控

You did not select any stats, using -cdngy by default.

----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--

usr sys idl wai hiq siq| read writ| recv send| in out | int csw

0 0 99 0 0 0| 47k 3615B| 0 0 | 0 0 | 37 64

0 0 100 0 0 0| 0 0 | 180B 886B| 0 0 | 33 42

1 0 99 0 0 0| 0 0 | 300B 444B| 0 0 | 56 81 ^C

root@wuzuniao \~# dstat --tcp #查看tcp监控信息

----tcp-sockets----

lis act syn tim clo

10 2 0 0 0

10 2 0 0 0

root@wuzuniao \~# dstat --top-mem #查看占用CPU最高的进程

--most-expensive-

memory process

gnome-shell 139M

gnome-shell 139M

root@wuzuniao \~# dstat --top-cpu #查看占用内存最高的进程

-most-expensive-

cpu process

gnome-shell 0.2

kworker/0:1 1.0

root@wuzuniao \~#

三、查看帮助

root@wuzuniao \~# dstat --help #查看帮助

Usage: dstat -afv options.. delay \[count]

Versatile tool for generating system resource statistics

Dstat options:

-c, --cpu enable cpu stats

-C 0,3,total include cpu0, cpu3 and total

-d, --disk enable disk stats

-D total,hda include hda and total

-g, --page enable page stats

-i, --int enable interrupt stats

-I 5,eth2 include int5 and interrupt used by eth2

-l, --load enable load stats

-m, --mem enable memory stats

-n, --net enable network stats

-N eth1,total include eth1 and total

-p, --proc enable process stats

-r, --io enable io stats (I/O requests completed)

-s, --swap enable swap stats

-S swap1,total include swap1 and total

-t, --time enable time/date output

-T, --epoch enable time counter (seconds since epoch)

-y, --sys enable system stats

--aio enable aio stats

--fs, --filesystem enable fs stats

--ipc enable ipc stats

--lock enable lock stats

--raw enable raw stats

--socket enable socket stats

--tcp enable tcp stats

--udp enable udp stats

--unix enable unix stats

--vm enable vm stats

--plugin-name enable plugins by plugin name (see manual)

--list list all available plugins

-a, --all equals -cdngy (default)

-f, --full automatically expand -C, -D, -I, -N and -S lists

-v, --vmstat equals -pmgdsc -D total

--bits force bits for values expressed in bytes

--float force float values on screen

--integer force integer values on screen

--bw, --blackonwhite change colors for white background terminal

--nocolor disable colors (implies --noupdate)

--noheaders disable repetitive headers

--noupdate disable intermediate updates

--output file write CSV output to file

--profile show profiling statistics when exiting dstat

delay is the delay in seconds between each update (default: 1)

count is the number of updates to display before exiting (default: unlimited)

root@wuzuniao \~#

相关推荐
时空无限1 小时前
ubuntu 26.04 sudo 连不上主机卡住然后失败问题处理
linux·服务器·ubuntu
路溪非溪2 小时前
C++标准库之智能指针
linux·开发语言·c++
外收内放2 小时前
ENSP学习记录(4)
服务器·学习·智能路由器
程序员大雄学编程2 小时前
Linux 磁盘满了怎么排查?df / du / find 三步定位大文件
linux·运维·php
RuoyiOffice2 小时前
Hyper-V+Kubernetes 搭建实战:保留 Windows,构建三节点 Linux 容器集群
linux·spring boot·kubernetes·containerd·hyper-v·微服务部署·ruoyi office
凯基迪科技2 小时前
瑞萨R5F100解密 R8C/RL78 MCU 固件读取与保护机制详解
服务器·网络·单片机
承渊政道2 小时前
Linux网络学习【五种IO模型与⾮阻塞IO】
linux·网络·学习·ubuntu·io模型·非阻塞io
开开心心就好3 小时前
网页图片批量下载工具,输入链接就保存
服务器·算法·leetcode·支持向量机·pdf·ocr·1024程序员节
wuminyu3 小时前
JVM执行引擎学习总结:热点字节码编译成本地机器码
java·linux·c语言·jvm·c++