summaryrefslogtreecommitdiffabout
path: root/src/report.c
Unidiff
Diffstat (limited to 'src/report.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/report.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/report.c b/src/report.c
index ed8a34d..ed3a81b 100644
--- a/src/report.c
+++ b/src/report.c
@@ -55,3 +55,3 @@ open_db (int flag)
55 { 55 {
56 logmsg (L_ERR, "Cannot open database %s: %s", 56 logmsg (L_ERR, _("cannot open database %s: %s"),
57 dbname, gdbm_strerror (gdbm_errno)); 57 dbname, gdbm_strerror (gdbm_errno));
@@ -93,6 +93,7 @@ _read_db (datum key, struct traffic_record **tr)
93 if (content.dptr == NULL) 93 if (content.dptr == NULL)
94 logmsg (L_NOTICE, "Record for %*.*s not found", key.dsize, key.dsize, key.dptr); 94 logmsg (L_NOTICE, _("record for %*.*s not found"),
95 key.dsize, key.dsize, key.dptr);
95 else if (content.dsize != sizeof **tr) 96 else if (content.dsize != sizeof **tr)
96 { 97 {
97 logmsg (L_ERR, "Wrong record size for %*.*s: %lu", 98 logmsg (L_ERR, _("wrong record size for %*.*s: %lu"),
98 key.dsize, key.dsize, key.dptr, content.dsize); 99 key.dsize, key.dsize, key.dptr, content.dsize);
@@ -106,3 +107,3 @@ _read_db (datum key, struct traffic_record **tr)
106 107
107 logmsg (L_NOTICE, "Creating record for %*.*s", 108 logmsg (L_NOTICE, _("creating record for %*.*s"),
108 key.dsize, key.dsize, key.dptr); 109 key.dsize, key.dsize, key.dptr);
@@ -138,3 +139,3 @@ write_db (struct monitor *mon, struct traffic_record *tr)
138 { 139 {
139 logmsg (L_ERR, "Failed to write data for %s: %s", 140 logmsg (L_ERR, _("failed to write data for %s: %s"),
140 mon->id, gdbm_strerror (gdbm_errno)); 141 mon->id, gdbm_strerror (gdbm_errno));
@@ -149,3 +150,5 @@ print_queue (const char *title, queue_t *q)
149 count = queue_count (q); 150 count = queue_count (q);
150 printf ("%s (%d entries):\n", title, count); 151 printf (ngettext ("%s (%d entry):\n", "%s (%d entries):\n",
152 count),
153 title, count);
151 for (i = count - 1; i >= 0; i--) 154 for (i = count - 1; i >= 0; i--)
@@ -177,16 +180,17 @@ print_tr (datum key, struct traffic_record *tr)
177 strftime (buf, sizeof buf, "%c", tm); 180 strftime (buf, sizeof buf, "%c", tm);
178 printf ("Last sample: %lu (%s) %lu %lu\n", 181 printf (_("Last sample: %lu (%s) %lu %lu\n"),
179 tr->last.time, buf, tr->last.in, tr->last.out); 182 tr->last.time, buf, tr->last.in, tr->last.out);
180 183
181 printf ("Last rates: %g %g\n", tr->last_rates.inrate, tr->last_rates.outrate); 184 printf (_("Last rates: %g %g\n"),
182 print_queue ("Daily rates", &tr->day_hist); 185 tr->last_rates.inrate, tr->last_rates.outrate);
186 print_queue (_("Daily rates"), &tr->day_hist);
183 187
184 print_avg ("Weekly average", &tr->week_avg); 188 print_avg (_("Weekly average"), &tr->week_avg);
185 print_queue ("Weekly rates", &tr->week_hist); 189 print_queue (_("Weekly rates"), &tr->week_hist);
186 190
187 print_avg ("Monthly average", &tr->month_avg); 191 print_avg (_("Monthly average"), &tr->month_avg);
188 print_queue ("Monthly rates", &tr->month_hist); 192 print_queue (_("Monthly rates"), &tr->month_hist);
189 193
190 print_avg ("Yearly average", &tr->year_avg); 194 print_avg (_("Yearly average"), &tr->year_avg);
191 print_queue ("Yearly rates", &tr->year_hist); 195 print_queue (_("Yearly rates"), &tr->year_hist);
192} 196}
@@ -234,3 +238,3 @@ report (Stat *stat, time_t timestamp)
234 else 238 else
235 logmsg (L_WARNING, "%s not found in config", stat->name); 239 logmsg (L_WARNING, _("%s not found in config"), stat->name);
236} 240}
@@ -275,3 +279,3 @@ rebuild (int force)
275 279
276 verbose (1, "rebuild initiated"); 280 verbose (1, _("rebuild initiated"));
277 open_db (TAGR_DB_WR); 281 open_db (TAGR_DB_WR);
@@ -286,3 +290,3 @@ rebuild (int force)
286 close_db (); 290 close_db ();
287 verbose (1, "rebuild finished"); 291 verbose (1, _("rebuild finished"));
288} 292}

Return to:

Send suggestions and report system problems to the System administrator.