| Name > |
rplctl - infod client |
| |
| Synopsis > |
rplctl [-A tty] [-D tty]
[-L [tty]] [-S tty] [-X tty]
[-Z [tty]] [-f socket] [-t]
|
| |
| Description > |
The rplctl utility is used to query and remote
control rpld and infod. It will print info about the
requested ttys, or all ttys currently monitored or optionized if no
arguments are given.
rplctl will read the INFOD_PORT variable
from rpld.conf by default, if not overriden by the -f
option.
|
| |
| Options > |
| -A tty |
Activate logging for the given tty.
It can be a filename (which must exist) or a device number using
"=MAJOR,MINOR". |
| -D tty |
Deactivate logging for the given
tty. |
| -L [tty] |
Explicitly request a listing of all
ttys currently active or have option set. If a tty is given,
only display info for that particular one. |
| -S tty |
Deactivate logging for the given tty
until it is deinitialized. |
| -X tty |
Call log_close() for the
given tty. rpld will close the logfile, and necessarily open
up a new one whenever new activity is detected (and logging this
terminal is not deactivated) on that terminal. |
| -Z [tty] |
Zero all packet and byte counters,
both of rpld and every single tty. If a tty is given,
only zeroes the stats of that tty. |
| -f
socket |
Path to the infod socket to
connect to. The default is /var/run/.rplinfo_socket or
INFOD_PORT in the rpld.conf configuration
file. |
| -t |
Generate output suitable for
sscanf(), split() or anything that deals best with
simple text strings. See below for details on the output format. |
|
| |
| Example
output > |
A command like `rplctl` could output this:
AC DEVICE TTY BYTES IN OUT FILENAME
==========================================================================
[---,---] * 8312777 8304424 ttyrpld 1.24
IOCD: 7/1623/1627/6 RW: 276228/277971 I: 8354 B: 0
--------------------------------------------------------------------------
. [ 4, 1] vc-1 67 5883 root/20041110.174144.vc-1
* [ 4, 2] vc-2 13 148 root/20041110.174158.vc-2
[ 4, 7] vc-7 14809 0 root/20041110.174235.vc-7
[ 4, 10] vc-10 0 6020 root/20041110.175900.vc-10
* [136, 1] pts-1 5981 527066 root/20041110.174237.pts-1
* [136, 2] pts-2 7 180 root/20041110.181123.pts-2
* [136, 4] pts-4 200 7079510 root/20041110.174143.pts-4
* [136, 5] pts-5 5324 461423 root/20041110.174235.pts-5
--------------------------------------------------------------------------
An asterisk in the AC (status) field means "Activated", a
dot "Deactivated until session ends" and a blank for "Deactivated".
|
| |
| sscanf()
format > |
On the other hand, `rplctl -t` could produce
this:
ttyrpld 1.24
format 2
7 1623 1627 6 276228 277971 8312777 8304424 8358 0
S 4 1 vc-1 67 5883 /var/log/rpl/root/20041110.174144.vc-1
A 4 2 vc-2 13 148 /var/log/rpl/root/20041110.174158.vc-2
D 4 7 vc-7 14809 0 /var/log/rpl/root/20041110.174235.vc-7
D 4 10 vc-10 0 6020 /var/log/rpl/root/20041110.175900.vc-10
A 136 1 pts-1 5981 527066 /var/log/rpl/root/20041110.174237.pts-1
A 136 2 pts-2 7 180 /var/log/rpl/root/20041110.181123.pts-2
A 136 4 pts-4 200 7079510 /var/log/rpl/root/20041110.174143.pts-4
A 136 5 pts-5 5324 461423 /var/log/rpl/root/20041110.174235.pts-5
Where A=Activated, D=Deactivated,
S=Deactivated until session ends.
The first line of the "parseable" output (-t) is
the program used. It can (and should) be ignored by programs querying
infod. The second is the status line about rpld. The
sscanf formula is "%zu %zu %zu %zu %llu %llu %zu %zu".
The fields are (in that order):
- EVT_INIT -- tty first opens
- EVT_OPEN -- number of open() operation on any tty
- EVT_CLOSE -- number of close() operations on any tty
- EVT_DEINIT -- tty deallocation
- EVT_READ -- packets read from rpldev
- EVT_WRITE -- packets read from rpldev
- EVT_READ -- payload bytecount
- EVT_WRITE -- payload bytecount
- EVT_IOCTL packets received
- packets considered bad (i.e. bad magic) -- might be more than
there are actually damaged, because the algorithm needs to find
something that looks good.
All other lines are tty information lines, whose formula
is "%c %ld %ld %s %llu %llu %s", and the fields are:
- status -- 'A' for activated, 'D' is deactivated and
'S' means deactivated until session ends.
- major number
- minor number
- mnemonic string for the major/minor number
- EVT_READ payload bytecount
- EVT_WRITE payload bytecount
- full filename being written to (this is different from the
human-readable output which only shows it in part)
|
| |
| See
also > |
rpld(8) |
 |
|