NAME
get-wgt624-statistics - Gets a statistic from a Netgear WGT624 router by parsing the HTML statistics page.
SYNOPSIS
The following will print out a statistic from the router:
get-wgt624-statistics --username username --password password \ --address router_address --element element
Use the following to print this usage summary:
get-wgt624-statistics --help
Use the following to print the full program documentation:
get-wgt624-statistics --man
DESCRIPTION
This program grew out of my frustration with the lack of SNMP support on the Netgear WGT624 router. Even though it obviously a cheaper product than other Netgear devices, there should be some way of quickly getting statistics out of it, for diagnostic purposes, and for using something like MRTG or Cacti with the device.
Unfortunately, all that I was able to find was a single HTML page that listed statistics for the various devices on the router, including the WAN, WLAN and LAN interfaces. This script parses the statistics HTML page from the Netgear WGT624 router and prints out any of the values on this HTML page. The output can then be used in a program like Cacti for graph generation.
LISTABLE ELEMENTS FROM WGT624
The following may be listed in the element field for output to the console:
WAN_Status
WAN_TxPkts
WAN_RxPkts
WAN_Collisions
WAN_TxRate
WAN_RxRate
WAN_UpTime
LAN_Status
LAN_TxPkts
LAN_RxPkts
LAN_Collisions
LAN_TxRate
LAN_RxRate
LAN_UpTime
WLAN_Status
WLAN_TxPkts
WLAN_RxPkts
WLAN_Collisions
WLAN_TxRate
WLAN_RxRate
WLAN_UpTime
Only one element may be specified per command, so if you want the WLAN transmit rate and the WLAN receive rate, you will have to type two separate commands to get this information.
EXAMPLES
If your router is at address 192.168.0.1, your username for the router is "admin" and the password is "p4ssword", and you wanted to see the WLAN_RxRate, you could use the following command:
get-wgt624-statistics --username admin --password p4ssword \ --address 192.168.0.1 --element WLAN_RxRate
Of course, the "\" character indicates a continuous line and is only shown above for formatting reasons -- only do this if the shell in which you're using get-wgt624-statistics supports it.
AUTHOR INFORMATION
get-wgt624-statistics was written by Justin S. Leitgeb <justin@phq.org>. The home page for this software is http://justin.phq.org/netgear/.
COPYRIGHT
get-wgt624-statistics and related libraries are copyright 2006 Justin S. Leitgeb.
All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.