linuxatop命令工具介绍

韵味老鸟 2024-08-17 14:57:04

linux atop命令工具介绍

Linux 上的 atop 命令是一个强大的系统监控工具,可以实时显示系统资源的使用情况

一:安装部署

root@meng:~# atop

Command 'atop' not found, but can be installed with:

apt install atop

root@meng:~# apt install atop

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following NEW packages will be installed:

atop

0 upgraded, 1 newly installed, 0 to remove and 214 not upgraded.

Need to get 180 kB of archives.

After this operation, 500 kB of additional disk space will be used.

Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 atop amd64 2.7.1-1 [180 kB]

Fetched 180 kB in 3s (67.6 kB/s)

Selecting previously unselected package atop.

(Reading database ... 74979 files and directories currently installed.)

Preparing to unpack .../atop_2.7.1-1_amd64.deb ...

Unpacking atop (2.7.1-1) ...

Setting up atop (2.7.1-1) ...

Created symlink /etc/systemd/system/timers.target.wants/atop-rotate.timer → /lib/systemd/system/atop-rotate.timer.

Created symlink /etc/systemd/system/multi-user.target.wants/atop.service → /lib/systemd/system/atop.service.

Created symlink /etc/systemd/system/multi-user.target.wants/atopacct.service → /lib/systemd/system/atopacct.service.

Processing triggers for man-db (2.10.2-1) ...

Scanning processes...

Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

root@meng:~# atop

显示特定资源信息使用 atop -c 显示 CPU 使用情况。使用 atop -m 显示内存使用情况。使用 atop -d 显示磁盘利用率。使用 atop -n 显示网络信息。快捷键使用 a 按最活跃的资源排序。使用 c 按 CPU 使用率排序(默认)。使用 d 按磁盘活动排序。使用 m 按内存使用率排序。使用 n 按网络活动排序。

日志和报告atop 默认会将系统快照写入压缩日志文件,如 /var/log/atop/atop_20140813。使用 atop -r </full/path/to/atop/log> 读取日志文件。

二:案例使用

0 阅读:2

韵味老鸟

简介:感谢大家的关注