diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
commit | d079b656b4719739b2247dcd9d46e9bec793095a (patch) | |
tree | d2c950c70a776bcf697c963151c5bd959f8a9f03 /collectors/slabinfo.plugin | |
parent | Releasing debian version 1.37.1-2. (diff) | |
download | netdata-d079b656b4719739b2247dcd9d46e9bec793095a.tar.xz netdata-d079b656b4719739b2247dcd9d46e9bec793095a.zip |
Merging upstream version 1.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/slabinfo.plugin/README.md | 6 | ||||
-rw-r--r-- | collectors/slabinfo.plugin/slabinfo.c | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/collectors/slabinfo.plugin/README.md b/collectors/slabinfo.plugin/README.md index 2f490466..320b1fc9 100644 --- a/collectors/slabinfo.plugin/README.md +++ b/collectors/slabinfo.plugin/README.md @@ -1,6 +1,10 @@ <!-- title: "slabinfo.plugin" -custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/slabinfo.plugin/README.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/collectors/slabinfo.plugin/README.md" +sidebar_label: "slabinfo.plugin" +learn_status: "Published" +learn_topic_type: "References" +learn_rel_path: "References/Collectors references/System metrics" --> # slabinfo.plugin diff --git a/collectors/slabinfo.plugin/slabinfo.c b/collectors/slabinfo.plugin/slabinfo.c index 2e47ee22..52b53cd2 100644 --- a/collectors/slabinfo.plugin/slabinfo.c +++ b/collectors/slabinfo.plugin/slabinfo.c @@ -142,14 +142,14 @@ struct slabinfo *read_file_slabinfo() { if(unlikely(!ff)) { ff = procfile_reopen(ff, PLUGIN_SLABINFO_PROCFILE, " ,:" , PROCFILE_FLAG_DEFAULT); if(unlikely(!ff)) { - error("<- Cannot open file '%s", PLUGIN_SLABINFO_PROCFILE); + collector_error("<- Cannot open file '%s", PLUGIN_SLABINFO_PROCFILE); exit(1); } } ff = procfile_readall(ff); if(unlikely(!ff)) { - error("<- Cannot read file '%s'", PLUGIN_SLABINFO_PROCFILE); + collector_error("<- Cannot read file '%s'", PLUGIN_SLABINFO_PROCFILE); exit(0); } @@ -336,6 +336,7 @@ void usage(void) { } int main(int argc, char **argv) { + stderror = stderr; clocks_init(); program_name = argv[0]; @@ -350,7 +351,7 @@ int main(int argc, char **argv) { n = (int) str2l(argv[i]); if (n > 0) { if (n >= UPDATE_EVERY_MAX) { - error("Invalid interval value: %s", argv[i]); + collector_error("Invalid interval value: %s", argv[i]); exit(1); } freq = n; @@ -383,7 +384,7 @@ int main(int argc, char **argv) { if(freq >= update_every) update_every = freq; else if(freq) - error("update frequency %d seconds is too small for slabinfo. Using %d.", freq, update_every); + collector_error("update frequency %d seconds is too small for slabinfo. Using %d.", freq, update_every); // Call the main function. Time drift to be added |