Hi
I have recently installed and configured monit on a Sparc-Solaris 8 machine. Monit checks some process correctly, but does not show the pid nor the ppid of those process. Does the pid file need to be written on any special format?
I have modified the file validate.c to include the line "s->inf->pid= pid" and it works OK, now showing the pid.
I still have not found out what to do for the ppid. Any idea?
Compiling the same brandnew 4.5.1 version on a PC-Linux I get the correct pid and other information such as the CPU and memory usage. What could I do to achieve this information on the Sparc-Solaris 8 machine?
Here is my check_process function:
/**
* Validate a given process service s. Events are posted according to
* its configuration. In case of a fatal event FALSE is returned.
*/
int check_process(Service_T s) {pid_t pid= -1; Port_T pp= NULL; Resource_T pr= NULL;
ASSERT(s);
/* Test for running process */
if(!(pid= Util_isProcessRunning(s))) {
/* Reset the service info object to prevent false data in the first run */
Util_resetInfo(s);
Event_post(s, EVENT_NONEXIST, TRUE, s->action_NONEXIST,
"'%s' process is not running", s->name);
return FALSE;
} else {
Event_post(s, EVENT_NONEXIST, FALSE, s->action_NONEXIST,
"'%s' process is running with pid %d", s->name, (int)pid);
s->inf->pid= pid;
}
.
.
.
Thanks. Santiago.
-- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
