_____________________________________________________________________
724-746-5500 | b lackb o x.co m
Page 199
# pmchat -v -f /etc/config/scripts/port08.chat < /dev/port08
For more information on using
chat
(and
pmchat
) you should consult the UNIX man 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.
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 that a user named “
user1
” is actively connected to ports 1 and 2, while
“
user2
” is connected to both ports 1 and 8.
portmanager daemon
There is normally no need to stop and restart the daemon. To restart the daemon normally, just run the
command:
# portmanager
Supported command line options are:
Force portmanager to run in the foreground:
--nodaemon
Set the level of debug logging:
--loglevel={debug,info,warn,error,alert}
Change which configuration file it uses:
-c /etc/config/portmanager.conf
Signals
Sending a SIGHUP signal to the portmanager will cause it to re-read its configuration file
15.2.2 External Scripts and Alerts
The portmanager can execute external scripts on certain events.
When the portmanager opens a port:
-
It attempts to execute
/etc/config/scripts/portXX.init
(where XX is the number of the port,
e.g.
08).
The script is run with STDIN and STDOUT both connected to the serial port.
-
If the script cannot be executed, then portmanager will execute
/etc/config/scripts/portXX.chat
via
the chat command on the serial port.