PDA

Bekijk de volledige versie : graphs



michaelth2
12-10-2004, 07:18
if you want to show traffic graphs in your Asus, see http://www.innerhtml.net/graphs

Styno
12-10-2004, 09:14
Is this your brainchild michael?

Anyway, some additional info: You need the full busybox for this to work on the WL-500g, because it needs awk.

sodb
12-10-2004, 21:52
Hi,

Seems that core.js is missing from your tarball. Could that be?

PS
I have been working on similar scripting for drawing graphs. Mine are logging hourly, daily and montly the traffic of a number of PC's in the LAN from and towards the WAN. Using AWK and SED I generate HTML code drawing traffic in bar graph. After renicing the scripts a bit, I will post them
PS2
I compiled a new busybox with awk, crond and crontab also included and selected a few other tools so that size is reasonable compared to full version. Anyone interested?

Currently defined functions:
[, ash, awk, basename, busybox, busybox_httpd, cat, chmod, chroot,
cp, crond, crontab, date, dd, df, dmesg, du, echo, egrep, expr,
false, find, grep, gunzip, gzip, halt, head, ifconfig, init, insmod,
ip, ipcalc, kill, killall, klogd, ln, logger, login, ls, lsmod,
makedevs, mkdir, mknod, more, mount, mv, netstat, nslookup, passwd,
ping, ping6, pivot_root, ps, pwd, reboot, rm, rmdir, rmmod, route,
sed, sh, sleep, sort, strings, sync, syslogd, tail, tar, tee,
telnet, telnetd, test, tftp, time, top, touch, traceroute, true,
udhcpc, umount, uniq, uptime, usleep, uuencode, vi, watch, wc,
wget, zcat

Styno
12-10-2004, 22:22
I compiled a new busybox with awk, crond and crontab also included and selected a few other tools so that size is reasonable compared to full version. Anyone interested?

Hmm, both the full busybox and your version will not fit into flash, so they have to be put onto an usbdevice. Why not using the full busybox then? Usbdevices generally have more then enough space available....

michaelth2
13-10-2004, 20:11
Hi,

Seems that core.js is missing from your tarball. Could that be?

[/CODE]

Ooops. Corrected.

Styno
13-10-2004, 20:57
Hmm, this graph shows the amount of traffic generated by each lan station.

I am interested in the amount of internet traffic devided into some protocols, like HTTP, FTP, KaZaA etc. This does not have to be specific for each lan station, just WAN traffic. Can this be done with your scripts? If yes, how?

sodb
13-10-2004, 21:51
Because the scripts are based on iptables you can differentiate between different services by using protocol and port number. Of course, the scripts need to be changed accordingly. In the example below, on the wl500, the port definition needs to be replaced by a numeric value (80 for www e.g.):



iptables -A FORWARD -i ppp0 -m tcp -p tcp --sport ftp-data:ftp
iptables -A FORWARD -o ppp0 -m tcp -p tcp --dport ftp-data:ftp
iptables -A FORWARD -i ppp0 -m tcp -p tcp --sport smtp
iptables -A FORWARD -o ppp0 -m tcp -p tcp --dport smtp
iptables -A FORWARD -i ppp0 -m tcp -p tcp --sport www
iptables -A FORWARD -o ppp0 -m tcp -p tcp --dport www


see ip accounting (http://www.faqs.org/docs/linux_network/x-087-2-accounting.ipfwadm.html) for further details.

michaelth2
14-10-2004, 09:52
Hmm, this graph shows the amount of traffic generated by each lan station.

I am interested in the amount of internet traffic devided into some protocols, like HTTP, FTP, KaZaA etc. This does not have to be specific for each lan station, just WAN traffic. Can this be done with your scripts? If yes, how?

It's possible, , but you have to change definition of chains and awk scripts