summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3cf9823)
raw | patch | inline | side by side (parent: 3cf9823)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 11 Nov 2003 10:34:42 +0000 (10:34 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 11 Nov 2003 10:34:42 +0000 (10:34 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@762 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_users.c | patch | blob | history |
diff --git a/plugins/check_users.c b/plugins/check_users.c
index 3705ee100bd511a787c0e4b68b25307dc11f07b7..e0a71845fec857f585d5f85c1b7962243b6c786c 100644 (file)
--- a/plugins/check_users.c
+++ b/plugins/check_users.c
int users = -1;
int result = STATE_OK;
char input_buffer[MAX_INPUT_BUFFER];
+ char *perf;
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ perf = strdup("");
+
if (process_arguments (argc, argv) == ERROR)
usage (_("Could not parse arguments\n"));
if (result == STATE_UNKNOWN)
printf (_("Unable to read output\n"));
- else
- printf (_("USERS %s - %d users currently logged in\n"), state_text (result),
- users);
+ else {
+ asprintf(&perf, "%s", perfdata ("users", users, "",
+ TRUE, wusers,
+ TRUE, cusers,
+ TRUE, 0,
+ FALSE, 0));
+ printf (_("USERS %s - %d users currently logged in |%s\n"), state_text (result),
+ users, perf);
+ }
return result;
}