wb2osz / direwolf

Dire Wolf is a software "soundcard" AX.25 packet modem/TNC and APRS encoder/decoder. It can be used stand-alone to observe APRS traffic, as a tracker, digipeater, APRStt gateway, or Internet Gateway (IGate). For more information, look at the bottom 1/4 of this page and in https://github.com/wb2osz/direwolf/blob/dev/doc/README.md
GNU General Public License v2.0
1.59k stars 307 forks source link

IGate Stats to Telemetry Data #1

Closed kernworks closed 8 years ago

kernworks commented 9 years ago

Hello.

First off, great application! I am using it as a RX IGate on a Raspberry Pi.

My question, I see that the IGate module has stat counters (line 282 to 315 in igate.c). Is there a way to send those stats along with the PBEACON of the IGate?

I see the TODO on line 284 already so I am guessing this is more of a feature request.

Thank You.

wb2osz commented 9 years ago

What would you like to see?

From: kernworks [mailto:notifications@github.com] Sent: Tuesday, August 11, 2015 12:46 PM To: wb2osz/direwolf Subject: [direwolf] IGate Stats to Telemetry Data (#1)

Hello.

First off, great application! I am using it as a RX IGate on a Raspberry Pi.

My question, I see that the IGate module has stat counters (line 282 to 315 in igate.c). Is there a way to send those stats along with the PBEACON of the IGate?

I see the TODO on line 284 already so I am guessing this is more of a feature request.

Thank You.

— Reply to this email directly or view it on GitHub https://github.com/wb2osz/direwolf/issues/1 . https://github.com/notifications/beacon/AGMul8n1sPSHAKuH9wSJkr5HmGF39LZ9ks5omh5fgaJpZM4FpnCo.gif

irl commented 8 years ago

I'd love to see similar telemetry options to aprx.

http://ham.zmailer.org/oh2mqk/aprx/aprx-manual.pdf

Per-radio-interface statistics that can be sent on the selected interface/to APRS-IS.

+1 on this feature request.

isaacbentley commented 8 years ago

+1

bradanlane commented 8 years ago

I have been playing with this idea. I coded an SBEACON option in the direwolf.conf which outputs packet stats to the internet. This way, the stats can be beaconed at its own interval..

An example beacon looks like:

2016-06-21 13:32:39 EDT: N0ABC-1>APDW13,TCPIP*,qAC,THIRD:!3850.29ND07703.33W&Statistics: RX=12345 TX=0 UP=12123 DN=0

This indicates N0ABC-1 heard 12345 packets on it's radio and after de-duplicaiton forwarded 12123 packets to the internet. Since this is an RX only iGate, 0 packets were transmitted and 0 packets were received from the internet.

Since it is its own beacon type, it can be set to its own interval such an hourly.

Is this along the lines of what people want?

Currently it is cumulative 'since last-start' of direwolf. An alternative is for the counters to be 'since last beaconing'.

I can make a PR for the changes if requested.

kernworks commented 8 years ago

That is basically what I was looking for. Awesome to see it happen.

My use for this is basically a packets per hour (or some set time period) set of counters that can be reported.

Personally, I would like counters to be set for "since last beaconing" but I could see how others may want since last start.

If you have some code to test, I'd be happy to do so. I'm running RX only as well (Raspberry Pi + SDR + Direwolf).

bradanlane commented 8 years ago

Having run this code for a week and analyzing the usefulness of the four metrics, I've concluded a few things:

  1. having the values be "since last beacon" is both more useful and significantly easier to maintain.
  2. with "since last start", there must is extra code to track the datetime in order to reset at the start of the new month (to avoid eventual overflow)
  3. the graphs I've found most useful depict the hourly traffic (I having the SBEACON set to hourly) so currently the spreadsheet is post processing the metrics to get "deltas".

I'll switch to "since last beacon", remove the datetime tracking and reset code. My current work is on the DEV branch.

I'm loath to fork the entire project for these small improvements but unless I can work with @wb2osz to get contributor status, I may not have a choice. If I do fork, I'll make it private so it doesn't wrench the Internet with people pulling from tangent repositories. I'll also delete the fork as soon as the pull-request is accepted.

dranch commented 8 years ago

The popular UIView32 APRS program has a module that beacons the # of packets in the "last 10 minutes". Now, I suppose you can tune the beacon interval to be every 10 minutes but some thought should go into this interval and how it's configured. On classic KB2KB packet networks, beacons running every 10 minutes creates a lot of unnecessary traffic but being able to send out stats data like this would be cool if done properly.

--David

On 06/27/2016 02:30 PM, bradanlane wrote:

Having run this code for a week and analyzing the usefulness of the four metrics, I've concluded a few things:

  1. having the values be "since last beacon" is both more useful and significantly easier to maintain.
  2. with "since last start", there must is extra code to track the datetime in order to reset at the start of the new month (to avoid eventual overflow)
  3. the graphs I've found most useful depict the hourly traffic (I having the SBEACON set to hourly) so currently the spreadsheet is post processing the metrics to get "deltas".

I'll switch to "since last beacon", remote the datetime tracking and reset code. My current work is on the DEV branch.

I'm loath to fork the entire project for these small improvements but unless I can work with WB2OSZ to get contributor status, I may not have a choice. If I do fork, I'll make it private so it doesn't wrench the Internet with people pulling from tangent repositories. I'll also delete the fork as soon as the pull-request is accepted.

bradanlane commented 8 years ago

In direwolf, the beacon interval is user configurable. There are currently five different beacon-types and each may be configured with its own interval. My code adds a new beacon-type ( SBEACON ) so it can be on whatever interval the operator wishes.

bradanlane commented 8 years ago

The simplified code is running on my iGate now. The statistics are sent as a beacon. The statistics counters reset after each time their data is sent as a beacon. The beacon is configured with the new beacon-type SBEACON. I have mine set to beacon every hour. This is configurable in direwolf.conf using the same syntax as the other beacon-types.

It turns out there is no way to create a private fork of a public repository. Apologies to those who would like access to the SBEACON feature. I defer to @wb2osz on how this code can be integrated into direwolf.

wb2osz commented 8 years ago

The latest version on the "dev" branch has a new IBEACON beacon type for sending IGate statistics. The format is based on existing standards and previous precedent with a couple extra values added. Details in the User Guide.

bradanlane commented 8 years ago

Thanks. I pull the latest and replace my implementation.