问题描述
我正在寻找系统监视工具,它们是GUI和Cli或基于Web的工具,其中包括基本功能,例如
CPU使用率
公羊使用
交换使用
磁盘使用情况(空间/I /O)
热监测
我知道有很多工具可以使用,但我正在寻找一种具有这些基本功能的工具。
最佳解决方案
浏览 – 关注你的系统
Glances是一款免费软件(根据LGPL授权),可通过文本界面监控您的GNU /Linux或BSD操作系统。 Glances使用库libstatgrab从您的系统中检索信息,并使用Python开发。
Installation
打开终端(Ctrl + Alt + T)并运行以下命令:
从Ubuntu 16.04及以上版本,您只需键入sudo apt install glances,但版本2.3 have this bug。其他:
curl -L https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh | sudo /bin/bash
要么
wget -O- https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh | sudo /bin/bash
手动安装
sudo apt-get install python-pip build-essential python-dev lm-sensors
sudo pip install psutil logutils bottle batinfo https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz zeroconf netifaces pymdstat influxdb elasticsearch potsdb statsd pystache docker-py pysnmp pika py-cpuinfo bernhard
sudo pip install glances
基本用法
要启动glances,只需在终端中键入glances。
通过浏览,您可以看到关于系统资源的大量信息:默认情况下,CPU,负载,内存,交换网络,磁盘I /O和进程全部在一个页面中,颜色代码表示:
GREEN : the statistic is “OK”
BLUE : the statistic is “CAREFUL” (to watch)
VIOLET : the statistic is “WARNING” (alert)
RED : the statistic is “CRITICAL” (critical)
当Glances正在运行时,您可以按下一些特殊的键给它发送命令:
c: Sort processes by CPU%
m: Sort processes by MEM%
p: Sort processes by name
i: Sort processes by IO Rate
d: Show/hide disk I/O stats
f: Show/hide file system stats
n: Show/hide network stats
s: Show/hide sensors stats
b: Bit/s or Byte/s for network IO
w: Delete warning logs
x: Delete warning and critical logs
1: Global CPU or Per Core stats
h: Show/hide this help message
q: Quit (Esc and Ctrl-C also work)
l: Show/hide log messages
Cpu,Ram,交换监控
磁盘监视
系统热量监测
如果键入glances --help,则会发现(-e启用传感器模块(Linux-only))
glances -e
配置文件
您可以在Glances配置文件中设置阈值,在GNU /Linux上,默认配置文件位于/etc/glances/glanc