Goto navigation

linksys wrt3g tools

A command line tool to get status information from a Linksys WRT3G router, reboot it and a munin plugin to track the connection state.

The routers are also known under the following names:


The tool is written in PHP, and distributed via my own PEAR channel server. Installation is easy:

$ pear channel-discover
$ pear install zz/linksys_wrt3g_tools

This should automatically download all dependencies.


The main script has been installed into your $PATH, so running linksys-wrt3g --help should give some output.

Running it without any parameters gives the default status messages:

$ linksys-wrt3g
connection: connected
type: UMTS
network: BASE DE
signal strength: excellent

Command all shows all status information one can get from the router:

$ linksys-wrt3g all
connection: connected
type: UMTS
network: BASE DE
signal strength: excellent
connection time: 91h 15m 56s
session usage: array (
  'received' => '339.57 Mbytes',
  'sent' => '39.27 Mbytes',
card model: GlobeTrotter Fusion Quad Lite
card revision: 4.1
card firmware: 1.5.5  (Date: May 17 2005, Time: 14:55:44)
IMSI: düdeldügeheimdüdeldü
router firmware: v2.01.03-EM

Rebooting is easy, too:

$ linksys-wrt3g reboot
200 Ok


The tools can be configured in three ways:

  1. Commandline options - Use --help to get an overview
  2. Environment variables
  3. User configuration file: ~/.config/linksys-wrt3g-tools
  4. System configuration file: /etc/linksys-wrt3g-tools

The configuration files are normal ini-style files with key=value lines. Supported configuration options in the files, and environment variables, are (lowercase):

Munin plugin

The tool itself needs to run (must be configured). Make sure it works.

Now find the munin plugin:

$ pear list-files zz/linksys_wrt3g_tools|grep munin
doc    /usr/share/php/doc/linksys_wrt3g_tools/scripts/munin.php

Symlink it in your munin plugins directory and make it executable:

$ chmod +x /usr/share/php/docs/linksys_wrt3g_tools/scripts/munin.php
$ ln -s /usr/share/php/docs/linksys_wrt3g_tools/scripts/munin.php /etc/munin/plugins/wrt3g

Test it:

$ munin-run wrt3g
conn_connected.value 3
type_umts.value 5


Monthly graph of the connection status

Source code

The source code can be found in the git repository.

File: linksys-wrt3g-tools.htm | last update: 2023-04-06 23:45:02 Valid XHTML Valid CSS