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
|
Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.7
diff -r1.7 check_disk.c
30a31,32
> * - Modification by www.datux.nl 2003-01-24
> * added performance data output
66a69,71
> int perf_total_disk = 0;
> int perf_free_disk = 0;
> int perf_used_disk = 0;
98a104
> /* did we get some usefull output from the 'df' process? */
120a127,129
> perf_total_disk+=total_disk;
> perf_free_disk+=free_disk;
> perf_used_disk+=used_disk;
150,151c159,166
< printf ("DISK %s%s\n", state_text (result), output);
<
---
> printf ("DISK %s%s|total=%d,used=%d,free=%d,used_perc=%f,free_perc=%f\n",
> state_text (result),
> output,
> perf_total_disk,
> perf_used_disk,
> perf_free_disk,
> 100-((float)perf_free_disk*100/(float)perf_total_disk),
> ((float)perf_free_disk*100/(float)perf_total_disk));
|