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