table of contents
GPSSNMP(1) | GPSD Documentation | GPSSNMP(1) |
NAME¶
gpssnmp - SNMP helper client for gpsd
SYNOPSIS¶
gpssnmp [OPTIONS] [server[:port[:device]]]
gpssnmp -h
gpssnmp -g OID
gpssnmp -n OID
gpssnmp -p
gpssnmp -V
NOTE¶
Eurolinux support for this package is limited. %{note2}
DESCRIPTION¶
gpssnmp is a gpsd client that works as an SNMP helper for MRTG.
gpssnmp does not require root privileges. It will also run fine as root.
gpssnmp can act as an agent to snmpd in pass mode or in pass_persist mode. So it can be used to extend snmpd with the GPSD-MIB. Given the nature of the SNMP protocol, do not expect good latency. Data from different epochs may be mixed up together.
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).
OPTIONS¶
-?, -h, --help
-g OID
-n OID
-p, --persist
-V, --version
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 enable this functionality on an already working snmpd installation, add this to your snmpd.conf file, and then restart snmpd:
# be sure SNMPv2 community "public" can access all MIBs: rocommunity public localhost # configure pass-thur of GPSD-MIB to gpssnmp pass .1.3.6.1.4.1.59054 /usr/local/bin/gpssnmp
You can then query the number of satlettites in use this way:
$ snmpget -c public -v 2c localhost skynSat.1 GPSD-MIB::skynSat.1 = INTEGER: 16
Dump the entire "sky" OID this way:
$ 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 this way:
$ snmpwalk -c public -v 2c localhost gpsd GPSD-MIB::tpvLeapSeconds = INTEGER: 18 GPSD-MIB::tpvNumber = INTEGER: 1 GPSD-MIB::tpvIndex.1 = INTEGER: 1 [...]
gpssnmp supports the pass_persist mode of snmpd. To have snmpd use gpssnmp in this 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
1
SEE ALSO¶
cgps(1), gps(1), gpspipe(1), snmpget(1), snmpwalk(1), xgps(1)
RESOURCES¶
Project web site: <https://gpsd.io/>
COPYING¶
This file is Copyright 2022 by the GPSD project
SPDX-License-Identifier: BSD-2-clause
2023-01-10 | GPSD Version 3.25 |