PMDASENDMAIL(1)

πŸ’Œ pmdasendmail β€” bestie edition

ok so real quick: this is the manual page for pmdasendmail, a.k.a. the sendmail Performance Metrics Domain Agent, living in section 1 of the General Commands Manual. she's a PMDA. she's iconic. let's get into it πŸ’…


✨ NAME ✨

pmdasendmail β€” sendmail performance metrics domain agent (PMDA)


🌸 SYNOPSIS 🌸

$PCP_PMDAS_DIR/sendmail/pmdasendmail [-D debug] [-d domain] [-l logfile]
[-U username]

πŸ’– DESCRIPTION πŸ’–

okay so pmdasendmail is a sendmail Performance Metrics Domain Agent (PMDA, say it with me) and what she does is export all the mail traffic statistics that sendmail(1) collects. that's her whole job. she ate.

but bestie, plot twist: before the sendmail PMDA can export literally anything, sendmail(1) has to have statistics collection enabled first. no stats, no metrics, no slay. how do you do that? you check the name of the statistics file β€” it's given by the OS or O StatusFile control lines in /etc/sendmail.cf β€” and then you create that file if it doesn't already exist. that's it. that's the vibe.

🚨 heads up: if you remove that file, you terminate statistics collection by sendmail(1), and therefore you also kill the sendmail PMDA. rip. so like... don't do that unless you mean it. 😭

a brief description of the pmdasendmail command line options follows:

  • -d β€” It is absolutely crucial that the performance metrics domain number you specify here is unique and consistent. Like, 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. no cap, this one matters.
  • -l β€” Location of the log file. By default, a log file named sendmail.log is written in the current directory of pmcd(1) when pmdasendmail 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.
  • -U β€” 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.

and here's the cute part: there are no communication options, because the Install script ensures the sendmail PMDA will be connected to PMCD by a pipe. πŸͺ„


πŸŽ€ INSTALLATION πŸŽ€

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

# cd $PCP_PMDAS_DIR/sendmail
# ./Install

and if you want to undo the installation (no judgment, we've all been there), do the following as root:

# cd $PCP_PMDAS_DIR/sendmail
# ./Remove
⚠️ real talk: pmdasendmail is launched by pmcd(1) and should never be executed directly. she does not take walk-ins. the Install and Remove scripts notify pmcd(1) when the agent is installed or removed, so let them handle it. periodt.

πŸ¦‹ FILES πŸ¦‹

  • $PCP_PMCDCONF_PATH β€” command line options used to launch pmdasendmail
  • $PCP_PMDAS_DIR/sendmail/help β€” default help text file for the sendmail metrics
  • $PCP_PMDAS_DIR/sendmail/Install β€” installation script for the pmdasendmail agent
  • $PCP_PMDAS_DIR/sendmail/Remove β€” undo installation script for the pmdasendmail agent
  • $PCP_LOG_DIR/pmcd/sendmail.log β€” default log file for error messages and other information from pmdasendmail
  • /etc/sendmail.cf β€” sendmail configuration file to identify the name of the statistics file

🌈 PCP ENVIRONMENT 🌈

so, 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. and 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 ngl, 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.

debugging options specific to pmdasendmail are as follows:

  • appl0 β€” verbose diagnostics, particularly from map_stats()

⭐ SEE ALSO ⭐

PCPIntro(1), pmcd(1) and sendmail(1).


and that's the whole page bestie!! this came to you straight from Performance Co-Pilot, aka PCP, and it's PMDASENDMAIL(1) β€” go forth and monitor those mail stats responsibly πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from