Compaq SC RMS Server User Manual


 
rmsquery(1)
The source is provided in /usr/opt/rms/src. Details of the SQL language can be
found on the Quadrics support page http://www.quadrics.com/web/support.
EXAMPLES
An example follows of a select statement that results in a list of the names of all of the
nodes in the machine. Note that the query must be quoted. This is because rmsquery
expects a single argument.
$ rmsquery "select name from nodes"
atlas0
atlas1
atlas2
atlas3
In the following example, rmsquery is used to print information on all jobs run by a
user:
$ rmsquery "select name,status,hostnames,cpus,startTime,endTime from \
resources where username=’user’"
7 finished atlas[0-3] 4 12/21/99 11:16:44 12/21/99 11:16:46
8 finished atlas0 2 12/21/99 11:54:23 12/21/99 11:54:29
9 finished atlas[0-3] 4 12/21/99 11:54:35 12/21/99 11:54:39
The -v option prints field names. In the following example, rmsquery is used to print
resource usage statistics:
$ rmsquery -v "select * from acctstats"
name uid project started etime atime utime stime ...
-----------------------------------------------------------------------
7 1507 1 12/21/99 11:16:44 2.00 8.00 0.10 0.22 ...
8 1507 1 12/21/99 11:54:23 6.65 13.30 10.62 0.10 ...
9 1507 1 12/21/99 11:54:35 4.27 16.63 12.28 0.44 ...
When used without arguments, rmsquery operates interactively and a sequence of
commands can be issued.
$ rmsquery -v
sql> select name, status from partitions
name status
------------------
login running
parallel running
sql>
RMS Commands 5-43