Steel Belted Radius Carrier 7.0 Reference Guide > Operations Files
> Auto-Restart Files
Auto-Restart Files
When enabled, the auto-restart module acts as a watchdog daemon, monitoring the status of the Steel-Belted Radius Carrier executable and restarting it as needed. Automatic restart is disabled by default.
Perl must be installed on the Steel-Belted Radius Carrier server if you want to use the automatic restart module. Perl support is not required for syslog but is available.
Perl SNMP Support
You can configure the auto-restart module to send SNMP traps to record auto-restart events. Perl SNMP support resides in the Perl SNMP_Session module, which provides access to remote SNMP agents.
Perl SNMP support allows Steel-Belted Radius Carrier to send SNMP traps to a variety of SNMP agents, including the Sun Management Center, which is distributed with some Sun hardware platforms. Sun Management Center is not required to run radiusd.
Perl syslog Support
The optional perl package syslog.ph is used to log the watchdog daemon status. You can configure the auto-restart module to send syslog messages to record auto-restart events. To use syslog reporting, you can use the h2ph utility to create a syslog.ph file. This example assumes site_perl/5.005 is in @INC:
su - root
cd /user/include/sys
/usr/perl15/bin/h2ph -d /usr/perl15/site_perl/5.005 syslog.h
If you do not want to use syslog, use the -d or --logfile options for the radiusd command to open a regular log file (radiusd.log).
S90sbrd Script
To enable the auto-restart module, you must edit the S90sbrd script to ensure that a certain line in the script is uncommented (the hash mark # is removed from the start of the line):
- If Steel-Belted Radius Carrier is already running, become superuser and type this command to stop the server:
/etc/rc2.d/S90sbrd stop
- Edit the radius script (S90sbrd). The line you want to edit for auto-restart resembles this example:
# RADIUS="$RADIUSDIR/radiusd --server $RADIUSDIR/radius"
The --server option identifies the location and name of the Steel-Belted Radius Carrier executable file, and must be present on the radiusd command line.
- If the comment hash mark (#) is present at the start of the line, remove it.
- Save and exit the file.
- Type this command to restart the server: S90sbrd invokes radiusd, which starts the RADIUS service:
/etc/rc2.d/S90sbrd start
radiusd Script
If you enable the auto-restart module, the S90sbrd startup/shutdown script runs radiusd instead of the radius executable file. radiusd executes radius as a child process and monitors its health by a polling mechanism. Polling parameters are configurable by editing the radiusd.conf file in the server directory; the relevant timeouts and logging options are near the beginning of the file.
The default radiusd.conf settings cause the auto-restart feature to work this way:
If the radius server executable fails to respond to status polling from radiusd within 17 seconds, radiusd attempts to stop radius using SIGTERM (a polite shutdown). If radius does not shut down within 60 seconds, SIGKILL (a hard kill) is used to stop it. After shutdown by either method, radiusd starts a new radius child process. If this radius child does not respond to status polling within 60 seconds of startup, it is presumed dead; a misconfiguration of the server is assumed; and radiusd terminates with a critical error.
 |
NOTE: The radius executable normally runs as a daemon. When the automatic-restart module is enabled, the radius executable is run as a child process of radiusd instead of being run as a daemon.
|
While the auto-restart module is enabled, all informational, debugging, warning, error, and critical messages from radiusd are recorded here:
- Syslog - Messages are written to the syslog system logging facility.
- Log file - If syslog is not available, messages are written to the server log file specified using the --logfile option on the radiusd command line; for example:
RADIUS="$RADIUSDIR/radiusd \
--server $RADIUSDIR/radius \
--logfile /var/log/radd.log"
If the --logfile option is not already included in the radiusd command line, you may add it.
 |
NOTE: Options processed by radiusd are preceded by two dashes (--). Options preceded with a single dash are passed to Steel-Belted Radius Carrier.
|
 |
NOTE: If Perl is not installed in the /usr/local/bin/ directory, this error message occurs when you start the Steel-Belted Radius Carrier server:
./S90sbrd: /RadiusHome/radiusd: not found
To fix this error, edit the first line of the radiusd file in the RADIUS directory so that the directory structure points to the correct Perl interpreter executable:
#!/usr/local/bin/perl
|
Script Configuration
The radiusd.conf configuration file (Table 30) provides settings for the radiusd automatic-restart module.
Table 30: radiusd.conf Syntax
|
|
WatchdogIntervalPing
|
Number of seconds the automatic-restart module waits between sending status inquiries.
Default value is 5 seconds.
|
WatchdogIntervalMaxPong
|
Number of seconds the automatic-restart module waits for a reply before issuing a SIGTERM (shutdown) message.
Default value is 17 seconds.
|
WatchdogIntervalMaxStartup
|
Number of seconds during which the server is expected to be able to start up.
Default value is 60 seconds.
|
WatchdogIntervalMaxShutdown
|
Number of seconds during which the server is expected to be able to shut down.
Default value is 60 seconds.
|
SnmpManager = hostname community port version
|
Identifier for an SNMP management station you want to receive traps from the automatic-restart module. You can specify more than one SNMP management station.
For each SNMP management station, enter:
- hostname - IP address of the SNMP management station.
- community - SNMP community string.
- port - UDP port number used for SNMP trap messages. UDP port 162 is the default.
- version - SNMP version number.
Default value is 1.
If SnmpManager is undefined, SNMP traps may still be logged, but are not transmitted on the network.
|
SnmpInterface
|
Identifies the IP network interface to be used to generate SNMP trap messages. You can specify interfaces by name or by IP address.
If you enter any, the first IPv4 interface the automatic-restart module finds is used.
If you leave this parameter blank, generation of SNMP trap messages is disabled.
|
SnmpCommandTrap
|
Specifies how SNMP trap messages are forwarded:
- You can specify the pathname and filename for a module or executable whose syntax matches the SMC snmptrap utility. For example:
/opt/SUNWsymon/util/bin/sparc-sun-solaris2.8/snmptrap
- You can specify SNMP_Session.pm to deliver SNMP traps to the management station using the Perl modules.
If you leave the parameter blank, SNMP trap messages are not generated.
Default value is blank.
|
SnmpCommandUptime
|
Specifies how the automatic-restart module determines elapsed time for timestamps in trap messages.
You can specify the pathname and filename for a module or executable whose syntax matches the SMC uclock utility. For example: /opt/SUNWsymon/util/bin/sparc-sun-solaris2.8/uclock
If you leave the parameter blank, the automatic restart module calculates elapsed time relative to its own start time.
Default value is blank.
|
SnmpEnterprise
|
Specifies the OID prefix for enterprise-specific trap messages, which is used to select the appropriate MIB for decoding traps.
Default value is 1.3.6.1.4.1.1411.1.1.
If you leave the parameter blank, SNMP trap messages are not generated.
|
SnmpGenericTrapType= 6
|
Specifies the enterprise-specific trap type, which must be 6 according to the SNMPv1 standard. Do not change this value without a specific reason.
|
SnmpTrapWatchdogStarted
|
Specifies the trap type for messages indicating that the automatic-restart module is started.
Default value is 113.
Enter 0 to disable this type of trap.
|
SnmpTrapWatchdogStopped
|
Specifies the trap type for messages indicating that the automatic-restart module is stopped.
Default value is 114.
Enter 0 to disable this type of trap.
|
SnmpTrapWatchdogRadius Started
|
Specifies the trap type for messages indicating that the RADIUS server is restarted.
Default value is 115.
Enter 0 to disable this type of trap.
|
SnmpTrapWatchdogRadiusTerm
|
Specifies the trap type for messages indicating that the RADIUS server is not responding and that the automatic-restart module has sent the SIGTERM signal.
Default value is 5028.
Enter 0 to disable this type of trap.
|
SnmpTrapWatchdogRadiusKill
|
Specifies the trap type for messages indicating that the RADIUS server is not responding and that the automatic-restart module has sent the KILL signal.
Default value is 5029.
Enter 0 to disable this type of trap.
|
SnmpTrapWatchdogAborted
|
Specifies the trap type for messages indicating that the RADIUS server is not responding and that the automatic-restart module has given up and aborted.
Default value is 10051.
Enter 0 to disable this type of trap.
|
SnmpTrapWatchdogFailedInit
|
Specifies the trap type for messages indicating that the automatic-restart module failed to start, which may indicate a misconfiguration issue.
Default value is 10052.
Enter 0 to disable this type of trap.
|