提交 a9ae6c27 编写于 作者: N nocjj

doc: Add document for vmtop

FAQ: explanation of some terms
TODO: something to do in future
HOWTO: ways to devalop
Signed-off-by: NJiajun Chen <1250062498@qq.com>
上级 a4cc4156
1. Explanations of terms in project.
1) field
Member of task that is being to show in screen
===========================================
DID VMname PID %CPU S P
3 cjj2 64716 0.0 S 23
|_ qemu-kvm 64716 0.0 S 23
|_ qemu-kvm 64734 0.0 S 13
===========================================
"DID", "VMname" are field names, and "3" is the DID field of task,
"cjj2" is VMname field of task.
2) delay time
time unit 1s, time interval between two display, and is also time interval
for obtaining data.
2. What does items vmtop display means?
DID: virtual machine id in libvirt
VM/task-name: name of virtual machine or threads
PID: pid of qemu or threads
%CPU: CPU usage of task
EXTxxx: kvm exit times
P: physical cpu that task runs
S: task state, include: R, S, D, T, Z, X
%ST: cpu time vcpu wait pcpu while it is running other vcpu
%GUE: cpu time in guest
%HYP: cpu time in hypervisor
3. What archs are supported?
Currently, only aarch64 is supported.
4. Where to send bug report?
You may send your bug report to virt@openeuler.org or open an issue in
https://gitee.com/openeuler/vmtop.
1.How to add a display item for vmtop?
Of course, the display item data get should have been realized. Then, you can add related display item to vmtop display through the following steps:
1) Add a enum item in fields_type(field.h).
Take 'S' display item as example:
Add "FD_STATE" enum in fields_type
--------------------------------
enum fields_type {
FD_DID,
...
FD_STATE,
FD_END
};
--------------------------------
2) Add display setting in fields(field.c):
--------------------------------
FID fields[] = {
/* name . flag . align */
{"DID", FIELDS_DISPLAY, 5 },
...
{"S", FIELDS_DISPLAY, 5 }
};
--------------------------------
3) Add relate print case in print_domain_field(vmtop.c):
--------------------------------
static void print_domain_field(struct domain *dom, int field)
{
int i = field;
switch (i) {
case FD_VMNAME: {
| printw("%*.*s", fields[i].align, fields[i].align - 2, dom->vmname);
| break;
}
...
case FD_STATE: {
| printw("%*c", fields[i].align, dom->state);
| break;
}
...
}
--------------------------------
4) Make and run.
1. Disk io status
Show disk io status for each disk of each virtual machine.
2. Set io status
Show net io status for each net card of each virtual machine.
3. Sort key
Add short cut key to choose which field to sort by.
4. Introducing multithreads
Now, vmtop use delay time to set time interval between two data acquisitions.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册