ecaddict
07-09-2009, 11:15
Updated on 07.10.2011, the most important changes:
Unified support for 2.4 and 2.6 kernel routers (shutdown script)
Added right click download from router via fewgets.cgi
Enhanced the rtorrent starter script /opt/etc/init.d/S99rtorrent
Enhanced GUI to show commands in non URL encoded form
So what fewgets does for you?
It contains a simple downloader that uses screen and wget in the background (kindof simplified ADOS) - plugins e.g. for rapid had to be reduced as they don't work anymore
It has a file manager similar to Filemanager (www.gerd-tentler.de/tools/filemanager/) or eXtplorer (http://extplorer.sourceforge.net/)
It has a traffic statistics similar to major internet exchanges
What makes fewgets unique?
It's entirely based on bash script (+javascript generated by bash script) and does not need php
It aims efficiency over fancy GUI, and it's faster then probably any other similar SW
UTF-8 support of different alphabets and strong support for special characters
Specifically designed for the router environment and tries to place load to the client side as much possible
The following tools (packages) have to be installed with ipkg install before you can take into use fewgets (install script automatically takes care of that):
screen, find (findutils), wget, ps (procps), lighttpd, wc (coreutils)
For rtorrent.cgi: gnuplot readline
For the traffic tab cron has to be installed and set up, that is
/opt/etc/crontab should contain (among others):
*/5 * * * * admin run-parts /opt/etc/cron.5mins
The graphs are similar to the ones generated by MRTG or used by major internet exchange sites (daily/weekly/monthly/yearly traffic graphs are shown for each interfaces).
You have to either run traffic.sh directly from /opt/etc/crontab or if you've set up cron to run scripts from directories (recommended way) copy it to /opt/etc/cron.5mins or to /opt/etc/cron.1min (the script has to run nx1 minutes).
If your traffic does not exceed on (5 min) average the 55 Mbit/s it's sufficient to run traffic.sh in every 5 minutes. If it exceeds it (as it can happen with RT-N16) the script has to run in every minute (up to 275 Mbit/s can be handled in this way; this is due to the 32bit counters and signed integers used by the shell).
The traffic log files are stored in /opt/var/log. They are rotated by traffic.sh, thus no extra handling is required.
Note: If you use cron.1min, you have to change LOGLN in traffic.sh to:
LOGLN=1442
It takes 5-10 (1-2) minutes the first plot to appear. The graphs are accurate only if the traffic.sh script is always run when the router routes traffic.
Download:
8372
It contains the following files (you can extract it manually also but there will be install as well):
/opt/etc/logrotate.conf
/opt/etc/init.d/rc.unslungstop
/opt/etc/init.d/S99rtorrent
/opt/etc/cron.5mins/traffic.sh
/opt/etc/cron.hourly/
/opt/etc/rtorrlog
/mnt/cgi-bin/plugins/data.hu.sh
/mnt/cgi-bin/plugins/addat.hu.sh
/mnt/cgi-bin/rtorrent.cgi
/mnt/cgi-bin/qwget.sh
/mnt/cgi-bin/fewgets.cgi
/usr/local/sbin/shutdown
Make the .sh files (also in plugin directory) executable via chmod u+x and also /usr/local/sbin/shutdown and /opt/etc/init.d/rc.unslungstop
If you manually extract save shutdown to flash via
flashfs save && flashfs commit && flashfs enable
8352
Single line install (note: it overwrites the above files):
cd /tmp && wget -O install.tar.gz "http://wl500g.info/attachment.php?attachmentid=8352&d=1318017040" && tar -xvzf install.tar.gz && ./install.sh
Open https://192.168.1.1/cgi-bin/fewgets.cgi
If it does not work check your /opt/etc/lighttpd/lighttpd.conf, it should have something like the following lines:
server.modules = (
#...
"mod_scgi",
"mod_fastcgi",
"mod_cgi",
#...
"mod_accesslog" )
#...
##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb",
".cgi" )
#### fastcgi module
## read fastcgi.txt for more info
fastcgi.server = ( ".php" =>
((
"host" => "192.168.1.1",
"port" => 1026,
))
)
#### CGI module
cgi.assign = ( ".cgi" => "/bin/sh",
".pl" => "/opt/bin/perl" )
scgi.server = ("/RPC2" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable"
)
)
)
The program to work correctly requires canvas/SVG capable browser javascript enabled (best works with Firefox/Chrome).
If icons/lines start to disappear (the program triggers the browser using significant amount of memory), disable the leading lines in fewgets.cgi:
treeul=true -> treeul=false
It also makes displaying a bit faster.
Nevertheless this is the javascript that I can crash any browser effortlessly...
You can use right-click menus (Ctrl+left-clik in Opera) or for file/directory operations Ctr+C|Ctr+X,Ctrl+V.
Shortcut keys are context sensitive and override browser shortcut keys in the given context.
A few screenshots:
6050
Screenshot of the file manager:
6056
The tgz file also includes rtorrent.cgi that can create rtorrent traffic graph from logs.
For that you have to include the following line to your /opt/etc/rtorrent.conf:
schedule = log,180,180,"execute=/opt/etc/rtorrlog,$get_down_rate=,$get_up_rate="
Open: https://192.168.1.1/cgi-bin/rtorrent.cgi
The rtorrent.cgi assumes that your system log is in /opt/var/log and it's either messages or syslog.log.
If that's not the case you have to adjust rtorrent.cgi accordingly.
The install script also creates dyndns updater /opt/etc/cron.hourly/dyndns.sh. I needed it to force daily update even if IP address does not change for months. It starts the update if you set your dyndns account name and password.
Warning: The file manager never asks for confirmation and there is no undelete in Linux so be very cautious with delete.
Also I did a reasonable amount of testing but I'm in no event shall be liable for any lost or corrupted files or any other damage caused by the program. Use it only at your own risk.
Unified support for 2.4 and 2.6 kernel routers (shutdown script)
Added right click download from router via fewgets.cgi
Enhanced the rtorrent starter script /opt/etc/init.d/S99rtorrent
Enhanced GUI to show commands in non URL encoded form
So what fewgets does for you?
It contains a simple downloader that uses screen and wget in the background (kindof simplified ADOS) - plugins e.g. for rapid had to be reduced as they don't work anymore
It has a file manager similar to Filemanager (www.gerd-tentler.de/tools/filemanager/) or eXtplorer (http://extplorer.sourceforge.net/)
It has a traffic statistics similar to major internet exchanges
What makes fewgets unique?
It's entirely based on bash script (+javascript generated by bash script) and does not need php
It aims efficiency over fancy GUI, and it's faster then probably any other similar SW
UTF-8 support of different alphabets and strong support for special characters
Specifically designed for the router environment and tries to place load to the client side as much possible
The following tools (packages) have to be installed with ipkg install before you can take into use fewgets (install script automatically takes care of that):
screen, find (findutils), wget, ps (procps), lighttpd, wc (coreutils)
For rtorrent.cgi: gnuplot readline
For the traffic tab cron has to be installed and set up, that is
/opt/etc/crontab should contain (among others):
*/5 * * * * admin run-parts /opt/etc/cron.5mins
The graphs are similar to the ones generated by MRTG or used by major internet exchange sites (daily/weekly/monthly/yearly traffic graphs are shown for each interfaces).
You have to either run traffic.sh directly from /opt/etc/crontab or if you've set up cron to run scripts from directories (recommended way) copy it to /opt/etc/cron.5mins or to /opt/etc/cron.1min (the script has to run nx1 minutes).
If your traffic does not exceed on (5 min) average the 55 Mbit/s it's sufficient to run traffic.sh in every 5 minutes. If it exceeds it (as it can happen with RT-N16) the script has to run in every minute (up to 275 Mbit/s can be handled in this way; this is due to the 32bit counters and signed integers used by the shell).
The traffic log files are stored in /opt/var/log. They are rotated by traffic.sh, thus no extra handling is required.
Note: If you use cron.1min, you have to change LOGLN in traffic.sh to:
LOGLN=1442
It takes 5-10 (1-2) minutes the first plot to appear. The graphs are accurate only if the traffic.sh script is always run when the router routes traffic.
Download:
8372
It contains the following files (you can extract it manually also but there will be install as well):
/opt/etc/logrotate.conf
/opt/etc/init.d/rc.unslungstop
/opt/etc/init.d/S99rtorrent
/opt/etc/cron.5mins/traffic.sh
/opt/etc/cron.hourly/
/opt/etc/rtorrlog
/mnt/cgi-bin/plugins/data.hu.sh
/mnt/cgi-bin/plugins/addat.hu.sh
/mnt/cgi-bin/rtorrent.cgi
/mnt/cgi-bin/qwget.sh
/mnt/cgi-bin/fewgets.cgi
/usr/local/sbin/shutdown
Make the .sh files (also in plugin directory) executable via chmod u+x and also /usr/local/sbin/shutdown and /opt/etc/init.d/rc.unslungstop
If you manually extract save shutdown to flash via
flashfs save && flashfs commit && flashfs enable
8352
Single line install (note: it overwrites the above files):
cd /tmp && wget -O install.tar.gz "http://wl500g.info/attachment.php?attachmentid=8352&d=1318017040" && tar -xvzf install.tar.gz && ./install.sh
Open https://192.168.1.1/cgi-bin/fewgets.cgi
If it does not work check your /opt/etc/lighttpd/lighttpd.conf, it should have something like the following lines:
server.modules = (
#...
"mod_scgi",
"mod_fastcgi",
"mod_cgi",
#...
"mod_accesslog" )
#...
##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb",
".cgi" )
#### fastcgi module
## read fastcgi.txt for more info
fastcgi.server = ( ".php" =>
((
"host" => "192.168.1.1",
"port" => 1026,
))
)
#### CGI module
cgi.assign = ( ".cgi" => "/bin/sh",
".pl" => "/opt/bin/perl" )
scgi.server = ("/RPC2" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable"
)
)
)
The program to work correctly requires canvas/SVG capable browser javascript enabled (best works with Firefox/Chrome).
If icons/lines start to disappear (the program triggers the browser using significant amount of memory), disable the leading lines in fewgets.cgi:
treeul=true -> treeul=false
It also makes displaying a bit faster.
Nevertheless this is the javascript that I can crash any browser effortlessly...
You can use right-click menus (Ctrl+left-clik in Opera) or for file/directory operations Ctr+C|Ctr+X,Ctrl+V.
Shortcut keys are context sensitive and override browser shortcut keys in the given context.
A few screenshots:
6050
Screenshot of the file manager:
6056
The tgz file also includes rtorrent.cgi that can create rtorrent traffic graph from logs.
For that you have to include the following line to your /opt/etc/rtorrent.conf:
schedule = log,180,180,"execute=/opt/etc/rtorrlog,$get_down_rate=,$get_up_rate="
Open: https://192.168.1.1/cgi-bin/rtorrent.cgi
The rtorrent.cgi assumes that your system log is in /opt/var/log and it's either messages or syslog.log.
If that's not the case you have to adjust rtorrent.cgi accordingly.
The install script also creates dyndns updater /opt/etc/cron.hourly/dyndns.sh. I needed it to force daily update even if IP address does not change for months. It starts the update if you set your dyndns account name and password.
Warning: The file manager never asks for confirmation and there is no undelete in Linux so be very cautious with delete.
Also I did a reasonable amount of testing but I'm in no event shall be liable for any lost or corrupted files or any other damage caused by the program. Use it only at your own risk.