public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Ken Yee" <kenkyee@excite.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Getting number of open file descriptors or sockets per thread?
Date: Wed, 31 Oct 2012 20:27:00 -0000	[thread overview]
Message-ID: <20121031162738.12590@web002.roc2.bluetie.com> (raw)

Is this possible in eCOS?

I'm basically trying to do this for checking leaks since an RTOS is more sensitive to this.
I'd ideally like to do something like this:
  http://www.cyberciti.biz/tips/linux-procfs-file-descriptors.html
then run some code in a loop while checking the descriptor used count to make sure it doesn't grow like crazy.

Ideally, I'd also like to do this with the sockets, mbufs, etc. as well.

I've used cyg_thread_measure_stack_usage to check stack usage per thread successfully.
And I've used mallinfo to check for memory leaks.

Hoping something like this exists for file descriptors and sockets, but if not, it'd be a very useful API to add :-)

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

                 reply	other threads:[~2012-10-31 20:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121031162738.12590@web002.roc2.bluetie.com \
    --to=kenkyee@excite.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).