Operating System - HP-UX
1834049 Members
2148 Online
110063 Solutions
New Discussion

Need Mechanism to find out TCP buffer occupancy level

 
Saptarshi Majumdar
Occasional Contributor

Need Mechanism to find out TCP buffer occupancy level

Hi,

The description and the context of the mechanism that i require is as follows:

There is an application communicating with a protocol stack binary. There is a TCP socket communication between the two.

Now, the stack is pumping up data to the Application such that the receiving buffer of the Application and the sending buffer of the stack is getting occupied. Basically, the Application is processing messages at a rate slower than that at which the stack is pumping the data to it.

Now the mechanism that i require is that i need a way in which i can get the amount of buffer that has been filled up by the messages in the corresponding TCP buffers.
My aim is to raise an alarm in case the TCP buffer has been filled up to a particular percentage level.

But to do that i need a way of knowing how much of the buffer has been occupied. So how do i get that idea?

Need this urgently. Thanks a lot.

Did some searching on this and found that the ioctl option SIOCINQ and SIOCOUTQ in linux does a similar task. Refer http://www.die.net/doc/linux/man/man7/tcp.7.html

My operating system is HP-UX. Is there a similar option in HP-UX?


Cheers
Saptarshi,
2 REPLIES 2
Sandman!
Honored Contributor

Re: Need Mechanism to find out TCP buffer occupancy level

Look at the FIOSNBIO request for the ioctl system call. It might be the SIOCINQ and SIOCOUTQ request equivalents under HP-UX.

# man 5 ioctl
Saptarshi Majumdar
Occasional Contributor

Re: Need Mechanism to find out TCP buffer occupancy level

Hi,

Thanks for the reply.
This would not exactly serve my purpose as i am at the moment looking into the TCP buffer occupancy rather than non-blocking read or write.

Thanks anyways.

regards
Saptarshi