Preeti,

Thank Uli, not me!

My points:

o)
There is default OPENHPICLIENT_CONF path in config.h
So setting the variable is optional step (needed for path different from  
default)

o)
Every OpenHPI daemon stores persistent resource id <-> entity mapping in  
uid_map file.
In case of two or more OpenHPI daemon on the same system you can see file  
corruption.
This leads to strange disappearance for some resources.

o)
Current OpenHPI way is the following:
1) each daemon provides domain 0
2) domain id mapping is made inside Base Library (libopenhpi.so) on client  
side.
3) you can point to which daemon connect using OPENHPI_DAEMON_HOST and  
OPENHPI_DAEMON_PORT env. variables
4) you can configure domain ids statically in openhpiclient.conf
5) and you can configure/tune domain ids at runtime using oHpiDomainAdd()  
oHpiDomainIdById()
6) you can introduce master OpenHPI daemon who will aggregate resources  
 from different slave daemons in the single domain

        Anton Pak

On Thu, 10 Feb 2011 01:08:25 +0300, Preeti Sharma  
<[email protected]> wrote:

> Hi Anton,
> Thanks for helps. I have found the answer to my last question (how to  
> make two instances of a Client to talk to two different Daemons), answer  
> is:
>
> ·         No coding change is required in daemon. I am running two  
> daemons, my commands are:
>> openhpid -n  -c /etc/openhpi/openhpi.conf -p 4743 -f pid1
>
>> openhpid -n  -c /etc/openhpi/openhpi.conf -p 4744 -f pid2
>
>
>
> ·         export OPENHPICLIENT_CONF=/etc/openhpi/openhpiclient.conf  .   
> My file looks like as shown below:
>
>> cat / etc/openhpi/openhpiclient.conf
>
> ### OpenHPI client library configuration example file ###
>
>
>
> #######
>
> ## Section: Domains
>
> ##          Since each openhpi daemon instance manages a hpi domain,
>
> #           each domain declaration specifies domain number, hpi daemon  
> host and hpi daemon port.
>
> #
>
> ## Example domain declarations:
>
> domain 1 {
>
>         host = "localhost6"   # String value. Double quotes required.
>
>         port = 4743     # Interger value
>
> }
>
>
>
> domain 2 {
>
>         host = "localhost6"   # String value. Double quotes required.
>
>         port = 4744     # Interger value
>
> }
>
> ·         To which Daemon client will talk is configured in  
> openhpiclient.conf file. E.g.
>> ./hpievents –D  1   (This instance talks to Daemon 1 i.e. port=4743)
>> ./hpievents –D  2   (This instance talks to Daemon 2 i.e. port=4744)
>
>
>
> Regards,
>
> Preeti
>
>
> From: Preeti Sharma
> Sent: Wednesday, February 09, 2011 3:21 PM
> To: 'Anton Pak'; '[email protected]'
> Subject: RE: [Openhpi-devel] Why not able to run more than one daemon  
> (using different port) in same m/c?
>
> Just to clarify I modified code for run daemons with user passed domain  
> Id value. I am running daemon1 with domain_Id=100 and daemon2 with  
> domain_id=200. My purpose is to run two daemon and two instances of a  
> client to talk to each of them- is there any other way than implementing  
> domain Id for this.
>
> Regards,
> Preeti
>
> From: Preeti Sharma
> Sent: Wednesday, February 09, 2011 3:17 PM
> To: 'Anton Pak'; [email protected]
> Subject: RE: [Openhpi-devel] Why not able to run more than one daemon  
> (using different port) in same m/c?
>
>
> Hi Anton,
>
> Thanks, I am able to start-up more than one daemons (currently I am  
> running two of them, though both of them are running with DomainId=0). I  
> as well want to run two client instances each of them to talk to each  
> daemon instance- probably to do this my daemons should have different  
> domain Id. To implement this I added below code:
>
>
>
> typedef struct {
>
>     SaHpiDomainIdT domain_id;
>
> } UserData_t;
>
>
>
> In Method main() of openhpid.cpp:
>
> ---------------------------------
>
>         UserData_t *user_data = new UserData_t;
>
>
>
>         //User Data field is populated same way as <port no.> is  
> populated in main from command line argument
>
>
>
>         // create the thread pool
>
>         thrdpool = g_thread_pool_new(service_thread,  
> (gpointer)user_data, max_threads, FALSE, NULL);
>
>
>
>
>
> Modified service_thread and HandleMsg to pass user_data. In HandleMsg  
> method changed code to run daemon with user passed daemonId value:
>
>                         ret = saHpiSessionOpen(  
> ((UserData_t*)user_data)->domain_id, &session_id, securityparams );
>
>
>
>
>
> I used below commands to run both the daemons:
>
> [root@rmtestvm1 preeti]# openhpid -n -d 100 -c /etc/openhpi/openhpi.conf  
> -p 4743 -f pid1
>
> [root@rmtestvm1 preeti]# openhpid -n -d 200 -c /etc/openhpi/openhpi.conf  
> -p 4744 -f pid2
>
>
>
>
>
> I am trying to run client “hpievent –D 100”, I am getting error shown  
> below:
>
>
>
> [root@rmtestvm1 clients]# ./hpievents -D 100
>
> /root/preeti/openhpi-2.15.1/clients/.libs/lt-hpievents (rev 7189) - This  
> program came with OpenHPI 2.15.1
>
> SAF HPI Version B.03.02
>
>
>
> ************** timeout:[0] 100****************
>
> saHpiSessionOpen: INVALID_DOMAIN
>
> [root@rmtestvm1 clients]#
>
>
>
> ./hpievents -D 200 is also giving same error.
>
>
>
> Regards,
>
> Preeti
>
>
>
> -----Original Message-----
> From: Anton Pak [mailto:[email protected]]
> Sent: Wednesday, February 09, 2011 11:12 AM
> To: [email protected]; Preeti Sharma
> Subject: Re: [Openhpi-devel] Why not able to run more than one daemon  
> (using different port) in same m/c?
>
>
>
> -f /different/pid/file.
>
>
>
>       Anton Pak
>
>
>
> On Wed, 09 Feb 2011 19:05:41 +0300, Preeti Sharma
>
> <[email protected]> wrote:
>
>
>
>> Hi,
>
>> I am trying to run more than one daemon in same m/c:
>
>> openhpid -n -c /etc/openhpi/openhpi1.conf -p 4743
>
>> openhpid -n -c /etc/openhpi/openhpi2.conf -p 4744      ----- does not
>
>> start, as well generates no log file- to hint on issue
>
>>
>
>> Regards,
>
>> Preeti

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to