Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

18.4 Log File Switchover Exit

This section explains the exit program used when the Jobscheduler log files (jobdb1.log, jobdb2.log and jobdb3.log) are switched.

[Windows]

If the log file has changed, the system searches for the exit program in jobdbexit.bat first, and then in jobdbexit.exe. The exit program found will be used. If the jobdbexit.bat is found, jobdbexit.exe will not be called up even if it exists.

If you want to use this exit to perform custom processing, create an exit program with the same name and store it in the following directory:

<Systemwalker installation directory>\MpWalker.JM\bin

[UNIX]

If the log file has changed, the system searches for and calls the jobdb.exit file as the exit program.

If you want to use this exit to perform custom processing, create an exit program with the same name and store it in the following directory:

Solaris/Linux:

/opt/FJSVJOBSC/bin

HP-UX:

/opt/FHPJOBSCH/bin

AIX:

/usr/FAIXJOBSC/bin

Appropriate execution privileges are required to execute the exit program. If relevant privileges are not set, the exit program will not be called.

Parameters Passed to the Exit Program

The parameters passed to the exit program are as follows:

argc :

Number of parameters (2) (Note1)

argv[0] :

Exit program name

argv[1] :

Log file name before switching

argv[2] :

Subsystem number (character string) (Note2)

Note1:

In Systemwalker Operation Manager EE, the number of parameters is three.

Note2:

This parameter is used in Systemwalker Operation Manager EE.

Cautions

Program Example

Below is an example program for the log file switchover exit:

[Windows]

/*
  Generates a message event called DB-CHANGE
*/

#include <process.h>

main()
{
    system("jobschmsgevent DB-CHANGE"); 

    exit(0);
}

[Solaris]

/*
  Example program for the log file switchover exit (for UNIX) which outputs a log
  switchover message on the console
*/

#include <syslog.h>
#include <stdio.h>

main(int argc, char **argv)
{
    openlog("jobsch", LOG_CONS, LOG_USER);
    syslog(LOG_WARNING, "WARNING: Log file was switched. file=%s", argv[1]);
    closelog();

    exit(0);
}