295
1.877.877.2269
BLACKBOX.COM
NEED HELP?
LEAVE THE TECH TO US
LIVE 24/7
TECHNICAL
SUPPORT
1.877.877.2269
CHAPTER 16: ADVANCED CONFIGURATION
pmchat
The pmchat command is similar to the standard chat command, but all serial port access is directed via the portmanager.
For example, to run a chat script via the portmanager:
# pmchat -v -f /etc/config/scripts/port08.chat < /dev/port08
For more information on using chat and pmchat, you should consult the utility’s manual page, via the man chat command on any
Linux or UNIX (including macOS) system, or via the web, including at https://linux.die.net/man/8/chat.
pmusers
The pmusers command is used to query the portmanager for active user sessions.
For example, to detect which users are currently active on which serial ports:
# pmusers
This will output nothing if there are no active users currently connected to any ports. If users are connected, it will respond with a
sorted list of usernames per active port. For example:
Port 1:
user1
user2
Port 2:
user1
Port 8:
user2
The above output indicates that a user named user1 is actively connected to ports 1 and 2, while user2 is connected to both ports 1
and 8.
With firmware v3.11 and later the pmusers command is extended with the --disconnect option. This allows an administrator or root to
disconnect console server sessions from the command line. The following connection types can be disconnected:
telnet
SSH
Raw TCP
Unauthorized Telnet
The --disconnect option cannot disconnect an RFC2217 session.
If the --disconnect option is specified, the pmusers command goes into disconnect mode where you can specify users with -u and
ports with -l (by label) or -n (by name).
By default, the command will prompt the user before actually disconnecting the matching sessions. This can be overriden with the
--no-prompt argument.
Some example pmuser sessions:
# pmusers --disconnect
Disconnect all users from all ports? (y/n)
y
5 sessions were disconnected