A lightweight console utility for serial devices, TCP sockets, and UNIX domain sockets. A minimal minicom replacement with zero UI overhead. For serial and TCP usage modes, see the original README.
This document covers UDS client features used for EPICS IOC console access via procServ.
make
sudo make install DESTDIR=/usr/local
con -VConnect to a procServ IOC console:
con -c /run/procserv/myioc/controlQuiet mode suppresses connection banners:
con -c /run/procserv/myioc/control -qDetach with Ctrl-A (default exit key).
Observe an IOC console without sending any keyboard input. Prevents accidental command injection when multiple operators share a console:
con -r -c /run/procserv/myioc/controlCtrl-A exits. The exit key is always active in read-only mode.
Press Ctrl-T during an active session to pause incoming data and display receive buffer utilization:
[diag] con recv buffer: 49152 / 212992 bytes (23%) - NORMAL
[diag] paused -- press any key to resume
Press any key to resume. Buffer status levels:
| Level | Threshold | Action |
|---|---|---|
| NORMAL | < 50% | No action required |
| HIGH | 50-80% | Check remote for output flood, consider con -r |
| If EPICS IOC, check for device driver errors or crash-loop | ||
| CRITICAL | > 80% | Remote output may block, disconnect or reduce output rate |
| If EPICS IOC, restart IOC or check procServ crash-loop |
When logging is active (-l or -a), diagnostic output is also written to the log file.
The default exit key is Ctrl-A (0x01). To change it to Ctrl-B:
con -x ctrl/b -c /run/procserv/myioc/controlThe -x argument accepts ctrl/a, cntrl/a, control-a forms, or raw integer values (0x02, 002).
Accepted formats: ctrl/a, cntrl/a, control-a, or raw integer (0x02, 002).
Overwrite mode:
con -c /run/procserv/myioc/control -l session.logAppend mode with timestamped session header:
con -c /run/procserv/myioc/control -a session.logStrip ANSI escape sequences from log output (for color-enabled EPICS shells):
con -c /run/procserv/myioc/control -n -l clean.logHex bytes:
con -X -c /run/procserv/myioc/controlHex + ASCII (non-printable shown as .):
con -Y -c /run/procserv/myioc/control| Switch | Description |
|---|---|
-V, --version |
Print version, git hash, and build date |
-h |
Print help message |
-c |
Connect as UDS or TCP client |
-r |
Read-only mode |
-q |
Suppress connection banners |
-l FILE |
Log to file (overwrite) |
-a FILE |
Append to log file with session header |
-n |
Strip ANSI escape sequences from log |
-X |
Hex byte output |
-Y |
Hex + ASCII output |
-x KEY |
Custom exit key (default: Ctrl-A) |
-e |
Echo keyboard input locally |
Ctrl-T |
Diagnostic: pause and display buffer status |
Ctrl-A |
Exit session (default, configurable with -x) |
make testThe Ctrl-T diagnostic hotkey is covered by make test
(tests/test-uds-diag.bash). The interactive test below is for flood mode and
visual inspection of the [diag] output:
bash tests/manual-test-diag-hotkey.bash # echo mode
bash tests/manual-test-diag-hotkey.bash --flood # flood modeTest specifications: tests/README.md and tests/TEST_DETAILS.md.
/srv/librablmOpt is the NFS folder where the BLM can access as PATH.
source ../deviceconf/BLM/setEnvBLMCC.bash
make clean
make
sudo make install DESTDIR=/srv/liberablmOpt