 |
|
|
| Name > |
rplctl - infod client |
| |
| Synopsis > |
rplctl [-A tty] [-D tty]
[-F] [-J tty] [-L] [-X tty]
[-Z] [-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
until it is closed. |
| -F |
Flush the tty table. This means that
every tty that is not currently active or has special options set
(which must be kept), is removed from the table to free up
memory. |
| -J tty |
Deactivate logging for the given tty.
Note that you should not use this on dynamic devices such as
/dev/pts/* since you can only reactivate them as long as
they exist, or by specifying the major-minor number it used. Plus,
the major-minor numbering is different for ptys between 2.4 and 2.6.
2.4 uses majors 128..136 with minors 0..255 while 2.6 uses majors
128..136:0..1048575. |
| -L |
Explicitly request a listing of all
ttys currently active or have option set. |
| -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 |
Zero all packet and byte counters,
both of rpld and every single 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 FD FILENAME
==========================================================================
[---,---] * 49464 7156047 -
opn/cls: 1746/0 r/w (pak): 43054/208011 ioctl: 12519 bad: 0
--------------------------------------------------------------------------
. [ 4, 7] vc-7 2446 0 10 root@20040907.215319.vc-7
* [ 4, 8] vc-8 0 0 -1 (null)
* [ 4, 10] vc-10 0 1152 9 root@20040907.221312.vc-10
* [136, 0] pts-0 9302 951466 11 root@20040907.213931.pts-0
* [136, 2] pts-2 5687 646931 7 root@20040907.213929.pts-2
* [136, 4] pts-4 171 5343010 8 root@20040907.213929.pts-4
* [136, 5] pts-5 6460 208424 12 root@20040907.214444.pts-5
An asterisk in the AC (status) field means "Activated", a
dot "Deactivated until session ends" and a blank for "deactivated". On the
other hand, `rplctl -t` (see below) could produce this:
1746 0 43054 208011 49464 7156047 12519 0
S 4 7 vc-7 2446 0 10 root@20040907.215319.vc-7
A 4 8 vc-8 0 0 -1 (null)
A 4 10 vc-10 0 1432 9 root@20040907.221312.vc-10
A 136 0 pts-0 9302 951466 11 root@20040907.213931.pts-0
A 136 2 pts-2 5687 646931 7 root@20040907.213929.pts-2
A 136 4 pts-4 171 5343010 8 root@20040907.213929.pts-4
A 136 5 pts-5 6460 208424 12 root@20040907.214444.pts-5
|
| |
| sscanf()
format > |
The first line of "parseable" output (-t) is the
status line about rpld. The sscanf formula is "%zu %zu
%zu %zu %llu %llu %zu %zu". The fields are:
- tty opens -- number of open() operation on any tty
- tty closes
- EV_READ packets read from rpldev
- EV_WRITE packets read from rpldev
- EV_READ payload bytecount
- EV_WRITE payload bytecount
- EV_IOCTL packets received
- packets considered bad (e.g. bad magic) -- might be more than there
are actually damaged in a way a human sees it
All other lines are tty information lines, whose formula
is "%c %ld %ld %s %llu %llu %d %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
- EV_READ payload bytecount
- EV_WRITE payload bytecount
- filedescriptor (anybody who needs this?)
- basename of the filename being written to
|
| |
| See
also > |
rpld(8) |
| |
|