Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Locate registered Agents and launch from Profile launch wizard
Locate registered Agents and launch from Profile launch wizard [message #94071] Fri, 23 March 2007 16:32 Go to next message
Eclipse UserFriend
Originally posted by: zclipse.gmail.com

All, I have been struggling to get this working... Here is my situation:
I have a Windows application that measures some telemetry values from a
piece of hardware.
I wrote an Agent as a C++ DLL (by extending BaseCollectorImpl and
BaseAgentImpl). This DLL is loaded when the Windows app runs.

Now, I noticed that in my C++ DLL, I am able to registerAgent().
Registration is successful.
I also get a 'command' back from the AC with IID
"org.eclipse.tptp.agentManager" and commandName as "agentRegistered".

My aim is to get this telemetry data and display this in the TPTP
Statistical (and Log) views... basically, I am reusing the GUI.

PerfmonAgent is my inspiration... so... I wrote a custom plugin in Eclipse
that is similar to "org.eclipse.hyades.perfmon.internal" package.
In the "org.eclipse.hyades.perfmon.internal" package, I noticed that the
process of 'launching' a Profile session is acheived by trying to 'LOCATE'
an existing Agent.
So, what they do is to
a) get a Node
b) locateExistingAgent by searching thro the node.listProcesses()
c) if the Agent is not found, PerfmonAgent.exe is executed by 'creating a
new process'

The problem that I am facing is that even when my Windows app is running,
and my custom C++ Agent is 'Registered' with the AC, I still *dont see* any
existing Agent.
When I step thro 'locateExistingAgent', the 'node.listProcesses()' comes up
with Zero items...

Please do let me know how can I 'locate', then create and then 'attach'
(org.eclipse.hyades.internal.execution.local.control) an 'Agent' object, so
that I can then pass this Agent object to send the 'startMonitoringEvent'
notification?

If there is an easier way ( or sample) to 'locate' registered Agents,
'launch' them thro the GUI launch wizard, ... and make it show up in the
"Profiling Monitor View", it will be great to understand...

Thanks for all your help.
E
Re: Locate registered Agents and launch from Profile launch wizard [message #94117 is a reply to message #94071] Sun, 25 March 2007 06:25 Go to previous message
Eclipse UserFriend
Originally posted by: zclipse.gmail.com

Hello,
Following my posting, I noticed that I can use
IAgentController.queryAvailableAgents and
IAgentController.queryRunningAgents to filter out the Agents that I want to
use for data collection.

I have another doubt...

My C++ Agent is currently sending out well formed CBE XML log events. It is
also sending out telemetry data via <CounterDescriptor..> and
<<ContigousObservation>> statistical fragments...

Parallelly, as a test, I wrote a sample JAVA Agent that extends
oggingAgent ---
I also wrote a custom launcher (using the example code written by Antony
Miguel) and was able to "launch" a profiling session from the Eclipse IDE
.... I just sent some sample CBE based XML log data from my sample JAVA Agent
and it comes across fine and is displayed in the Log View / Statistical
Graph, etc...

My question is ...
a) Since my C++ Agent is already registered with the AC AND is sending out
well formed CBE XML, how can I 'pipe' this to the GUI?
b) Do I write *another* JAVA based LoggingAgent and pass this XML (which
comes from the C++ Agent) to it, in order to see the data on the GUI?
c) Or... do I have to write all the model creation, plumbing, etc just like
they wrote with Perfmon? (Gulp!)

The LoggingAgent does everything that my app requires... I just dont know
how to 'connect' the XML output from my C++ Agent to the GUI views (log,
statistical, etc)

Please do clarify... Many thanks..
-E



"Emura Takashi" <zclipse@gmail.com> wrote in message
news:eu0vem$cg8$1@utils.eclipse.org...
> All, I have been struggling to get this working... Here is my situation:
> I have a Windows application that measures some telemetry values from a
> piece of hardware.
> I wrote an Agent as a C++ DLL (by extending BaseCollectorImpl and
> BaseAgentImpl). This DLL is loaded when the Windows app runs.
>
> Now, I noticed that in my C++ DLL, I am able to registerAgent().
> Registration is successful.
> I also get a 'command' back from the AC with IID
> "org.eclipse.tptp.agentManager" and commandName as "agentRegistered".
>
> My aim is to get this telemetry data and display this in the TPTP
> Statistical (and Log) views... basically, I am reusing the GUI.
>
> PerfmonAgent is my inspiration... so... I wrote a custom plugin in Eclipse
> that is similar to "org.eclipse.hyades.perfmon.internal" package.
> In the "org.eclipse.hyades.perfmon.internal" package, I noticed that the
> process of 'launching' a Profile session is acheived by trying to 'LOCATE'
> an existing Agent.
> So, what they do is to
> a) get a Node
> b) locateExistingAgent by searching thro the node.listProcesses()
> c) if the Agent is not found, PerfmonAgent.exe is executed by 'creating a
> new process'
>
> The problem that I am facing is that even when my Windows app is running,
> and my custom C++ Agent is 'Registered' with the AC, I still *dont see*
> any existing Agent.
> When I step thro 'locateExistingAgent', the 'node.listProcesses()' comes
> up with Zero items...
>
> Please do let me know how can I 'locate', then create and then 'attach'
> (org.eclipse.hyades.internal.execution.local.control) an 'Agent' object,
> so that I can then pass this Agent object to send the
> 'startMonitoringEvent' notification?
>
> If there is an easier way ( or sample) to 'locate' registered Agents,
> 'launch' them thro the GUI launch wizard, ... and make it show up in the
> "Profiling Monitor View", it will be great to understand...
>
> Thanks for all your help.
> E
>
Previous Topic:Profile without AgentController
Next Topic:LogParserExtension example multi file import fails
Goto Forum:
  


Current Time: Tue May 14 01:02:25 GMT 2024

Powered by FUDForum. Page generated in 0.02903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top