【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 \~#

相关推荐
蜗牛一步步往上爬5 小时前
第十一章 构建基本脚本
linux
星恒随风5 小时前
从0实现C++ AI大模型接入SDK(二):AI知识科普——从图灵测试到ChatGPT,人工智能的发展历程
linux·c++·人工智能·笔记·chatgpt
飞奔的瓜牛5 小时前
Linux 数据盘分区、格式化与自动挂载完整实践
linux·运维·服务器
Lucas. Wáng7 小时前
Linux网络编程之网络套接字
linux·服务器·网络
数字新视界7 小时前
动环智能监控在机房管理中的智能应用与安全保障
服务器·数据中心·机房·环境管理·环控系统
进击的荆棘7 小时前
Linux网络——Socket编程TCP
linux·运维·服务器·网络·tcp/ip
大今野7 小时前
2026 专转本计算机|Linux CentOS7 软件包管理:yum 仓库配置与常用命令考点全解(附例题)
linux·运维·服务器·专转本
SeanQhl8 小时前
openEuler 下 Docker 静态安装与容器基础操作
linux·docker·云原生·容器·openeuler
无奈笑天下8 小时前
Wine适配Windows程序常见故障标准处理流程
linux·运维·服务器·windows
沫璃染墨8 小时前
从零入门计算机网络系列(二十六):IPv4分片机制详解——从MTU与MSS到报文分片与重组
运维·服务器·网络·网络协议·tcp/ip·ip