Measure network traffic

I want to measure the whole internet traffic comming in or out of my eri/hme etc. in kb/s|mb/s. As I don't want to install any tools like net-snmp, mrtg, or other net traffic counter, I'm wondering if there is a basic unix command.

I appreciate any help

Cheers, Martin

[345 byte] By [] at [2007-11-25 22:43:04]
# 1

Hi Martin,

This is definitely not my area of expertise, but I believe you can get some such

statistics with the command 'kstat' (at least on solaris). The problem

is to find out the right combination of options and the right method to

interpret the results.

For instance try things like:

kstat -c mib2

kstat -m ip

kstat -m hme

Hope this helps,

-- daniel

JMX, SNMP, Java, etc...

http://blogs.sun.com/roller/page/jmxetc

dfuchs at 2007-7-5 16:54:57 > top of Java-index,General,Network Configurations...
# 2

Hi,

To complement my answer you may also want to try out

kstat -n [ ip | icmp | stcp | tcp | udp]

and/or

netstat -s

Hope this helps,

-- daniel

JMX, SNMP, Java, etc...

http://blogs.sun.com/roller/page/jmxetc

PS: Note that Java DMK 5.1 (http://java.sun.com/products/jdmk/index.jsp)

has an example (called SolarisKstat)

which works on solaris - and will generate an MBean which will be

able to get at the data exported by a kstat module through JNI.

So in principle you could also use Java SE 5.0, JMX, and JDMK

to export your kstat data to a remote manager.

The example is a little raw, and I am not completely sure on which

solaris version it was last tested....

dfuchs at 2007-7-5 16:54:57 > top of Java-index,General,Network Configurations...