jobquery - NetWorker jobs database query program



[ -s server ] [ -i file ]


[ -s server ] [ query ]


The jobquery command is a command-line based program used to query NetWorker server's jobs database. Its interface is similar to that of nsradmin program.


-i file

Takes input commands from file instead of from standard input. In this mode, the interactive prompt will not be printed.

-s server

Opens a connection to the named NetWorker server.


Each jobs database entry is made up of a list of named attributes. Each attribute can have zero or more values. The attribute names and values are all represented by printable strings. Upper and lower case is not distinguished on comparisons, and spaces are ignored except inside the names and values.

The format for specifying attributes and attribute lists is: attribute ::= name [ : value [ , value ]* ]

An attribute is a name optionally followed by a colon, followed by zero or more values, with values separated by commas. 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 semicolons. 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.

Here is an example of an attribute list:

name: "nyx.lss.emc.com:Probe"; type: savefs job; jobid: 480435;

For more information on attributes and attribute lists see the resource(5), and nsr_resource(5), manual pages.


At each input prompt, jobquery expects a command name and some optional arguments. Command names can be shortened to the smallest unique string (for example, p for print). Command arguments are always specified in the form of an attribute list.


Displays all entries in the jobs database.


Print usage of all available commands.

print [query]

Print the resources that match the current query. If a query is specified, it becomes the current query. If a name has been specified for the the current show list, only the attributes for the specified name in the show list will be displayed.


Exits jobquery

show [name; ...]

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


Print a list of all known types.

. [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, server binding, and options.


print type:savefs job

Print all entries of type savefs job and make this the current query.

show type; name

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


nsr_resource(5), resource(5), nsradmin(1m).


The following exit status values are meaningful:


Program exited normally.


There was a usage or other non-query related error.