Current Document Information | |||||
---|---|---|---|---|---|
Author/Maintainer : | Daravong Luangphakdy | daravongl@zer0knowledge.com | 2000-12-05 | Project: | NI 2.01 |
Audience: | Private | Status: | Reviewed | Version: | 1.0 |
Reviewer(s) : | Dan Kha Pham | danp@zeroknowledge.com | January 24th, 2001 |
Revision History | |||
---|---|---|---|
Revised by: | <Name> | <email address> | <Date> |
Revision Notes: | <mods made> |
The Nidbtool Wrapper utility is a perl script which enables the broadcasting of Nidbtool commands (through SSH connections) to multiple NIDBs residing on different physical hosts. This ensures the synchronization of multiple NIDBs.
For more details about the Nidbtool Wrapper, please refer to the perl
documentation of this utlity:
perldoc nidbtoolWrapper.pl
;;
;; Nidbtool
Wrapper configuration:
;;
[general]
ssh = /usr/local/bin/ssh
[nidb0]
host = t0.niqs.dev.zks.net
prog = /freedom/bin/nidbtool
conf = /freedom/etc/freedom-nidb.conf
[nidb1]
host = t1.niqs.dev.zks.net
prog = /freedom/bin/nidbtool
conf = /freedom/etc/freedom-nidb.conf
[nidb2]
host = t2.niqs.dev.zks.net
prog = /freedom/bin/nidbtool
conf = /freedom/etc/freedom-nidb.conf
host: host name of where the NIDB resides.
prog: Absolute path to the nidbtool application.
conf: Absolute path to the nidbtool configuration file.
Note: If the nidbtool file and/or the configuration file is not found,
the Nidbtool Wrapper will exit to ensure the synchronization of the NIDBs.
The Nidbtool Wrapper can run either in an interactive mode (as the nidbtool),
or using a seed file.
Usage: nidbtoolWrapper.pl [--version] [--help] [--config <file>] [--seedfile <file>] [--debug]
--version : version information
--help
: this help
--config : Input
configuration file to read.Using this option
overrides the default value
(/usr/freedom/etc/freedom-nidbtooolWrapper.conf)
--seedfile : Input the seed
file will seed from that file
--debug :
Debug mode.
You may access the nidbtool help screen by doing:
[root@niqs bin]# ./nidbtoolWrapper.pl --config nidbtoolw.conf
[===]
[===] Loading configuration files: nidbtoolw.conf
[===]
adding nidb0 host: niqs.t1.dev.zks.net....OK
Opening ssh connection to:
nidb0 niqs.t1.dev.zks.net
root's password:
NidbTool-Master> help
You enter: help
cache
cache [get] | [set value]
report
report ent-type ent-name
entity
entity ( list | show | add | delete | update | state | desc ) ...
context Display
the current application context
unset
unset name
set
set [ name value ]
source
source filename
echo
echo [ parm1 ... parmN ]
prompt
prompt string
?
? [ command ]
help
help [ command ]
quit
quit
hostname
<nidbtool command> Broadcast a nidbtool to a particular host.
broadcast
<nidbtool command> Broadcast a nidbtool to all the hosts.
Broadcast Flag is Off
NidbTool-Master>
To broadbast a command, you may type "Broadcast" in front of the given
command. For example:
NidbTool-Master> broadcast entity show aip host1
To execute a command on a specific host, you may type the host name
in front of the given command. If the host is not found, an error will
occur.
NidbTool-Master> niqs.t1.dev.zks.net cache get
Broadcasting to nidb0 [niqs.t1.dev.zks.net]: cache get
Cache data version: [2000112833]
Broadcast Flag is Off
NidbTool-Master> foo.dev.zks.net cache get
You enter: foo.dev.zks.net cache get
Error: unrecognized command: foo.dev.zks.net
Broadcast Flag is Off
NidbTool-Master> cache get
You enter: cache get
Cache data version: [2000112854]
Broadcast Flag is Off
NidbTool-Master> report aip host1
You enter: report aip host1
<AipService>
<EntityInfo>
<hostname> danielf.dev.zks.net </hostname>
<ip> 10.16.128.148 </ip>
<company> Zero-Knowledge Systems [100] </company>
<city> --- </city>
<state> CA103934N07845W </state>
<country> --- </country>
</EntityInfo>
<NoTag>
<errorMsg> can't find stat info </errorMsg>
</NoTag>
<NoTag>
<errorMsg> can't find freedom info </errorMsg>
</NoTag>
<NoTag>
<errorMsg> can't find aip info </errorMsg>
</NoTag>
</AipService>
Broadcast Flag is Off
NidbTool-Master> entity list
You enter: entity list
NIDB matches: 15
[ 4] host4/18
[ 8] host3/1
[12] host1/1
[ 3] host3/18
[ 7] NymServer/7
[11] NISS/20
[15] host5/1
[ 2] host2/18
[ 6] host2/1
[10] NIQS/19
[14] TokenServer/9
[ 1] host1/18
[ 5] host5/18
[ 9] host4/1
[13] KeyQryServer/10
Broadcast Flag is Off
NidbTool-Master> entity show aip host1
You enter: entity show aip host1
Data retrieved for [host1].
entity aip host1 12 1 51101 51102 30 3600 1
Broadcast Flag is Off