diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:33:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:34:10 +0000 |
commit | 83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch) | |
tree | 2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/collectors/slabinfo.plugin/slabinfo.c | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip |
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/collectors/slabinfo.plugin/slabinfo.c')
-rw-r--r-- | src/collectors/slabinfo.plugin/slabinfo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/collectors/slabinfo.plugin/slabinfo.c b/src/collectors/slabinfo.plugin/slabinfo.c index 216f31ac6..98adc1513 100644 --- a/src/collectors/slabinfo.plugin/slabinfo.c +++ b/src/collectors/slabinfo.plugin/slabinfo.c @@ -167,7 +167,7 @@ struct slabinfo *read_file_slabinfo() { slabdebug(" Read %lu lines from procfile", (unsigned long)lines); for(l = 2; l < lines; l++) { if (unlikely(procfile_linewords(ff, l) < 14)) { - slabdebug(" Line %zu has only %zu words, skipping", l, procfile_linewords(ff,l)); + slabdebug(" Line %zu has only %zu words, skipping", l, (size_t)procfile_linewords(ff,l)); continue; } @@ -318,6 +318,12 @@ unsigned int do_slab_stats(int update_every) { } printf("END\n"); + fprintf(stdout, "\n"); + fflush(stdout); + if (ferror(stdout) && errno == EPIPE) { + netdata_log_error("error writing to stdout: EPIPE. Exiting..."); + return loops; + } loops++; @@ -339,7 +345,6 @@ void usage(void) { } int main(int argc, char **argv) { - clocks_init(); nd_log_initialize_for_external_plugins("slabinfo.plugin"); program_name = argv[0]; |