/*
***************************************************************************
- * printf() function modified for XML display
+ * printf() function modified for textual (XML-like) display.
*
* IN:
* @nr_tab Number of tabs to print.
* been saved.
***************************************************************************
*/
-void write_xml_restarts(int curr, int use_tm_start, int use_tm_end, int tab, /* FIXME: revoir nom proc */
- struct tm *rectime, struct tm *loctime)
+void write_textual_restarts(int curr, int use_tm_start, int use_tm_end, int tab,
+ struct tm *rectime, struct tm *loctime)
{
char cur_date[32], cur_time[32];
/*
***************************************************************************
- * Display XML COMMENT records for textual (XML-like) reports.
+ * Display COMMENT records for textual (XML-like) reports.
*
* IN:
* @curr Index in array for current sample statistics.
* been saved.
***************************************************************************
*/
-void write_xml_comments(int curr, int use_tm_start, int use_tm_end, int tab, int ifd, /* FIXME: revoir nom proc */
- struct tm *rectime, struct tm *loctime)
+void write_textual_comments(int curr, int use_tm_start, int use_tm_end, int tab, int ifd,
+ struct tm *rectime, struct tm *loctime)
{
char cur_date[32], cur_time[32];
char file_comment[MAX_COMMENT_LEN];
* 1 if stats have been successfully displayed.
***************************************************************************
*/
-int write_xml_stats(int curr, int use_tm_start, int use_tm_end, int reset,
- long *cnt, int tab, __nr_t cpu_nr, struct tm *rectime,
- struct tm *loctime)
+int write_textual_stats(int curr, int use_tm_start, int use_tm_end, int reset,
+ long *cnt, int tab, __nr_t cpu_nr, struct tm *rectime,
+ struct tm *loctime)
{
int i;
unsigned long long dt, itv, g_itv;
}
tab++;
- /* Display XML statistics */
+ /* Display textual statistics */
for (i = 0; i < NR_ACT; i++) {
- /* FIXME: PB: le nom de la fonction a appeler va dependre du format d'affichage choisi (ex.: f_xml_print si on est en XML) */
-
+ /* This code is not generic at all...! */
if (CLOSE_MARKUP(act[i]->options) ||
(IS_SELECTED(act[i]->options) && (act[i]->nr > 0))) {
(*act[i]->f_xml_print)(act[i], curr, tab,
* saved for current record.
***************************************************************************
*/
-void xml_display_loop(int ifd, struct file_activity *file_actlst, char *dfile,
- struct file_magic *file_magic, __nr_t cpu_nr,
- struct tm *rectime, struct tm *loctime)
+void textual_display_loop(int ifd, struct file_activity *file_actlst, char *dfile,
+ struct file_magic *file_magic, __nr_t cpu_nr,
+ struct tm *rectime, struct tm *loctime)
{
int curr, tab = 0, rtype;
int eosaf = TRUE, next, reset = FALSE;
file_actlst);
/* next is set to 1 when we were close enough to desired interval */
- next = write_xml_stats(curr, tm_start.use, tm_end.use, reset,
- &cnt, tab, cpu_nr, rectime, loctime);
+ next = write_textual_stats(curr, tm_start.use, tm_end.use, reset,
+ &cnt, tab, cpu_nr, rectime, loctime);
if (next) {
curr ^= 1;
file_actlst);
}
if (rtype == R_RESTART) {
- write_xml_restarts(0, tm_start.use, tm_end.use, tab,
- rectime, loctime);
+ write_textual_restarts(0, tm_start.use, tm_end.use, tab,
+ rectime, loctime);
}
else if (rtype == R_COMMENT) {
/* Ignore COMMENT record */
file_actlst);
}
if (rtype == R_COMMENT) {
- write_xml_comments(0, tm_start.use, tm_end.use,
- tab, ifd, rectime, loctime);
+ write_textual_comments(0, tm_start.use, tm_end.use,
+ tab, ifd, rectime, loctime);
}
}
}
if (DISPLAY_GROUPED_STATS(fmt[f_position]->options)) {
main_display_loop(ifd, file_actlst, cpu_nr,
- &rectime, &loctime); /* FIXME: revoir nom */
+ &rectime, &loctime);
}
else {
- xml_display_loop(ifd, file_actlst,
- dfile, &file_magic, cpu_nr,
- &rectime, &loctime); /* FIXME: revoir nom */
+ textual_display_loop(ifd, file_actlst, dfile,
+ &file_magic, cpu_nr, &rectime, &loctime);
}
close(ifd);
}
if (action & F_MAIN) {
xprintf(*tab, "<boot date=\"%s\" time=\"%s\" utc=\"%d\"/>",
- cur_date, cur_time, utc ? 1 : 0); /* FIXME: Nouvelle balise a prevoir dans DTD/XSD */
+ cur_date, cur_time, utc ? 1 : 0);
}
if (action & F_END) {
xprintf(--(*tab), "</restarts>");
xprintf((*tab)++, "<comments>");
}
if (action & F_MAIN) {
- xprintf(*tab, "<comment date=\"%s\" time=\"%s\" utc=\"%d\" com=\"%s\"/>", /* FIXME: modification du DTD/XSD */
+ xprintf(*tab, "<comment date=\"%s\" time=\"%s\" utc=\"%d\" com=\"%s\"/>",
cur_date, cur_time, utc ? 1 : 0, comment);
}
if (action & F_END) {
char *cur_time, int utc, unsigned long long itv)
{
if (action & F_BEGIN) {
- xprintf(*tab, "<timestamp date=\"%s\" time=\"%s\" utc=\"%d\" interval=\"%llu\"/>", /* FIXME: modification du DTD/XSD */
+ xprintf(*tab, "<timestamp date=\"%s\" time=\"%s\" utc=\"%d\" interval=\"%llu\"/>",
cur_date, cur_time, utc ? 1 : 0, itv);
}
if (action & F_END) {
<?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.11 for sysstat. See sadf.h --</xs:appinfo>
+ <xs:appinfo>-- XML Schema v2.12 for sysstat. See sadf.h --</xs:appinfo>
</xs:annotation>
<xs:element name="sysstat" type="sysstat-type"></xs:element>
<xs:element name="comments" type="comments-type"></xs:element>
<xs:complexType name="comments-type">
- <xs:attribute name="date" type="xs:date"></xs:attribute>
- <xs:attribute name="time" type="xs:time"></xs:attribute>
- <xs:attribute name="comment" type="xs:string"></xs:attribute>
+ <xs:sequence>
+ <xs:element name="comment" type="comment-type"></xs:element>
+ </xs:sequence>
</xs:complexType>
<xs:element name="timestamp" type="timestamp-type"></xs:element>
</xs:sequence>
<xs:attribute name="date" type="xs:date"></xs:attribute>
<xs:attribute name="time" type="xs:time"></xs:attribute>
+ <xs:attribute name="utc" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="interval" type="xs:nonNegativeInteger"></xs:attribute>
</xs:complexType>
<xs:complexType name="boot-type">
<xs:attribute name="date" type="xs:date"></xs:attribute>
<xs:attribute name="time" type="xs:time"></xs:attribute>
+ <xs:attribute name="utc" type="xs:nonNegativeInteger"></xs:attribute>
+</xs:complexType>
+
+<xs:element name="comment" type="comment-type"></xs:element>
+<xs:complexType name="comment-type">
+ <xs:attribute name="date" type="xs:date"></xs:attribute>
+ <xs:attribute name="time" type="xs:time"></xs:attribute>
+ <xs:attribute name="utc" type="xs:nonNegativeInteger"></xs:attribute>
+ <xs:attribute name="com" type="xs:string"></xs:attribute>
</xs:complexType>
<xs:element name="cpu-load" type="cpu-load-type"></xs:element>