Under Solaris, how can I get the NIC in and out bytes just like in Linux where I can use cat /proc/net/dev
to pick data two times then compute the difference ?
Under Solaris, how can I get the NIC in and out bytes?
579 Views Asked by user3079567 At
2
There are 2 best solutions below
0

Give Tim Cook's nicstat a try: http://sourceforge.net/projects/nicstat/
Time Int rKB/s wKB/s rPk/s wPk/s rAvs wAvs %Util Sat
02:02:23 lo0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:02:23 net4 0.95 21.06 11.00 4.00 88.36 5393.0 0.02 0.00
02:02:23 net1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:02:23 net0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Time Int rKB/s wKB/s rPk/s wPk/s rAvs wAvs %Util Sat
02:02:24 lo0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:02:24 net4 0.29 0.06 5.00 1.00 60.00 66.00 0.00 0.00
02:02:24 net1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:02:24 net0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
You can use kstat, passing the name of your interface, eg:
Here the interval is one second (1.03545953 precisely), obytes shows the outgoing bytes and rbytes the incoming ones.
Make sure to pick the right interface, eg: