diff options
Diffstat (limited to 'plugins/check_swap.d/check_swap.h')
| -rw-r--r-- | plugins/check_swap.d/check_swap.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/check_swap.d/check_swap.h b/plugins/check_swap.d/check_swap.h index 99039b21..8d3c7fcf 100644 --- a/plugins/check_swap.d/check_swap.h +++ b/plugins/check_swap.d/check_swap.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include "../common.h" | 3 | #include "../common.h" |
| 4 | #include "../../lib/output.h" | ||
| 5 | #include "../../lib/states.h" | ||
| 4 | 6 | ||
| 5 | #ifndef SWAP_CONVERSION | 7 | #ifndef SWAP_CONVERSION |
| 6 | # define SWAP_CONVERSION 1 | 8 | # define SWAP_CONVERSION 1 |
| @@ -25,19 +27,23 @@ typedef struct { | |||
| 25 | 27 | ||
| 26 | typedef struct { | 28 | typedef struct { |
| 27 | bool allswaps; | 29 | bool allswaps; |
| 28 | int no_swap_state; | 30 | mp_state_enum no_swap_state; |
| 29 | bool warn_is_set; | 31 | bool warn_is_set; |
| 30 | check_swap_threshold warn; | 32 | check_swap_threshold warn; |
| 31 | bool crit_is_set; | 33 | bool crit_is_set; |
| 32 | check_swap_threshold crit; | 34 | check_swap_threshold crit; |
| 33 | bool on_aix; | 35 | bool on_aix; |
| 34 | int conversion_factor; | 36 | int conversion_factor; |
| 37 | |||
| 38 | bool output_format_is_set; | ||
| 39 | mp_output_format output_format; | ||
| 35 | } swap_config; | 40 | } swap_config; |
| 36 | 41 | ||
| 37 | swap_config swap_config_init(void); | 42 | swap_config swap_config_init(void); |
| 38 | 43 | ||
| 39 | swap_result get_swap_data(swap_config config); | 44 | swap_result get_swap_data(swap_config config); |
| 40 | swap_result getSwapFromProcMeminfo(char path_to_proc_meminfo[]); | 45 | swap_result getSwapFromProcMeminfo(char path_to_proc_meminfo[]); |
| 41 | swap_result getSwapFromSwapCommand(swap_config config, const char swap_command[], const char swap_format[]); | 46 | swap_result getSwapFromSwapCommand(swap_config config, const char swap_command[], |
| 47 | const char swap_format[]); | ||
| 42 | swap_result getSwapFromSwapctl_BSD(swap_config config); | 48 | swap_result getSwapFromSwapctl_BSD(swap_config config); |
| 43 | swap_result getSwapFromSwap_SRV4(swap_config config); | 49 | swap_result getSwapFromSwap_SRV4(swap_config config); |
