MD-MX-CTRL(8)
π MD-MX-CTRL π (section 8 of the System Manager's Manual)
okay bestie, gather round, because md-mx-ctrl is literally the little remote control you point at mimedefang-multiplexor πβ¨
πΈ NAME πΈ
md-mx-ctrl β control mimedefang-multiplexor
β¨ SYNOPSIS β¨
md-mx-ctrl [options] command
π¦ DESCRIPTION π¦
so md-mx-ctrl is a command-line tool, and its whole job β its entire main character purpose β is talking to mimedefang-multiplexor(8). that's it, that's the vibe. you send it stuff, it goes and chats with the multiplexor for you π
π OPTIONS π
-hβ shows you the usage info. the "help me bestie" flag, iconic, no notes.-spathβ tells it where themimedefang-multiplexorsocket lives. if you don't say anything, it just assumes the default like the confident queen it is:/var/spool/MIMEDefang/mimedefang-multiplexor.sock.-iβ makesmd-mx-ctrljust sit there in a loop, lowkey vibing: it reads commands off standard input and prints results to standard output, forever. this is for when a monitoring program likewatch-mimedefangwants to boss it around. it's giving "I'll just stay on the line, you go do your thing" π«Ά
π COMMANDS π
here's the menu, bestie. these are all available:
statusβ prints the status of every worker Perl process, in nice human-readable format. for the girlies who want to read things πΈrawstatusβ same status of all the worker Perl processes, but in a format that's easy for a computer to parse. it comes back as a single line with six words on it, separated by a single space character. buckle up:- each character in the first word maps to a worker, and it goes like this:
"I"= an idle worker,"B"= a busy worker,"S"= a worker that is not running, and"K"= a worker that's been killed but hasn't exited yet. a worker is "idle" when there's a running Perl process just waiting to do work. "busy" means that Perl process is currently filtering a message."S"means there's no associated Perl process with the worker, but one can be started if the load warrants it. and finally,"K"means the worker Perl process got killed but hasn't terminated yet. π - the second word is the total number of messages processed since the multiplexor started up.
- the third word is the total number of workers activated since the multiplexor started up. (that's a count of how many times the multiplexor has forked and exec'd the Perl filter, fr fr.)
- 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. β
- each character in the first word maps to a worker, and it goes like this:
autoscaleβ displays the current autoscaling configuration and runtime state. the output is a single line ofkey=valuepairs:enabledis1if autoscaling is active,0otherwise.intervalis the number of seconds between autoscale checks.ema_busyis the current exponential moving average of the busy-worker ratio.scale_outandscale_inare the EMA thresholds above/below which a worker is added or removed, respectively.out_coolandin_coolare the cooldown periods (in seconds) that must elapse before another scale-out or scale-in event may occur.ema_alphais the smoothing factor used to compute the EMA.
autoscaling gets enabled with the-koption ofmimedefang-multiplexor(8)π
barstatusβ prints the status of busy workers and queued requests in a cute little "bar chart" format. this is the one that lets you keep an eye on things with a script like this:
while true ; do
md-mx-ctrl barstatus
sleep 1
done
jsonstatusβ prints the status of all worker Perl processes in JSON format. for the structured-data girlies β¨histoβ prints a histogram showing how many workers were busy each time a request was processed. it prints a single line for the numbers from1up to the maximum number of workers. each line has the count of busy workers (1,2,3up toMX_MAXIMUM), then a space, then the number of times that many workers were busy when a request was processed. πloadβ prints a table of "load averages" for the last 10 seconds, 1 minute, 5 minutes and 10 minutes.
each row in the table is a time interval, and that interval is shown in the first column. the rest of the columns are:
- Msgs: the number of messages scanned within that row's time interval.
- Msgs/Sec: the average number of messages scanned per second within that row's time interval.
- Avg Busy Workers: the average number of busy workers whenever a message was scanned. (and listen β if you're processing any mail at all, this number is at least
1, because there's always 1 busy worker when a message is scanned. math is math π )
if you've got the watch(1) command on your system, you can keep an eye on the load like this:
watch -n 10 md-mx-ctrl load
and if you don't have watch, this shell script is a less fancy equivalent:
#!/bin/sh
while true; do
clear
date
md-mx-ctrl load
sleep 10
done
rawloadβ prints the load averages in computer-readable format. the format is twenty-nine space-separated numbers, and here's the breakdown:- the first four are integers: the number of messages scanned in the last 10 seconds, 1 minute, 5 minutes and 10 minutes.
- the second four are floating-point numbers: 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: 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.
- and the final number is the number of seconds since the multiplexor was started. π§
load-relayokβ similar toload, but it shows timings forfilter_relaycalls.load-senderokβ similar toload, but it shows timings forfilter_sendercalls.load-recipokβ similar toload, but it shows timings forfilter_recipientcalls.rawload-relayokβ similar torawload, but it shows timings forfilter_relaycalls. heads up though: the worker activation and reap statistics are present, but always0. they're only valid in arawloadcommand. πrawload-senderokβ similar torawload, but it shows timings forfilter_sendercalls. same warning bestie: the worker activation and reap statistics are present but always0, and they're only valid in arawloadcommand.rawload-recipokβ similar torawload, but it shows timings forfilter_recipientcalls. and again: worker activation and reap statistics are present but always0, only valid in arawloadcommand. πload1nsecsβ theload1command displays the load for various commands over the lastnsecsseconds, wherensecsis an integer from10to600. it combines the output ofload,load-relayok,load-senderokfandload-recipokinto one display. (yes,load-senderokfβ we're keeping it exactly as written, no cap.)
you might use it like this:
watch -n 10 md-mx-ctrl load1 60
rawload1nsecsβ returns theload1data in human-readable format. the result is a line containing twenty-six space-separated numbers:- the first three are the number of scans performed in the last
nsecsseconds, 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_relaycalls. - the third three are the same measurements for
filter_sendercalls. - the fourth three are the same measurements for
filter_relaycalls. (that's what it says, bestie β we don't make the rules) - 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-multiplexorwas 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
nsecsfor convenience. - the twenty-third through twenty-sixth numbers are the number of workers currently executing a
scan,relayok,senderokandrecipokcommand respectively. β
- the first three are the number of scans performed in the last
jsonload1nsecsβ returns theload1data in JSON format. structured, slay, gorgeous β¨workersβ displays a list of workers and their process IDs. each line of output has a worker number, a status (I,B,K, orS), and β for idle or busy workers β the process-ID of the worker. for busy workers, the line may have extra info about what that worker is doing. oh and btw, the commandslavesis a deprecated synonym for this one. deprecated, bestie, meaning it's on its way out ππbusyworkersβ similar toworkers, but it only outputs a line for each busy worker. andbusyslavesis a deprecated synonym for this command too.workerinfonβ displays information about worker numbern.slaveinfois a deprecated synonym for this command.rereadβ forcesmimedefang-multiplexorto kill all idle workers, and to terminate and restart busy workers when they become idle. basically it forces a reread of the filter rules. π₯msgsβ prints the total number of messages scanned since the multiplexor started.
π ADDITIONAL COMMANDS π
plot twist: you can supply any other command and arguments to md-mx-ctrl. here's the move β it percent-encodes each command-line argument, glues all the encoded arguments together with a single space between each one, and sends the result to the multiplexor as a command. this lets you send arbitrary commands to your Perl workers. for the extra details, go peek at the section "EXTENDING MIMEDEFANG" in mimedefang-filter(5). π«Ά
π PERMISSIONS π
md-mx-ctrl uses the multiplexor's socket, so yeah β it probably needs to be run as root, or as the same user as mimedefang-multiplexor. sorry babes, that's just how the socket rolls π
(part 1 done, but bestie we are NOT done β more coming)
β¨ AUTHOR β¨
md-mx-ctrl was written by Dianne Skoll <dfs@roaringpenguin.com> π like, actual icon behaviour, we stan. π«Ά
The mimedefang home page lives at https://www.mimedefang.org/ β go peek, it's giving main character energy fr fr. πβ¨
π¦ SEE ALSO π¦
Like, the whole mimedefang cinematic universe is right there bestie, go read them all π π
okay and that's a wrap onMD-MX-CTRL(8)π this page comes from the 4th Berkeley Distribution, dated 8 February 2005, and it's theMD-MX-CTRL(8)manual page β like, vintage but make it iconic. πΈ no cap, you're fully caught up now, go control some multiplexors. mwah πβ¨
π¦ where this page comes from
- epel 10: mimedefang 3.7.1-1.el10_3 Β· GPL-2.0-only AND GPL-2.0-or-later
- epel 9: mimedefang 3.7.1-1.el9 Β· GPL-2.0-only AND GPL-2.0-or-later
- fedora 43: mimedefang 3.7.1-1.fc43 Β· GPL-2.0-only AND GPL-2.0-or-later
- fedora 44: mimedefang 3.7.1-1.fc44 Β· GPL-2.0-only AND GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms