Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Apr 2003 12:54:37 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Stalker <cole@optec.co.za>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: mbuf question again
Message-ID:  <3E89FC8D.90AFF0F@mindspring.com>
References:  <002301c2f831$d847b820$4206000a@stalker>

next in thread | previous in thread | raw e-mail | index | archive | help
Stalker wrote:
> I would like to know if it is possible to write a program to check which
> mbuf's are allocated to which programs that are currently running, or is
> this totally not possible?
> 
> If it is possible, could someone point me in the right direction as in which
> libraries / functions / reading material i would need to look at in order to
> do so?

The mbufs are not accounted to particular processes; our TCP/IP
stack is kernel code, not user space code.  8-).

If you look at the output of "netstat -aA", you will get the
application data pending in so_snd and so_rcv queues.

You don't get the mbufs "in progress", and you don't get the
size of the freelist; you can approximate the second one with
"vmstat -m", but the "in progress" numbers are simply not
available, because it's more important to use the memory and
CPU for actual data, rather than accounting structures.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E89FC8D.90AFF0F>