PMDAMAILQ(1)

πŸ’Œ NAME πŸ’Œ

okay bestie, meet pmdamailq β€” the mail queue performance metrics domain agent, aka a PMDA. that's the whole vibe, no notes. this is the PMDAMAILQ(1) page from the General Commands Manual, and yes we're reading it together, bestie behavior only πŸ’…βœ¨


🌸 SYNOPSIS 🌸

$PCP_PMDAS_DIR/mailq/pmdamailq [-b binlist] [-D debug] [-d domain] [-l logfile] [-r regex] [-U username] [queuedir]

πŸ¦‹ DESCRIPTION πŸ¦‹

so pmdamailq is a Performance Metrics Domain Agent (PMDA), and what it does is extract performance metrics describing the state of the e-mail queues managed by sendmail(1) and other mail transfer agents. it's giving surveillance but make it ✨useful✨.

the mailq PMDA exports metrics that measure the total number of entries in the mail queue, plus the subtotals for entries that have been queued for various time periods. basically: how many mails are stuck, and exactly how stuck they are 🫢

a brief description of the pmdamailq command line options follows β€” lowkey this is the important part, don't skip it:

  • -b binlist β€” the binlist argument specifies a list of delay thresholds used to "bin" the entries in the queue into a histogram, based on how long the entry has been in the mail queue. the default thresholds are: 1 hour, 4 hours, 8 hours, 1 day, 3 days and 7 days. the entries in binlist are comma separated time intervals, using the syntax described in PCPIntro(1) for an update or reporting interval, e.g. the default list could be specified using the value 1hr,4hrs,8hrs,1day,3days,7days.

values in binlist are assumed to be in ascending order, and mail items in the queue less than the first threshold are binned into a special bin labeled recent. cute little bin for the babies πŸŽ€

  • -d domain β€” it is absolutely crucial that the performance metrics domain number specified here is unique and consistent. that is, domain should be different for every PMDA on the one host, and the same domain number should be used for the same PMDA on all hosts. do not play with this one fr fr 😭
  • -l logfile β€” location of the log file. by default, a log file named mailq.log is written in the current directory of pmcd(1) when pmdamailq is started, i.e. $PCP_LOG_DIR/pmcd. if the log file cannot be created or is not writable, output is written to the standard error instead.
  • -r regex β€” use an extended regular expression to match file names in the mail queue directory, rather than assuming all df prefixed files in the directory are mail files (the df prefix is the sendmail convention, but this convention is not followed by other mail daemons). the regex pattern specified should conform to the POSIX format described in regex(3), and it describes file names that should be considered mail.
  • -U username β€” user account under which to run the agent. the default is the unprivileged pcp account in current versions of PCP, but in older versions the superuser account (root) was used by default. glow-up era for real πŸ‘‘

the optional queuedir argument defines the directory in which pmdamailq expects to find the mail queue. the default is /var/spool/mqueue.


✨ INSTALLATION ✨

if you want access to the names, help text and values for the mailq performance metrics, do the following as root:

# cd $PCP_PMDAS_DIR/mailq
# ./Install

if you want to undo the installation, do the following as root:

# cd $PCP_PMDAS_DIR/mailq
# ./Remove
⚠️ pmdamailq is launched by pmcd(1) and should never be executed directly. the Install and Remove scripts notify pmcd(1) when the agent is installed or removed. do not freelance on this one bestie, it's not giving main character energy, it's giving broken monitoring πŸ’€

πŸŽ€ FILES πŸŽ€

  • $PCP_PMCDCONF_PATH β€” command line options used to launch pmdamailq
  • $PCP_PMDAS_DIR/mailq/help β€” default help text file for the mailq metrics
  • $PCP_PMDAS_DIR/mailq/Install β€” installation script for the pmdamailq agent
  • $PCP_PMDAS_DIR/mailq/Remove β€” undo installation script for the pmdamailq agent
  • $PCP_LOG_DIR/pmcd/mailq.log β€” default log file for error messages and other information from pmdamailq

🌈 PCP ENVIRONMENT 🌈

environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. on each installation, the file /etc/pcp.conf contains the local values for these variables. the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). iykyk πŸ’œ


🧚 DEBUGGING OPTIONS 🧚

the -D or --debug option enables the output of additional diagnostics on stderr to help triage problems, although the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. debug is a comma separated list of debugging options; use pmdbg(1) with the -l option to obtain a list of the available debugging options and their meaning. not me reading cryptic dev output at 3am πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

PCPIntro(1), pmcd(1), pcp.conf(5) and pcp.env(5).


and that's the page bestie!! πŸ’– brought to you by Performance Co-Pilot β€” the PCP crew β€” on the PMDAMAILQ(1) tip. go forth, watch those queues, and slay. periodt. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from