PCP-GEOLOCATE(1)
π pcp-geolocate β a Gen Z field guide π
okay bestie, welcome to pcp-geolocate, a page from the General Commands Manual section of the Performance Co-Pilot docs. it's a whole vibe and it's lowkey about finding out where in the world your collector host actually is πβ¨
πΈ NAME πΈ
pcp-geolocate β discover collector system geographical labels π
β¨ SYNOPSIS β¨
pcp geolocate
that's it. that's the whole thing. no flags, no drama, she just goes π«Ά
π¦ DESCRIPTION π¦
so here's the tea: pcp-geolocate reports the latitude and longitude for the local Performance Co-Pilot collector host, and it spits it out in JSON format. very demure, very parseable. π
where does that geolocation info come from? two possibilities, and she's got a priority order:
- the cache file
$PCP_SYSCONF_DIR/labels/optional/geolocateβ if it exists, that's the source, periodt. - if that file doesn't exist, she'll make an attempt to perform geolocation based on the host IP address, via several online sources (REST APIs). yes bestie, she's going online for this one π
the output from this command is literally made for storing as metric labels β you just save it to that cache file mentioned above and you're golden. πΎβ¨
also!! the opt-in systemd(1) service unit file for this command provides an automated location discovery for PCP metric labels. so it can just... do it for you. iconic behaviour, no notes π
π METRIC LABELS π
the JSON output is the preferred format for storing geographical location as PCP metric labels. why? because every PCP metric available from this host will be tagged with the labels for latitude and longitude β which means tools that make use of this, like the Grafana geomap panel, get to shine. ππΊοΈ
for more information about metric labels, go read the pmcd(1), pminfo(1), pmlogger(1) and pmLookupLabels(3) manual entries. iykyk, they're the receipts π
π 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. π
and the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). so if you wanna be extra, you absolutely can πββοΈ
π SEE ALSO π
PCPIntro(1), pmcd(1), pminfo(1), pmseries(1), pmlogger(1), systemd(1), pmLookupLabels(3), pcp.conf(5) and pcp.env(5).
go forth and read, bestie, the rabbit hole is deep and it's giving knowledge π
mwah, that's a wrap π«Ά this whole thing came to you straight from the Performance Co-Pilot crew, under the PCP banner β thanks for reading, you ate that π β¨
π¦ 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 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 6.3.8-1
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2022-2023 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms