The command xentop -bi1
outputs the following:
NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR VBD_RSECT VBD_WSECT SSID
Domain-0 -----r 37719 0.0 2096776 6.4 no limit n/a 1 0 0 0 0 0 0 0 0 0 0
testvm01 --b--- 69 0.0 131072 0.4 131072 0.4 1 1 2388 1670 2 0 3358 15802 154314 273808 0
xenwin2008 --b--- 8208 0.0 1052628 3.2 1052672 3.2 1 2 1361 0 2 0 0 0 0 0 0
I want to output only the cpu usage of testvm01
So, i use grep: xentop -bi1 | grep testvm01
testvm01 --b--- 69 0.0 131072 0.4 131072 0.4 1 1 2389 1672 2 0 3358 15826 154314 274080 0
How to get only the value "0.0"?