GPSSNMP(1)
π NAME π
gpssnmp β the SNMP helper client for gpsd π°οΈβ¨
π SYNOPSIS π
gpssnmp [OPTIONS] [server[:port[:device]]]
gpssnmp -h
gpssnmp -g OID
gpssnmp -n OID
gpssnmp -p
gpssnmp -V
β¨ DESCRIPTION β¨
okay so bestie, gpssnmp is a gpsd client that is also an SNMP helper for MRTG. double duty, main character energy, we love to see it π
good news: gpssnmp does not need root privileges. and if you do run it as root? it will also run totally fine. no drama, no complaints π«Ά
here's the fun part: gpssnmp can act as an agent to snmpd in pass mode or in pass_persist mode. so you can use it to extend snmpd with the GPSD-MIB. iconique πΈ
β οΈ but lowkey, given the nature of the SNMP protocol, do not expect good latency. data from different epochs may be mixed up together. that's just how it is, no cap π
π Note this program is new in version 3.24.1 and will be subject to change for a few revisions. consider it a Work In Progress (WIP). it's giving "baby of the family" πΌ
π OPTIONS π
-?,-h,--helpβ prints a summary of the options and then dips out. pro tip: use it with-D 1to see the valid OID values, or with-D 2to see valid OID values plus their scale values and descriptions. the lore goes deep π-g OIDβ get the OID you specified. just the one. go get it π-n OIDβ get the next OID, starting at OID. onward and upward π¦-p,--persistβ enterpass_persistmode. this gives you better performance when you're using it as an agent for thesnmpddaemon. check thesnmpd.confman page for the details, iykyk π-V,--versionβ print the package version and exit. short, sweet, iconic β¨
π EXAMPLES: π
to get the number of saltellits seen with the OID:
$ gpssnmp -g .1.3.6.1.4.1.59054.11.2.1.3.1
.1.3.6.1.4.1.59054.11.2.1.3.1
INTEGER
15
to get the number of saltellits seen with the MIB name:
$ gpssnmp -g skynSat.1
.1.3.6.1.4.1.59054.11.2.1.3.1
INTEGER
15
π Connecting to snmpd π
gpssnmp can work as a "pass-through script" with snmpd. to turn this on for an snmpd installation that's already working, add this to your snmpd.conf file, then restart snmpd:
# be sure SNMPv2 community "public" can access all MIBs:
rocommunity public localhost
# configure pass-through of GPSD-MIB to gpssnmp
pass .1.3.6.1.4.1.59054 /usr/local/bin/gpssnmp
then you can query the number of satlettites in use like this:
$ snmpget -c public -v 2c localhost skynSat.1
GPSD-MIB::skynSat.1 = INTEGER: 16
dump the entire "sky" OID like this:
$ snmpwalk -c public -v 2c localhost GPSD-MIB::sky
GPSD-MIB::skynSat.1 = INTEGER: 17
GPSD-MIB::skyuSat.1 = INTEGER: 8
GPSD-MIB::skySNRavg.1 = INTEGER: 2000
dump the entire GPSD-MIB like this:
$ snmpwalk -c public -v 2c localhost gpsd
GPSD-MIB::tpvLeapSeconds = INTEGER: 18
GPSD-MIB::tpvNumber = INTEGER: 1
GPSD-MIB::tpvIndex.1 = INTEGER: 1
[...]
and gpssnmp supports the pass_persist mode of snmpd too π«Ά. to have snmpd use gpssnmp in that mode, put this in your snmpd.conf file:
pass_persist .1.3.6.1.4.1.59054 /usr/local/bin/gpssnmp --persist
π RETURN VALUES π
0β on success. slay β1β on failure. π
π SEE ALSO π
cgps(1), gps(1), gpspipe(1), snmpget(1), snmpwalk(1), xgps(1)
πΈ RESOURCES πΈ
Project web site: https://gpsd.io/
π COPYING π
SPDX-FileCopyrightText: The GPSD project
SPDX-FileType: DOCUMENTATION
SPDX-License-Identifier: BSD-2-clause
and that's the whole page bestie!! this one came straight from the GPSD Documentation, stamped GPSD Version 3.27.5 and dated 2025-11-04 β so if you're reading this later and something's changed, that's on the future, not on us π β¨π¦
π¦ where this page comes from
- arch rolling: gpsd 3.27.5-1 Β· BSD
- fedora 44: gpsd-clients 1:3.27.5-3.fc44 Β· BSD-2-Clause
- fedora 44: gpsd-clients 1:3.27.5-5.fc44 Β· BSD-2-Clause
- nixos 26.05: gpsd 3.27.5
- nixpkgs unstable: gpsd 3.27.5
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gpsd-clients 3.27.5-160000.1.1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms