Updated vhostmd.conf file which enables TotalCPUTime metric.

This commit is contained in:
Richard W.M. Jones 2010-04-27 10:39:00 +00:00
parent 8791133062
commit 685be0dbbd
2 changed files with 23 additions and 5 deletions

View File

@ -150,13 +150,28 @@ within the vm element.
<variable name="PageInRate" type="uint64"/>
<variable name="PageFaultRate" type="uint64"/>
</metric>
<!--<metric type="real64" context="host">
<metric type="real64" context="host">
<name>TotalCPUTime</name>
<action>
virsh -r CONNECT dominfo 0 | sed 's/: */:/' \
| gawk -F: '/CPU time/ {print $2;}'
gawk 'BEGIN {
getline &lt; "/proc/uptime";
idle_sec = $2;
while ( 0 &lt;= (getline &lt; "/proc/stat") )
{
if ( "cpu" == $1 )
{
USER_HZ = $5/idle_sec;
#printf "USER_HZ = %f\n", USER_HZ | "cat 1&gt;&amp;2"
TotalCPUTime = ($2 + $3 + $4)/USER_HZ;
printf "%f\n", TotalCPUTime;
break;
}
}
#close("cat 1&gt;&amp;2");
}'
</action>
</metric>-->
</metric>
<!-- SAP "CIM" -->
<metric type="real64" context="vm">
<name>TotalCPUTime</name>

View File

@ -8,7 +8,7 @@
Summary: Virtualization host metrics daemon
Name: vhostmd
Version: 0.4
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -192,6 +192,9 @@ exit 0
%changelog
* Tue Apr 27 2010 Richard W.M. Jones <rjones@redhat.com> - 0.4-6
- Updated vhostmd.conf file which enables TotalCPUTime metric.
* Tue Feb 16 2010 Richard W.M. Jones <rjones@redhat.com> - 0.4-5
- Add a patch to link tests explicitly with -ldl (RHBZ#565096).