大网数据广告活动
服务器运维问答

virsh command that displays the cpu and memory consumption?

· 52CE 我爱测

I want to know if there is a command virsh to display the cpu and memory consumption of each machine virtual. I created the virtual machine using KVM in ubuntu system.

问题原文

原帖链接 · Nadya Nux · CC BY-SA 3.0

I want to know if there is a command virsh to display the cpu and memory consumption of each machine virtual. I created the virtual machine using KVM in ubuntu system.

已采纳解答

原帖链接 · Pablo Martinez · CC BY-SA 4.0

The command dommemstat can give you memory stats for a specific domain and with domstats you can get plenty of stats for all domains or just the specified. You can pass the parameter --cpu-total to see the total in the moment.

First get a virsh interactive console by typing virsh on your command line and then, once inside virsh's console, issue the following command:

virsh # domstats --cpu-total

The previous command will give you the CPU stats for all domains. If you have virt-manager you can see live some graphs and other nice stats, and if you want to collect them for a time you would need some other tool, I would recommend collectd and its 'virt' plugin

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-05-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。