You are not logged in.
Just PKGBUILD for a nice network traffic monitoring tool that served me very well so far:
pkgname=traffic-devel
pkgver=0.1rc3
pkgrel=1
pkgdesc="Network traffic analyzer for console"
url="http://darkzone.ma.cx/resources/unix/traffic/index.php"
depends=('ncurses' 'libpcap')
makedepends=('sed')
source=(http://darkzone.ma.cx/resources/unix/traffic/traffic-current.tar.gz)
md5sums=('b427c393f2b0202d0188af07b4a1c02c')
build() {
cd $startdir/src/traffic-current
./configure --prefix=/usr
sed -i "511,548s/$/\n\/g" $startdir/src/traffic-current/src/show_stats.c
sed -i "31,50s/$/\n\/g" $startdir/src/traffic-current/src/routines.c
make || return 1
make prefix=$startdir/pkg/usr install
}
The pkgbuild needs some explanation:
I called this traffic-devel because I used traffic-current version. There are other releases but they are too old IMO. The last current version is dated December 14th 2003 (check traffic homepage for details). I also set pkgver=0.1rc3 because that's how traffic-current reports it's version (traffic -v).
I had some problems with compiling it with gcc 3.4 - it reported some syntax errors (you now it's more strict now - it doesn't accept multiline strings without n at the end of each line). This is why I put sed lines in the PKGBUILD. So be careful with compiling it with newer current sources - it may require changing line numbers before s (or you can change sed starting and ending address to regular expressions instead of line numbers).
This my favourite set of traffic options:
traffic -c xxx.xxx.xxx.0/24 -i eth0 -r 1 -u KB -U MB -t -C hMct -s t
Replace xxx.xxx.xxx with the ip of the network you want to monitor. There are more interesting options and combinations (like output to text log which you could place on your webpage) - read traffic manpage.
Offline
[root@sucker traffic-devel]# makepkg
==> Making package: traffic-devel (Thu May 27 13:12:32 CEST 2004)
==> Checking Runtime Dependencies...
==> Missing Dependencies:
==>
requires: libpcap
==>
where can I find libcap?
pacman -Ss libcap returns no matching result...
Offline
It's libpcap not libcap that's why you can't find it. And libpcap is in current repo: http://www.archlinux.org/packages.php?id=3636
Offline
uh my fault
thx, now its working
Offline
update: new current sources do not require patching to compile with new gcc
pkgname=traffic-devel
pkgver=0.1rc3
pkgrel=1
pkgdesc="Network traffic analyzer for console"
url="http://darkzone.ma.cx/resources/unix/traffic/index.php"
depends=('ncurses' 'libpcap')
source=(http://darkzone.ma.cx/resources/unix/traffic/traffic-current.tar.gz)
md5sums=('a9b8fa60692766b337cbd39ccc2ac21c')
build() {
cd $startdir/src/traffic-current
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
}
and some options changed a little too (read traffic manpage for details and change C hMct -s t to C hMcs -s s if you are using this syntax - the symbol for total colum is now s not t).
BTW if you want to see how this works here are two screenshots from traffic author page:
http://darkzone.ma.cx/resources/unix/tr … nshot1.jpg
http://darkzone.ma.cx/resources/unix/tr … nshot2.jpg
Offline
nice tool! thanks 8)
Offline
hmm, i had to reinstall, and it seems that darkzone.ma.cx is no longer up. do you have an alternate location?
Offline
You are right - darkzone site is down for the moment :-(. I couldn't find any mirror for newest sources. I could find only older (Dec 2003) version mirror.
You can download the sources from this site http://www.lanrat.webpark.pl/traffic-current.tar.gz I uploaded sources form my cache to this temporary place (please save it somewhere because I don't know what is the limit, etc. for this site - it's really temporary :-))
Offline
okay, i 've got it, thanks a lot. when darkzone comes back online again or you get a hold of the newer version let me know, i could mirror it. it's really a nice monitor.
Offline