ProxBox资源监视器
proxtop的Python项目详细描述
proxtop列出了proxmox vm平台的顶级资源使用者。
- 它将列出这些资源的顶级用户的列:
- CPU
- 磁盘读取
- 磁盘写入
- 网友
- 网络输出
proxtop 0.3.0中的重要更改:
- 现在只显示平均值、中值、最大值之一。请参见-g选项。
- 部分匹配选项已被删除,以支持全局搜索 (例如*server-name*)。
- 默认输出现在是中值。
proxtop 0.2.0中的重要更改:
- 默认端口现在是443。这是用proxmox 4.0-57测试的。 如果您想要旧的默认端口8006,您可以附加“:8006” 到主机名。
- vm容器类型现在在rest路径中使用:即/qemu/ (或lxc)而不是/openvz/。
安装
通过PIP:
$ pip install proxtop
通过Git:
$ pip install proxmoxer # tested with 0.1.7 and 0.2.0 $ pip install requests # tested with 2.2.1 and 2.5.3 $ git clone https://github.com/ossobv/proxtop.git $cd proxtop $ python setup.py install
示例
$ ./proxtop -t day proxmox.example.com:8006 monitor@pve Password:<enter password> SORTED BY: diskread, avg ------------------ #0: 3.1 MiB/s pve10 (acme-bugs-bunny)#1: 1.3 MiB/s pve07 (customerX-private)#2: 992.3 KiB/s pve10 (acme-road-runner)... SORTED BY: cpu, max ------------------ #0: 91 % pve07 (customerX-private)#1: 89 % pve10 (acme-bugs-bunny)#2: 66 % pve10 (acme-elmer-fudd)
有关更多选项,请参阅帮助:
usage: proxtop [-h] [-T TOP] [-t TIMEFRAME] [-g AGGREGATION]
[--only-storage ONLY_STORAGE]
hostname username [only_vms [only_vms ...]]
proxtop lists the top resource consumers on your Proxmox VM platform.
positional arguments:
hostname Use this API hostname (e.g. proxmox.example.com[:443])
username Use this API username (e.g. monitor@pve)
only_vms Limit results to these VM names (globbing is allowed)
optional arguments:
-h, --help show this help message and exit
-T TOP, --top TOP Limit results to TOP VMs
-t TIMEFRAME, --timeframe TIMEFRAME
Timeframe, can be one of: hour* | day | week | month |
year
-g AGGREGATION, --aggregation AGGREGATION
RRD aggregation, can be one of: AVERAGE | MAX |
MEDIAN*
--only-storage ONLY_STORAGE
Filter VMs by storage glob (e.g. "nfs03*")
Default values may be placed in ~/.proxtoprc. Lines should look like:
hostname=HOSTNAME, username=USERNAME, password=PASSWORD
许可证
proxtop是免费软件:您可以在 自由党公布的GNU通用公共许可条款 软件基础,版本3或任何更高版本。
未来
未来可能的增强功能:
- 解释服务器端聚合如何影响值 (或者删除avg/max子类型,只显示一个,基于 开-关)。
- 添加其他输出模式?
- 仅将结果限制为一项(CPU、磁盘读取…)?