gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] strange - currently only few satellites


From: David J Taylor
Subject: Re: [gpsd-users] strange - currently only few satellites
Date: Mon, 11 Apr 2016 08:54:36 +0100

Dear David,

This is actually a nice idea to feed MRTG with satellites numbers.
MRTG is running all 5 minutes typically. So it would be nice to have
an average number of satellites of the last 5 minutes instead of
just the value when MRTG is executed.

I setup several MRTG's in the past but always reading the values
with SNMP. No idea how to read data in a different way.

This simple script below would just print out the number of
available satellites at moment when it's started.

gpspipe -r | egrep --line-buffered  'GPGSA' | head -1 | gawk  '-F,' '
{
 CNT=0 ;
 if ( $1 ~  /GPGSA/ ) {
   for (i = 1; i <= NF; i++) {
     if ( $i != "" ) {
       CNT++ ;
     } ;
   } ;
   print ( CNT - 6 ) ;
 } ;
}'

Kind regards
Hans
==============================

Thanks for that, Hans.  I'm also using it via SNMP with a "pass" command.

Are you sure that 6 is the correct number to subtract? With cgps -s I see 11 satellites, and without subtracting anything from CNT I get a response of 11 or 12. Seems a little hit and miss!

Cheers,
David
--
SatSignal Software - Quality software written to your requirements
Web: http://www.satsignal.eu
Email: address@hidden
Twitter: @gm8arv



reply via email to

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