121 |
char *localhostname; /**< The host name for localhost */ |
char *localhostname; /**< The host name for localhost */ |
122 |
char *mailserver; /**< Mailserver used for alert notification */ |
char *mailserver; /**< Mailserver used for alert notification */ |
123 |
char *pidfile; /**< This programs pidfile */ |
char *pidfile; /**< This programs pidfile */ |
124 |
|
char *mygroup; /**< Group Name of the Process */ |
125 |
|
int have_tty; /**< Do we have a valid tty */ |
126 |
int debug; /**< Write debug information - TRUE or FALSE */ |
int debug; /**< Write debug information - TRUE or FALSE */ |
127 |
int use_syslog; /**< If TRUE write log to syslog */ |
int use_syslog; /**< If TRUE write log to syslog */ |
128 |
int dolog; /**< TRUE if program should log actions, otherwise FALSE */ |
int dolog; /**< TRUE if program should log actions, otherwise FALSE */ |
195 |
typedef struct myprotocol *Protocol_T; |
typedef struct myprotocol *Protocol_T; |
196 |
|
|
197 |
typedef struct mydependant { |
typedef struct mydependant { |
198 |
char *dependant; /** <name of dependant process> **/ |
char *dependant; /**< name of dependant process */ |
199 |
/** For internal use */ |
/** For internal use */ |
200 |
struct mydependant *next; /** <next dependant process in chain> **/ |
struct mydependant *next; /**< next dependant process in chain */ |
201 |
} *Dependant_T; |
} *Dependant_T; |
202 |
|
|
203 |
/** Defines a checksum object */ |
/** Defines a checksum object */ |
277 |
char *name; /**< Process descriptive name */ |
char *name; /**< Process descriptive name */ |
278 |
char *pidfile; /**< The pid file of the process */ |
char *pidfile; /**< The pid file of the process */ |
279 |
char *group; /**< Process group name */ |
char *group; /**< Process group name */ |
|
char *parent; /**< The process that is depended upon */ |
|
280 |
Command_T start; /**< The start command for the process */ |
Command_T start; /**< The start command for the process */ |
281 |
Command_T stop; /**< The stop command for the process */ |
Command_T stop; /**< The stop command for the process */ |
282 |
int do_validate; /**< validation flag, if FALSE, no validation is done */ |
int do_validate; /**< validation flag, if FALSE, no validation is done */ |
|
int visited; /**< visited flag */ |
|
283 |
int mode; /**< Monitoring mode for the process */ |
int mode; /**< Monitoring mode for the process */ |
284 |
int ncycle; /**< The number of the current cycle */ |
int ncycle; /**< The number of the current cycle */ |
285 |
int nstart; /**< The number of current starts with this process */ |
int nstart; /**< The number of current starts with this process */ |
292 |
int def_timeout; /**< TRUE if timeout is defined for the process */ |
int def_timeout; /**< TRUE if timeout is defined for the process */ |
293 |
int def_checksum; /**< TRUE if checksum is defined for the process */ |
int def_checksum; /**< TRUE if checksum is defined for the process */ |
294 |
int def_procinfo; /**< TRUE if procinfo is defined for the process */ |
int def_procinfo; /**< TRUE if procinfo is defined for the process */ |
295 |
|
int visited; /**< Process visited flag, set if dependencies are used */ |
296 |
|
int depend_visited;/**< Depend visited flag, set if dependencies are used */ |
297 |
|
|
298 |
Port_T portlist; /**< Portnumbers the process listens on */ |
Port_T portlist; /**< Portnumbers the process listens on */ |
299 |
Checksum_T checksumlist; /**< A list of file associated checksums */ |
Checksum_T checksumlist; /**< A list of file associated checksums */ |
311 |
|
|
312 |
/* ------ Global variables ------------------------------------------------- */ |
/* ------ Global variables ------------------------------------------------- */ |
313 |
Process_T processlist; /**< The process list (created in p.y) */ |
Process_T processlist; /**< The process list (created in p.y) */ |
|
Dependant_T dependantlist; /**<The depeandant list (created in p.y) */ |
|
314 |
char *prog; /**< The Name of this Program */ |
char *prog; /**< The Name of this Program */ |
315 |
struct myrun Run; /**< Struct holding runtime constants */ |
struct myrun Run; /**< Struct holding runtime constants */ |
|
int have_tty; /**< Do we have a valid tty */ |
|
|
char *mygroup; /**< Group Name of the Process */ |
|
316 |
|
|
317 |
|
|
318 |
/* Public prototypes */ |
/* Public prototypes */ |
350 |
void d_check_process(char *, char *); |
void d_check_process(char *, char *); |
351 |
void check_process(char *, char *, int); |
void check_process(char *, char *, int); |
352 |
void setup_dependants(); |
void setup_dependants(); |
353 |
|
void reset_depend(); |
354 |
void spawn(Process_T, Command_T); |
void spawn(Process_T, Command_T); |
355 |
void status(); |
void status(); |
356 |
void status_group(char *); |
void status_group(char *); |