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 1 to see the valid OID values, or with -D 2 to 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 β€” enter pass_persist mode. this gives you better performance when you're using it as an agent for the snmpd daemon. check the snmpd.conf man 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)

snmpd.conf(5)

gpsd(8), snmpd(8)


🌸 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 πŸ’…βœ¨πŸ¦‹