From 51604a101926411c844ffc4f80c0b5ce3ed9d001 Mon Sep 17 00:00:00 2001 From: Adrian Murphy Date: Mon, 3 Nov 2014 12:42:10 +1030 Subject: Fix perfdata to comply with perfdata UOM definition --- plugins/check_mrtgtraf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index 32ba0507..3b038cf1 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c @@ -148,37 +148,37 @@ main (int argc, char **argv) /* report incoming traffic in Bytes/sec */ if (incoming_rate < 1024) { - strcpy (incoming_speed_rating, "B/s"); + strcpy (incoming_speed_rating, "B"); adjusted_incoming_rate = (double) incoming_rate; } /* report incoming traffic in KBytes/sec */ else if (incoming_rate < (1024 * 1024)) { - strcpy (incoming_speed_rating, "KB/s"); + strcpy (incoming_speed_rating, "KB"); adjusted_incoming_rate = (double) (incoming_rate / 1024.0); } /* report incoming traffic in MBytes/sec */ else { - strcpy (incoming_speed_rating, "MB/s"); + strcpy (incoming_speed_rating, "MB"); adjusted_incoming_rate = (double) (incoming_rate / 1024.0 / 1024.0); } /* report outgoing traffic in Bytes/sec */ if (outgoing_rate < 1024) { - strcpy (outgoing_speed_rating, "B/s"); + strcpy (outgoing_speed_rating, "B"); adjusted_outgoing_rate = (double) outgoing_rate; } /* report outgoing traffic in KBytes/sec */ else if (outgoing_rate < (1024 * 1024)) { - strcpy (outgoing_speed_rating, "KB/s"); + strcpy (outgoing_speed_rating, "KB"); adjusted_outgoing_rate = (double) (outgoing_rate / 1024.0); } /* report outgoing traffic in MBytes/sec */ else { - strcpy (outgoing_speed_rating, "MB/s"); + strcpy (outgoing_speed_rating, "MB"); adjusted_outgoing_rate = (double) (outgoing_rate / 1024.0 / 1024.0); } @@ -191,7 +191,7 @@ main (int argc, char **argv) result = STATE_WARNING; } - xasprintf (&error_message, _("%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n"), + xasprintf (&error_message, _("%s. In = %0.1f %s/s, %s. Out = %0.1f %s/s|%s %s\n"), (use_average == TRUE) ? _("Avg") : _("Max"), adjusted_incoming_rate, incoming_speed_rating, (use_average == TRUE) ? _("Avg") : _("Max"), adjusted_outgoing_rate, outgoing_speed_rating, -- cgit v1.2.3-74-g34f1