2003-10-24 15:44:10 +00:00
|
|
|
.\" Copyright (c) 2003 Hidetoshi Shimokawa
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
|
|
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
|
|
|
.\"
|
|
|
|
.Dd February 11, 2003
|
|
|
|
.Dt DCONSCHAT 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm dconschat
|
2004-06-13 18:03:44 +00:00
|
|
|
.Nd user interface to
|
|
|
|
.Xr dcons 4
|
2003-10-24 15:44:10 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl brvwRT1
|
2007-06-15 12:09:16 +00:00
|
|
|
.Op Fl e Ar escape-char
|
2003-10-24 15:44:10 +00:00
|
|
|
.Op Fl h Ar hz
|
|
|
|
.Op Fl C Ar console_port
|
|
|
|
.Op Fl G Ar gdb_port
|
|
|
|
.Op Fl M Ar core
|
|
|
|
.Op Fl N Ar system
|
|
|
|
.Nm
|
|
|
|
.Op Fl brvwR1
|
|
|
|
.Op Fl h Ar hz
|
|
|
|
.Op Fl C Ar console_port
|
|
|
|
.Op Fl G Ar gdb_port
|
|
|
|
.Op Fl a Ar address
|
|
|
|
.Op Fl u Ar bus_num
|
|
|
|
.Fl t Ar target_eui64
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is designed to provide a way for users to access
|
|
|
|
.Xr dcons 4
|
|
|
|
(dumb console device) on a local or remote system.
|
|
|
|
The
|
|
|
|
.Nm
|
2004-06-13 18:03:44 +00:00
|
|
|
utility interacts with
|
2003-10-24 15:44:10 +00:00
|
|
|
.Xr dcons 4
|
|
|
|
using
|
|
|
|
.Xr kvm 3
|
|
|
|
or
|
2004-06-13 18:03:44 +00:00
|
|
|
.Xr firewire 4 ,
|
|
|
|
and interacts with the user over TTY or TCP/IP.
|
2003-10-24 15:44:10 +00:00
|
|
|
To access remote
|
|
|
|
.Xr dcons 4
|
|
|
|
using
|
|
|
|
.Xr firewire 4 ,
|
2004-06-13 18:03:44 +00:00
|
|
|
you have to specify target EUI64 address using the
|
2003-10-24 15:44:10 +00:00
|
|
|
.Fl t
|
2007-06-08 05:26:11 +00:00
|
|
|
option. Physical DMA should be enabled on the target machine for access
|
|
|
|
via FireWire.
|
2003-10-24 15:44:10 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
2004-06-13 18:03:44 +00:00
|
|
|
utility and the
|
2003-10-24 15:44:10 +00:00
|
|
|
.Xr dcons 4
|
2004-06-13 18:03:44 +00:00
|
|
|
driver communicate using 2 ports, one for the console port and another
|
|
|
|
for remote
|
|
|
|
.Xr gdb 1
|
|
|
|
port.
|
2003-10-24 15:44:10 +00:00
|
|
|
Users are supposed to access
|
|
|
|
.Nm
|
2004-06-13 18:03:44 +00:00
|
|
|
using TTY,
|
|
|
|
.Xr telnet 1
|
|
|
|
and
|
|
|
|
.Xr gdb 1 .
|
|
|
|
You can specify listen ports for console and
|
|
|
|
.Xr gdb 1
|
|
|
|
port using the
|
2003-10-24 15:44:10 +00:00
|
|
|
.Fl C
|
|
|
|
and
|
|
|
|
.Fl G
|
2004-06-13 18:03:44 +00:00
|
|
|
options respectively.
|
|
|
|
The port number 0 has special meaning that
|
|
|
|
current TTY (stdin/stdout) is used instead of TCP/IP.
|
2003-10-24 15:44:10 +00:00
|
|
|
A negative port number will disable the port.
|
|
|
|
By analogy with
|
|
|
|
.Xr pty 4
|
2004-06-13 18:03:44 +00:00
|
|
|
device, the
|
2003-10-24 15:44:10 +00:00
|
|
|
.Xr dcons 4
|
|
|
|
acts as a slave device and
|
|
|
|
.Nm
|
|
|
|
acts as a master device with
|
|
|
|
.Xr telnetd 8 .
|
2007-06-08 05:26:11 +00:00
|
|
|
.Pp
|
|
|
|
Typed characters are normally transmitted directly to
|
|
|
|
.Xr dcons 4 .
|
2007-06-15 12:09:16 +00:00
|
|
|
A escape character (the default is
|
|
|
|
.Ql ~
|
|
|
|
) appearing as the first character of a line is an escape signal; the
|
2007-06-08 05:26:11 +00:00
|
|
|
following are recognized:
|
|
|
|
.Bl -tag -width ident
|
|
|
|
.It Ic ~.
|
|
|
|
Drop the connection and exit.
|
2007-06-15 12:09:16 +00:00
|
|
|
.It Ic ~^G
|
|
|
|
Invoke kgdb on the terminal on which dconschat is running.
|
2007-06-08 05:26:11 +00:00
|
|
|
.It Ic ~^R
|
|
|
|
Reset the target over FireWire if a reset address is registered in Configuration ROM.
|
|
|
|
.It Ic ~^Z
|
|
|
|
Suspend the dconschat process.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following options are supported.
|
2004-06-13 18:03:44 +00:00
|
|
|
.Bl -tag -width indent
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl b
|
2004-06-13 18:03:44 +00:00
|
|
|
Translate Ctrl-C to ALT_BREAK (CR +
|
|
|
|
.Ql ~
|
|
|
|
+ Ctrl-B) on
|
|
|
|
.Xr gdb 1
|
|
|
|
port.
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl r
|
|
|
|
Replay old buffer on connection.
|
|
|
|
.It Fl v
|
2004-06-13 18:03:44 +00:00
|
|
|
Verbose debug output.
|
|
|
|
Multiple
|
|
|
|
.Fl v
|
|
|
|
options increase verbosity.
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl w
|
2004-06-13 18:03:44 +00:00
|
|
|
Listen on a wildcard address rather than localhost.
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl R
|
2004-06-13 18:03:44 +00:00
|
|
|
Read-only.
|
|
|
|
Do not write anything to the
|
|
|
|
.Xr dcons 4
|
|
|
|
buffer.
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl T
|
2004-06-13 18:03:44 +00:00
|
|
|
Enable ad-hoc workaround for the TELNET protocol to
|
2003-10-24 15:44:10 +00:00
|
|
|
remove unnecessary byte sequences.
|
2004-06-13 18:03:44 +00:00
|
|
|
It should be set when you access
|
|
|
|
.Nm
|
|
|
|
using
|
|
|
|
.Xr telnet 1 .
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl 1
|
2004-06-13 18:03:44 +00:00
|
|
|
One-shot.
|
|
|
|
Read available buffer, then exit.
|
|
|
|
This implies the
|
2003-10-24 15:44:10 +00:00
|
|
|
.Fl r
|
|
|
|
option.
|
2007-06-15 12:09:16 +00:00
|
|
|
.It Fl e Ar escape-char
|
|
|
|
Specify escape character.
|
|
|
|
The default is '~'.
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl h Ar hz
|
2004-06-13 18:03:44 +00:00
|
|
|
Specify polling rate.
|
|
|
|
The default value is 100.
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl C Ar console_port
|
2004-06-13 18:03:44 +00:00
|
|
|
Specify the console port.
|
|
|
|
The default value is 0 (stdin/stdout).
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl G Ar gdb_port
|
2004-06-13 18:03:44 +00:00
|
|
|
Specify
|
|
|
|
.Xr gdb 1
|
|
|
|
port.
|
|
|
|
The default value is \-1 (disabled).
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl M Ar core
|
|
|
|
Specify core file.
|
|
|
|
.It Fl N Ar system
|
2004-06-13 18:03:44 +00:00
|
|
|
Specify system file such as
|
|
|
|
.Pa /boot/kernel/kernel .
|
2003-10-24 15:44:10 +00:00
|
|
|
.It Fl t Ar target_eui64
|
2004-06-13 18:03:44 +00:00
|
|
|
Specify the 64-bit extended unique identifier of the target,
|
|
|
|
and use FireWire to access remote
|
2003-10-24 15:44:10 +00:00
|
|
|
.Xr dcons 4 .
|
|
|
|
.It Fl a Ar address
|
2004-06-13 18:03:44 +00:00
|
|
|
Specify the physical I/O address of the
|
|
|
|
.Xr dcons 4
|
|
|
|
buffer.
|
|
|
|
See
|
2003-10-24 15:44:10 +00:00
|
|
|
.Xr dcons 4
|
|
|
|
for details.
|
|
|
|
If this option is not specified,
|
|
|
|
.Nm
|
|
|
|
tries to get the address from the Configuration ROM on the target.
|
|
|
|
You are supposed to enable
|
|
|
|
.Xr dcons_crom 4
|
|
|
|
on the target to omit this option.
|
|
|
|
.It Fl u Ar bus_num
|
2004-06-13 18:03:44 +00:00
|
|
|
Specify FireWire bus number.
|
|
|
|
The default is 0.
|
2003-10-24 15:44:10 +00:00
|
|
|
.El
|
2005-01-18 20:02:45 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It Pa /dev/fwmem0.0
|
|
|
|
.It Pa /dev/mem
|
|
|
|
.It Pa /dev/kmem
|
|
|
|
.El
|
2004-06-13 18:03:44 +00:00
|
|
|
.Sh EXAMPLES
|
2003-10-24 15:44:10 +00:00
|
|
|
To use
|
2004-06-13 18:03:44 +00:00
|
|
|
.Nm
|
2003-10-24 15:44:10 +00:00
|
|
|
with FireWire for remote
|
2004-06-13 18:03:44 +00:00
|
|
|
.Xr dcons 4 ,
|
|
|
|
you have to specify the EUI64 of the target.
|
2003-10-24 15:44:10 +00:00
|
|
|
You can obtain EUI64 by running
|
2004-06-13 18:03:44 +00:00
|
|
|
.Xr fwcontrol 8
|
2003-10-24 15:44:10 +00:00
|
|
|
without options.
|
2004-06-13 18:03:44 +00:00
|
|
|
The first EUI64 is of the host running
|
|
|
|
.Xr fwcontrol 8
|
|
|
|
and others on the bus follow.
|
2003-10-24 15:44:10 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
# fwcontrol
|
|
|
|
2 devices (info_len=2)
|
2004-05-26 22:59:55 +00:00
|
|
|
node EUI64 status
|
|
|
|
1 77-66-55-44-33-22-11-00 0
|
|
|
|
0 00-11-22-33-44-55-66-77 1
|
2003-10-24 15:44:10 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
The EUI64 does not change unless you change the hardware
|
2003-10-24 15:44:10 +00:00
|
|
|
as the ethernet address.
|
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
Now we can run
|
2003-10-24 15:44:10 +00:00
|
|
|
.Nm .
|
|
|
|
.Bd -literal -offset indent
|
2004-05-26 22:59:55 +00:00
|
|
|
# dconschat -br -G 12345 -t 00-11-22-33-44-55-66-77
|
2003-10-24 15:44:10 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
You will get console output of the target and login prompt if a
|
|
|
|
.Xr getty 8
|
|
|
|
is running on
|
|
|
|
.Xr dcons 4 .
|
|
|
|
You can break to DDB with ALT_BREAK (CR +
|
|
|
|
.Ql ~
|
|
|
|
+ Ctrl-B)
|
|
|
|
if
|
|
|
|
.Dv DDB
|
|
|
|
and
|
|
|
|
.Dv ALT_BREAK_TO_DEBUGGER
|
|
|
|
are enabled in the target kernel.
|
|
|
|
To quit the session, type CR +
|
|
|
|
.Ql ~
|
|
|
|
+
|
|
|
|
.Ql \&.
|
|
|
|
in the console port.
|
2003-10-24 15:44:10 +00:00
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
Using
|
|
|
|
.Xr gdb 1
|
|
|
|
port is almost the same as remote
|
|
|
|
.Xr gdb 1
|
|
|
|
over serial line except
|
|
|
|
using TCP/IP instead of
|
|
|
|
.Pa /dev/cu* .
|
|
|
|
See
|
|
|
|
.Sx "On-line Kernel Debugging Using Remote GDB"
|
|
|
|
section of
|
|
|
|
.%T "The FreeBSD Developers Handbook"
|
|
|
|
and
|
2004-02-20 10:59:46 +00:00
|
|
|
.Xr gdb 4
|
2004-06-13 18:03:44 +00:00
|
|
|
for details.
|
2003-10-24 15:44:10 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
% gdb -k kernel.debug
|
|
|
|
(kgdb) target remote :12345
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
Once
|
|
|
|
.Xr gdb 1
|
|
|
|
is attached and you specified the
|
|
|
|
.Fl b
|
|
|
|
option to
|
|
|
|
.Nm ,
|
|
|
|
typing Ctrl-C in
|
|
|
|
.Xr gdb 1
|
|
|
|
causes a break to debugger.
|
2003-10-24 15:44:10 +00:00
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
The following command gets the console log from the crash dump:
|
2003-10-24 15:44:10 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
# dconschat -1 -M vmcore.0 -N kernel.0
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
If you want access to the console using
|
|
|
|
.Xr telnet 1 ,
|
|
|
|
try the following:
|
2003-10-24 15:44:10 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
# dconschat -rTC 5555 &
|
|
|
|
# telnet localhost 5555
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2004-06-13 18:03:44 +00:00
|
|
|
You may want to keep logging console output of several machines.
|
|
|
|
.Nm conserver-com
|
|
|
|
in the Ports collection may help you.
|
|
|
|
Insert the following lines in
|
|
|
|
.Pa conserver.cf :
|
2003-10-24 15:44:10 +00:00
|
|
|
.Bd -literal -offset indent
|
2003-10-25 14:53:53 +00:00
|
|
|
console local {
|
|
|
|
master localhost;
|
|
|
|
type exec;
|
|
|
|
exec /usr/sbin/dconschat -rh 25;
|
|
|
|
}
|
|
|
|
console remote {
|
|
|
|
master localhost;
|
|
|
|
type exec;
|
2004-05-26 22:59:55 +00:00
|
|
|
exec /usr/sbin/dconschat -rh 25 -t 00-11-22-33-44-55-66-77;
|
2003-10-25 14:53:53 +00:00
|
|
|
}
|
2003-10-24 15:44:10 +00:00
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr gdb 1 ,
|
|
|
|
.Xr telnet 1 ,
|
|
|
|
.Xr kvm 3 ,
|
|
|
|
.Xr dcons 4 ,
|
|
|
|
.Xr dcons_crom 4 ,
|
|
|
|
.Xr ddb 4 ,
|
|
|
|
.Xr firewire 4 ,
|
|
|
|
.Xr fwohci 4 ,
|
2004-02-20 10:59:46 +00:00
|
|
|
.Xr gdb 4 ,
|
2004-05-26 22:59:55 +00:00
|
|
|
.Xr eui64 5 ,
|
2003-10-24 15:44:10 +00:00
|
|
|
.Xr fwcontrol 8
|
|
|
|
.Sh AUTHORS
|
2014-06-20 09:57:27 +00:00
|
|
|
.An Hidetoshi Shimokawa Aq Mt simokawa@FreeBSD.org
|
2003-10-24 15:44:10 +00:00
|
|
|
.Sh BUGS
|
2004-06-13 18:03:44 +00:00
|
|
|
This utility is
|
2010-05-27 13:56:40 +00:00
|
|
|
.Ud
|