unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



gdc(8)								       gdc(8)



NAME

  gdc -	operational user interface for gated(8)

SYNOPSIS

  /usr/sbin/gdc	[-q] [-n] [-c coresize]	[-f filesize] [-m datasize] [-s
  stacksize] [-t seconds] command

OPTIONS

  -n  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.

  -q  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.

  -t  seconds
      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.

  -c  coresize
      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.

  -f  filesize
      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.

  -m  datasize
      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.

  -s  stacksize
      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.

DESCRIPTION

  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 exe-
  cuted, for audit purposes.

  Signal Commands


  You can use the following commands to	send signals to	gated:

  COREDUMP
      Sends an abort signal to gated, causing it to terminate with a core
      dump.

  dump
      Signals gated to dump its	current	state into the /usr/tmp/gated_dump
      file.

  interface
      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.

  KILL
      Causes gated to terminate.  This is useful when the daemon is hung.

  reconfig
      Signals gated to reread its configuration	file, reconfiguring its
      current state as appropriate.

  term
      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.

  toggletrace
      Suspends tracing and closes the trace file, if gated is currently	trac-
      ing 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


  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:

  /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 next oldest configuration file. The gdc program retains the previ-
      ous old configuration file under this name.





  Configuration	File Commands


  The following	commands perform operations related to configuration files:

  checkconf
      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 con-
      figuration which would cause the running gated to	terminate on reconfi-
      guration.	 When this command is used, gdc	issues an informational	mes-
      sage indicating whether there were parse errors.	If any errors
      occurred,	gdc saves the error output in a	file for inspection.

  checknew
      Like checkconf, except that gdc checks the new configuration file,
      /etc/gated.conf+.

  newconf
      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.

  backout
      Renames /etc/gated.conf- file as /etc/gated.conf,	in effect going	back
      to the older version of the configuration	file. The command does noth-
      ing 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.

  BACKOUT
      Performs a backout operation even	if /etc/gated.conf+ exists and is of
      non-zero length.

  modeconf
      Sets all configuration files to mode 664,	owner root, group gdmaint.
      This allows a trusted non-root user to modify the	configuration files.

  createconf
      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


  The following	commands enable	you to start and stop gated, and to determine
  its running state:

  running
      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.

  start
      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 execut-
      ing the binary, or if a lock is not obtained on the pid file within the
      specified	wait time.

  stop
      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 other-
      wise.

  restart
      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


  The following	commands allow the removal of files created by the execution
  of some of the operational commands:

  rmcore
      Removes any existing gated core dump file.

  rmdump
      Removes any existing gated state dump file.

  rmparse
      Removes the parse	error file generated when a checkconf or checknew
      command is executed and syntax errors are	encountered in the configura-
      tion file	being checked.

FILES

  /usr/sbin/gated
      The gated	binary.

  /etc/gated.conf
      Contains the current gated configuration information.

  /etc/gated.conf+
      Contains newer gated configuration information.

  /etc/gated.conf-
      Contains older gated configuration information.

  /etc/gated.conf--
      Contains the oldest gated	configuration information.

  /var/run/gated.pid
      Contains the gated process id (PID).

  /usr/tmp/gated_dump
      Contains gated status information.

  /usr/tmp/gated_parse
      Contains configuration file parse	errors.

  /usr/tmp
      Specifies	the path where gated creates its core file.


SEE ALSO

  Commands: syslog(1), gated(8), ospf_monitor(8), ripquery(8), routed(8),
  route(8).