[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9168.0. "monitor socket buffers, memory use?" by CHEFS::DAVIDSONS () Thu Mar 13 1997 15:01

    Is it possible to monitor a processes socket file descriptors
    to determine how much data is waiting to be read or buffered?
    
    (maybe threading through mbuf lists or via proc fs ?)
    
    This is required for IP and DECnet sockets.
    
    Thanks,
    	Stuart.
    
    X-posted in DIGITAL_UNIX and DNU_OSI conferences.
T.RTitleUserPersonal
Name
DateLines
9168.1VAXCPU::michaudJeff Michaud - ObjectBrokerThu Mar 13 1997 15:2420
>     Is it possible to monitor a processes socket file descriptors
>     to determine how much data is waiting to be read or buffered?
>     This is required for IP and DECnet sockets.

	This has been asked and answered before.  Guess you didn't
	use the right keywords in your AltaVista NOTES search :-(

	The answer once again is you either use ioctl(FIONREAD) or
	do a non-blocking recv(MSG_PEEK) with a buffer larger or
	equal to the max you want to check for.  The ioctl I would
	assume would be faster since no data is being copied.

	Also once again, you really should ask the customer *why* they
	want to do this.  There may be a better way.

	Also the above assumes you want to do this from within a program
	that has a handle to a socket.  If you simply want to see how
	much user data is buffered on socket queues in the system use
	the netstat command and your answer is in the column that is
	titled "Recv-Q"....
9168.2DECnet sockets?CHEFS::DAVIDSONSTue Mar 25 1997 14:497
    Any idea how to monitor DECnet sockets?
    
    I can't find the info' via any NCL options and 'netstat -f dnet'
    is no longer available.
    
    Thanks,
    	Stuart.
9168.3netrix.lkg.dec.com::thomasThe Code WarriorTue Mar 25 1997 16:1912
I don't think the information is available OSI Transport sockets but for
Session Control,

ncl show sess cont port \* send queu, rec que

Node 0 Session Control Port %XFFFFFC001B975040 
AT 1997-03-25-16:17:52.973-05:00I105.768

Status

    Send Queue                        = 55
    Receive Queue                     = 0
9168.4Thanks.CHEFS::DAVIDSONSWed Mar 26 1997 01:311