summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_mrtgtraf.c14
1 files 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)
148 148
149 /* report incoming traffic in Bytes/sec */ 149 /* report incoming traffic in Bytes/sec */
150 if (incoming_rate < 1024) { 150 if (incoming_rate < 1024) {
151 strcpy (incoming_speed_rating, "B/s"); 151 strcpy (incoming_speed_rating, "B");
152 adjusted_incoming_rate = (double) incoming_rate; 152 adjusted_incoming_rate = (double) incoming_rate;
153 } 153 }
154 154
155 /* report incoming traffic in KBytes/sec */ 155 /* report incoming traffic in KBytes/sec */
156 else if (incoming_rate < (1024 * 1024)) { 156 else if (incoming_rate < (1024 * 1024)) {
157 strcpy (incoming_speed_rating, "KB/s"); 157 strcpy (incoming_speed_rating, "KB");
158 adjusted_incoming_rate = (double) (incoming_rate / 1024.0); 158 adjusted_incoming_rate = (double) (incoming_rate / 1024.0);
159 } 159 }
160 160
161 /* report incoming traffic in MBytes/sec */ 161 /* report incoming traffic in MBytes/sec */
162 else { 162 else {
163 strcpy (incoming_speed_rating, "MB/s"); 163 strcpy (incoming_speed_rating, "MB");
164 adjusted_incoming_rate = (double) (incoming_rate / 1024.0 / 1024.0); 164 adjusted_incoming_rate = (double) (incoming_rate / 1024.0 / 1024.0);
165 } 165 }
166 166
167 /* report outgoing traffic in Bytes/sec */ 167 /* report outgoing traffic in Bytes/sec */
168 if (outgoing_rate < 1024) { 168 if (outgoing_rate < 1024) {
169 strcpy (outgoing_speed_rating, "B/s"); 169 strcpy (outgoing_speed_rating, "B");
170 adjusted_outgoing_rate = (double) outgoing_rate; 170 adjusted_outgoing_rate = (double) outgoing_rate;
171 } 171 }
172 172
173 /* report outgoing traffic in KBytes/sec */ 173 /* report outgoing traffic in KBytes/sec */
174 else if (outgoing_rate < (1024 * 1024)) { 174 else if (outgoing_rate < (1024 * 1024)) {
175 strcpy (outgoing_speed_rating, "KB/s"); 175 strcpy (outgoing_speed_rating, "KB");
176 adjusted_outgoing_rate = (double) (outgoing_rate / 1024.0); 176 adjusted_outgoing_rate = (double) (outgoing_rate / 1024.0);
177 } 177 }
178 178
179 /* report outgoing traffic in MBytes/sec */ 179 /* report outgoing traffic in MBytes/sec */
180 else { 180 else {
181 strcpy (outgoing_speed_rating, "MB/s"); 181 strcpy (outgoing_speed_rating, "MB");
182 adjusted_outgoing_rate = (double) (outgoing_rate / 1024.0 / 1024.0); 182 adjusted_outgoing_rate = (double) (outgoing_rate / 1024.0 / 1024.0);
183 } 183 }
184 184
@@ -191,7 +191,7 @@ main (int argc, char **argv)
191 result = STATE_WARNING; 191 result = STATE_WARNING;
192 } 192 }
193 193
194 xasprintf (&error_message, _("%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n"), 194 xasprintf (&error_message, _("%s. In = %0.1f %s/s, %s. Out = %0.1f %s/s|%s %s\n"),
195 (use_average == TRUE) ? _("Avg") : _("Max"), adjusted_incoming_rate, 195 (use_average == TRUE) ? _("Avg") : _("Max"), adjusted_incoming_rate,
196 incoming_speed_rating, (use_average == TRUE) ? _("Avg") : _("Max"), 196 incoming_speed_rating, (use_average == TRUE) ? _("Avg") : _("Max"),
197 adjusted_outgoing_rate, outgoing_speed_rating, 197 adjusted_outgoing_rate, outgoing_speed_rating,