From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/187009-check_disk.diff | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 web/attachments/187009-check_disk.diff (limited to 'web/attachments/187009-check_disk.diff') diff --git a/web/attachments/187009-check_disk.diff b/web/attachments/187009-check_disk.diff new file mode 100644 index 0000000..bc98702 --- /dev/null +++ b/web/attachments/187009-check_disk.diff @@ -0,0 +1,45 @@ +60a61,63 +> /* If nonzero, display percents as % of space used rather than free */ +> static int show_used_pct = 0; +> +160c163 +< double dused_inodes_percent; +--- +> double dused_inodes_percent, dfree_inodes_percent; +249a253 +> dfree_inodes_percent = 100 - dused_inodes_percent; +278,286d281 +< +< +< +< +< /* Moved this computation up here so we can add it +< * to perf */ +< inode_space_pct = (1 - dused_inodes_percent) * 100; +< +< +304c299 +< dfree_pct); +--- +> (show_used_pct ? dused_pct : dfree_pct)); +308c303 +< asprintf(&output, "%s inode=%.0f%%);", output, (1 - dused_inodes_percent) * 100); +--- +> asprintf(&output, "%s inode=%.0f%%);", output, (show_used_pct ? dused_inodes_percent : dfree_inodes_percent) ); +385a381 +> {"used", no_argument, 0, 'f'}, +404c400 +< c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklME", longopts, &option); +--- +> c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklMEU", longopts, &option); +548a545,547 +> case 'U': /* Display output percentage as % free */ +> show_used_pct = 1; +> break; +720a720,721 +> printf (" %s\n", "-U --used"); +> printf (" %s\n", _("Display output percentage as % free")); +737c738 +< printf ("[-m] [-e] [-W limit] [-K limit] [-v] [-q] [-E]\n"); +--- +> printf ("[-m] [-e] [-W limit] [-K limit] [-v] [-q] [-E] [-U]\n"); -- cgit v1.2.3-74-g34f1