shithub: netgraph

ref: 59402bf42b8b199218f1f0d111aaf273a3c1806a
dir: /netgraph1/

View raw version
.TH NETGRAPH 1
.SH NAME
netgraph \- generate a network graph of the Plan 9 system
.SH SYNOPSIS
.B netgraph
[
.B -ipl
] [
.B -s
.I systuples
] [
.B -n
.I ipnettuples
] [
.B -x
.I netmtpt
]
.br
.B fullnetgraph
[
.B ...
]
.SH DESCRIPTION
.I Netgraph
generates a network graph of the Plan 9 system based on all data found by the connection service.
.PP
It reads requests from stdin.
Each line has to be one request tuple in the format
.IR type=what ,
for example
.IR sys=cirno .
Currently valid requests are:
.IP "for systems:"
.IR sys ", " ip ", " dom ", "
.IR ipgw .
.IP "for ipnets:"
.IR ipnet .
.PP
.I Netgraph
will try to find relevant fields for each system and ipnet.
You can use the
.I -s
and
.I -n
parameters to adjust the default list of fields.
.PP
In addition to that,
.I netgraph
supports the following parameters:
.IP \fL-i\fR
By default,
.I netgraph
hides fields that are derived from the
.I ipnet
in the system visualization.
This flag can be used to include all relevant
.I ipnet
values.
.IP \fL-p\fR
.I Netgraph
outputs a PostScript file by default.
This flag pipes that output through
.I ps2pdf
with the proper parameters set to have the correct page size.
The output format will be PDF.
.IP
It is equivalent to running
.BR "netgraph | ps2pdf -g1191x842 -r72" ,
but the size adjusts automatically to the actual drawing.
.IP \fL-l\fR
.I Netgraph
tries to fetch a list of network listeners based on files in
.BR /cfg/$sysname/service .
.IP \fL-x\fR \fInetmtpt\fR
Use this flag to use a different network device.
.IP "\fL-s\fR \fIsystuples\fR"
The user can adjust the relevant fields to search for by providing a comma separated list of field names.
.IP "\fL-n\fR \fIipnettuples\fR"
This is analog to
.BR -s ,
but for
.IR ipnets .
.PP
.I Fullnetgraph
is a rc shell script that calls netgraph with all
.B sys=
tuples that could be found in
.IR /lib/ndb/local .
It forwards all arguments to netgraph.
.SH EXAMPLES
Save the full graph of the Plan 9 network to a PDF file:
.IP
.EX
fullnetgraph -p > everything.pdf
.EE
.PP
Display the network around computer
.IR cirno :
.IP
.EX
echo 'sys=cirno' | netgraph -p | page
.EE
.SH SOURCE
.BR https://shithub.us/sirjofri/netgraph/HEAD/info.html .
.SH SEE ALSO
.IR ndb (8),
.IR ps2pdf (1)
.SH BUGS
Sure. Send patches.