[mrtg] Newbie data analysis / script question

Dan Tappin dan.tappin at orourke-eng.com
Thu Jul 29 18:56:55 MEST 2004


I have a system with a high speed satellite connection.  The ISP provides a handy local webpage with spits out various stats on the
system.  A curl of the page results in a plain html page with following data that I want to use via MRTG:

Signal Strength.............. 80      Stream Msg-Ackd/Nakd........ 824997/34
Flags............... 0x00000020       NonStream Msg-Ackd/Nakd..... 4123/119
UpTime (d:h:m:s).. 001:14:53:52       Aloha Starts................ 4123
The Sequencer Timeout........ 0       Ranging Starts.............. 0
Transport Alarm Bit.......... None    Frames Received............. 12356891
Addresses Open............... 7       Frame Errors: CRC/Bad Key... 0/0
Carrier Info........ 091:W:1350       Miscellaneous Problems...... 1
Rate Code.................... 2       No Receive Outroute Lock.... 10
Inroute Group................ 5       No FLL Lock................. 237
Inroute...................... 13      No Network Timing Sync...... 56

For example I would like to plot 'Signal Strength' so I need to awk / cut / grep / sed etc this file and spit out the required data
for MRTG in this case it would be: 80 80

The first part is easy:

curl http://myurl | grep "Signal Strength" which will get the line containing my required data.  From here I am lost.

Can someone please take pity on me and give me an example of a script that can do this.

Thanks,

Dan

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list