DCONSCHAT(8)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… dconschat(8) β€” your girl's guide to the dcons(4) user interface

okay bestie so this is DCONSCHAT(8), straight out of the System Manager's Manual, and it's literally your user interface to dcons(4). Let's get into it ✨

🌸 SYNOPSIS 🌸

dconschat [-brvwRT1] [-e escape-char] [-h hz] [-C console_port]
          [-G gdb_port] [-M core] [-N system]
dconschat [-brvwR1] [-h hz] [-C console_port] [-G gdb_port] [-a address]
          [-u bus_num] -t target_eui64

two whole forms, pick your fighter 🫢


πŸ’– DESCRIPTION πŸ’–

so dconschat is the utility that's designed to give users a way to access dcons(4) β€” the dumb console device, hence "dcons", iykyk β€” on a local or remote system. it interacts with dcons(4) using kvm(3) or firewire(4), and it interacts with you over TTY or TCP/IP. and bestie, listen: to access a remote dcons(4) using firewire(4), you have to specify the target EUI64 address with the -t option. Physical DMA should be enabled on the target machine for access via FireWire. no cap, that part matters πŸ”₯

dconschat and the dcons(4) driver communicate using 2 ports β€” one for the console port and another for the remote gdb(1) (ports/devel/gdb) port. users are supposed to access dconschat using TTY, telnet(1) and gdb(1) (ports/devel/gdb). you can specify listen ports for the console and the gdb(1) (ports/devel/gdb) port using the -C and -G options respectively. and here's the fun part: the port number 0 has special meaning β€” current TTY (stdin/stdout) is used instead of TCP/IP. a negative port number will disable the port. by analogy with the pty(4) device, dcons(4) acts as a slave device and dconschat acts as a master device with telnetd. it's giving master/slave energy, periodt πŸ’…

typed characters are normally transmitted directly to dcons(4). but an escape character (the default is '~') appearing as the first character of a line is an escape signal β€” and here's what's recognized:

  • ~. β€” Drop the connection and exit. bye bestie πŸ¦‹
  • ~^G β€” Invoke kgdb on the terminal on which dconschat is running.
  • ~^R β€” Reset the target over FireWire if a reset address is registered in Configuration ROM.
  • ~^Z β€” Suspend the dconschat process.

and now, the following options are supported πŸ‘‘

✨ OPTIONS ✨

  • -b β€” Translate Ctrl-C to ALT_BREAK (CR + '~' + Ctrl-B) on the gdb(1) (ports/devel/gdb) port.
  • -r β€” Replay old buffer on connection. nostalgia core πŸŽ€
  • -v β€” Verbose debug output. multiple -v options increase verbosity β€” stack 'em, the way that verbosity scales is iconic.
  • -w β€” Listen on a wildcard address rather than localhost.
  • -R β€” Read-only. do not write anything to the dcons(4) buffer. hands off πŸ™ˆ
  • -T β€” Enable ad-hoc workaround for the TELNET protocol to remove unnecessary byte sequences. it should be set when you access dconschat using telnet(1).
  • -1 β€” One-shot. read available buffer, then exit. this implies the -r option.
  • -e escape-char β€” Specify escape character. the default is '~'.
  • -h hz β€” Specify polling rate. the default value is 100.
  • -C console_port β€” Specify the console port. the default value is 0 (stdin/stdout).
  • -G gdb_port β€” Specify gdb(1) (ports/devel/gdb) port. the default value is -1 (disabled).
  • -M core β€” Specify core file.
  • -N system β€” Specify system file such as /boot/kernel/kernel.
  • -t target_eui64 β€” Specify the 64-bit extended unique identifier of the target, and use FireWire to access remote dcons(4).
  • -a address β€” Specify the physical I/O address of the dcons(4) buffer. see dcons(4) for details. if this option is not specified, dconschat tries to get the address from the Configuration ROM on the target. you are supposed to enable dcons_crom(4) on the target to omit this option.
  • -u bus_num β€” Specify FireWire bus number. the default is 0.

🧚 FILES 🧚

  • /dev/fwmem0.0
  • /dev/mem
  • /dev/kmem

πŸ”₯ EXAMPLES πŸ”₯

to use dconschat with FireWire for remote dcons(4), you have to specify the EUI64 of the target. you can obtain EUI64 by running fwcontrol(8) without options. the first EUI64 is of the host running fwcontrol(8) and others on the bus follow. look at her go:

# fwcontrol
2 devices (info_len=2)
node           EUI64          status
   1  77-66-55-44-33-22-11-00      0
   0  00-11-22-33-44-55-66-77      1

the EUI64 does not change unless you change the hardware β€” as the ethernet address. stable queen πŸ‘‘

now we can run dconschat.

# dconschat -br -G 12345 -t 00-11-22-33-44-55-66-77

you will get console output of the target and a login prompt if a getty(8) is running on dcons(4). you can break to DDB with ALT_BREAK (CR + '~' + Ctrl-B) if DDB and ALT_BREAK_TO_DEBUGGER are enabled in the target kernel. to quit the session, type CR + '~' + '.' in the console port. 🫢

using the gdb(1) (ports/devel/gdb) port is almost the same as remote gdb(1) (ports/devel/gdb) over a serial line except using TCP/IP instead of /dev/cu*. see the "On-line Kernel Debugging Using Remote GDB" section of The FreeBSD Developers Handbook and gdb(4) for details.

% gdb -k kernel.debug
(kgdb) target remote :12345

once gdb(1) (ports/devel/gdb) is attached and you specified the -b option to dconschat, typing Ctrl-C in gdb(1) (ports/devel/gdb) causes a break to debugger. slay πŸ’…

the following command gets the console log from the crash dump:

# dconschat -1 -M vmcore.0 -N kernel.0

if you want access to the console using telnet(1), try the following:

# dconschat -rTC 5555 &
# telnet localhost 5555

you may want to keep logging console output of several machines. conserver-com in the Ports collection may help you. insert the following lines in conserver.cf:

console local {
        master localhost;
        type exec;
        exec /usr/sbin/dconschat -rh 25;
}
console remote {
        master localhost;
        type exec;
        exec /usr/sbin/dconschat -rh 25 -t 00-11-22-33-44-55-66-77;
}

πŸ¦‹ SEE ALSO πŸ¦‹

gdb(1) (ports/devel/gdb), telnet(1), kvm(3), dcons(4), dcons_crom(4), ddb(4), firewire(4), fwohci(4), gdb(4), eui64(5), fwcontrol(8)


πŸ‘‘ AUTHORS πŸ‘‘

Hidetoshi Shimokawa <simokawa@FreeBSD.org> β€” we stan 🫢


πŸ’€ BUGS πŸ’€

this utility is currently under development. it's giving work-in-progress main character energy, ngl 😭


so yeah bestie, that's the whole page β€” every flag, every default, every escape sequence, all of it. go forth and console, and remember: Ctrl-C to ALT_BREAK only if you asked for it. πŸ’–

signing off πŸŽ€ this beauty is from the Debian manual set, dated September 29, 2022, and it's called DCONSCHAT(8) β€” you're so welcome. mwah πŸ’‹

πŸ“¦ where this page comes from