gdc(1M) TCP/IP R4.11 gdc(1M)
NAME
gdc - provide a management interface for gated(1M)
SYNOPSIS
gdc [ -q ] [ -t seconds ] command
where:
seconds Time-out value; default = 10 seconds
command A command to manage the operation of gated; see Commands
below
DESCRIPTION
Gdc provides a user-oriented interface to the gated(1M) routing
server (daemon). It lets you start and stop the server, deliver
signals to manipulate the server when it is operating, maintain and
check syntax of configuration files, and produce and remove state
dumps and core dumps.
Gdc can reliably determine gated's running state and produces a
reliable exit status when errors occur, making it useful in shell
scripts that manipulate gated. Commands executed using gdc and,
optionally, error messages produced by the execution of those
commands, are logged via the same syslogd(1M) facility that gated
uses. This provides an audit trail of operations performed on the
server.
This command requires appropriate privilege. On a generic DG/UX
system, appropriate privilege is granted by having an effective UID
of 0 (root). See the appropriateprivilege(5) man page for more
information.
On a system with DG/UX information security, appropriate privilege is
granted by having one or more specific capabilities enabled in the
effective capability set of the user. See the capdefaults(5) man
page for the default capabilities for this command.
Options
-q Run quietly. Informational messages normally printed to the
standard output are suppressed, and error messages are logged
via syslogd(1M) instead of being printed to the standard error
output. This is often convenient when running gdc from a
shell script.
-t Specify the time in seconds that gdc will wait for gated to
complete certain operations, in particular at termination and
startup.
Commands
The following commands send signals to gated:
COREDUMP Send an abort signal to gated, causing it to terminate with
a core dump.
dump Signal gated to dump its current state into the file
/var/tmp/gateddump.
interface Signal gated to recheck the interface configuration. Gated
normally does this periodically in any event, but you can
use this command to force the server to check the interface
status immediately when changes are known to have occurred.
KILL Terminate gated ungracefully. This is useful when the
gated hangs.
reconfig Signal gated to reread its configuration file,
reconfiguring its current state as appropriate.
term Signal gated to terminate after shutting down all operating
routing protocols gracefully.
toggletrace
If gated is currently tracing to a file, suspend tracing
and close the trace file. If gated tracing is currently
suspended, reopen the trace file and initiate tracing.
This is useful for moving trace files.
By default gated obtains its configuration from a file named
/etc/gated.conf. The gdc program also maintains several other
versions of the configuration file, in particular named:
/etc/gated.conf+
The new configuration file. When gdc is requested to
install a new configuration file, this file is renamed
/etc/gated.conf.
/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.
/etc/gated.conf--
The really old configuration file. Gdc retains the
previous old configuration file under this name.
The following commands perform operations related to configuration
files:
checkconf Check /etc/gated.conf for syntax errors. This is usually
done after changes to the configuration file but 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 or not, and if so saves the error output in a file
for inspection.
checknew Like checkconf except that the new configuration file,
/etc/gated.conf+, is checked instead.
newconf Move the /etc/gated.conf+ file into place as
/etc/gated.conf, retaining the older versions of the file
as described above. Gdc declines to do anything when given
this command if the new configuration file doesn't exist or
otherwise looks suspect.
backout Rotate the configuration files in the newer direction, in
effect moving the old configuration file to
/etc/gated.conf. The command will decline to perform the
operation if /etc/gated.conf- doesn't exist or is zero
length, or if the operation would delete an existing, non-
zero length /etc/gated.conf+ file.
BACKOUT Perform a backout operation even if /etc/gated.conf+ exists
and is of non-zero length.
modeconf Set all configuration files to mode 664, owner root, group
adm. This let a trusted non-root user modify the
configuration files.
createconf
If /etc/gated.conf+ does not exist, create a zero length
file with the file mode set to 664, owner root, group adm.
This lets a trusted non-root user install a new
configuration file.
The following commands provide support for starting and stopping
gated, and for determining its running state:
running Determine whether gated is currently running. This is done
by checking to see whether 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. Exit status
is zero if gated is running, non-zero otherwise.
start Start gated. The command returns an error if gated is
already running. Otherwise it runs 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.
stop Stop 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. Should gated
fail to exit within the delay interval, it is then signaled
again with a second terminate signal. Should it fail to
exit by the end of the second delay interval it is signaled
for a third time with a kill signal. This should force
immediate termination unless something is very broken. The
command terminates with zero exit status when it detects
that gated has terminated, non-zero otherwise.
restart If gated is running it is terminated via the same procedure
as is used for the stop command above. When the previous
gated terminates, or if it was not running prior to command
execution, a new gated process is executed using the
procedures described for the start command above. A non-
zero exit status is returned if any step in this procedure
appears to have failed.
The following commands allow the removal of files created by the
execution of some of the commands above:
rmcore Remove any existing gated core dump file.
rmdump Remove any existing gated state dump file.
rmparse Remove the parse error file generated when a checkconf or
checknew command is executed and syntax errors are
encountered in the configuration file being checked.
FILES
/usr/bin/gated the gated binary
/etc/gated.conf current gated configuration file
/etc/gated.conf+ newer configuration file
/etc/gated.conf- older configuration file
/etc/gated.conf-- much older configuration file
/etc/gated.pid where gated stores its pid
/var/tmp/gateddump gated's state dump file
/var/tmp/gatedparse where config file parse errors go
/var/tmp where gated drops its core file
AUTHOR
Dennis Ferguson <dennis@ans.net>
SEE ALSO
gated(1M), ripquery(1M), syslog(1M), gated-config(4M),
appropriateprivilege(5).
COPYRIGHT INFORMATION
This software and associated documentation is Copyright © 1993
Cornell University., all rights reserved.
Licensed material--property of copyright holder(s)