9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ndb database checker: ndb/vrfy
@ 2010-10-28 23:14 erik quanstrom
  2010-10-29  0:21 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: erik quanstrom @ 2010-10-28 23:14 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 670 bytes --]

a number of weeks ago, to facilitate migrating many
hundreds of machines to a new network setup, i wrote a
simple and fairly bone-headed ndb database checker,
ndb/vrfy.  it was amazingly effective, if provincial.

it catches all the classics like badly formatted eas,
duplicate eas,  mistyped keys (eg ethr and not ether)

the referenced, but not included, checkndb, checks
to see that the user was "okay" (not expired, in ndb),
but depends on local rules, kenfs and /adm/keystat,
none of which are universal.  /adm/keystat is a local
invention to allow anyone to make a rough check for
expired keys.  if you really want a copy email me privately.

- erik

[-- Attachment #2.1: Type: text/plain, Size: 312 bytes --]

from postmaster@plug:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: text/troff
	Content-Disposition: attachment; filename=ndbvrfy
	Content-Transfer-Encoding: base64

[-- Attachment #2.2: ndbvrfy.suspect --]
[-- Type: application/octet-stream, Size: 971 bytes --]

.TH NDBVRFY 9
.SH NAME
ndb/vrfy, checkndb \- check ndb database
.SH SYNOPSIS
.B ndb/vrfy
[
.B -c
] [
-B -m
.I ip/mask
] [
.I file ...
]
.br
checkndb
.SH DESCRIPTION
.I Ndb/vrfy
verifies the syntax database file given
and applies a few ad-hoc heuristics.  With
the
.B -m
flag, all IP addresses in
.I file
are checked against the given
.IR ip/mask .
Normally,
.I ndb/vrfy
checks attributes against a generic list of
attributes.  with
.BR -c,
attributes suitable for use with
.IR consoledb (8)
are used.
.PP
.I Checkndb
checks all the files in
.B /lib/ndb
for reasonableness in the Coraid environment.
It is assumed that the owner's uid on the file server
match the third octet of the network.  Thus it
is assumed that
.I tor
owns
.BR /lib/ndb/10.220.1 .
and all the IP addresses in this file are within the
.B 10.220.1.0/112
network.
.SH SOURCE
.B /sys/src/cmd/ndb/vrfy.y
.br
.B /rc/bin/checkndb
.SH SEE ALSO
.IR consoledb (8),
.IR ndb (8)
.SH BUGS
Hopeless provinciality.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-29  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28 23:14 [9fans] ndb database checker: ndb/vrfy erik quanstrom
2010-10-29  0:21 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).