MD-MX-CTRL(8) | System Manager's Manual | MD-MX-CTRL(8) |
md-mx-ctrl - Control mimedefang-multiplexor
md-mx-ctrl [options] command
md-mx-ctrl is a command-line tool for communicating with mimedefang-multiplexor(8).
The following commands are available:
Each character in the first word corresponds to a worker, and is "I" for an idle worker, "B" for a busy worker, "S" for a worker which is not running, and "K" for a worker which has been killed, but has not yet exited. A worker is "idle" if there is a running Perl process waiting to do work. "Busy" means the Perl process is currently filtering a message. "S" means there is no associated Perl process with the worker, but one can be started if the load warrants. Finally, "K" means the worker Perl process has been killed, but has yet to terminate.
The second word is the total number of messages processed since the multiplexor started up. The third word is the total number of workers which have been activated since the multiplexor started up. (That is, it's a count of the number of times the multiplexor has forked and exec'd the Perl filter.)
The fourth word is the size of the queue for request queuing, and the fifth word is the actual number of requests in the queue. The sixth word is the number of seconds elapsed since the multiplexor was started.
while true ; do md-mx-ctrl barstatus sleep 1 done
Each row in the table corresponds to a time interval, displayed in the first column. The remaining columns in the table are:
Msgs: The number of messages scanned within the row's time interval.
Msgs/Sec: The average number of messages scanned per second within the row's time interval.
Avg Busy Workers: The average number of busy workers whenever a message was scanned. (If you are processing any mail at all, this number will be at least 1, because there is always 1 busy worker when a message is scanned.)
If you have the watch(1) command on your system, you can keep an eye on the load with this command:
watch -n 10 md-mx-ctrl load
If you do not have watch, the following shell script is a less fancy equivalent:
#!/bin/sh while true; do clear date md-mx-ctrl load sleep 10 done
Prints the load averages in computer-readable format. The format consists of twenty-nine space-separated numbers:
The first four are integers representing the number of messages scanned in the last 10 seconds, 1 minute, 5 minutes and 10 minutes.
The second four are floating-point numbers representing the average number of busy workers in the last 10 seconds, 1 minute, 5 minutes and 10 minutes.
The third four are floating-point numbers representing the average time per scan in milliseconds over the last 10 seconds, 1 minute, 5 minutes and 10 minutes.
The fourth four are the number of worker activations (new workers started) over the last 10 seconds, 1 minute, 5 minutes and 10 minutes.
The fifth four are the number of workers reaped (workers that have exited) over the last 10 seconds, 1 minute, 5 minutes and 10 minutes.
The sixth four are the number of busy, idle, stopped and killed workers.
The seventh four are the number of messages processed, the number of worker activations, the size of the request queue, and the number of requests actually on the queue.
The final number is the number of seconds since the multiplexor was started.
You might use the command like this:
watch -n 10 md-mx-ctrl load1 60
The first three numbers are the number of scans performed in the last nsecs seconds, the average number of busy workers when a scan was initiated and the average number of milliseconds per scan.
The second three are the same measurements for filter_relay calls.
The third three are the same measurements for filter_sender calls.
The fourth three are the same measurements for filter_relay calls.
The thirteenth through sixteenth numbers are the number of busy, idle, stopped and killed workers, respectively.
The seventeenth number is the number of scans since mimedefang-multiplexor was started.
The eighteenth number is the number of times a new worker has been activated since program startup.
The nineteenth number is the size of the request queue and the twentieth number is the actual number of queued requests.
The twenty-first number is the time since program startup and the twenty-second number is a copy of nsecs for convenience.
The twenty-third through twenty-sixth numbers are the number of workers currently executing a scan, relayok, senderok and recipok command respectively.
You can supply any other command and arguments to md-mx-ctrl. It percent-encodes each command-line argument, glues the encoded arguments together with a single space between each, and sends the result to the multiplexor as a command. This allows you to send arbitrary commands to your Perl workers. See the section "EXTENDING MIMEDEFANG" in mimedefang-filter(5) for additional details.
md-mx-ctrl uses the multiplexor's socket; therefore, it probably needs to be run as root or the same user as mimedefang-multiplexor.
md-mx-ctrl was written by Dianne Skoll <dfs@roaringpenguin.com>. The mimedefang home page is https://www.mimedefang.org/.
mimedefang.pl(8), mimedefang-filter(5), mimedefang(8), mimedefang-protocol(7), watch-mimedefang(8)
8 February 2005 | 4th Berkeley Distribution |