Changes:
xxxx/xx/xx: Version 10.1.2 - Sebastien Godard (sysstat <at> orange.fr)
+ * New field added to sar -u: %gnice (time spent running a niced
+ guest).
* [Peter Schiffer]: systemd support added.
* [Peter Schiffer]: Sysstat init script updated to make it
more conforming to LSB.
* sar and sadf manual pages updated.
+ * DTD and XSD documents updated.
* Cosmetic change in sadf -H output.
2012/07/29: Version 10.1.1 - Sebastien Godard (sysstat <at> orange.fr)
.f_xml_print = xml_print_cpu_stats,
.f_json_print = json_print_cpu_stats,
.hdr_line = "CPU;%user;%nice;%system;%iowait;%steal;%idle|"
- "CPU;%usr;%nice;%sys;%iowait;%steal;%irq;%soft;%guest;%idle",
+ "CPU;%usr;%nice;%sys;%iowait;%steal;%irq;%soft;%guest;%gnice;%idle",
.name = "A_CPU",
#endif
.nr = -1,
if ((scc->cpu_user - scc->cpu_guest) < (scp->cpu_user - scp->cpu_guest)) {
/*
- * Sometimes the nr of jiffies spent in guest mode given by the guest
- * counter in /proc/stat is slightly higher than that included in
- * the user counter. Update the interval value accordingly.
- */
- ishift = (scp->cpu_user - scp->cpu_guest) -
- (scc->cpu_user - scc->cpu_guest);
+ * Sometimes the nr of jiffies spent in guest mode given by the guest
+ * counter in /proc/stat is slightly higher than that included in
+ * the user counter. Update the interval value accordingly.
+ */
+ ishift += (scp->cpu_user - scp->cpu_guest) -
+ (scc->cpu_user - scc->cpu_guest);
+ }
+ if ((scc->cpu_nice - scc->cpu_guest_nice) < (scp->cpu_nice - scp->cpu_guest_nice)) {
+ /*
+ * Idem for nr of jiffies spent in guest_nice mode.
+ */
+ ishift += (scp->cpu_nice - scp->cpu_guest_nice) -
+ (scc->cpu_nice - scc->cpu_guest_nice);
}
- /* Don't take cpu_guest into account because cpu_user already includes it */
+ /*
+ * Don't take cpu_guest and cpu_guest_nice into account
+ * because cpu_user and cpu_nice already include them.
+ */
return ((scc->cpu_user + scc->cpu_nice +
scc->cpu_sys + scc->cpu_iowait +
scc->cpu_idle + scc->cpu_steal +
/* Debug output */
fprintf(stderr, "itv=%llu st_cpu[curr]{ cpu_user=%llu cpu_nice=%llu "
"cpu_sys=%llu cpu_idle=%llu cpu_iowait=%llu cpu_steal=%llu "
- "cpu_hardirq=%llu cpu_softirq=%llu cpu_guest=%llu }\n",
+ "cpu_hardirq=%llu cpu_softirq=%llu cpu_guest=%llu "
+ "cpu_guest_nice=%llu }\n",
itv,
st_cpu[curr]->cpu_user,
st_cpu[curr]->cpu_nice,
st_cpu[curr]->cpu_steal,
st_cpu[curr]->cpu_hardirq,
st_cpu[curr]->cpu_softirq,
- st_cpu[curr]->cpu_guest
- );
+ st_cpu[curr]->cpu_guest,
+ st_cpu[curr]->cpu_guest_nice);
}
#endif
/*
* If the CPU is offline then it is omited from /proc/stat:
* All the fields couldn't have been read and the sum of them is zero.
- * (Remember that guest time is already included in user mode.)
+ * (Remember that guest/guest_nice times are already included in
+ * user/nice modes.)
*/
if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys +
scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal +
"\"irq\": %.2f, "
"\"soft\": %.2f, "
"\"guest\": %.2f, "
+ "\"gnice\": %.2f, "
"\"idle\": %.2f}",
i - 1, 0.0, 0.0, 0.0, 0.0,
- 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0, 0.0,
cpu_offline ? 0.0 : 100.0);
}
continue;
"\"steal\": %.2f, "
"\"idle\": %.2f}",
cpuno,
- ll_sp_value(scp->cpu_user, scc->cpu_user, g_itv),
- ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
+ ll_sp_value(scp->cpu_user, scc->cpu_user, g_itv),
+ ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
ll_sp_value(scp->cpu_sys + scp->cpu_hardirq + scp->cpu_softirq,
scc->cpu_sys + scc->cpu_hardirq + scc->cpu_softirq,
g_itv),
ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
- ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
+ ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
scc->cpu_idle < scp->cpu_idle ?
0.0 :
- ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
+ ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
}
else if (DISPLAY_CPU_ALL(a->opt_flags)) {
xprintf0(tab, "{\"cpu\": \"%s\", "
"\"irq\": %.2f, "
"\"soft\": %.2f, "
"\"guest\": %.2f, "
+ "\"gnice\": %.2f, "
"\"idle\": %.2f}",
cpuno,
(scc->cpu_user - scc->cpu_guest) < (scp->cpu_user - scp->cpu_guest) ?
0.0 :
ll_sp_value(scp->cpu_user - scp->cpu_guest,
- scc->cpu_user - scc->cpu_guest, g_itv),
- ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
- ll_sp_value(scp->cpu_sys, scc->cpu_sys, g_itv),
- ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
- ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
+ scc->cpu_user - scc->cpu_guest, g_itv),
+ (scc->cpu_nice - scc->cpu_guest_nice) < (scp->cpu_nice - scp->cpu_guest_nice) ?
+ 0.0 :
+ ll_sp_value(scp->cpu_nice - scp->cpu_guest_nice,
+ scc->cpu_nice - scc->cpu_guest_nice, g_itv),
+ ll_sp_value(scp->cpu_sys, scc->cpu_sys, g_itv),
+ ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
+ ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
ll_sp_value(scp->cpu_hardirq, scc->cpu_hardirq, g_itv),
ll_sp_value(scp->cpu_softirq, scc->cpu_softirq, g_itv),
- ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
+ ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
+ ll_sp_value(scp->cpu_guest_nice, scc->cpu_guest_nice, g_itv),
scc->cpu_idle < scp->cpu_idle ?
0.0 :
- ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
+ ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
}
}
}
-.TH SAR 1 "JULY 2012" Linux "Linux User's Manual" -*- nroff -*-
+.TH SAR 1 "SEPTEMBER 2012" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
sar \- Collect, report, or save system activity information.
.SH SYNOPSIS
Percentage of time spent by the CPU or CPUs to run a virtual processor.
.RE
+.B %gnice
+.RS
+Percentage of time spent by the CPU or CPUs to run a niced guest.
+.RE
+
.B %idle
.RS
Percentage of time that the CPU or CPUs were idle and the system
else if (DISPLAY_CPU_ALL(a->opt_flags)) {
printf("\n%-11s CPU %%usr %%nice %%sys"
" %%iowait %%steal %%irq %%soft"
- " %%guest %%idle\n",
+ " %%guest %%gnice %%idle\n",
timestamp[!curr]);
}
}
/*
* If the CPU is offline then it is omited from /proc/stat:
* All the fields couldn't have been read and the sum of them is zero.
- * (Remember that guest time is already included in user mode.)
+ * (Remember that guest/guest_nice times are already included in
+ * user/nice modes.)
*/
if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys +
scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal +
*/
*scc = *scp;
+ /* %user, %nice, %system, %iowait, %steal, ..., %idle */
printf(" %6.2f %6.2f %6.2f"
" %6.2f %6.2f %6.2f",
0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if (DISPLAY_CPU_ALL(a->opt_flags)) {
- printf(" %6.2f %6.2f %6.2f",
- 0.0, 0.0, 0.0);
+ /*
+ * Four additional fields to display:
+ * %irq, %soft, %guest, %gnice.
+ */
+ printf(" %6.2f %6.2f %6.2f %6.2f",
+ 0.0, 0.0, 0.0, 0.0);
}
printf("\n");
continue;
/*
* If the CPU is tickless then there is no change in CPU values
* but the sum of values is not zero.
+ * %user, %nice, %system, %iowait, %steal, ..., %idle
*/
printf(" %6.2f %6.2f %6.2f"
" %6.2f %6.2f",
if (DISPLAY_CPU_DEF(a->opt_flags)) {
printf(" %6.2f\n", 100.0);
}
+ /*
+ * Four additional fields to display:
+ * %irq, %soft, %guest, %gnice.
+ */
else if (DISPLAY_CPU_ALL(a->opt_flags)) {
printf(" %6.2f %6.2f %6.2f %6.2f\n",
0.0, 0.0, 0.0, 100.0);
if (DISPLAY_CPU_DEF(a->opt_flags)) {
printf(" %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f\n",
- ll_sp_value(scp->cpu_user, scc->cpu_user, g_itv),
- ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
+ ll_sp_value(scp->cpu_user, scc->cpu_user, g_itv),
+ ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
ll_sp_value(scp->cpu_sys + scp->cpu_hardirq + scp->cpu_softirq,
scc->cpu_sys + scc->cpu_hardirq + scc->cpu_softirq,
g_itv),
ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
- ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
+ ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
scc->cpu_idle < scp->cpu_idle ?
0.0 :
- ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
+ ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
}
else if (DISPLAY_CPU_ALL(a->opt_flags)) {
printf(" %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f"
- " %6.2f %6.2f %6.2f\n",
+ " %6.2f %6.2f %6.2f %6.2f\n",
(scc->cpu_user - scc->cpu_guest) < (scp->cpu_user - scp->cpu_guest) ?
0.0 :
ll_sp_value(scp->cpu_user - scp->cpu_guest,
- scc->cpu_user - scc->cpu_guest, g_itv),
- ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
- ll_sp_value(scp->cpu_sys, scc->cpu_sys, g_itv),
- ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
- ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
+ scc->cpu_user - scc->cpu_guest, g_itv),
+ (scc->cpu_nice - scc->cpu_guest_nice) < (scp->cpu_nice - scp->cpu_guest_nice) ?
+ 0.0 :
+ ll_sp_value(scp->cpu_nice - scp->cpu_guest_nice,
+ scc->cpu_nice - scc->cpu_guest_nice, g_itv),
+ ll_sp_value(scp->cpu_sys, scc->cpu_sys, g_itv),
+ ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
+ ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
ll_sp_value(scp->cpu_hardirq, scc->cpu_hardirq, g_itv),
ll_sp_value(scp->cpu_softirq, scc->cpu_softirq, g_itv),
- ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
+ ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
+ ll_sp_value(scp->cpu_guest_nice, scc->cpu_guest_nice, g_itv),
scc->cpu_idle < scp->cpu_idle ?
0.0 :
- ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
+ ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
}
}
}
* (user, nice, etc.) among all proc. CPU usage is not reduced
* to one processor to avoid rounding problems.
*/
- sscanf(line + 5, "%llu %llu %llu %llu %llu %llu %llu %llu %llu",
+ sscanf(line + 5, "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu",
&st_cpu->cpu_user,
&st_cpu->cpu_nice,
&st_cpu->cpu_sys,
&st_cpu->cpu_hardirq,
&st_cpu->cpu_softirq,
&st_cpu->cpu_steal,
- &st_cpu->cpu_guest);
+ &st_cpu->cpu_guest,
+ &st_cpu->cpu_guest_nice);
/*
* Compute the uptime of the system in jiffies (1/100ths of a second
* if HZ=100).
* Machine uptime is multiplied by the number of processors here.
*
- * NB: Don't add cpu_guest because cpu_user already includes it.
+ * NB: Don't add cpu_guest/cpu_guest_nice because cpu_user/cpu_nice
+ * already include them.
*/
*uptime = st_cpu->cpu_user + st_cpu->cpu_nice +
st_cpu->cpu_sys + st_cpu->cpu_idle +
* (user, nice, etc) for current proc.
* This is done only on SMP machines.
*/
- sscanf(line + 3, "%d %llu %llu %llu %llu %llu %llu %llu %llu %llu",
+ sscanf(line + 3, "%d %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu",
&proc_nb,
&sc.cpu_user,
&sc.cpu_nice,
&sc.cpu_hardirq,
&sc.cpu_softirq,
&sc.cpu_steal,
- &sc.cpu_guest);
+ &sc.cpu_guest,
+ &sc.cpu_guest_nice);
if (proc_nb < (nbr - 1)) {
st_cpu_i = st_cpu + proc_nb + 1;
* Compute uptime reduced to one proc using proc#0.
* Done if /proc/uptime was unavailable.
*
- * NB: Don't add cpu_guest because cpu_user already
- * includes it.
+ * NB: Don't add cpu_guest/cpu_guest_nice because cpu_user/cpu_nice
+ * already include them.
*/
*uptime0 = sc.cpu_user + sc.cpu_nice +
sc.cpu_sys + sc.cpu_idle +
* Following structures are for each individual CPU (0, 1, etc.)
*/
struct stats_cpu {
- unsigned long long cpu_user __attribute__ ((aligned (16)));
- unsigned long long cpu_nice __attribute__ ((aligned (16)));
- unsigned long long cpu_sys __attribute__ ((aligned (16)));
- unsigned long long cpu_idle __attribute__ ((aligned (16)));
- unsigned long long cpu_iowait __attribute__ ((aligned (16)));
- unsigned long long cpu_steal __attribute__ ((aligned (16)));
- unsigned long long cpu_hardirq __attribute__ ((aligned (16)));
- unsigned long long cpu_softirq __attribute__ ((aligned (16)));
- unsigned long long cpu_guest __attribute__ ((aligned (16)));
+ unsigned long long cpu_user __attribute__ ((aligned (16)));
+ unsigned long long cpu_nice __attribute__ ((aligned (16)));
+ unsigned long long cpu_sys __attribute__ ((aligned (16)));
+ unsigned long long cpu_idle __attribute__ ((aligned (16)));
+ unsigned long long cpu_iowait __attribute__ ((aligned (16)));
+ unsigned long long cpu_steal __attribute__ ((aligned (16)));
+ unsigned long long cpu_hardirq __attribute__ ((aligned (16)));
+ unsigned long long cpu_softirq __attribute__ ((aligned (16)));
+ unsigned long long cpu_guest __attribute__ ((aligned (16)));
+ unsigned long long cpu_guest_nice __attribute__ ((aligned (16)));
};
#define STATS_CPU_SIZE (sizeof(struct stats_cpu))
NULL);
}
- render(isdb, pre, PT_NOFLAG,
- "all\t%%nice", NULL, NULL,
- NOVAL,
- ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
- NULL);
+ if (DISPLAY_CPU_DEF(a->opt_flags)) {
+ render(isdb, pre, PT_NOFLAG,
+ "all\t%%nice", NULL, NULL,
+ NOVAL,
+ ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
+ NULL);
+ }
+ else if (DISPLAY_CPU_ALL(a->opt_flags)) {
+ render(isdb, pre, PT_NOFLAG,
+ "all\t%%nice", NULL, NULL,
+ NOVAL,
+ (scc->cpu_nice - scc->cpu_guest_nice) < (scp->cpu_nice - scp->cpu_guest_nice) ?
+ 0.0 :
+ ll_sp_value(scp->cpu_nice - scp->cpu_guest_nice,
+ scc->cpu_nice - scc->cpu_guest_nice,
+ g_itv),
+ NULL);
+ }
if (DISPLAY_CPU_DEF(a->opt_flags)) {
render(isdb, pre, PT_NOFLAG,
NOVAL,
ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
NULL);
+
+ render(isdb, pre, PT_NOFLAG,
+ "all\t%%gnice", NULL, NULL,
+ NOVAL,
+ ll_sp_value(scp->cpu_guest_nice, scc->cpu_guest_nice, g_itv),
+ NULL);
}
render(isdb, pre, pt_newlin,
/*
* If the CPU is offline then it is omited from /proc/stat:
* All the fields couldn't have been read and the sum of them is zero.
- * (Remember that guest time is already included in user mode.)
+ * (Remember that guest/guest_nice times are already included in
+ * user/nice modes.)
*/
if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys +
scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal +
NULL);
}
- render(isdb, pre, PT_NOFLAG,
- "cpu%d\t%%nice", NULL, cons(iv, i - 1, NOVAL),
- NOVAL,
- !g_itv ?
- 0.0 :
- ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
- NULL);
+ if (DISPLAY_CPU_DEF(a->opt_flags)) {
+ render(isdb, pre, PT_NOFLAG,
+ "cpu%d\t%%nice", NULL, cons(iv, i - 1, NOVAL),
+ NOVAL,
+ !g_itv ?
+ 0.0 :
+ ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
+ NULL);
+ }
+ else if (DISPLAY_CPU_ALL(a->opt_flags)) {
+ render(isdb, pre, PT_NOFLAG,
+ "cpu%d\t%%nice", NULL, cons(iv, i - 1, NOVAL),
+ NOVAL,
+ (!g_itv ||
+ ((scc->cpu_nice - scc->cpu_guest_nice) < (scp->cpu_nice - scp->cpu_guest_nice))) ?
+ 0.0 :
+ ll_sp_value(scp->cpu_nice - scp->cpu_guest_nice,
+ scc->cpu_nice - scc->cpu_guest_nice, g_itv),
+ NULL);
+ }
if (DISPLAY_CPU_DEF(a->opt_flags)) {
render(isdb, pre, PT_NOFLAG,
0.0 :
ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
NULL);
+
+ render(isdb, pre, PT_NOFLAG,
+ "cpu%d\t%%gnice", NULL, cons(iv, i - 1, NOVAL),
+ NOVAL,
+ !g_itv ?
+ 0.0 :
+ ll_sp_value(scp->cpu_guest_nice, scc->cpu_guest_nice, g_itv),
+ NULL);
}
if (!g_itv) {
#include "sa.h"
/* DTD version for XML output */
-#define XML_DTD_VERSION "2.13"
+#define XML_DTD_VERSION "2.14"
/* Possible actions for functions used to display reports */
#define F_BEGIN 0x01
<?xml version="1.0" encoding="UTF-8"?>
-<!--DTD v2.13 for sysstat. See sadf.h -->
+<!--DTD v2.14 for sysstat. See sadf.h -->
<!ELEMENT sysstat (sysdata-version, host)>
irq CDATA #REQUIRED
soft CDATA #REQUIRED
guest CDATA #REQUIRED
+ gnice CDATA #REQUIRED
idle CDATA #REQUIRED
>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://pagesperso-orange.fr/sebastien.godard/sysstat" targetNamespace="http://pagesperso-orange.fr/sebastien.godard/sysstat" elementFormDefault="qualified">
<xs:annotation>
- <xs:appinfo>-- XML Schema v2.13 for sysstat. See sadf.h --</xs:appinfo>
+ <xs:appinfo>-- XML Schema v2.14 for sysstat. See sadf.h --</xs:appinfo>
</xs:annotation>
<xs:element name="sysstat" type="sysstat-type"></xs:element>
<xs:attribute name="irq" type="hundredth-type"></xs:attribute>
<xs:attribute name="soft" type="hundredth-type"></xs:attribute>
<xs:attribute name="guest" type="hundredth-type"></xs:attribute>
+ <xs:attribute name="gnice" type="hundredth-type"></xs:attribute>
<xs:attribute name="idle" type="hundredth-type"></xs:attribute>
</xs:complexType>
/*
* If the CPU is offline then it is omited from /proc/stat:
* All the fields couldn't have been read and the sum of them is zero.
- * (Remember that guest time is already included in user mode.)
+ * (Remember that guest/guest_nice times are already included in
+ * user/nice modes.)
*/
- if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys +
- scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal +
+ if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys +
+ scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal +
scc->cpu_hardirq + scc->cpu_softirq) == 0) {
/*
* Set current struct fields (which have been set to zero)
"irq=\"%.2f\" "
"soft=\"%.2f\" "
"guest=\"%.2f\" "
+ "gnice=\"%.2f\" "
"idle=\"%.2f\"/>",
i - 1, 0.0, 0.0, 0.0, 0.0,
- 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0, 0.0,
cpu_offline ? 0.0 : 100.0);
}
continue;
"irq=\"%.2f\" "
"soft=\"%.2f\" "
"guest=\"%.2f\" "
+ "gnice=\"%.2f\" "
"idle=\"%.2f\"/>",
cpuno,
(scc->cpu_user - scc->cpu_guest) < (scp->cpu_user - scp->cpu_guest) ?
0.0 :
ll_sp_value(scp->cpu_user - scp->cpu_guest,
- scc->cpu_user - scc->cpu_guest, g_itv),
- ll_sp_value(scp->cpu_nice, scc->cpu_nice, g_itv),
- ll_sp_value(scp->cpu_sys, scc->cpu_sys, g_itv),
- ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
- ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
+ scc->cpu_user - scc->cpu_guest, g_itv),
+ (scc->cpu_nice - scc->cpu_guest_nice) < (scp->cpu_nice - scp->cpu_guest_nice) ?
+ 0.0 :
+ ll_sp_value(scp->cpu_nice - scp->cpu_guest_nice,
+ scc->cpu_nice - scc->cpu_guest_nice, g_itv),
+ ll_sp_value(scp->cpu_sys, scc->cpu_sys, g_itv),
+ ll_sp_value(scp->cpu_iowait, scc->cpu_iowait, g_itv),
+ ll_sp_value(scp->cpu_steal, scc->cpu_steal, g_itv),
ll_sp_value(scp->cpu_hardirq, scc->cpu_hardirq, g_itv),
ll_sp_value(scp->cpu_softirq, scc->cpu_softirq, g_itv),
- ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
+ ll_sp_value(scp->cpu_guest, scc->cpu_guest, g_itv),
+ ll_sp_value(scp->cpu_guest_nice, scc->cpu_guest_nice, g_itv),
scc->cpu_idle < scp->cpu_idle ?
0.0 :
- ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
+ ll_sp_value(scp->cpu_idle, scc->cpu_idle, g_itv));
}
}
}
/*
* xml_stats.h: Include file used to display system statistics in XML.
- * (C) 1999-2011 by Sebastien Godard (sysstat <at> orange.fr)
+ * (C) 1999-2012 by Sebastien Godard (sysstat <at> orange.fr)
*/
#ifndef _XML_STATS_H