---
name: "pcp-geolocate"
section: "1"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pcp-geolocate"
---

# pcp-geolocate(1)

discover collector system geographical labels

## NAME

**pcp-geolocate** - discover collector system geographical labels

## SYNOPSIS

**pcp** **geolocate**

## DESCRIPTION

**pcp-geolocate** reports the latitude and longitude for the local Performance Co-Pilot collector host in JSON format. This geolocation information is sourced from the cache file *$PCP\_SYSCONF\_DIR/labels/optional/geolocate* if it exists, else an attempt is made to perform geolocation based on the host IP address, via several online sources (REST APIs).

The output from this command is suited for storing as metric labels by saving it to the cache file mentioned above.

The opt-in [**systemd**(1)](/systemd/1.md) service unit file for this command provides an automated location discovery for PCP metric labels.

## METRIC LABELS

The JSON output is the preferred format for storing geographical location as PCP metric labels. Every PCP metric available from this host will be tagged with the labels for latitude and longitude, enabling tools that make use of this such as the Grafana geomap panel.

For more information about metric labels refer to the [**pmcd**(1)](/pmcd/1.md), [**pminfo**(1)](/pminfo/1.md), [**pmlogger**(1)](/pmlogger/1.md) and [**pmLookupLabels**(3)](/pmLookupLabels/3.md) manual entries.

## 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)](/pcp.conf/5.md).

## SEE ALSO

[**PCPIntro**(1)](/PCPIntro/1.md), [**pmcd**(1)](/pmcd/1.md), [**pminfo**(1)](/pminfo/1.md), [**pmseries**(1)](/pmseries/1.md), [**pmlogger**(1)](/pmlogger/1.md), [**systemd**(1)](/systemd/1.md), [**pmLookupLabels**(3)](/pmLookupLabels/3.md), [**pcp.conf**(5)](/pcp.conf/5.md) and [**pcp.env**(5)](/pcp.env/5.md).
