1 #ifndef LIBMETRICS_H 2 #define LIBMETRICS_H 1 3 4 void libmetrics_init( void ); 5 6 #ifndef SYNAPSE_SUCCESS 7 #define SYNAPSE_SUCCESS 0 8 #endif 9 #ifndef SYNAPSE_FAILURE 10 #define SYNAPSE_FAILURE -1 11 #endif 12 13 #include <sys/types.h> 14 15 #ifdef HAVE_STDLIB_H 16 #include <stdlib.h> 17 #endif 18 19 #ifdef AIX 20 void *malloc(size_t size); 21 22 char * rpl_malloc(size_t n)23 rpl_malloc(size_t n) 24 { 25 if (n == 0) 26 n = 1; 27 return malloc (n); 28 } 29 #endif 30 31 #ifdef HAVE_CONFIG_H 32 #include <config.h> 33 #endif 34 35 #include <gm_value.h> 36 #include <gm_msg.h> 37 38 g_val_t metric_init(void); 39 g_val_t cpu_num_func(void); 40 g_val_t cpu_speed_func(void); 41 g_val_t mem_total_func(void); 42 g_val_t swap_total_func(void); 43 g_val_t boottime_func(void); 44 g_val_t sys_clock_func(void); 45 g_val_t machine_type_func(void); 46 g_val_t os_name_func(void); 47 g_val_t os_release_func(void); 48 g_val_t mtu_func(void); 49 g_val_t cpu_user_func(void); 50 g_val_t cpu_nice_func(void); 51 g_val_t cpu_system_func(void); 52 g_val_t cpu_idle_func(void); 53 g_val_t cpu_wio_func(void); 54 g_val_t cpu_aidle_func(void); 55 g_val_t cpu_intr_func(void); 56 g_val_t cpu_sintr_func(void); 57 g_val_t cpu_steal_func(void); 58 g_val_t bytes_in_func(void); 59 g_val_t bytes_out_func(void); 60 g_val_t pkts_in_func(void); 61 g_val_t pkts_out_func(void); 62 g_val_t disk_total_func(void); 63 g_val_t disk_free_func(void); 64 g_val_t part_max_used_func(void); 65 g_val_t load_one_func(void); 66 g_val_t load_five_func(void); 67 g_val_t load_fifteen_func(void); 68 g_val_t proc_run_func(void); 69 g_val_t proc_total_func(void); 70 g_val_t mem_free_func(void); 71 g_val_t mem_shared_func(void); 72 g_val_t mem_buffers_func(void); 73 g_val_t mem_cached_func(void); 74 g_val_t swap_free_func(void); 75 g_val_t gexec_func(void); 76 g_val_t heartbeat_func(void); 77 g_val_t location_func(void); 78 79 #ifdef LINUX 80 g_val_t mem_sreclaimable_func (void); 81 #endif 82 83 /* the following are additional internal metrics added by swagner 84 * what for the monitoring of buffer/linear read/writes on Solaris boxen. 85 * these are only valid on the solaris version of gmond v2.3.1b1, 86 * all others are untested. caveat haxor. :P 87 */ 88 89 #ifdef SOLARIS 90 91 g_val_t bread_sec_func(void); 92 g_val_t bwrite_sec_func(void); 93 g_val_t lread_sec_func(void); 94 g_val_t lwrite_sec_func(void); 95 g_val_t phread_sec_func(void); 96 g_val_t phwrite_sec_func(void); 97 g_val_t rcache_func(void); 98 g_val_t wcache_func(void); 99 100 #endif 101 102 #ifdef HPUX 103 104 g_val_t mem_rm_func(void); 105 g_val_t mem_arm_func(void); 106 g_val_t mem_vm_func(void); 107 g_val_t mem_avm_func(void); 108 109 #endif 110 111 #endif /* LIBMETRICS_H */ 112