netstat -s output for hpux 11.11 (11i)
On Wed, Apr 05, 2006 at 07:22:00PM +0200, thomas.seglard.enata at cnp.fr wrote:
$ uname -r B.11.11 $ netstat -s tcp: 90934926 packets sent
I already have the "netstat -s" output, but is statistics for TCP/IP. What I'm after right now is statistics about the physical network interfaces - how many bytes have been received and transmitted through the Ethernet network-card.
From the public man-pages, it seems this might be the "netstat -in" command. What output does that give on HP-UX ?
(I'd like the same info for Darwin, but I don't know what commands you must use. If it's like the *BSD systems, perhaps "netstat -i -b -n" ?)
Regards, Henrik
It is very hard to get bytes out of HP-UX. Is this an answer for you?
Lars
lanadmin -g mibstats 0
LAN INTERFACE STATUS DISPLAY
Sun, Apr 23,2006 15:51:14
PPA Number = 0 Description = lan0 Hewlett-Packard LAN Interface Hw Rev 0 Type (value) = ethernet-csmacd(6) MTU Size = 1500 Speed = 10000000 Station Address = 0x80009a35c3b Administration Status (value) = up(1) Operation Status (value) = up(1) Last Change = 300198077 Inbound Octets = 3111235429 Inbound Unicast Packets = 16596539 Inbound Non-Unicast Packets = 2554519 Inbound Discards = 75971167 Inbound Errors = 27 Inbound Unknown Protocols = 58 Outbound Octets = 3892111463 Outbound Unicast Packets = 118413162 Outbound Non-Unicast Packets = 956287 Outbound Discards = 21849 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 655367
Ethernet-like Statistics Group
Index = 1 Alignment Errors = 0 FCS Errors = 0 Single Collision Frames = 375927 Multiple Collision Frames = 156248 Deferred Transmissions = 27291198 Late Collisions = 0 Excessive Collisions = 0 Internal MAC Transmit Errors = 0 Carrier Sense Errors = 324 Frames Too Long = 0 Internal MAC Receive Errors = 0
----- Original Message ----- From: "Henrik Stoerner" <henrik at hswn.dk> To: <hobbit at hswn.dk> Sent: Sunday, April 23, 2006 2:16 PM Subject: [hobbit] Re: netstat -s output for hpux 11.11 (11i)
On Wed, Apr 05, 2006 at 07:22:00PM +0200, thomas.seglard.enata at cnp.fr wrote:
$ uname -r B.11.11 $ netstat -s tcp: 90934926 packets sent
I already have the "netstat -s" output, but is statistics for TCP/IP. What I'm after right now is statistics about the physical network interfaces - how many bytes have been received and transmitted through the Ethernet network-card.
From the public man-pages, it seems this might be the "netstat -in" command. What output does that give on HP-UX ?
(I'd like the same info for Darwin, but I don't know what commands you must use. If it's like the *BSD systems, perhaps "netstat -i -b -n" ?)
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
On Sun, Apr 23, 2006 at 03:54:02PM +0200, lars ebeling wrote:
It is very hard to get bytes out of HP-UX. Is this an answer for you?
lanadmin -g mibstats 0
[snip]
PPA Number = 0 Description = lan0 Hewlett-Packard LAN Interface Hw Rev 0 Inbound Octets = 3111235429 Outbound Octets = 3892111463
Ah yes, this is what I'm after.
I managed to dig up some HP-UX man-pages, and as far as I can tell you need to use the lanscan command to determine the "PPA" numbers that are valid, and then the lanadmin command above to get the statistics for each interface card. Correct ?
In that case, I would think that the HP-UX client code should do something like
lanscan -p | while read PPA; do lanadmin -g mibstats $PPA; done
Would that work ? And does it require root privs ?
Thanks, Henrik
No, you don't have to be root to use lanadmin to display information.
I tested your "script" below and it worked for me, but I only have one PPA. You should have the full path, /usr/sbin to both lanscan and lanadmin, since /usr/sbin is not in the normal users PATH
Regards Lars
----- Original Message ----- From: "Henrik Stoerner" <henrik at hswn.dk> To: <hobbit at hswn.dk> Sent: Sunday, April 23, 2006 6:00 PM Subject: Re: [hobbit] Re: netstat -s output for hpux 11.11 (11i)
On Sun, Apr 23, 2006 at 03:54:02PM +0200, lars ebeling wrote:
It is very hard to get bytes out of HP-UX. Is this an answer for you?
lanadmin -g mibstats 0
[snip]
PPA Number = 0 Description = lan0 Hewlett-Packard LAN Interface Hw Rev 0 Inbound Octets = 3111235429 Outbound Octets = 3892111463
Ah yes, this is what I'm after.
I managed to dig up some HP-UX man-pages, and as far as I can tell you need to use the lanscan command to determine the "PPA" numbers that are valid, and then the lanadmin command above to get the statistics for each interface card. Correct ?
In that case, I would think that the HP-UX client code should do something like
lanscan -p | while read PPA; do lanadmin -g mibstats $PPA; done
Would that work ? And does it require root privs ?
Thanks, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
And here's some output from a random more complicated network setup. (It's the server I happened to be logged in to at the time.)
This server has three network interfaces in use. Two are aggregated together to give a single 2Gbps connection and the other is used as a single 1Gps connection.
prompt> lanscan -p | while read PPA; do lanadmin -g mibstats $PPA; done
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 1 Description = lan1 HP PCI-X 1000Base-T Release B.11.23.05 Type (value) = ethernet-csmacd(6) MTU Size = 1500 Speed = 1000000000 Station Address = 0x1185ebd29b Administration Status (value) = up(1) Operation Status (value) = up(1) Last Change = 411 Inbound Octets = 14712215 Inbound Unicast Packets = 0 Inbound Non-Unicast Packets = 132446 Inbound Discards = 0 Inbound Errors = 0 Inbound Unknown Protocols = 132446 Outbound Octets = 0 Outbound Unicast Packets = 0 Outbound Non-Unicast Packets = 0 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 655367
Ethernet-like Statistics Group
Index = 2 Alignment Errors = 0 FCS Errors = 0 Single Collision Frames = 0 Multiple Collision Frames = 0 Deferred Transmissions = 0 Late Collisions = 0 Excessive Collisions = 0 Internal MAC Transmit Errors = 0 Carrier Sense Errors = 0 Frames Too Long = 0 Internal MAC Receive Errors = 0
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 3 Description = lan3 HP PCI-X 1000Base-T Release B.11.23.05 Type (value) = ethernet-csmacd(6) MTU Size = 1500 Speed = 1000000000 Station Address = 0x1185ebe2c0 Administration Status (value) = up(1) Operation Status (value) = down(2) Last Change = 0 Inbound Octets = 0 Inbound Unicast Packets = 0 Inbound Non-Unicast Packets = 0 Inbound Discards = 0 Inbound Errors = 0 Inbound Unknown Protocols = 0 Outbound Octets = 0 Outbound Unicast Packets = 0 Outbound Non-Unicast Packets = 0 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 655367
Ethernet-like Statistics Group
Index = 4 Alignment Errors = 0 FCS Errors = 0 Single Collision Frames = 0 Multiple Collision Frames = 0 Deferred Transmissions = 0 Late Collisions = 0 Excessive Collisions = 0 Internal MAC Transmit Errors = 0 Carrier Sense Errors = 0 Frames Too Long = 0 Internal MAC Receive Errors = 0
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 4 Description = lan4 HP PCI-X 1000Base-T Release B.11.23.05 Type (value) = ethernet-csmacd(6) MTU Size = 1500 Speed = 1000000000 Station Address = 0x1185ebe200 Administration Status (value) = up(1) Operation Status (value) = down(2) Last Change = 0 Inbound Octets = 0 Inbound Unicast Packets = 0 Inbound Non-Unicast Packets = 0 Inbound Discards = 0 Inbound Errors = 0 Inbound Unknown Protocols = 0 Outbound Octets = 0 Outbound Unicast Packets = 0 Outbound Non-Unicast Packets = 0 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 655367
Ethernet-like Statistics Group
Index = 5 Alignment Errors = 0 FCS Errors = 0 Single Collision Frames = 0 Multiple Collision Frames = 0 Deferred Transmissions = 0 Late Collisions = 0 Excessive Collisions = 0 Internal MAC Transmit Errors = 0 Carrier Sense Errors = 0 Frames Too Long = 0 Internal MAC Receive Errors = 0
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 900 Description = lan900 Hewlett-Packard LinkAggregate InterfaceType (value) = ethernet-csmacd(6) MTU Size = 1500 Speed = 2000000000 Station Address = 0x001185afe673 Administration Status (value) = up(1) Operation Status (value) = up(1) Last Change = 414 Inbound Octets = 1124881132 Inbound Unicast Packets = 2452957923 Inbound Non-Unicast Packets = 2263913 Inbound Discards = 0 Inbound Errors = 0 Inbound Unknown Protocols = 178 Outbound Octets = 2426545181 Outbound Unicast Packets = 832427705 Outbound Non-Unicast Packets = 14393 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 0
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 901 Description = lan901 Hewlett-Packard LinkAggregate InterfaceType (value) = ethernet-csmacd(6) MTU Size = 1500 Speed = 1000000000 Station Address = 0x001185ebf229 Administration Status (value) = up(1) Operation Status (value) = up(1) Last Change = 421 Inbound Octets = 3900731164 Inbound Unicast Packets = 1276673283 Inbound Non-Unicast Packets = 129024 Inbound Discards = 173544 Inbound Errors = 0 Inbound Unknown Protocols = 4 Outbound Octets = 4293768766 Outbound Unicast Packets = 719623083 Outbound Non-Unicast Packets = 3420 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 0
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 902 Description = lan902 Hewlett-Packard LinkAggregate InterfaceType (value) = other(1) MTU Size = 1500 Speed = 0 Station Address = 0x000000000000 Administration Status (value) = up(1) Operation Status (value) = down(2) Last Change = 0 Inbound Octets = 0 Inbound Unicast Packets = 0 Inbound Non-Unicast Packets = 0 Inbound Discards = 0 Inbound Errors = 0 Inbound Unknown Protocols = 0 Outbound Octets = 0 Outbound Unicast Packets = 0 Outbound Non-Unicast Packets = 0 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 0
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 903 Description = lan903 Hewlett-Packard LinkAggregate InterfaceType (value) = other(1) MTU Size = 1500 Speed = 0 Station Address = 0x000000000000 Administration Status (value) = up(1) Operation Status (value) = down(2) Last Change = 0 Inbound Octets = 0 Inbound Unicast Packets = 0 Inbound Non-Unicast Packets = 0 Inbound Discards = 0 Inbound Errors = 0 Inbound Unknown Protocols = 0 Outbound Octets = 0 Outbound Unicast Packets = 0 Outbound Non-Unicast Packets = 0 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 0
LAN INTERFACE STATUS DISPLAY
Mon, Apr 24,2006 10:00:38
PPA Number = 904 Description = lan904 Hewlett-Packard LinkAggregate InterfaceType (value) = other(1) MTU Size = 1500 Speed = 0 Station Address = 0x000000000000 Administration Status (value) = up(1) Operation Status (value) = down(2) Last Change = 0 Inbound Octets = 0 Inbound Unicast Packets = 0 Inbound Non-Unicast Packets = 0 Inbound Discards = 0 Inbound Errors = 0 Inbound Unknown Protocols = 0 Outbound Octets = 0 Outbound Unicast Packets = 0 Outbound Non-Unicast Packets = 0 Outbound Discards = 0 Outbound Errors = 0 Outbound Queue Length = 0 Specific = 0
Henrik Stoerner wrote:
On Wed, Apr 05, 2006 at 07:22:00PM +0200, thomas.seglard.enata at cnp.fr wrote:
$ uname -r B.11.11 $ netstat -s tcp: 90934926 packets sent
I already have the "netstat -s" output, but is statistics for TCP/IP. What I'm after right now is statistics about the physical network interfaces - how many bytes have been received and transmitted through the Ethernet network-card.
From the public man-pages, it seems this might be the "netstat -in" command. What output does that give on HP-UX ?
(I'd like the same info for Darwin, but I don't know what commands you must use. If it's like the *BSD systems, perhaps "netstat -i -b -n" ?)
zelda2:~ root# uname -a Darwin zelda2.unil.ch 8.6.0 Darwin Kernel Version 8.6.0: Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power Macintosh powerpc
zelda2:~ root# netstat -ibn Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll lo0 16384 <Link#1> 994100 0 96177441 994100 0 96177441 0 lo0 16384 127 127.0.0.1 994100 - 96177441 994100
- 96177441 - lo0 16384 ::1/128 ::1 994100 - 96177441 994100
- 96177441 - lo0 16384 fe80::1%lo0 fe80::1 994100 - 96177441 994100
- 96177441 - gif0* 1280 <Link#2> 0 0 0 0 0 0 0 stf0* 1280 <Link#3> 0 0 0 0 0 0 0 en0 1500 <Link#4> 00:0d:93:9d:eb:3a 2013711826 0 2131205566781 331648829 0 41815551289 0 en0 1500 fe80::20d:9 fe80::20d:93ff:fe 2013711826 - 2131205566781 331648829 - 41815551289 - en0 1500 130.223.20/24 130.223.20.20 2013711826 - 2131205566781 331648829 - 41815551289 - en1* 1500 <Link#5> 00:0d:93:9d:eb:3b 0 0 0 0 0 0 0 fw0* 4078 <Link#6> 00:14:51:ff:fe:1e:f4:ce 0 0 0 0 0 0 0
Dominique
On Mon, Apr 24, 2006 at 07:31:03AM +0200, Dominique Frise wrote:
Henrik Stoerner wrote:
(I'd like the same info for Darwin, but I don't know what commands you must use. If it's like the *BSD systems, perhaps "netstat -i -b -n" ?)
zelda2:~ root# uname -a Darwin zelda2.unil.ch 8.6.0 Darwin Kernel Version 8.6.0: Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power Macintosh powerpc
zelda2:~ root# netstat -ibn Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll en0 1500 fe80::20d:9 fe80::20d:93ff:fe 2013711826 - 2131205566781 331648829 - 41815551289 - en0 1500 130.223.20/24 130.223.20.20 2013711826 - 2131205566781 331648829 - 41815551289 -
Excellent, thanks - it's just like the BSD systems, then.
If you want to try it out, use this patch on top of the 20060423 alfa version I sent out yesterday.
Regards, Henrik
participants (4)
-
Dominique.Frise@unil.ch
-
henrik@hswn.dk
-
kevin.pye@gmail.com
-
lars.ebeling@leopg9.no-ip.org