PMSNAP(1)
π PMSNAP β pmsnap(1) π
okay bestie, welcome to pmsnap from the General Commands Manual section, she's giving performance-summary-snapshot-icon and she's about to eat π
β¨ NAME β¨
pmsnap β generate performance summary snapshot images π
πΈ SYNOPSIS πΈ
$PCP_BINADM_DIR/pmsnap [-NV?] [-c configs] [-C dir] [-f format] [-n
names] [-o dir]
π¦ DESCRIPTION π¦
so pmsnap is a shell script, and no cap, she's the kind of script that just lives in your crontab(1) and runs periodically to make graphic images out of pmchart(1) performance charts β¨ Those images can be in any of the pmchart formats she supports, including png, bmp, and jpeg, and you can absolutely fold them into whatever your local web server is serving up. By default though? pmsnap says nothing. Zero textual output, unless some error or warning condition pops up. she's lowkey mysterious like that π
pmsnap generates images according to its control file, $PCP_PMSNAPCONTROL_PATH (or dir/control if you passed the -C option), and she uses archives created by pmlogger(1) or PCP archive folios created by pmafm(1) and pmlogger_check(1). And listen β before you even think about configuring pmsnap, it is strongly recommended that you configure pmlogger first, following the descriptions in pmlogger_daily(1), pmlogger_check(1) and pmlogger(1). like, do the homework first, bestie π
Once pmlogger is configured, you configure pmsnap like this:
- Edit the control file
$PCP_PMSNAPCONTROL_PATH. The syntax of this file is described in the comment at the head of the file, and an example is supplied for one and twelve hour "Summary" performance charts for the local host. Suitable arguments forpmchartare also described in the comment. The user should consultpmchartfor further details. π Note that whenpmsnapis run, it globally substitutes the stringLOCALHOSTNAMEwith the name of the local host in the control file. - Test the configuration by running
$PCP_BINADM_DIR/pmsnap
Without any arguments pmsnap will process every non-comment line in $PCP_PMSNAPCONTROL_PATH. The output images will be placed in the files named in the first field of each line in the control file, with the file format appended if necessary. If these file names do not start with / or . then they are assumed relative to dir, as specified with the -o option. The default dir is the current directory. π«Ά
Note that ifpmloggerhas only been recently started (within about the last 15 minutes), snapshot images may not be produced and no error messages will be issued β the reason is thatpmchartcan not use very short archives and hence, neither canpmsnap. For debugging purposes the-Vflag should be used. π (not the silent failure, bestie, use-V.)
- Add an appropriate entry for
pmsnapin the root user'scrontab. An example is supplied in$PCP_VAR_DIR/config/pmlogger/crontab. π - Incorporate the
pmsnapimages into the local WWW content. Usually, WWW pages use images that are relative to a particular document root, so it is often convenient to use the-ocommand line option to specify a sub-directory of the local WWW content, and then create a web page in this directory that shows the snapshot images with text and other content appropriate to the local environment. π
A sample HTML page, suitable for the Summary snapshot, may be found in $PCP_VAR_DIR/config/pmsnap/Summary.html. π§
Although pmsnap attempts to flush stdio(3) output buffers in the relevant pmlogger processes before generating snapshots images, this may fail for assorted reasons and no error message will be given. π
pmsnapshould not be invoked immediately afterpmlogger_dailyhas rolled the logs because the new archives will be too short to obtain meaningful results. Note however thatpmsnapwill not report errors frompmchartabout not being able to comply with the-Aoption on very short archives. In these cases no error will be reported and no output images will be produced. like... nothing. silence. the void. π³οΈ
π OPTIONS π
The available command line options are:
-cconfig-pattern β Only process lines in the control file which match the config-pattern regular expression in theConfigcolumn.-Cdir β The control file is located in the directory dir rather than in the default$PCP_PMSNAPCONTROL_PATHlocation.-fformat β Set output image format. The defaults format ispng.-nname-pattern β Only process lines in the control file which match the name-pattern regular expression (seeegrep(1)) in theNamecolumn.-Nβ Enable ashow me'' mode, where the actions are echoed, but not executed, in the style ofmake -n''. Using-Nin conjunction with-Vmaximizes the diagnostic capabilities for debugging. π-odir β The output images having file names which do not start with/or.will be placed in a directory relative to dir, otherwise the output directory is relative to the current directory (i.e. the default value for dir is./). Note that dir must be a writable directory path and may be on an NFS or CIFS file system.-Vβ Enable verbose mode. π-?β Display usage message and exit.
When either -n or -c are used, pmsnap will only process lines in the control file which match all the supplied patterns. If no patterns are given, then all lines will be processed. These arguments allow multiple entries for pmsnap in crontab so that different performance summary images can be generated at different times or with different frequencies. periodt. π
π FILES π
$PCP_PMSNAPCONTROL_PATHβpmsnapcontrol file$PCP_VAR_DIR/config/pmsnap/Summaryβ summary view forpmchart$PCP_VAR_DIR/config/pmsnap/Summary.htmlβ sample HTML page for summary snapshot$PCP_LOG_DIR/pmlogger/<hostname>/Latestβ PCP archive folio for the host hostname, as generated bypmlogger_check$PCP_VAR_DIR/config/pmlogger/crontabβ examplecrontabentry
π SEE ALSO π
cron(1), crontab(1), egrep(1), pmafm(1), pmchart(1), pmlc(1), pmlogger(1) and pmlogger_daily(1).
and that's the whole page, bestie β this one's brought to you by Performance Co-Pilot, page PMSNAP(1), and she ate. go flush those buffers πβ¨π
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp-gui 6.3.8-1
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu questing: pcp-gui 6.3.8-1
- ubuntu resolute: pcp-gui 7.1.1-1
- ubuntu stonking: pcp-gui 7.2.1-2build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms