gdc - operational user interface for gated(8)
/usr/sbin/gdc [-q] [-n] [-c coresize] [-f filesize] [-m
datasize] [-s stacksize] [-t seconds] command
Causes gdc to run without changing the kernel forwarding
table. This is useful for testing, and when operating as
a route server that does no forwarding. Causes gdc to run
quietly. Informational messages that are normally printed
to the standard output are suppressed, and error messages
are logged by syslogd(8) instead of being printed to the
standard error output. This is often convenient when running
gdc from a shell script. Specifies the time in seconds
for gdc to waiting for gated to complete certain
operations, in particular at termination and startup. The
default value is 10 seconds. Specifies the maximum size
of a core dump a gated started with gdc will produce.
This is useful on systems where the default maximum core
dump size is too small for gated to produce a full core
dump on errors. Sets the maximum file size a gated
started with gdc will produce. This is useful on systems
where the default maximum file dump size is too small for
gated to produce a full state dump when requested. Sets
the maximum size of the data segment of a gated started
with gdc. This is useful on systems where the default
data segment size is too small for gated to run. Sets the
maximum size of stack of a gated started with gdc. This
is useful on systems where the default maximum stack size
is too small for gated to run.
The gdc command provides a user-oriented interface for the
operation of the gated routing daemon. It provides support
for starting and stopping the daemon, for the delivery
of signals to manipulate the daemon when it is operating,
for the maintenance and syntax checking of configuration
files, and for the production and removal of state
dumps and core dumps. The gdc interface can reliably
determine gated's running state and produces a reliable
exit status when errors occur, making it advantageous for
use in shell scripts which manipulate gated. Commands executed
using gdc and, optionally, error messages produced
by the execution of those commands, are logged using the
same syslogd(8) facility that gated itself uses, providing
an audit trail of operations performed on the daemon.
If installed as a setuid root program, gdc allows non-root
users who are members of a trusted group (by default the
gdmaint group) to manipulate the routing daemon while
denying access to others. The name of the user is logged
along using syslogd(8) along with an indication of each
command executed, for audit purposes.
Signal Commands [Toc] [Back]
You can use the following commands to send signals to
gated: Sends an abort signal to gated, causing it to terminate
with a core dump. Signals gated to dump its current
state into the /usr/tmp/gated_dump file. Signals
gated to recheck the interface configuration. The gated
daemon rechecks the interface configuration periodically,
but you can force the daemon to check interface status
immediately when changes are known to have occurred.
Causes gated to terminate. This is useful when the daemon
is hung. Signals gated to reread its configuration file,
reconfiguring its current state as appropriate. Signals
gated to terminate after shutting down all operating routing
protocols. If you issue this a second time, gated
terminates even if some protocols have not yet fully shut
down. Suspends tracing and closes the trace file, if
gated is currently tracing to a file. If gated tracing is
currently suspended, this reopens the trace file and initiates
tracing. This is useful for moving trace files.
Configuration Files [Toc] [Back]
By default, gated obtains its configuration information
from the /etc/gated.config file. The gdc program also
maintains the following other versions of the configuration
file: The new configuration file. When gdc is
requested to install a new configuration file, this file
is renamed /etc/gated.conf. The old configuration file.
When gdc is requested to install a new configuration file,
the previous /etc/gated.conf is renamed to this name. The
next oldest configuration file. The gdc program retains
the previous old configuration file under this name.
Configuration File Commands [Toc] [Back]
The following commands perform operations related to configuration
files: Checks /etc/gated.conf for syntax
errors. This is done after changes to the configuration
file and before sending a reconfig signal to the currently
running gated, to ensure that there are no errors in the
configuration which would cause the running gated to terminate
on reconfiguration. When this command is used, gdc
issues an informational message indicating whether there
were parse errors. If any errors occurred, gdc saves the
error output in a file for inspection. Like checkconf,
except that gdc checks the new configuration file,
/etc/gated.conf+. Renames the /etc/gated.conf+ file as
/etc/gated.conf, retaining the older versions of the file
as described previously. The gdc program does nothing if
the new configuration file does not exist or otherwise
looks suspect. Renames /etc/gated.conf- file as
/etc/gated.conf, in effect going back to the older version
of the configuration file. The command does nothing if
/etc/gated.conf- does not exist or is zero length, or if
the operation would delete an existing, non-zero length
/etc/gated.conf+ file. Performs a backout operation even
if /etc/gated.conf+ exists and is of non-zero length.
Sets all configuration files to mode 664, owner root,
group gdmaint. This allows a trusted non-root user to modify
the configuration files. Creates a zero length configuration
file with the file mode set to 664, owner root,
group gdmaint, if /etc/gated.conf+ does not exist. This
allows a trusted non-root user to install a new configuration
file.
Operational Commands [Toc] [Back]
The following commands enable you to start and stop gated,
and to determine its running state: Determines if gated is
currently running by checking to see if gated has a lock
on the file containing its pid, if the pid in the file is
sensible and if there is a running process with that pid.
If gated is running, the command exits with a zero status.
Otherwise, it exits with a non-zero status. Starts gated.
The command returns an error if gated is already running.
Otherwise, it executes the gated binary and waits for up
to the delay interval (10 seconds by default, as set with
the -t option otherwise) until the newly started process
obtains a lock on the pid file. A non-zero exit status is
returned if an error is detected while executing the
binary, or if a lock is not obtained on the pid file
within the specified wait time. Stops gated, gracefully
if possible, ungracefully if not. The command returns an
error (with non-zero exit status) if gated is not currently
running. Otherwise, it sends a terminate signal to
gated and waits for up to the delay interval (10 seconds
by default, as specified with the -t option otherwise) for
the process to exit. If gated fails to exit within the
delay interval, a second terminate signal is sent. If it
fails to exit by the end of the second delay interval, a
kill signal is sent, forcing immediate termination. The
command terminates with zero exit status when it detects
that gated has terminated, non-zero otherwise. If gated
is running, it is terminated using the same procedure as
the stop command. When the previous gated terminates, or
if it was not running prior to command execution, a new
gated process is executed using the procedures previously
described for the start command. A non-zero exit status
is returned if any step in this procedure fails.
Maintenance Commands [Toc] [Back]
The following commands allow the removal of files created
by the execution of some of the operational commands:
Removes any existing gated core dump file. Removes any
existing gated state dump file. Removes the parse error
file generated when a checkconf or checknew command is
executed and syntax errors are encountered in the configuration
file being checked.
The gated binary. Contains the current gated configuration
information. Contains newer gated configuration
information. Contains older gated configuration information.
Contains the oldest gated configuration information.
Contains the gated process id (PID). Contains
gated status information. Contains configuration file
parse errors. Specifies the path where gated creates its
core file.
Commands: syslog(1), gated(8), ospf_monitor(8), ripquery(8), routed(8), route(8).
gdc(8)
[ Back ] |