System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get network throughput via DLPI API

 
Highlighted
Frequent Advisor

How to get network throughput via DLPI API

I would like to get network statistic value
first I use lanadmin -g PPA Number,

But I found a problem,if the PPA Number is a trunk ,it will need to press enter to continue
,but i use program to parse the text to get network throughput,

so I would like to use API to get network statistic value like below,

or anther way to solve the "press enter to continue "problem

how to do these via DLPI API
thanks



PPA Number = 0
Description = lan0 HP PCI-X 1000Base-T Release B.11.31.0803
Type (value) = ethernet-csmacd(6)
MTU Size = 1500
Speed = 1000000000
Station Address = 0x1b789fc135
Administration Status (value) = up(1)
Operation Status (value) = up(1)
Last Change = 460
Inbound Octets = 61332615
Inbound Unicast Packets = 36221
Inbound Non-Unicast Packets = 789874
Inbound Discards = 0
Inbound Errors = 0
Inbound Unknown Protocols = 7054
Outbound Octets = 45444803
Outbound Unicast Packets = 56647
Outbound Non-Unicast Packets = 388
Outbound Discards = 0
Outbound Errors = 0
Outbound Queue Length = 0
Specific = 655367

Ethernet-like Statistics Group

Index = 1
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

3 REPLIES 3
Highlighted
Esteemed Contributor

Re: How to get network throughput via DLPI API

Hi,
are you using hp-ux 11.31?
lanadmin is obsolete in 11.31 and you should take a look at nwmgr command (man nwmgr) , it also collects statistics of an interface.
Highlighted
Trusted Contributor

Re: How to get network throughput via DLPI API

Here's the DLPI programmer's guide:

http://h10032.www1.hp.com/ctg/Manual/c02011471.pdf
Highlighted
Frequent Advisor

Re: How to get network throughput via DLPI API

I would use in HP-UX 11.11 11.23 11.31,
because when i use lanadmin -g PPA Number
there will a press to continue,but my program doesn't know it.So I would like to USE DPLI API,could any one give me a example like using command lanadmin -g PPA

thanks