[ man7.org ](../../../index.html) > Linux > [ man-pages ](../index.html) |  [ Linux/UNIX system programming training ](http://man7.org/training/)  
---|---  
  
* * *

#  pcp-geolocate(1) — Linux manual page

NAME  |  SYNOPSIS  |  DESCRIPTION  |  METRIC LABELS  |  PCP ENVIRONMENT  |  SEE ALSO  |  COLOPHON   
---  
|  
      
    
    _PCP-GEOLOCATE_(1)         General Commands Manual        _PCP-GEOLOCATE_(1)
    

##  NAME  top

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

##  SYNOPSIS  top

    
    
           **pcp geolocate**
    

##  DESCRIPTION  top

    
    
           **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)](../man1/systemd.1.html) service unit file for this command provides
           an automated location discovery for PCP metric labels.
    

##  METRIC LABELS  top

    
    
           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)](../man1/pmcd.1.html),
           [pminfo(1)](../man1/pminfo.1.html), [pmlogger(1)](../man1/pmlogger.1.html) and [pmLookupLabels(3)](../man3/pmLookupLabels.3.html) manual entries.
    

##  PCP ENVIRONMENT  top

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

##  SEE ALSO  top

    
    
           [PCPIntro(1)](../man1/PCPIntro.1.html), [pmcd(1)](../man1/pmcd.1.html), [pminfo(1)](../man1/pminfo.1.html), [pmseries(1)](../man1/pmseries.1.html), [pmlogger(1)](../man1/pmlogger.1.html),
           [systemd(1)](../man1/systemd.1.html), [pmLookupLabels(3)](../man3/pmLookupLabels.3.html), [pcp.conf(5)](../man5/pcp.conf.5.html) and [pcp.env(5)](../man5/pcp.env.5.html).
    

##  COLOPHON  top

    
    
           This page is part of the _PCP_ (Performance Co-Pilot) project.
           Information about the project can be found at 
           â¨<http://www.pcp.io/>â©.  If you have a bug report for this manual
           page, send it to pcp@groups.io.  This page was obtained from the
           project's upstream Git repository
           â¨<https://github.com/performancecopilot/pcp.git>â© on 2023-12-22.
           (At that time, the date of the most recent commit that was found
           in the repository was 2023-12-16.)  If you discover any rendering
           problems in this HTML version of the page, or you believe there
           is a better or more up-to-date source for the page, or you have
           corrections or improvements to the information in this COLOPHON
           (which is _not_ part of the original manual page), send a mail to
           man-pages@man7.org
    
    Performance Co-Pilot               PCP                  _PCP-GEOLOCATE_(1)
    

* * *

* * *

HTML rendering created 2023-12-22 by [ Michael Kerrisk ](https://man7.org/mtk/index.html) , author of