[ECOS] Getting number of open file descriptors or sockets per thread?

Ken Yee kenkyee@excite.com
Wed Oct 31 20:27:00 GMT 2012


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



More information about the Ecos-discuss mailing list