1832751 Members
2724 Online
110045 Solutions
New Discussion

Re: lan statistics

 
SOLVED
Go to solution
Carles Viaplana
Valued Contributor

lan statistics

Hello,

I need to get lan interface statistics. I've seen sam and netadmin can help me, but they are interactive applications and I want a script executes command automatically for a short period of time.

Is there any command to get statistics from lan interface?

Thanks in advance for your reply.
Regards,

Carles
4 REPLIES 4
RAC_1
Honored Contributor
Solution

Re: lan statistics

lanadmin -g. I used following script in the past.

let z=0

let y=$(lanadmin -g mibstats 0|grep -i oct|grep Inbound|awk '{print $4}')

let y2=$(lanadmin -g mibstats 0|grep -i oct|grep Outbound|awk '{print $4}')

while true

do

let x=0

sleep 1

x=$(lanadmin -g mibstats 0|grep -i oct|grep Inbound|awk '{print $4}')

x2=$(lanadmin -g mibstats 0|grep -i oct|grep Outbound|awk '{print $4}')

let t=$x-$y

let t2=$x2-$y2

let y=$x

let y2=$x2

let z=$z+1

let t=$t/1000

let t2=$t2/1000

echo "${t} Kb/s inbound, ${t2} Kb/s outbound"

done
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: lan statistics

You can try using # netstat -in, it gives some information like Incoming, outgoing packets..

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=144903

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Frank de Vries
Respected Contributor

Re: lan statistics

Shouldn't that be netstat -s
(netstat -in give the routing table :)

Lanadmin -g is a good way, but my favourite
(a bit more tedious and techy) is still
nettl (network tracing tool)

http://docs.hp.om/en/B2355-90692/nettl.1M.html
Look before you leap
Carles Viaplana
Valued Contributor

Re: lan statistics

That's the command I was looking for.
Thanks for your help!

Regards,

Carles