summaryrefslogtreecommitdiffstats
path: root/web/attachments/268243-patch.check_ping.c
blob: a9dff190f1a166a585faee33003b5957fdebb2e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
88a89,90
>       char *perf;
>       char *perf1;
161,162c163,171
<                       printf (_("PING %s - %sPacket loss = %d%%"), state_text (this_result), warn_text,
<                                                       pl);
---
>               {
>                       asprintf(&perf, "%s", perfdata("packet_loss", pl, "%",
>                       TRUE, wpl,
>                       TRUE, cpl,
>                       TRUE, 0,
>                       FALSE, 0));
>                       printf (_("PING %s - %sPacket loss = %d%% |%s\n"), state_text (this_result), warn_text,
>                                                       pl, perf);
>               }
164,165c173,186
<                       printf (_("PING %s - %sPacket loss = %d%%, RTA = %2.2f ms"),
<                                                       state_text (this_result), warn_text, pl, rta);
---
>               {
>                       asprintf(&perf, "%s", perfdata("packet_loss", pl, "%",
>                         TRUE, wpl,
>                         TRUE, cpl,
>                         TRUE, 0,
>                         FALSE, 0));
>                       asprintf(&perf1, "%s", perfdata("RTA", rta, "ms",
>                       TRUE, wrta,
>                       TRUE, crta,
>                       TRUE, 0,
>                       FALSE, 0));
>                       printf (_("PING %s - %sPacket loss = %d%%, RTA = %2.2f ms | %s %s\n"),
>                                                       state_text (this_result), warn_text, pl, rta, perf1, perf);
>               }