gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using SNMP...


From: David Taylor
Subject: Re: Using SNMP...
Date: Mon, 30 Jan 2023 11:00:20 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 30/01/2023 02:03, Gary E. Miller wrote:
Yo David!

On Sun, 29 Jan 2023 06:38:55 +0000
David Taylor<davidtaylor@writeme.com>  wrote:

Perhaps I should have written 3.25.1~dev, that's what cgps tells me.

    cgps: 3.25.1~dev (revision release-3.23.1-897-gadcab3c2a)
That I beleive.

I did no special configuration of snmpd
snmpget, snmpwalk, etc talk to snmpd, and snmp talks to gpsd bu way
of gpssnmp, which you configure in your snmp.conf.  As shown on the
gpssnmp man page:

        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



What
should I have done?
What the man page (above) says to do.

Here are the results from the tests you suggested:

pi@RasPi-23:~ $ snmpgetnext -v 2c localhost -c public
.1.3.6.1.4.1.59054.3.2.1.1 iso.3.6.1.6.3.1.1.6.1.0 = INTEGER:
1952941162
That only works if you did the gpssnmp configuration above.
pi@RasPi-23:~ $ snmpwalk  -v 2c localhost -c public gpsd
gpsd: Unknown Object Identifier (Sub-id not found: (top) -> gpsd)
pi@RasPi-23:~ $ snmpwalk  -On -v 2c localhost -c public gpsd
gpsd: Unknown Object Identifier (Sub-id not found: (top) -> gpsd)
You also forgot to install the GPSD-MIB.  Where it goes is system
dependent.  On Gentoo it goes here:
        /usr/share/snmp/mibs/GPSD-MIB

RGDS
GARY

Many thanks, Gary.

This is the first time I have dealt with MIB files directly, so I was unaware of the need to edit /etc/snmp/snmp.conf. On the Raspberry Pi this required removing an "mib :" entry, and adding a pointer to the GPS file:

  mibfile /usr/local/share/snmp/mibs/gpsd/GPSD-MIB

On the RPi OS most MIB files are elsewhere.

I was unaware of the need to add the pass command:

  pass .1.3.6.1.4.1.59054  /usr/local/bin/gpssnmp

Having done that, I was delighted to get the set of data:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GPSD-MIB::skyNumber = INTEGER: 1
GPSD-MIB::skyIndex.1 = INTEGER: 1
GPSD-MIB::skyPath.1 = STRING: /dev/ttyAMA0
GPSD-MIB::skynSat.1 = INTEGER: 28
GPSD-MIB::skyuSat.1 = INTEGER: 14
GPSD-MIB::skySNRavg.1 = INTEGER: 1600
GPSD-MIB::skyGdop.1 = INTEGER: 160
GPSD-MIB::skyHdop.1 = INTEGER: 75
GPSD-MIB::skyPdop.1 = INTEGER: 142
GPSD-MIB::skyTdop.1 = INTEGER: 73
GPSD-MIB::skyVdop.1 = INTEGER: 121
GPSD-MIB::skyXdop.1 = INTEGER: 51
GPSD-MIB::skyYdop.1 = INTEGER: 54
GPSD-MIB::tpvLeapSeconds = INTEGER: 18
GPSD-MIB::tpvNumber = INTEGER: 1
GPSD-MIB::tpvIndex.1 = INTEGER: 1
GPSD-MIB::tpvPath.1 = STRING: /dev/ttyAMA0
GPSD-MIB::tpvMode.1 = INTEGER: 3
GPSD-MIB::tpvStatus.1 = INTEGER: 0
GPSD-MIB::tpvLatitude.1 = INTEGER: 559xxxxxx
GPSD-MIB::tpvLongitude.1 = INTEGER: -32xxxxxx
GPSD-MIB::tpvAltHAE.1 = INTEGER: 2354010
GPSD-MIB::tpvAltMSL.1 = INTEGER: 1855800
GPSD-MIB::tpvClimb.1 = INTEGER: -730
GPSD-MIB::tpvTrack.1 = INTEGER: 3530210
GPSD-MIB::tpvSpeed.1 = INTEGER: 360
GPSD-MIB::tpvEpc.1 = INTEGER: 1010000
GPSD-MIB::tpvEph.1 = INTEGER: 375000
GPSD-MIB::tpvEps.1 = INTEGER: 1588000
GPSD-MIB::tpvEpt.1 = INTEGER: 50000
GPSD-MIB::tpvEpv.1 = INTEGER: 512500
GPSD-MIB::tpvEpx.1 = INTEGER: 706800
GPSD-MIB::tpvEpy.1 = INTEGER: 815199
GPSD-MIB::tpvTime.1 = STRING: 2023-01-30T10:26:22.000Z
GPSD-MIB::verRelease = STRING: 3.25.1~dev
GPSD-MIB::verRevision = STRING: release-3.23.1-897-gadcab3c2a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'll be testing those out in due course.

Thanks again,
David
--
SatSignal Software - Quality software for you
Web: https://www.satsignal.eu
Email: david-taylor@blueyonder.co.uk
Twitter: @gm8arv




reply via email to

[Prev in Thread] Current Thread [Next in Thread]