Subject: Re: Tool for processing "ipmon" output
To: Matthias Scheler <tron@lyssa.owl.de>
From: Herb Peyerl <hpeyerl@beer.org>
List: tech-net
Date: 02/26/1999 19:17:01
tron@lyssa.owl.de (Matthias Scheler) wrote:
> is there a tool which can process "ipmon" output? I would e.g. like to
> know how many traffic is caused by certain network services.
"gratuitous quick hack warning!"
I cheat and have a cgi on an oracle server and run this script every 15
minutes... It's just for fun; I don't do anything serious with it.
Oh, btw, I use ipfstat output; not ipmon. So I guess it's not exactly
what you're looking for.
----
DATE=`date '+\&date=%Y%m%d\&time=%H%M%S'`
ipfstat -ai -ao | sed "
s/count [a-z][a-z]* on [a-z][a-z0-9]* from any //
s/ count [a-z][a-z]* on [a-z][a-z0-9]*//
s/ to any//
s/\/.*$//
s/^/GET \/log\/log.cgi\?count=/
s/ from /\&direction=1\&address=/
s/ to /\&direction=0\&address=/
s/$/$DATE/
" | (ipf -z -f /etc/ipf.conf >/dev/null ; sort +2) | while read A
do
echo $A | /usr/local/bin/nc oraclehost 8080
done