From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26223 invoked by alias); 31 Oct 2012 20:27:50 -0000 Received: (qmail 26199 invoked by uid 22791); 31 Oct 2012 20:27:45 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,TW_OC X-Spam-Check-By: sourceware.org Received: from outbound002.roc2.bluetie.com (HELO outbound002.roc2.bluetie.com) (208.89.132.142) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 31 Oct 2012 20:27:41 +0000 Received: from web002.roc2.bluetie.com ([10.200.2.96]) by outbound002.roc2.bluetie.com with outbound002 id HwTe1k00J24HP3e01wTeEU; Wed, 31 Oct 2012 16:27:38 -0400 X-CMAE-OUT-Analysis: v=2.0 cv=Y+16Q2iN c=1 sm=1 a=8DdfRP5VQLUA:10 a=i-wQWBNYtOgA:10 a=IkcTkHD0fZMA:10 a=FmX3VfpdAAAA:8 a=QoHJ8kPOAAAA:8 a=vr71u8QL6BQA:10 a=e4bue0vzAAAA:8 a=K9bHPraGI4sjdo8S0TwA:9 a=QEXdDO2ut3YA:10 a=lGRnNgmss7oA:10 a=41l5LDBFByitqw60Fh41mg==:117 X-CMAE-OUT-Score: 0.00 Received: from web002.roc2.bluetie.com (localhost.localdomain [127.0.0.1]) by web002.roc2.bluetie.com (Postfix) with ESMTP id 8FBA93F013D for ; Wed, 31 Oct 2012 16:27:38 -0400 (EDT) Message-ID: <20121031162738.12590@web002.roc2.bluetie.com> X-HTTP-Received: from kenkyee.excite [173.162.132.73] by web002.roc2.bluetie.com (BlueTie WebMail ); Wed, 31 Oct 2012 16:27:38 -0400 Date: Wed, 31 Oct 2012 20:27:00 -0000 Cc: To: ecos-discuss@ecos.sourceware.org From: "Ken Yee" Content-transfer-encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Getting number of open file descriptors or sockets per thread? X-SW-Source: 2012-10/txt/msg00019.txt.bz2 Is this possible in eCOS? I'm basically trying to do this for checking leaks since an RTOS is more se= nsitive 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 ma= ke 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 su= ccessfully. 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