Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rap(8) — DG/UX 5.4R2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vi(1)

resource(5)

curses(3)

rapd(8)



RAP(8)                      Legato NetWorker 3.0                      RAP(8)


NAME
       rap - RAP character-based administration program

SYNOPSIS
       rap [ -c ] [ -i file ] [ -s server ] [ -p prognum ] [ -v version ] [
       query ] ...

       rap [ -c ] [ -i file ] -f resfile ...  [ query ] ...
       rap [ -i file ] -n ndbmfile [ query ] ...

DESCRIPTION
       The rap command is a command-line based administrative program for
       services using the Legato Resource Administration Platform (RAP).
       Normally, a user types commands on standard input and responses (such
       as the result of queries) are produced on standard output.  The rap
       command can be used to query and modify resources in four forms: in
       files, in an ndbm(3) database, talking to a service, or using the RAP
       Resource Directory (see rapd(8)), which is the default.  There is
       also a visual mode that uses the curses(3) package to do full screen
       interactive administration on a character-only terminal.

OPTIONS
       -c     Use the curses(3) package to implement a full-screen display
              mode, just like the visual command described below.

       -i infile
              Take input commands from infile instead of from standard
              input. In this mode, the interactive prompt will not be
              printed.  The file name - is used to indicate reading from
              standard input, but without the prompt.

       query  If a query is specified (in the form of an attribute list),
              the edit operation (see below) is performed on the results of
              the query.  See COMMANDS, below, for more information on how
              the edit command works.

       -s server -p program -v version
              Administers through a connection to the service with the given
              RPC program number and version number running on the given
              server machine.

       -f resfile
              Administers the RAP resource file resfile as its database of
              resources.  If more than one -f argument is given all of the
              listed files will be used.

       -n ndbmfile
              Administers the ndbm(3) resource database.  Used only for
              debugging.


RESOURCES
       Each RAP resource is described by a list of named attributes. Each
       attribute can have zero or more values. The attribute names and



Licensed material--property of copyright holder(s)                         1




RAP(8)                      Legato NetWorker 3.0                      RAP(8)


       values are all represented by printable strings.  Upper and lower
       case is not distinguished for sake of comparison, and spaces are
       ignored except inside the names and values.

       The rules for specifying attributes and attribute lists are:

       attribute ::=  name [ : value [ , value ]* ]
              An attribute is a name optionally followed by a colon followed
              by zero or more values, with multiple values separated by com­
              mas.  A comma at the end of a line continues the line.

       attribute list ::= attribute [ ; attribute ]*
              An attribute list is one or more attributes separated by semi­
              colons.  A semicolon at the end of a line continues the line.
              The list is ended by a newline that is not preceded by a comma
              or semi-colon.  Quotes and back-slashes can be used to quote
              special characters.

       Here is an example of an attribute list:

                        name: venus;
                        type: NSR client;
              recover access: venus, mars;

       For more information on attributes, attribute lists, the RAP resource
       format, and type descriptors, see the resource(5) manual page, or the
       manual page describing the appropriate resource type.

COMMANDS
       In non-visual mode, rap expects a command name and some optional
       arguments at each input prompt.  Command names can be shortened to
       the smallest unique string (for example, p for print).  Command argu­
       ments are always specified in the form of an attribute list.  Most
       commands operate on a list of resources returned by a query.  The
       query is specified as an attribute list which is used to match
       resources with the following rules:

              1) If more than one attribute is specified, then the resource
              must match all attributes.

              2) If more than one value is specified the resource can match
              any one of the values.

              3) If an attribute is specified with no value, then the
              resource must contain an attribute of that name.

       Thus, a query:
              type:NSR device;
              name:mars, venus;
              test
       will match all resources that have a type attribute with the value
       NSR device and a name attribute with a value of either mars or venus,
       and an attribute test with any value.




Licensed material--property of copyright holder(s)                         2




RAP(8)                      Legato NetWorker 3.0                      RAP(8)


       If the query has only one name and no values (for example, if there
       is no semi-colon or colon in it), then the program tries to guess a
       more reasonable query. If the name is a host name, then the query
       will select all the resources on the given host.  Otherwise, the name
       will be interpreted as a type name, and all resources of that given
       type will be selected.

       bind [query]
              Bind to the service that owns the resource described by query.
              If no query is specified, queries are sent to the RAP Resource
              Directory, and update, create, and delete commands to the ser­
              vice that owns the resource being changed.

       create attribute list
              Create a resource with the given attributes. One of the
              attributes must be type to specify the resource type.  The
              types command can be used to find out which types a server
              supports.  If no particular server is bound, then the location
              attributes must also be specified to determine where the cre­
              ation takes place.

       delete [query]
              Delete the resources that match the current query.  If a query
              is specified, it becomes the current query.

       edit [query]
              Edit the resources that match the current query.  If a query
              is specified, it becomes the current query.  If the environ­
              ment variable EDITOR is set, then that editor will be invoked,
              otherwise vi(1) will be started. When the editor exits, rap
              applies update, delete and create operations based on the
              changes to the resource descriptors. Be careful to not edit
              the resource identifier attribute, and to write the file out
              before exiting the editor.

       help [command]
              Print a message describing a command. If no command name is
              given a synopsis of all of the commands is given.

       print [query]
              Print the resources that match the current query.  If a query
              is specified, it becomes the current query. If the current
              show list is not empty only the attributes named in the show
              list will be displayed.

       show [name; ...]
              If a name list (really an attribute list with no values) is
              specified, add those names to the show list. These attributes
              will be displayed in subsequent print commands.  If no name
              list is given the show list is cleared, resulting in all visi­
              ble attributes being shown.

       types  Print a list of all known types.




Licensed material--property of copyright holder(s)                         3




RAP(8)                      Legato NetWorker 3.0                      RAP(8)


       update attributes
              Update the resources given by the current query to match
              attributes.

       quit   Exit the program.

       visual  [query]
              Enter a full-screen mode using the curses(3) package to step
              through commands in a perhaps more user-friendly manner than
              the command line interface.  You can get this mode directly
              using the -c command line argument.

       option [option;...]
              This command enables some options to change the display of
              resources.  With no arguments it displays the current options;
              with a list of options it turns the specified ones on.  The
              options are: Dynamic displays all dynamic attributes, even the
              normally hidden ones.  Hidden displays all attributes, even
              the normally hidden ones.  Resource ID displays the resource
              identifier on each resource, a number that is used internally
              to provide sequencing and uniqueness.

       unset [option;...]
              This command turns off the specified option.

       . [query]
              If a query is specified, this command will set the current
              query without printing the results of the query. Otherwise, it
              will display the current query, show list, and server binding.

       ? [command]
              Same as the help command above.

EXAMPLES
       print type:NSR device
              Print all resources of type NSR device and make this the cur­
              rent query.

       show type; name
              Set the show list to only display the attributes type and
              name.

       delete
              Delete all resources that match the current query.

       delete type:NSR device; hostname: mars
              Delete the resources with attributes: type: NSR device and
              hostname: mars.

       bind type:NSR
              Limit administration to the NSR service and the resources it
              manages.





Licensed material--property of copyright holder(s)                         4




RAP(8)                      Legato NetWorker 3.0                      RAP(8)


SEE ALSO
       vi(1), resource(5), curses(3), rapd(8).























































Licensed material--property of copyright holder(s)                         5


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026