get-wgt624-status - Gets a status element from a Netgear WGT624 router by parsing the HTML status page.
The following will print out a status element from the router:
get-wgt624-status --username username --password password --address router_address --element element
Note that this is very insecure because anyone who can list the processes currently running on your computer can see your password!
To get the status from the router without having to enter your password on the command line, try the following:
get-wgt624-status --username username --pwprompt --address router_address --element element
Use the following to print this usage summary:
Use the following to print the full program documentation:
This program can be used to query Netgear's 108 Mbps Wireless Firewall Router, model WGT624 router for various statistics from the command line. It was originally written because the WGT624 is unable to be queried via SNMP, which makes it less than ideal for many environments. Rather than spending more money on an SNMP device, I wrote this script to provide a subset of the functionaliity that SNMP would offer. Specifically, this program is currently able to list a number of elements about the utilization of the WGT624, as listed in the section "LISTABLE ELEMENTS FROM WGT624" of this document.
get-wgt624-status is useful for outputting information to shell scripts, or to programs like rrdtool and cacti for graphing.
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.
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-status --username admin --password p4ssword --address 192.168.0.1 --element WLAN_RxRate
The perldoc for Netgear::WGT624.
get-wgt624-status was written by Justin S. Leitgeb <email@example.com>. The author's home page is at http://justin.phq.org/.
This program is made available under the Artistic license, see the README file in the package with which it was distributed for more information.
get-wgt624-status 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.