Skip to content

Commit 6d5483d

Browse files
committed
Make status report uniform
1 parent 8e2640d commit 6d5483d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

audisp/plugins/statsd/audisp-statsd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct audit_report
5454
{
5555
unsigned int backlog;
5656
unsigned int lost;
57-
unsigned int free_space;
57+
long long unsigned int free_space;
5858
unsigned int plugin_current_depth;
5959
unsigned int plugin_max_depth;
6060
unsigned int events_total_count;
@@ -243,7 +243,7 @@ static void get_auditd_status(void)
243243
while (fgets(buf, sizeof(buf), f)) {
244244
if (memcmp(buf, "Logging", 7) == 0) {
245245
sscanf(buf,
246-
"Logging partition free space %u",
246+
"Logging partition free space = %llu",
247247
&r.free_space);
248248
} else if (memcmp(buf, "current plugin", 14) == 0) {
249249
sscanf(buf,
@@ -276,7 +276,7 @@ static void send_statsd(void)
276276
// incremented (events) are counters.
277277
len = snprintf(message, sizeof(message),
278278
"kernel.lost:%u|g\nkernel.backlog:%u|g\n"
279-
"auditd.free_space:%u|g\nauditd.plugin_current_depth:%u|g\nauditd.plugin_max_depth:%u|g\n"
279+
"auditd.free_space:%llu|g\nauditd.plugin_current_depth:%u|g\nauditd.plugin_max_depth:%u|g\n"
280280
"events.total_count:%u|c\nevents.total_failed:%u|c\n"
281281
"events.avc_count:%u|c\nevents.fanotify_count:%u|c\n"
282282
"events.logins_success:%u|c\nevents.logins_failed:%u|c\n"

src/auditd-event.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ void write_logging_state(FILE *f)
119119
fs_space_left ? "yes" : "no");
120120
rc = fstatfs(log_fd, &buf);
121121
if (rc == 0) {
122-
fprintf(f, "Logging partition free space %llu MB\n",
122+
fprintf(f, "Logging partition free space = %llu MB\n",
123123
(long long unsigned)
124124
(buf.f_bavail * buf.f_bsize)/MEGABYTE);
125-
fprintf(f, "space_left setting %lu MB\n",
125+
fprintf(f, "space_left setting = %lu MB\n",
126126
config->space_left);
127-
fprintf(f, "admin_space_left setting %lu MB\n",
127+
fprintf(f, "admin_space_left setting = %lu MB\n",
128128
config->admin_space_left);
129129
}
130130
fprintf(f, "logging suspended = %s\n",

0 commit comments

Comments
 (0)