'\" t .\" Title: gpssnmp .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.18 .\" Date: 2023-01-10 .\" Manual: GPSD Documentation .\" Source: GPSD Version 3.25 .\" Language: English .\" .TH "GPSSNMP" "1" "2023-01-10" "GPSD Version 3.25" "GPSD Documentation" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" gpssnmp \- SNMP helper client for gpsd .SH "SYNOPSIS" .sp \fBgpssnmp\fP [OPTIONS] [server[:port[:device]]] .sp \fBgpssnmp\fP \-h .sp \fBgpssnmp\fP \-g OID .sp \fBgpssnmp\fP \-n OID .sp \fBgpssnmp\fP \-p .sp \fBgpssnmp\fP \-V .SH "DESCRIPTION" .sp \fBgpssnmp\fP is a \fBgpsd\fP client that works as an SNMP helper for \fBMRTG\fP. .sp \fBgpssnmp\fP does not require root privileges. It will also run fine as root. .sp \fBgpssnmp\fP can act as an agent to \fBsnmpd\fP in \fIpass\fP mode or in \fIpass_persist\fP mode. So it can be used to extend \fBsnmpd\fP with the \fBGPSD\-MIB\fP. Given the nature of the \fBSNMP\fP protocol, do not expect good latency. Data from different epochs may be mixed up together. .if n .sp .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 .B Note .ps -1 .br .sp 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). .sp .5v .RE .SH "OPTIONS" .sp \fB\-?\fP, \fB\-h\fP, \fB\-\-help\fP .RS 4 Print a summary of options and then exit. Use with "\-D 1" to see valid OID values. Use with "\-D 2" to see valid OID values with scale values and descriptions. .RE .sp \fB\-g OID\fP .RS 4 Get the specified OID. .RE .sp \fB\-n OID\fP .RS 4 Get the next OID starting at OID. .RE .sp \fB\-p\fP, \fB\-\-persist\fP .RS 4 Enter \fIpass_persist\fP mode. This allows better performance when used as an agent for the \fBsnmpd\fP daemon. See the snmpd.conf man page for details. .RE .sp \fB\-V\fP, \fB\-\-version\fP .RS 4 Print the package version and exit. .RE .SH "EXAMPLES:" .sp To get the number of saltellits seen with the OID .sp .if n .RS 4 .nf .fam C $ 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 .fam .fi .if n .RE .sp To get the number of saltellits seen with the MIB name .sp .if n .RS 4 .nf .fam C $ gpssnmp \-g skynSat.1 .1.3.6.1.4.1.59054.11.2.1.3.1 INTEGER 15 .fam .fi .if n .RE .SS "Connecting to snmpd" .sp \fBgpssnmp\fP can work as a "pass\-through script" with \fBsnmpd\fP. To enable this functionality on an already working snmpd installation, add this to your \fBsnmpd.conf\fP file, and then restart \fBsnmpd\fP: .sp .if n .RS 4 .nf .fam C # 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 .fam .fi .if n .RE .sp You can then query the number of satlettites in use this way: .sp .if n .RS 4 .nf .fam C $ snmpget \-c public \-v 2c localhost skynSat.1 GPSD\-MIB::skynSat.1 = INTEGER: 16 .fam .fi .if n .RE .sp Dump the entire "sky" OID this way: .sp .if n .RS 4 .nf .fam C $ 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 .fam .fi .if n .RE .sp Dump the entire GPSD\-MIB this way: .sp .if n .RS 4 .nf .fam C $ snmpwalk \-c public \-v 2c localhost gpsd GPSD\-MIB::tpvLeapSeconds = INTEGER: 18 GPSD\-MIB::tpvNumber = INTEGER: 1 GPSD\-MIB::tpvIndex.1 = INTEGER: 1 [...] .fam .fi .if n .RE .sp \fBgpssnmp\fP supports the \fIpass_persist\fP mode of snmpd. To have \fBsnmpd\fP use \fBgpssnmp\fP in this mode put this in your \fIsnmpd.conf\fP file: .sp .if n .RS 4 .nf .fam C pass_persist .1.3.6.1.4.1.59054 /usr/local/bin/gpssnmp \-\-persist .fam .fi .if n .RE .SH "RETURN VALUES" .sp \fB0\fP .RS 4 on success. .RE .sp \fB1\fP .RS 4 on failure .RE .SH "SEE ALSO" .sp \fBcgps\fP(1), \fBgps\fP(1), \fBgpspipe\fP(1), \fBsnmpget\fP(1), \fBsnmpwalk\fP(1), \fBxgps\fP(1) .sp \fBsnmpd.conf\fP(5) .sp \fBgpsd\fP(8), \fBsnmpd\fP(8) .SH "RESOURCES" .sp \fBProject web site:\fP \c .URL "https://gpsd.io/" "" "" .SH "COPYING" .sp This file is Copyright 2022 by the GPSD project .br SPDX\-License\-Identifier: BSD\-2\-clause