1GPSSNMP(1)                    GPSD Documentation                    GPSSNMP(1)
2
3
4

NAME

6       gpssnmp - SNMP helper client for gpsd
7

SYNOPSIS

9       gpssnmp [OPTIONS] [server[:port[:device]]]
10
11       gpssnmp -h
12
13       gpssnmp -g OID
14
15       gpssnmp -n OID
16
17       gpssnmp -p
18
19       gpssnmp -V
20

DESCRIPTION

22       gpssnmp is a gpsd client that works as an SNMP helper for MRTG.
23
24       gpssnmp does not require root privileges. It will also run fine as
25       root.
26
27       gpssnmp can act as an agent to snmpd in pass mode or in pass_persist
28       mode. So it can be used to extend snmpd with the GPSD-MIB. Given the
29       nature of the SNMP protocol, do not expect good latency. Data from
30       different epochs may be mixed up together.
31
32           Note
33           this program is new in version 3.24.1 and will be subject to change
34           for a few revisions. Consider it a Work In Progress (WIP).
35

OPTIONS

37       -?, -h, --help
38           Print a summary of options and then exit. Use with "-D 1" to see
39           valid OID values. Use with "-D 2" to see valid OID values with
40           scale values and descriptions.
41
42       -g OID
43           Get the specified OID.
44
45       -n OID
46           Get the next OID starting at OID.
47
48       -p, --persist
49           Enter pass_persist mode. This allows better performance when used
50           as an agent for the snmpd daemon. See the snmpd.conf man page for
51           details.
52
53       -V, --version
54           Print the package version and exit.
55

EXAMPLES:

57       To get the number of saltellits seen with the OID
58
59              $ gpssnmp -g .1.3.6.1.4.1.59054.11.2.1.3.1
60              .1.3.6.1.4.1.59054.11.2.1.3.1
61              INTEGER
62              15
63
64       To get the number of saltellits seen with the MIB name
65
66              $ gpssnmp -g skynSat.1
67              .1.3.6.1.4.1.59054.11.2.1.3.1
68              INTEGER
69              15
70
71   Connecting to snmpd
72       gpssnmp can work as a "pass-through script" with snmpd. To enable this
73       functionality on an already working snmpd installation, add this to
74       your snmpd.conf file, and then restart snmpd:
75
76           # be sure SNMPv2 community "public" can access all MIBs:
77           rocommunity public  localhost
78
79           # configure pass-thur of GPSD-MIB to gpssnmp
80           pass .1.3.6.1.4.1.59054  /usr/local/bin/gpssnmp
81
82       You can then query the number of satlettites in use this way:
83
84           $ snmpget -c public -v 2c localhost skynSat.1
85           GPSD-MIB::skynSat.1 = INTEGER: 16
86
87       Dump the entire "sky" OID this way:
88
89           $ snmpwalk -c public -v 2c localhost GPSD-MIB::sky
90           GPSD-MIB::skynSat.1 = INTEGER: 17
91           GPSD-MIB::skyuSat.1 = INTEGER: 8
92           GPSD-MIB::skySNRavg.1 = INTEGER: 2000
93
94       Dump the entire GPSD-MIB this way:
95
96           $ snmpwalk -c public -v 2c localhost gpsd
97           GPSD-MIB::tpvLeapSeconds = INTEGER: 18
98           GPSD-MIB::tpvNumber = INTEGER: 1
99           GPSD-MIB::tpvIndex.1 = INTEGER: 1
100           [...]
101
102       gpssnmp supports the pass_persist mode of snmpd. To have snmpd use
103       gpssnmp in this mode put this in your snmpd.conf file:
104
105           pass_persist .1.3.6.1.4.1.59054  /usr/local/bin/gpssnmp --persist
106

RETURN VALUES

108       0
109           on success.
110
111       1
112           on failure
113

SEE ALSO

115       cgps(1), gps(1), gpspipe(1), snmpget(1), snmpwalk(1), xgps(1)
116
117       snmpd.conf(5)
118
119       gpsd(8), snmpd(8)
120

RESOURCES

122       Project web site: https://gpsd.io/
123

COPYING

125       This file is Copyright 2022 by the GPSD project
126       SPDX-License-Identifier: BSD-2-clause
127
128
129
130GPSD Version 3.25                 2023-01-10                        GPSSNMP(1)
Impressum