RE: Pegasus Logs In Linux

"Manjunath Marlabeeti" <[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <[email protected]>
 

Thank you Sahana for your suggestions.

I  solved the issues just by creating a log file in "/tmp/"using C functions and debugged the provider (own logging mechanism).

I found the problem and fixed it.

 

Thanks,

Manjunath M

 

From: Sampige, Sahana Prabhakar (R&D Bangalore) [mailto:[email protected]] 
Sent: Thursday, February 10, 2011 4:39 PM
To: Manjunath Marlabeeti
Cc: [email protected]
Subject: RE: Pegasus Logs In Linux

 

"$0" appears in the trace

1297331991s-366557us: LogMessages [32075:140342960678656:Logger.cpp:338]: $0

 

You need to add tracing in your provider in the enumerateInstances() function and and use your own logging mechanism.

 

-Sahana

 

From: Manjunath Marlabeeti [mailto:[email protected]] 
Sent: Thursday, February 10, 2011 3:37 PM
To: Sampige, Sahana Prabhakar (R&D Bangalore)
Cc: [email protected]
Subject: RE: Pegasus Logs In Linux

 

 

Hi Sahana,

 

I have tried as per your suggestion 

$ cimconfig -g traceFilePath=/tmp/Pegasus.trc

$ cimserver traceLevel=4 traceComponents=All

 

Pegasus.trc: contents are below:

---------------------------------------------------------------------------------------------------start

1297331991s-361698us: ProviderAgent [32075:140342960687104:ProviderAgent.cpp:440]: Processed the agent initialization message.

1297331991s-364953us: ProviderAgent [32075:140342960687104:ProviderAgent.cpp:351]: Received request from server with messageId 0x19d4060

1297331991s-365084us: Thread [32075:140342960687104:ThreadPool.cpp:330]: Initializing thread(140342960678656) with work function and parameters: parm = 0x1060040

1297331991s-365106us: Thread [32075:140342960687104:ThreadPool.cpp:350]: Signal thread to awaken

1297331991s-365135us: Thread [32075:140342960678656:Thread.cpp:415]: Successful set Thread * into thread specific storage

1297331991s-365176us: Thread [32075:140342960678656:ThreadPool.cpp:221]: Work starting.

1297331991s-365343us: ProviderManager [32075:140342960678656:DefaultProviderManager.cpp:517]: Created provider C_LogFileProvider

1297331991s-365365us: ProviderManager [32075:140342960678656:DefaultProviderManager.cpp:639]: Creating Provider Module /root/pegasus//lib/libC_LogFileProvider.so

1297331991s-365387us: ProviderManager [32075:140342960678656:DefaultProviderManager.cpp:548]: Loading/Linking Provider Module /root/pegasus//lib/libC_LogFileProvider.so

1297331991s-366177us: LogMessages [32075:140342960678656:Logger.cpp:338]: $0

1297331991s-366223us: MessageQueueService [32075:140342960678656:MessageQueue.cpp:182]: MessageQueue::lookup failure - name = CIMOpRequestDispatcher

1297331991s-366245us: ProviderManager [32075:140342960678656:DefaultProviderManager.cpp:566]: Initializing Provider C_LogFileProvider

1297331991s-366261us: MessageQueueService [32075:140342960678656:MessageQueue.cpp:182]: MessageQueue::lookup failure - name = CIMOpRequestDispatcher

1297331991s-366278us: ProviderManager [32075:140342960678656:ProviderMessageHandler.cpp:160]: Calling provider.initialize: C_LogFileProviderModule:C_LogFileProvider

1297331991s-366300us: ProviderManager [32075:140342960678656:ProviderMessageHandler.cpp:176]: Returned from provider.initialize: C_LogFileProviderModule:C_LogFileProvider

1297331991s-366315us: ProviderManager [32075:140342960678656:DefaultProviderManager.cpp:473]: Returning Provider C_LogFileProvider

1297331991s-366432us: ProviderManager [32075:140342960678656:ProviderMessageHandler.cpp:439]: ProviderMessageHandler::_handleEnumerateInstancesRequest - Object path: //Cristie-Manju.localdomain/root/Cristie:C_LogFile

1297331991s-366462us: ProviderManager [32075:140342960678656:ProviderMessageHandler.cpp:460]: Calling provider.enumerateInstances: C_LogFileProviderModule:C_LogFileProvider

1297331991s-366557us: LogMessages [32075:140342960678656:Logger.cpp:338]: $0

1297331991s-366587us: ProviderManager [32075:140342960678656:SimpleResponseHandler.cpp:57]: SimpleResponseHandler::processing()

---------------------------------------------------------------------------------------------------end

 

I have added tracing logic using below function 

 

Logger::put(Logger::STANDARD_LOG, "Entering LogFile::enumerateInstaces",

                     Logger::TRACE, "$0");

 

It did not appear in the trace.(I mean debug entry)

 

Please suggest me if there is wrong.

 

Thanks,

Manjunath M

 

 

From: Sampige, Sahana Prabhakar (R&D Bangalore) [mailto:[email protected]] 
Sent: Thursday, February 10, 2011 2:57 PM
To: Manjunath Marlabeeti; [email protected]
Subject: RE: Pegasus Logs In Linux

 

Hi Manjunath,

You can turn on tracing in the cimserver as below :

 

#cimserver traceLevel=4 traceComponents=All ç This is the highest tracelevel and will generate detailed trace output. You could chose to use a lower trace level as well. This will place all logs in the cimserver's and provider's trace files ( cimconfig -g traceFilePath). This should easily point you to the location of the failure. If there is some issue within your provider you would have to add some tracing logic in your provider. This log will only indicate the request which resulted in the failure.

 

If you have built the cimserver with debug enabled, then you can debug the core generated by the cimprovagt process using gdb. 

 

Printf's & cout's are visible only when cimserver is started with option -X ( cimserver -X). This will only print printf's from the cimserver's process. The prints in your provider are not associated to any terminal, hence will not be printed.

 

Rgds,

Sahana

 

 

From: Manjunath Marlabeeti [mailto:[email protected]] 
Sent: Thursday, February 10, 2011 2:38 PM
To: [email protected]
Subject: Pegasus Logs In Linux

 

Hi,

 

I have compiled Pegasus 2.10.0 (with OpenSSL) on Fedora-14 x64 bit Linux OS.

I have written a simple provider, registered with cimserver ,compiled successfully.

When I call the provider it is throwing the error.

 

cimcli CIMException:  Cmd= ei Object= C_Test Code= 1

CIM_ERR_FAILED: Lost connection with cimprovagt " C_TestProviderModule".

 

I read in the web above error occurs when the provider is crashing.

 

I did not find Log folder in compiled Pegasus for debug.

I tried to debug with printf statements but these are not printing at cimserver terminal (like in windows).

 

Please can any suggest me where the Pegasus logs will get created and where the printf debugging prints.

 

Thanks,

Manjunath M
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.