From o.tarnus@free.fr Tue Oct 19 08:22:57 2004 Received: with ECARTIS (v1.0.0; list pcp); Tue, 19 Oct 2004 08:23:03 -0700 (PDT) Received: from lxdomino01.domain ([194.235.198.134]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JFMupE003059 for ; Tue, 19 Oct 2004 08:22:57 -0700 Received: from [192.168.9.100] ([192.168.9.100]) by lxdomino01.domain (Lotus Domino Release 6.0.2CF1) with ESMTP id 2004101917224061-173328 ; Tue, 19 Oct 2004 17:22:40 +0200 Message-ID: <41753140.4090301@free.fr> Date: Tue, 19 Oct 2004 17:22:40 +0200 From: Olivier Tarnus User-Agent: Mozilla Thunderbird 0.8 (X11/20040917) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pcp@oss.sgi.com Subject: PCP viewer X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-MIMETrack: Itemize by SMTP Server on lxdomino01/KCcom(Release 6.0.2CF1|June 9, 2003) at 19/10/2004 17:22:40, Serialize by Router on lxdomino01/KCcom(Release 6.0.2CF1|June 9, 2003) at 19/10/2004 17:22:42, Serialize complete at 19/10/2004 17:22:42 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-archive-position: 410 X-ecartis-version: Ecartis v1.0.0 Sender: pcp-bounce@oss.sgi.com Errors-to: pcp-bounce@oss.sgi.com X-original-sender: o.tarnus@free.fr Precedence: bulk X-list: pcp Hi all, Just wanted to inform you that i created a tool to display data from a pcp host in a 3D window. Nothing much to talk about for the moment, but i would greatly appreciate your comments and even more your help if you have time to do so. The tool is based on two sgi oss projects (thanks for this): pcp and openInventor. I actually run it on linux but i assume it could compile on other unixes too. If you're interested, take a look at : http://pcpview.sf.net The tool actually lack many, many things, like for ex a config file :-) , but i'm here searching for volunteers too, so come on with your ideas and remarks. Feel free to bash me on code quality, as i didn't wrote c++ for 7 years before starting this project (last time was in school). Hope that things will turn better with time and your remarks. Thanks. Olivier From o.tarnus@free.fr Fri Oct 22 06:29:39 2004 Received: with ECARTIS (v1.0.0; list pcp); Fri, 22 Oct 2004 06:29:46 -0700 (PDT) Received: from lxdomino01.domain ([194.235.198.134]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MDTcsL025393 for ; Fri, 22 Oct 2004 06:29:39 -0700 Received: from [192.168.9.100] ([192.168.9.100]) by lxdomino01.domain (Lotus Domino Release 6.0.2CF1) with ESMTP id 2004102215292166-182086 ; Fri, 22 Oct 2004 15:29:21 +0200 Message-ID: <41790B32.9040707@free.fr> Date: Fri, 22 Oct 2004 15:29:22 +0200 From: Olivier Tarnus User-Agent: Mozilla Thunderbird 0.8 (X11/20040917) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pcp@oss.sgi.com Subject: Opening multiple contexts X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-MIMETrack: Itemize by SMTP Server on lxdomino01/KCcom(Release 6.0.2CF1|June 9, 2003) at 22/10/2004 15:29:21, Serialize by Router on lxdomino01/KCcom(Release 6.0.2CF1|June 9, 2003) at 22/10/2004 15:29:23, Serialize complete at 22/10/2004 15:29:23 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-archive-position: 411 X-ecartis-version: Ecartis v1.0.0 Sender: pcp-bounce@oss.sgi.com Errors-to: pcp-bounce@oss.sgi.com X-original-sender: o.tarnus@free.fr Precedence: bulk X-list: pcp Hi all, I was wondering if it's possible to open multiple contexts and specifying them in pmFetch or pmLookupDesc... I want to get multiple data from multiple hosts in the same program, and as pmapi is not thread safe, the only alternative would be to go multi-process and opening contexts in each process. However this would greaty complicate access to gathered data, so is fork() my only alternative??? Thanks Olivier From markgw@sgi.com Fri Oct 22 15:01:48 2004 Received: with ECARTIS (v1.0.0; list pcp); Fri, 22 Oct 2004 15:01:52 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9MM1krt001364 for ; Fri, 22 Oct 2004 15:01:47 -0700 Received: from woolami.melbourne.sgi.com (woolami.melbourne.sgi.com [134.14.55.160]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id IAA01104; Sat, 23 Oct 2004 08:01:20 +1000 Date: Sat, 23 Oct 2004 08:02:09 +1000 (EST) From: Mark Goodwin X-X-Sender: markgw@woolami.melbourne.sgi.com To: Olivier Tarnus cc: pcp@oss.sgi.com Subject: Re: Opening multiple contexts In-Reply-To: <41790B32.9040707@free.fr> Message-ID: References: <41790B32.9040707@free.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 412 X-ecartis-version: Ecartis v1.0.0 Sender: pcp-bounce@oss.sgi.com Errors-to: pcp-bounce@oss.sgi.com X-original-sender: markgw@sgi.com Precedence: bulk X-list: pcp On Fri, 22 Oct 2004, Olivier Tarnus wrote: > > I was wondering if it's possible to open multiple contexts and specifying > them in pmFetch or pmLookupDesc... I want to get multiple data from multiple > hosts in the same program, and as pmapi is not thread safe, the only > alternative would be to go multi-process and opening contexts in each > process. Olivier, you can create as many contexts are needed, to the same or different hosts. The pmNewContext(3) call returns a unique handle that can be passed to any of the following functions to manage contexts : pmDestroyContext(3), pmDupContext(3), pmReconnectContext(3), pmUseContext(3), pmWhichContext(3) In your case, just create a new context to each host and then call pmUseContext(3) to set the current context before each pmFetch. Thanks -- Mark From kenmcd@melbourne.sgi.com Sun Oct 24 17:57:48 2004 Received: with ECARTIS (v1.0.0; list pcp); Sun, 24 Oct 2004 17:57:52 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9P0vkFO023371 for ; Sun, 24 Oct 2004 17:57:47 -0700 Received: from kenj-pc.melbourne.sgi.com (kenj-pc.melbourne.sgi.com [134.14.55.189]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA12401; Mon, 25 Oct 2004 10:57:22 +1000 Date: Mon, 25 Oct 2004 10:55:21 +1000 (EST) From: kenmcd@melbourne.sgi.com Reply-To: Ken McDonell To: Olivier Tarnus cc: pcp@oss.sgi.com Subject: Re: Opening multiple contexts In-Reply-To: <41790B32.9040707@free.fr> Message-ID: References: <41790B32.9040707@free.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 413 X-ecartis-version: Ecartis v1.0.0 Sender: pcp-bounce@oss.sgi.com Errors-to: pcp-bounce@oss.sgi.com X-original-sender: kenmcd@melbourne.sgi.com Precedence: bulk X-list: pcp On Fri, 22 Oct 2004, Olivier Tarnus wrote: > Hi all, > > I was wondering if it's possible to open multiple contexts and specifying > them in pmFetch or pmLookupDesc... I want to get multiple data from multiple > hosts in the same program, and as pmapi is not thread safe, the only > alternative would be to go multi-process and opening contexts in each > process. > However this would greaty complicate access to gathered data, so is fork() my > only alternative??? Creating multiple contexts is not a problem. Having multiple threads calling libpcp at the same time is going to get you into strife. All the PCP applications we've developed do round-robin fetches from multiple hosts using a single thread for all libpcp calls ... in practice this has worked out just fine. If you have a counter example where this does not work, I'd be interested in hearing about it. The alternative of making libpcp thread-safe is a homework project for someone who's very keen ... it is not on my resourced roadmap ... 8^)> From o.tarnus@free.fr Mon Oct 25 01:38:48 2004 Received: with ECARTIS (v1.0.0; list pcp); Mon, 25 Oct 2004 01:38:54 -0700 (PDT) Received: from lxdomino01.domain ([194.235.198.134]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P8cl4d013296 for ; Mon, 25 Oct 2004 01:38:48 -0700 Received: from [192.168.9.100] ([192.168.9.100]) by lxdomino01.domain (Lotus Domino Release 6.0.2CF1) with ESMTP id 2004102510382989-186756 ; Mon, 25 Oct 2004 10:38:29 +0200 Message-ID: <417CBB86.30805@free.fr> Date: Mon, 25 Oct 2004 10:38:30 +0200 From: Olivier Tarnus User-Agent: Mozilla Thunderbird 0.8 (X11/20040917) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ken McDonell CC: pcp@oss.sgi.com Subject: Re: Opening multiple contexts References: <41790B32.9040707@free.fr> In-Reply-To: X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-MIMETrack: Itemize by SMTP Server on lxdomino01/KCcom(Release 6.0.2CF1|June 9, 2003) at 25/10/2004 10:38:29, Serialize by Router on lxdomino01/KCcom(Release 6.0.2CF1|June 9, 2003) at 25/10/2004 10:38:32, Serialize complete at 25/10/2004 10:38:32 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-archive-position: 414 X-ecartis-version: Ecartis v1.0.0 Sender: pcp-bounce@oss.sgi.com Errors-to: pcp-bounce@oss.sgi.com X-original-sender: o.tarnus@free.fr Precedence: bulk X-list: pcp Thanks Ken and Mark, kenmcd@melbourne.sgi.com wrote: > On Fri, 22 Oct 2004, Olivier Tarnus wrote: > >> Hi all, >> >> I was wondering if it's possible to open multiple contexts and >> specifying them in pmFetch or pmLookupDesc... I want to get multiple >> data from multiple hosts in the same program, and as pmapi is not >> thread safe, the only alternative would be to go multi-process and >> opening contexts in each process. >> However this would greaty complicate access to gathered data, so is >> fork() my only alternative??? > > > Creating multiple contexts is not a problem. > > Having multiple threads calling libpcp at the same time is going > to get you into strife. > > All the PCP applications we've developed do round-robin fetches from > multiple hosts using a single thread for all libpcp calls ... in practice > this has worked out just fine. > I'll stick to this one... > If you have a counter example where this does not work, I'd be interested > in hearing about it. > > The alternative of making libpcp thread-safe is a homework project for > someone who's very keen ... it is not on my resourced roadmap ... 8^)> > Not on my todo for the moment ;-) Need first to really work on my C... However, i'm going to refine my c++ class for pcp access, an it would perhaps be nice to include it in pcp, if its quality meet your criteria (far from now ;-) Olivier