06-27-2007
Mechanism reqd for knowing 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.
Cheers
Saptarshi,
10 More Discussions You Might Find Interesting
1. HP-UX
Hi
I am facing the problem where my HP Unix system date is in accordance with the current date but the logs written by the same is of previous time stamp.
Eg. System Date - Thu Mar 15 18:00:04 IST 2007
Syslogs -
Mar 15 12:30:10 mac@1 ftpd: FTP LOGIN FROM xx.xxx.xxx.xx , main
The ftp... (1 Reply)
Discussion started by: PradeepRed
1 Replies
2. Linux
Does anyone know of a user level implementation of the TCP stack for Linux?
Thanks,
- sumati (1 Reply)
Discussion started by: sumati01
1 Replies
3. Shell Programming and Scripting
I have a shell script.
How can use some kind of locking mechanism to ensure that the script is not being executed by two people
at the same time? (3 Replies)
Discussion started by: tjay83
3 Replies
4. AIX
Hi all,
on aix,whether have udev or devfs mechanism?
thanks! (4 Replies)
Discussion started by: anonys
4 Replies
5. Solaris
what are the major Difference Between run level & init level (2 Replies)
Discussion started by: rajaramrnb
2 Replies
6. Shell Programming and Scripting
What if the operating systems would not use any ipc mechanism in order to exchange the datas with each other,which technique could be an alternative for messaging between the processes?Do you guys think using the vfork () system call to duplicate processes is a logical solution for this problem? (4 Replies)
Discussion started by: helltrex
4 Replies
7. Shell Programming and Scripting
Hi,
i have a script of following content
#!/usr/bin/sh
'exit 255' USR1
ncm_CheckDir.pl -a
/cnt/mgr/test/working/applog_CheckDir.log -c
/cnt/mgr/test/lib/config/bp_CheckDir.conf -s
/cnt/mgr/test/log/syslog
filename : BC_CheckDir
when i execute ie :
sh BC_CheckDir
i am getting... (11 Replies)
Discussion started by: psthariharan
11 Replies
8. Programming
Suppose I have 5 independent process divided in two imaginay sets:
set1 set2
---------------------
p1 p3
| |
p2 p4
|
p5
The processes inside each set communicate mutually quite often.
I mean p1 and p2 communicate mutually quite often
Similarly p3, p4 and p5 communicate mutually... (2 Replies)
Discussion started by: rupeshkp728
2 Replies
9. Red Hat
We have a RHEL 5.8 server at the production level and we have a Java application on this server. I know of the SSL certificate generation at the OS (RHEL) level but it is implemented on the Java application by our development team using the Java keytool. My doubt is that is the SSL generation can... (3 Replies)
Discussion started by: RHCE
3 Replies
10. Solaris
I have problem with oracle solaris 10 running on oracle sparc T4-2 server.
Os information: 5.10 Generic_150400-03 sun4v sparc sun4v
Output from tcpstat.d script
TCP bytes: out outRetrans in inDup inUnorder
6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies
LEARN ABOUT ULTRIX
setsockopt
getsockopt(2) System Calls Manual getsockopt(2)
Name
getsockopt, setsockopt - get or set options on sockets
Syntax
#include <sys/types.h>
#include <sys/socket.h>
getsockopt(s, level, optname, optval, optlen)
int s, level, optname;
char *optval;
int *optlen;
setsockopt(s, level, optname, optval, optlen)
int s, level, optname;
char *optval;
int optlen;
Description
The and system calls manipulate options associated with a socket. Options can exist at multiple protocol levels; they are always present
at the uppermost socket level.
When manipulating socket options, the level at which the option resides and the name of the option must be specified. To manipulate
options at the socket level, level is specified as SOL_SOCKET. To manipulate options at any other level, the protocol number of the appro-
priate protocol controlling the option must be supplied. For example, to indicate an option is to be interpreted by the TCP protocol,
level should be set to the protocol number of TCP. For further information, see
The parameters optval and optlen are used to access option values for For they identify a buffer in which the values for the requested
options are to be returned. For optlen is a value-result parameter, initially containing the size of the buffer pointed to by optval and
modified on return to indicate the actual size of the value returned. If no option value is to be supplied or returned, optval can be sup-
plied as 0.
The optname parameter and any specified options are passed uninterpreted to the appropriate protocol module for interpretation. The
include file <sys/socket.h> contains definitions for socket level options. For further information, see Options at other protocol levels
vary in format and name. Consult the or reference pages for details.
Return Values
A zero is returned if the call succeeds, and -1 is returned if it fails.
Diagnostics
The call fails under the following conditions:
[EBADF] The argument s is not a valid descriptor.
[ENOTSOCK] The argument s is a file, not a socket.
[ENOPROTOOPT] The option is unknown.
[EFAULT] The address pointed to by optval is not in a valid part of the process address space. For this error can also be returned
if optlen is not in a valid part of the process address space.
See Also
fcntl(2), socket(2), getprotoent(3n), Guide to the Data Link Interface
getsockopt(2)