Back to index

nagios-plugins  1.4.16
utils_disk.h
Go to the documentation of this file.
00001 /* Header file for utils_disk */
00002 
00003 #include "mountlist.h"
00004 #include "utils_base.h"
00005 #include "regex.h"
00006 
00007 struct name_list
00008 {
00009   char *name;
00010   struct name_list *next;
00011 };
00012 
00013 struct parameter_list
00014 {
00015   char *name;
00016   thresholds *freespace_bytes;
00017   thresholds *freespace_units;
00018   thresholds *freespace_percent;
00019   thresholds *usedspace_bytes;
00020   thresholds *usedspace_units;
00021   thresholds *usedspace_percent;
00022   thresholds *usedinodes_percent;
00023   thresholds *freeinodes_percent;
00024   char *group;
00025   struct mount_entry *best_match;
00026   struct parameter_list *name_next;
00027   uintmax_t total, available, available_to_root, used, inodes_free, inodes_total;
00028   double dfree_pct, dused_pct;
00029   double dused_units, dfree_units, dtotal_units;
00030   double dused_inodes_percent, dfree_inodes_percent;
00031 };
00032 
00033 void np_add_name (struct name_list **list, const char *name);
00034 int np_find_name (struct name_list *list, const char *name);
00035 int np_seen_name (struct name_list *list, const char *name);
00036 struct parameter_list *np_add_parameter(struct parameter_list **list, const char *name);
00037 struct parameter_list *np_find_parameter(struct parameter_list *list, const char *name);
00038 struct parameter_list *np_del_parameter(struct parameter_list *item, struct parameter_list *prev);
00039   
00040 int search_parameter_list (struct parameter_list *list, const char *name);
00041 void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, int exact);
00042 int np_regex_match_mount_entry (struct mount_entry* me, regex_t* re);