net-snmp sun mods install: make sure destdirs exist
[unleashed-userland.git] / components / sysutils / net-snmp / sun / agent / modules / healthMonitor / healthMonitor.h
blob27e8b6c7b6cb82dd53da5e8a113766daa728412b
1 /*
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
4 * U.S. Government Rights - Commercial software. Government users are subject
5 * to the Sun Microsystems, Inc. standard license agreement and applicable
6 * provisions of the FAR and its supplements.
9 * This distribution may include materials developed by third parties. Sun,
10 * Sun Microsystems, the Sun logo and Solaris are trademarks or registered
11 * trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 * Note: this file originally auto-generated by mib2c using
17 * : mib2c.scalar.conf,v 1.5 2002/07/18 14:18:52 dts12 Exp $
21 #ifndef HEALTHMONITOR_H
22 #define HEALTHMONITOR_H
24 /* function declarations */
25 void init_healthMonitor(void);
26 Netsnmp_Node_Handler get_hmSpinsOnMutexes;
27 Netsnmp_Node_Handler get_hmTotProcInRunQueue;
28 Netsnmp_Node_Handler get_hmTotRPCCalls;
29 Netsnmp_Node_Handler get_hmUsedSwapSpace;
30 Netsnmp_Node_Handler get_hmDNLCMisses;
31 Netsnmp_Node_Handler get_hmReservedSwapSpace;
32 Netsnmp_Node_Handler get_hmTotMemAllocFails;
33 Netsnmp_Node_Handler get_hmAvailableSwapSpace;
34 Netsnmp_Node_Handler get_hmDNLCHitRate;
35 Netsnmp_Node_Handler get_hmDNLCHits;
36 Netsnmp_Node_Handler get_hmAllocatedSwapSpace;
37 Netsnmp_Node_Handler get_hmTotNumOfCPUs;
38 Netsnmp_Node_Handler get_hmPageScanRate;
39 Netsnmp_Node_Handler get_hmTimers;
40 Netsnmp_Node_Handler get_hmTotBadRPCCalls;
41 Netsnmp_Node_Handler get_hmDNLCRefRate;
42 Netsnmp_Node_Handler get_hmTotSendFails;
43 Netsnmp_Node_Handler get_hmTotFailedCallsBV;
44 Netsnmp_Node_Handler get_hmTotNumOfAuthRefresh;
45 Netsnmp_Node_Handler get_hmHandspread;
46 Netsnmp_Node_Handler get_hmTotRPCRetransmissions;
47 Netsnmp_Node_Handler get_hmKmemFreeMem;
48 Netsnmp_Node_Handler get_hmTotBadRPCReplies;
49 Netsnmp_Node_Handler get_hmKmemErrors;
50 Netsnmp_Node_Handler get_hmTotProcReadyInSwap;
51 Netsnmp_Node_Handler get_hmTotProcBlocked;
52 Netsnmp_Node_Handler get_hmTotRPCCallsTimedOut;
55 /* Additions to the template generated by mib2c */
57 /* Define node alarm states */
59 #define OK 0
60 #define INFO 1
61 #define WARNING 2
62 #define ERROR 3
64 /* Defile various rule states */
66 #define NOTINIT 0
67 #define INIT 1
68 #define OPEN 2
69 #define CONTINUE 3
70 #define CLOSE 4
71 #define CONDITION 5
73 /* Forward Function declarations */
75 int hm_post_read_config(int a, int b, void *c, void *d);
76 void read_health_monitor_thresholds(const char *token, char *cptr);
77 void send_trap(u_char *host , u_char *mod , u_char* con, oid *asdf, int size, u_char *stat , u_char *desc , u_char* dvalue, int dtype);
78 void hm_handle_rule(int* rule_state, int (*rule) (int action));
80 int SWAP_rule(int action);
81 int Kernel_rule(int action);
82 int NFS_rule(int action);
83 int CPU_rule(int action);
84 int RAM_rule(int action);
85 int KMEM_rule(int action);
86 int DNLC_rule(int action);
88 void refresh_all_HM_data(unsigned int clientreg, void *clientarg);
89 void refresh_SWAP_data();
90 void refresh_Kernel_data();
91 void refresh_NFS_data();
92 void refresh_CPU_data();
93 void refresh_RAM_data();
94 void refresh_KMEM_data();
95 void refresh_DNLC_data();
97 char* conv_alarm_state(int);
100 * Additions from hmDiskGroup.h required for implementing hmDiskGroup
104 /* function declarations */
105 void initialize_table_hmDiskTable(void);
106 Netsnmp_Node_Handler hmDiskTable_handler;
108 Netsnmp_First_Data_Point hmDiskTable_get_first_data_point;
109 Netsnmp_Next_Data_Point hmDiskTable_get_next_data_point;
111 /* column number definitions for table hmDiskTable */
112 #define COLUMN_HMDISKNAME 1
113 #define COLUMN_HMDISKALIASNAME 2
114 #define COLUMN_HMAVGWAITTRANSACTIONS 3
115 #define COLUMN_HMDISKBUSYPCNT 4
116 #define COLUMN_HMAVGDISKSVCTIME 5
118 typedef struct HmDiskEntry {
119 char *hmDiskName;
120 char *hmDiskAliasName;
121 char *hmAvgWaitTransactions;
122 char *hmDiskBusyPcnt;
123 char *hmAvgDiskSvcTime;
124 int hmDiskState;
125 int hmTraversed;
127 struct HmDiskEntry* pNext;
128 } hmDiskTable;
130 #define DISK_DATA_LEN 8
132 /* Function prototypes */
134 void construct_DISK_table();
135 void refresh_DISK_table(unsigned int clientreg, void *clientarg);
136 hmDiskTable* get_first_node();
137 void check_state_DISK();
139 #endif /* HEALTHMONITOR_H */