dconschat.8 (cb5df0b27b8a2fa32030c3ddacf0fd163e70b941) dconschat.8 (9cdb6ee1641e84242a1640055e0072ad693e1a7d)
1.\" Copyright (c) 2003 Hidetoshi Shimokawa
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" $FreeBSD$
26.\"
27.\"
28.Dd February 11, 2003
29.Dt DCONSCHAT 8
30.Os
31.Sh NAME
32.Nm dconschat
1.\" Copyright (c) 2003 Hidetoshi Shimokawa
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" $FreeBSD$
26.\"
27.\"
28.Dd February 11, 2003
29.Dt DCONSCHAT 8
30.Os
31.Sh NAME
32.Nm dconschat
33.Nd user interface to dcons
33.Nd user interface to
34.Xr dcons 4
34.Sh SYNOPSIS
35.Nm
36.Op Fl brvwRT1
37.Op Fl h Ar hz
38.Op Fl C Ar console_port
39.Op Fl G Ar gdb_port
40.Op Fl M Ar core
41.Op Fl N Ar system

--- 8 unchanged lines hidden (view full) ---

50.Sh DESCRIPTION
51The
52.Nm
53utility is designed to provide a way for users to access
54.Xr dcons 4
55(dumb console device) on a local or remote system.
56The
57.Nm
35.Sh SYNOPSIS
36.Nm
37.Op Fl brvwRT1
38.Op Fl h Ar hz
39.Op Fl C Ar console_port
40.Op Fl G Ar gdb_port
41.Op Fl M Ar core
42.Op Fl N Ar system

--- 8 unchanged lines hidden (view full) ---

51.Sh DESCRIPTION
52The
53.Nm
54utility is designed to provide a way for users to access
55.Xr dcons 4
56(dumb console device) on a local or remote system.
57The
58.Nm
58interacts with
59utility interacts with
59.Xr dcons 4
60using
61.Xr kvm 3
62or
60.Xr dcons 4
61using
62.Xr kvm 3
63or
63.Xr firewire 4
64and interact with a user over tty or TCP/IP.
64.Xr firewire 4 ,
65and interacts with the user over TTY or TCP/IP.
65To access remote
66.Xr dcons 4
67using
68.Xr firewire 4 ,
66To access remote
67.Xr dcons 4
68using
69.Xr firewire 4 ,
69you have to specify target EUI64 address by
70you have to specify target EUI64 address using the
70.Fl t
71option.
72.Pp
73The
74.Nm
71.Fl t
72option.
73.Pp
74The
75.Nm
75and
76utility and the
76.Xr dcons 4
77.Xr dcons 4
77communicate using 2 port, one for console port and the other for
78remote gdb port.
78driver communicate using 2 ports, one for the console port and another
79for remote
80.Xr gdb 1
81port.
79Users are supposed to access
80.Nm
82Users are supposed to access
83.Nm
81using tty, telnet and gdb.
82You can specify listen ports for console and gdb port by
84using TTY,
85.Xr telnet 1
86and
87.Xr gdb 1 .
88You can specify listen ports for console and
89.Xr gdb 1
90port using the
83.Fl C
84and
85.Fl G
91.Fl C
92and
93.Fl G
86options respectively. The port number 0 has special meaning that
87current tty(stdin/out) is used instead of TCP/IP.
94options respectively.
95The port number 0 has special meaning that
96current TTY (stdin/stdout) is used instead of TCP/IP.
88A negative port number will disable the port.
97A negative port number will disable the port.
89To quit dconschat, send a CR + '~' + '.' sequence to the console port
98To quit
99.Nm ,
100send a CR +
101.Ql ~
102+
103.Ql \&.
104sequence to the console port,
90or send signal to the process.
91.Pp
92By analogy with
93.Xr pty 4
105or send signal to the process.
106.Pp
107By analogy with
108.Xr pty 4
94device, the
109device, the
95.Xr dcons 4
96acts as a slave device and
97.Nm
98acts as a master device with
99.Xr telnetd 8 .
110.Xr dcons 4
111acts as a slave device and
112.Nm
113acts as a master device with
114.Xr telnetd 8 .
100.Pp
101.Bl -tag -width indent
115.Bl -tag -width indent
102.It Fl b
116.It Fl b
103Translate Ctrl-C to ALT_BREAK(CR + '~' + Ctrl-B) on gdb port.
117Translate Ctrl-C to ALT_BREAK (CR +
118.Ql ~
119+ Ctrl-B) on
120.Xr gdb 1
121port.
104.It Fl r
105Replay old buffer on connection.
106.It Fl v
122.It Fl r
123Replay old buffer on connection.
124.It Fl v
107Verbose debug output. Multiple '-v' increase verbosity.
125Verbose debug output.
126Multiple
127.Fl v
128options increase verbosity.
108.It Fl w
129.It Fl w
109Listen on wildcard address rather than localhost.
130Listen on a wildcard address rather than localhost.
110.It Fl R
131.It Fl R
111Read-only. Don't write anything on dcons buffer.
132Read-only.
133Do not write anything to the
134.Xr dcons 4
135buffer.
112.It Fl T
136.It Fl T
113Enable ad hoc workaround for telnet protocol to
137Enable ad-hoc workaround for the TELNET protocol to
114remove unnecessary byte sequences.
138remove unnecessary byte sequences.
115It should be set when you access dconschat using telnet.
139It should be set when you access
140.Nm
141using
142.Xr telnet 1 .
116.It Fl 1
143.It Fl 1
117One-Shot. Read available buffer then exit. This implies
144One-shot.
145Read available buffer, then exit.
146This implies the
118.Fl r
119option.
120.It Fl h Ar hz
147.Fl r
148option.
149.It Fl h Ar hz
121Specify polling rate. The default value is 100.
150Specify polling rate.
151The default value is 100.
122.It Fl C Ar console_port
152.It Fl C Ar console_port
123Specify console port. The default value is 0(stdin/stdout).
153Specify the console port.
154The default value is 0 (stdin/stdout).
124.It Fl G Ar gdb_port
155.It Fl G Ar gdb_port
125Specify gdb port.. The default value is -1(disabled).
156Specify
157.Xr gdb 1
158port.
159The default value is \-1 (disabled).
126.It Fl M Ar core
127Specify core file.
128.It Fl N Ar system
160.It Fl M Ar core
161Specify core file.
162.It Fl N Ar system
129Specify system file such as /boot/kernel/kernel.
163Specify system file such as
164.Pa /boot/kernel/kernel .
130.It Fl t Ar target_eui64
165.It Fl t Ar target_eui64
131Specify the 64bit extended unique identifier of the target and use FireWire to access remote
166Specify the 64-bit extended unique identifier of the target,
167and use FireWire to access remote
132.Xr dcons 4 .
133.It Fl a Ar address
168.Xr dcons 4 .
169.It Fl a Ar address
134Specify the physical/IO address of the dcons buffer. See
170Specify the physical I/O address of the
135.Xr dcons 4
171.Xr dcons 4
172buffer.
173See
174.Xr dcons 4
136for details.
137If this option is not specified,
138.Nm
139tries to get the address from the Configuration ROM on the target.
140You are supposed to enable
141.Xr dcons_crom 4
142on the target to omit this option.
143.It Fl u Ar bus_num
175for details.
176If this option is not specified,
177.Nm
178tries to get the address from the Configuration ROM on the target.
179You are supposed to enable
180.Xr dcons_crom 4
181on the target to omit this option.
182.It Fl u Ar bus_num
144Specify FireWire bus number. The default is 0.
183Specify FireWire bus number.
184The default is 0.
145.El
185.El
146.Sh EXAMPLE
186.Sh EXAMPLES
147To use
187To use
148.Nm
188.Nm
149with FireWire for remote
189with FireWire for remote
150.Xr dcons ,
151you have to specify the eui64 of the target.
190.Xr dcons 4 ,
191you have to specify the EUI64 of the target.
152You can obtain EUI64 by running
192You can obtain EUI64 by running
153.Xr fwcontorl 4
193.Xr fwcontrol 8
154without options.
194without options.
155The first EUI64 is of the host running fwcontrol and others on the
156bus follow.
195The first EUI64 is of the host running
196.Xr fwcontrol 8
197and others on the bus follow.
157.Bd -literal -offset indent
158# fwcontrol
1592 devices (info_len=2)
160node EUI64 status
161 1 77-66-55-44-33-22-11-00 0
162 0 00-11-22-33-44-55-66-77 1
163.Ed
164.Pp
198.Bd -literal -offset indent
199# fwcontrol
2002 devices (info_len=2)
201node EUI64 status
202 1 77-66-55-44-33-22-11-00 0
203 0 00-11-22-33-44-55-66-77 1
204.Ed
205.Pp
165The EUI64 doesn't change unless you change the hardware
206The EUI64 does not change unless you change the hardware
166as the ethernet address.
167.Pp
207as the ethernet address.
208.Pp
168Now we can run the
209Now we can run
169.Nm .
170.Bd -literal -offset indent
171# dconschat -br -G 12345 -t 00-11-22-33-44-55-66-77
172.Ed
173.Pp
210.Nm .
211.Bd -literal -offset indent
212# dconschat -br -G 12345 -t 00-11-22-33-44-55-66-77
213.Ed
214.Pp
174You'll get console output of the target and login prompt if a getty is
175running on dcons. You can break to DDB with ALT_BREAK (CR + '~' + Ctrl-B)
176if DDB and ALT_BREAK_TO_DEBUGGER is enabled in the target kernel.
177To quit the session, type CR + '~' + '.' in the console port.
215You will get console output of the target and login prompt if a
216.Xr getty 8
217is running on
218.Xr dcons 4 .
219You can break to DDB with ALT_BREAK (CR +
220.Ql ~
221+ Ctrl-B)
222if
223.Dv DDB
224and
225.Dv ALT_BREAK_TO_DEBUGGER
226are enabled in the target kernel.
227To quit the session, type CR +
228.Ql ~
229+
230.Ql \&.
231in the console port.
178.Pp
232.Pp
179Using gdb port is almost the same as remote gdb over serial line except
180using TCP/IP instead of /dev/cu*. See
181"On-line Kernel Debugging Using Remote GDB"
182section of The FreeBSD Developers Handbook and
233Using
234.Xr gdb 1
235port is almost the same as remote
236.Xr gdb 1
237over serial line except
238using TCP/IP instead of
239.Pa /dev/cu* .
240See
241.Sx "On-line Kernel Debugging Using Remote GDB"
242section of
243.%T "The FreeBSD Developers Handbook"
244and
183.Xr gdb 4
245.Xr gdb 4
184for detail.
246for details.
185.Bd -literal -offset indent
186% gdb -k kernel.debug
187(kgdb) target remote :12345
188.Ed
189.Pp
247.Bd -literal -offset indent
248% gdb -k kernel.debug
249(kgdb) target remote :12345
250.Ed
251.Pp
190Once gdb is attached and you specified '-b' option to dconschat,
191typing "Ctrl-C" on gdb causes break to debugger.
252Once
253.Xr gdb 1
254is attached and you specified the
255.Fl b
256option to
257.Nm ,
258typing Ctrl-C in
259.Xr gdb 1
260causes a break to debugger.
192.Pp
261.Pp
193The following command get console log from crash dump:
262The following command gets the console log from the crash dump:
194.Bd -literal -offset indent
195# dconschat -1 -M vmcore.0 -N kernel.0
196.Ed
197.Pp
263.Bd -literal -offset indent
264# dconschat -1 -M vmcore.0 -N kernel.0
265.Ed
266.Pp
198If you want access to the console using telnet, try the following:
267If you want access to the console using
268.Xr telnet 1 ,
269try the following:
199.Bd -literal -offset indent
200# dconschat -rTC 5555 &
201# telnet localhost 5555
202.Ed
203.Pp
270.Bd -literal -offset indent
271# dconschat -rTC 5555 &
272# telnet localhost 5555
273.Ed
274.Pp
204You may want to keep logging console output of several machines. Conserve-com
205in the ports collection may help you. Insert the following lines
206in the conserver.cf.
275You may want to keep logging console output of several machines.
276.Nm conserver-com
277in the Ports collection may help you.
278Insert the following lines in
279.Pa conserver.cf :
207.Bd -literal -offset indent
208console local {
209 master localhost;
210 type exec;
211 exec /usr/sbin/dconschat -rh 25;
212}
213console remote {
214 master localhost;
215 type exec;
216 exec /usr/sbin/dconschat -rh 25 -t 00-11-22-33-44-55-66-77;
217}
218.Ed
219.Sh FILES
280.Bd -literal -offset indent
281console local {
282 master localhost;
283 type exec;
284 exec /usr/sbin/dconschat -rh 25;
285}
286console remote {
287 master localhost;
288 type exec;
289 exec /usr/sbin/dconschat -rh 25 -t 00-11-22-33-44-55-66-77;
290}
291.Ed
292.Sh FILES
220.Bl -tag -width indent
293.Bl -tag -width indent -compact
221.It Pa /dev/fwmem0.0
222.It Pa /dev/mem
223.It Pa /dev/kmem
224.El
225.Sh SEE ALSO
226.Xr gdb 1 ,
227.Xr telnet 1 ,
228.Xr kvm 3 ,
229.Xr dcons 4 ,
230.Xr dcons_crom 4 ,
231.Xr ddb 4 ,
232.Xr firewire 4 ,
233.Xr fwohci 4 ,
234.Xr gdb 4 ,
235.Xr eui64 5 ,
236.Xr fwcontrol 8
237.Sh AUTHORS
238.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
239.Sh BUGS
294.It Pa /dev/fwmem0.0
295.It Pa /dev/mem
296.It Pa /dev/kmem
297.El
298.Sh SEE ALSO
299.Xr gdb 1 ,
300.Xr telnet 1 ,
301.Xr kvm 3 ,
302.Xr dcons 4 ,
303.Xr dcons_crom 4 ,
304.Xr ddb 4 ,
305.Xr firewire 4 ,
306.Xr fwohci 4 ,
307.Xr gdb 4 ,
308.Xr eui64 5 ,
309.Xr fwcontrol 8
310.Sh AUTHORS
311.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
312.Sh BUGS
240This utility is still under development.
241.Pp
313This utility is
314.Ud .