Operating System - HP-UX
1826074 Members
3460 Online
109690 Solutions
New Discussion

Re: How do I Get Trustworthy Throughput Numbers

 
Eric Crosby_3
Advisor

How do I Get Trustworthy Throughput Numbers

I have an HP-UX 11i box w/ a Gig interface. I want to verify/spot check network performance (MB/sec or Mb/sec) without having to ask my Network guy to query the switch.

How can I do it?

I have tried MWA/Perfview, but the numbers are not correct. I will log a call in the next few days to try and find the cause.

Glance (or gpm) only gives me packets/sec - which doesn't tell me about the throughput on the interface.

I know that netperf can stress a link and give me throughput, but what will tell me throughput used by current load (vs induced load)?

Thank you!
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: How do I Get Trustworthy Throughput Numbers

Shalom,

Best way to go is to use ftp or scp or rcp to push a few files of varying size from system to system.

Peformance figures will always vary based on system patch level and the utility you choose.

sar -d might help.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
spex
Honored Contributor

Re: How do I Get Trustworthy Throughput Numbers

Hi,

Replace 0 below with the PPA of interest:
# (echo "lan,ppa,0,display,quit" | lanadmin 2>/dev/null) | grep Octets
Inbound Octets = 969135997
Outbound Octets = 201604344

Octets are bytes transferred.

PCS
spex
Honored Contributor

Re: How do I Get Trustworthy Throughput Numbers

Just to elaborate a bit...

Run the command at different times, then compute deltas for bytes RX and bytes TX. Then divide by length of the interval for the rate.

For example:
# (echo "lan,ppa,0,display,quit" | lanadmin 2>/dev/null) | grep Octets
Inbound Octets = 969135997
Outbound Octets = 201604344

Wait 90 seconds...

# (echo "lan,ppa,0,display,quit" | lanadmin 2>/dev/null) | grep Octets
Inbound Octets = 984739384
Outbound Octets = 223847387

delta_rx = 984739384 - 969135997 = 15603387
delta_tx = 223847387 - 201604344 = 22243043
interval = 90

rate_rx = delta_rx/interval = 15603387/90 = 173370.97 bytes/s
rate_tx = delta_tx/interval = 22243043/90 = 247144.92 bytes/s

PCS
Jay Kidambi
Advisor

Re: How do I Get Trustworthy Throughput Numbers

rick jones
Honored Contributor

Re: How do I Get Trustworthy Throughput Numbers

In what way are the MWA/PerfView numbers wrong?

Until that is resolved, you can do a couple things. Depends on whether you want "on the wire" numbers or "socket to socket" numbers (and are willing to ass-u-me that all traffic is tcp :)

first - lanadmin -g mibstats > before; sleep N; lanadmin -g mibstats > after; beforeafter before after > delta and then do some math on the Octets field. Keep N pretty small as the octent counters are still (on 11iv1 at least, not sure about v2) 32-bit. That will give everything that passed through the NIC, headers and all.

The variation on the them is to replace lanadmin with "netstat -s -p tcp"

When you are in Glance, be sure to check the CPU utilization of the CPU taking interrupts from the NIC (which you can determine with the intctl command).
there is no rest for the wicked yet the virtuous have no pillows
Dave Olker
Neighborhood Moderator

Re: How do I Get Trustworthy Throughput Numbers

Hi Eric,

I'm not sure why you don't trust the MWA numbers. If you don't like packets/sec, there are dozens (nay, hundreds) of other metrics available in GPM.

In the "Network by Interface" graph you can use the "Choose Metrics" item from the Configure pull-down and select BYNETIF_OUT_BYTE. That will show you the outbound rate in KB/sec. You can also select BYNETIF_IN_BYTE to see inbound KB/sec. Both of these metrics are also available in character-mode Glance in the Network by Interface screen. There are columns for KB/In and KB/Out for each interface.

If these metrics don't tell you what you want in the format you want it, you can always write an Advisor script that works with Glance. Advisor scripts can pull any of the metrics collected by Glance and allows you to format them, calculate them, massage them, etc. any way you want.

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Eric Crosby_3
Advisor

Re: How do I Get Trustworthy Throughput Numbers

Thank you for the many wonderful responses! I do not trust the numbers that MWA was providing b/c it says that there is only 71649KB/Sec In Rate when the cisco switch shows it's output rate (my input rate) at 754236000 bits/sec (there is a power of 100 difference not the 10 that you originally think).

I have written a quick script (see end of article) which tests both the lanadmin and the netstat methods over a 60 second period. From what I understood, the lanadmin should give me everything that transverses the interface (in octets [which equal bytes, right?]) while netstat will only give me the sum of acknowledged tcp payload (in bytes). The confusing thing is the output is opposite of what I would expect (LAN_Diff should be greater than Net_Diff, right?).

Does it matter if this is a Gig interface? I believe I am getting good throughput but would like the OS and switch to agree (at least close) to a number. You know?

# ./test.sh
LAN Before - 1228936652
LAN After - 1229023034
Net Before - 2450054287
Net After - 2451206831
Lan Diff - 86382
Net Diff - 1152544


# cat test.sh
#!/usr/bin/ksh

#netstat -s -p tcp|grep acks|grep bytes|awk '{print $4}'
#(echo "lan,ppa,0,display,quit" | lanadmin 2>/dev/null) | grep Octets

lan_before=`(echo "lan,ppa,0,display,quit" | lanadmin 2>/dev/null) | grep Octets|grep Inbound|awk '{print $4}' &`

net_before=`netstat -s -p tcp|grep acks|grep bytes|awk '{print $4}' &`

sleep 60

lan_after=`(echo "lan,ppa,0,display,quit" | lanadmin 2>/dev/null) | grep Octets|grep Inbound|awk '{print $4}' &`

net_after=`netstat -s -p tcp|grep acks|grep bytes|awk '{print $4}' &`

sleep 10
echo "LAN Before - $lan_before "
echo "LAN After - $lan_after "

echo "Net Before - $net_before "
echo "Net After - $net_after "

echo "Lan Diff - `expr $lan_after - $lan_before` "
echo "Net Diff - `expr $net_after - $net_before` "


rick jones
Honored Contributor

Re: How do I Get Trustworthy Throughput Numbers

netstat includes all interfaces, and that includes loopback.

It is possible that the switch is sending data out the port to the 11i system that the 11i system does not accept. That could include traffic to multicast destinations, or destination MAC's that are not that of the 11i system. Yes, switches do try to do traffic isolation, but it is not 100% - the first time the switch sees a given MAC address it will have to flood-forward it to all ports, similarly if the forwarding tables fill.
there is no rest for the wicked yet the virtuous have no pillows
spex
Honored Contributor

Re: How do I Get Trustworthy Throughput Numbers

Eric,

>
>I do not trust the numbers that MWA was
>providing b/c it says that there is only
>71649KB/Sec In Rate when the cisco switch
>shows it's output rate (my input rate) at
>754236000 bits/sec (there is a power of 100
>difference not the 10 that you originally
>think).
>

754,236,000 bits/sec = 94,279,500 bytes/sec = 92,069 kbytes/sec.

This is only 28.5% greater than the MWA rate of 71,649 kbytes/sec, so it seems reasonable. And as Rick said, your NIC is most likely dropping certain packets.

PCS