habrs
NAME
habrs - command line interface to Ringstore storage
SYNTAX
habrs [-c <purl>] [-C <cfcmd>]
[-e <fmt>] [-dDhv] [file [ring [dur]]]
DESCRIPTION
A Ringstore is a type of storage system designed to hold
Fat Headed Arrays (FHA) in time series.
It is the primary method of storing data locally on a machine
in Habitat.
The command can be run with optional file, ring
and dur arguments for names of the Ringstore file,
the time series ring and its duration.
Alternatively, these can be specified with the
commands 'file', 'ring' and 'duration'
once habrs has started.
The prompt will contain the current file and ring name with duration.
OPTIONS
- -c <purl>
-
Append user configuration data from the route <purl>, rather than
the default file ~/.habrc.
- -C <cfcmd>
-
Append a list of configuration directives from <cfcmd>, separated
by semicolons.
- -d
-
Place ghabitat in diagnositc mode, giving an additional
level of logging and sending the text to stderr rather than the
default or configured destinations.
In daemon mode, will send output to the controlling terminal.
- -D
-
Place ghabitat in debug mode.
As -d above but generating a great deal more information, designed to be
used in conjunction with the source code.
Also overrides normal outputs and will send the text to stderr.
In daemon mode, will send output to the controlling terminal.
- -e <fmt>
-
Change the logging output to one of eight preset alternative formats,
some showing additional information.
<fmt> must be 0-7.
See LOGGING below.
- -h
-
Print a help message to stdout and exit
- -v
-
Print the version to stdout and exit
COMMANDS
The following commands are accepted:-
- ! <cmd> sh <cmd>
-
Run <cmd> in a shell (see chsh(1) for your shell choice)
- ? [<cmd>] help [<cmd>]
-
Without <cmd>, print a tabular list of commands.
Otherwise print an explanation and usage of <cmd>
- bye exit e quit q
-
All of the above commands will exit habrs
- close
-
Closes the currently open file and ring
- create <file> <perm> <ring> <lname> <desc> <nslots> <dur>
-
Create a new time series ring, where
<file> name of holstore file to contain the ring
<perm> file permissions (eg 0644)
<ring> name of ringstore ring
<lname> long name of ring
<desc> text description of ring
<nslots> number of slots in ring, 0 for unlimitied
<dur> secs duration of each sample, 0 for irregular
- duration <dur> dur <dur>
-
Open the ring using the previously specified ring name in
the currently open file.
The duration should be a positive integer, which represents
the length in seconds of each sample.
Alternatively, it may be 0 to represent an irregular interval.
- footprint
-
Print the current Ringstore file size
- get
-
Get the next table in the time series.
You should have an open file and ring
- getall
-
Get all the tables in the series and print as a single table with
the following columns:-
_seq sequence number
_time time
_dur duration
- goto <seq> jumpto <seq>
-
Goto a specific sequence number <seq> in the time series.
The next call to get will print that table
- jump <nseq>
-
If <nseq> is positive, move forward <nseq>
places in the time series.
If negative, move backwards.
- ls lsrings
-
List the rings available in the current file
- mget <nseq>
-
Return data from the next <nseq> sequences and advance
to the next unread sequence.
The data is printed as a single table with the following
columns.
_seq sequence number
_time time
_dur duration
- open <file> [<ring> [ <password> ] ]
-
Open a Ringstore file and optionally a time sries ring.
If <ring> is not specified, then it can be specified
with 'ring' afterwards (also see lsring).
<password> is not currently supported.
- purge <nseq>
-
Remove the oldest <nseq> sequences from the time series.
If more are removed that are present in the current ring, then
this effectively empties the ring
- put
-
Appends a new table to the end of the time series, which will
be read from stdin (the keyboard or input pipe).
Does not alter the current sequence to next read.
- remain
-
Prints the amount of space free in the filesystem that houses
the currently open Ringstore file.
- resize
-
Change the number of sequence slots in the current time
series ring
- ring <rname>
-
Change the current time series ring to be <rname>.
This will close any previously open ring but
will not affect the current file.
<rname> must exist in the current file.
- rm
-
Remove the current ring.
You will be prompted to confirm the action to prevent
accidental eraseure.
- rs <info>
-
Show the underlying ringstore structure in the form of tables.
The secondary argument is needed to show the table as follows:-
s | superblock superblock
r | rings ring directory
h | headers header hash table
i | index record index
- stat
-
Print statisticas about the current file and ring
FILES
Locations alter depending on how the application is installed.
- For the habitat configuration
-
~/.habrc
$HAB/etc/habitat.conf or /etc/habitat.conf
- For the help information
-
$HAB/lib/help/ or /usr/lib/habitat/help/
ENVIRONMENT VARIABLES
- HOME
-
User's home directory
AUTHORS
Nigel Stuckey <[email protected]>
SEE ALSO
clockwork(8), killclock(8), statclock(8), habedit(8), habrep(8),
habconf(5),
myhabitat(1), habget(1), habput(1), habprobe(1), habmeth(1)
Index
- NAME
-
- SYNTAX
-
- DESCRIPTION
-
- OPTIONS
-
- COMMANDS
-
- FILES
-
- ENVIRONMENT VARIABLES
-
- AUTHORS
-
- SEE ALSO
-