ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbMon.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <unistd.h>
#include <errno.h>
#include <ngc/core/ngcb.h>
#include <ngc/core/ngcbSocket.h>

Macros

#define _GNU_SOURCE
 

Functions

FILE * ngcbWatchdogOpen (int verbose, char *erms)
 
void ngcbWatchdogClose (FILE *wd)
 
void ngcbWatchdogAddProc (FILE *wd, const char *host, int pid)
 
void ngcbWatchdogRemoveProc (FILE *wd, const char *host, int pid)
 
void ngcbWatchdogClearProc (FILE *wd, const char *host)
 
void ngcbWatchdogAddCmd (FILE *wd, const char *host, const char *cmd)
 
void ngcbWatchdogRemoveCmd (FILE *wd, const char *host, const char *cmd)
 
void ngcbWatchdogClearCmd (FILE *wd, const char *host)
 
void ngcbWatchdogDbWrite (FILE *wd, const char *host, const char *attr, const char *value)
 

Detailed Description

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Function Documentation

◆ ngcbWatchdogAddCmd()

void ngcbWatchdogAddCmd ( FILE * wd,
const char * host,
const char * cmd )

Add a command to the watchdog instruction list. The command will be executed when the calling process terminates abnormally.

◆ ngcbWatchdogAddProc()

void ngcbWatchdogAddProc ( FILE * wd,
const char * host,
int pid )

Add a process to the watchdog kill-list. When the calling process terminates abnormally the watchdog will kill all processes in the list.

◆ ngcbWatchdogClearCmd()

void ngcbWatchdogClearCmd ( FILE * wd,
const char * host )

Clear the watchdog instruction list for host. If host is a NULL-pointer then the complete instruction list is cleared.

◆ ngcbWatchdogClearProc()

void ngcbWatchdogClearProc ( FILE * wd,
const char * host )

Clear the watchdog kill-list for host.

◆ ngcbWatchdogClose()

void ngcbWatchdogClose ( FILE * wd)

Close watchdog connection and terminate the watchdog process. The function returns no value.

◆ ngcbWatchdogDbWrite()

void ngcbWatchdogDbWrite ( FILE * wd,
const char * host,
const char * attr,
const char * value )

Add a database attribute update to the watchdog execution list. The attribute will be set to the given value when the calling process terminates abnormally.

◆ ngcbWatchdogOpen()

FILE * ngcbWatchdogOpen ( int verbose,
char * erms )

Open a watchdog connection. The function returns a stream to be written to. If the verbose flag is greater than zero then the watchdog process is launched in verbose mode in a new terminal.

◆ ngcbWatchdogRemoveCmd()

void ngcbWatchdogRemoveCmd ( FILE * wd,
const char * host,
const char * cmd )

Remove a command from the watchdog instruction list.

◆ ngcbWatchdogRemoveProc()

void ngcbWatchdogRemoveProc ( FILE * wd,
const char * host,
int pid )

Removes a process from the watchdog kill-list. If host is a NULL-pointer then the complete kill-list is cleared.