capture.1 2.51 KB
Newer Older
1
2
.\"
.\" EMULAB-COPYRIGHT
3
.\" Copyright (c) 2000, 2012 University of Utah and the Flux Group.
4
5
.\" All rights reserved.
.\"
6
7
8
9
10
11
12
13
14
15
16

.Dd April 19, 2000
.Dt CAPTURE 1
.Os BSD 4
.Sh NAME
.Nm capture
.Nd record serial port output while allowing tip access to it
.Sh SYNOPSIS
.Nm capture
.Op Fl s Ar speed
.Op Fl H
17
.Op Fl T Ar seconds
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.Ar remote-name
.Ar dev-name
.Sh DESCRIPTION
.Nm capture
records output from a tty device to a file, and makes a new tty
device available by which you can still tip to the original
device.
.Pp
The options are as follows:
.Pp
.Bl -tag -width indent
.It Fl s Ar speed
Set the speed in bps (2400, 9600, 115200, etc)
.It Fl H
Use hardware flow control
33
34
35
36
37
38
39
40
41
42
.It Fl T Ar sinterval
If more than
.Ar sinterval
seconds have elapsed since the
last output to the device, put out a timestamp of the form "STAMP{time}"
reflecting the current time.
If
.Fl L
is also specified, then the stamp will be of the form "STAMP{delta@time}"
where delta reflects the actual number of seconds since the last output.
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.Sh CONFIGURATION
You should run one copy of
.Nm capture
for each device you wish to record.  In order to run
.Nm capture
you'll need to set up a pty/tty pair for this device.
By default, these devices go in
.Pa /dev/tip
.Pp
The tty file (the one that's now accessible to 'tip') should
be named
.Ar remote-name
and the pty file (that
.Nm capture
uses internally) should be named
.Ar remote-name-pty

.Sh LOGGING
The output from
.Nm capture
by default goes in the file
.Pa /var/log/tiplogs/remote-name

The directory in which this occurs is configurable by modifying
the LOGPATH variable in the source code.

.Sh EXAMPLE
To configure capture for a remote machine named
.Ar test
which is connected to our 
.Pa /dev/cuaa1 
port at 115200 bps,
we'd do the following steps:
.Pp
mkdir /dev/tip
.Pp
mkdir /var/log/tiplogs
.Pp
use
.Xr mknod 8
to create a tty/pty pair in 
.Pa /dev/tip 
named test and test-pty
respectively
.Pp
run 
.Nm capture -s 115200 test cuaa1
.Pp
If you wish to be able to 
.Xr tip 1
directly to test by typing tip test, then
put a line like the following in your
.Xr remote 5
file:
.Pp
test:dv=/dev/tip/test:br#115200:nt:pa=none:
.Pp
(Place the capture startup line in your rc files if
you wish it to start automatically).
.Sh FILES
.Bl -tag -width /var/log/tiplogs -compact
.It Pa /etc/remote
Remote system descriptions
.It Pa /var/log/tiplogs
Logfile of machine output
.It /dev/tip
Directory for capture ttys and ptys
.Sh HISTORY
Originally written by Leigh Stoller at the University of Utah
in 1992 for HPBSD, runs well under FreeBSD as well.