User Manual
241
pmchat
The pmchat command acts 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), consult the UNIX manual pages:
http://techpubs.sgi.com/library/tpl/cgibin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man8/chat.8.html
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 command will output nothing if there are no active users currently connected to any ports. Otherwise, it will respond with
a sorted list of usernames per active port:
Port 1:
user1
user2
Port 2:
user1
Port 8:
user2
The above output indicates a user named “user1” is actively connected to ports 1 and 2, while “user2” is connected to both
ports 1 and 8
With firmware version 3.11 and later, the pmusers command is extended with the --disconnect option, which allows an
admin user or root to disconnect console server sessions from the command line. The following connection types can be
disconnected:
telnet
SSH
Raw TCP
Unauth’ed Telnet
You cannot disconnect an RFC2217 session.
If the --disconnect option is specified, the pmusers command goes into disconnect mode, where you can specify the users
with -u, the 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 overridden
with the --no-prompt argument.
Example: pmuser sessions:
# pmusers --disconnect
Disconnect all users from all ports? (y/n)
y
5 sessions were disconnected
# pmusers --disconnect -u robertw
Disconnect user robertw from all ports? (y/n)
y
1 session was disconnected
# pmusers --disconnect -u robertw -n 5
Disconnect user robertw from port 5 (BranchRouter01)? (y/n)
y
No sessions were disconnected
# pmusers --disconnect -n 5
Disconnect all users from port 5 (BranchRouter01)? (y/n)
y
2 sessions were disconnected
15. Advanced Configuration