Linux系统资源监控

系统资源查看

free

free  displays  the  total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo. The displayed columns are:

free命令可以显示当前系统未使用的和已使用的内存数目,还可以显示被内核使用的内存缓冲区。

# free
              total        used        free      shared  buff/cache   available
Mem:       32761704    27925420      321020       21440     4515264     4412040
Swap:      16515068     2721536    13793532

free -b 以bytes 方式显示信息 ;-k 以kb方式显示; -g 以GB方式显示信息; -h 自适应(方面阅读)

 

top

top -hv|-bcHioSs -d secs -n max  -u|U user -p pid -o fld -w [clos] The traditional switches `-' and whitespace are optional.

查看系统整体的负载

Option

# Option
# top -d num: 每间隔num秒显示所有进行占用情况(刷新)
# top -p  pid 指定查看某一个或多个进程号的占用资源情况
# top -c 显示进程的命令行参数(command) 缺省为不显示

 

posted on 2024-05-09 17:53  Xielb  阅读(6)  评论(0编辑  收藏  举报

导航