Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
18 Views

How to attach to a Windows service

 
0 Kudos
15 Replies
Highlighted
18 Views

Hi,

You can attach to a running Windows service the same way you attach to a general Windows process: VTune Amplifier XE->Project Properties->Attach to process->Process Name or PID.

You can obtain the process name for a service in the Windows (Win7) Control Panel->Administrative Tools->Component Services->Services(Local)

0 Kudos
Highlighted
Beginner
18 Views

Hi

Thanks for your reply. It looks strange that contents in my previous post disappeared. Actually I want to ask : Why can't vTune attach to a Windows service? I already tried your method to attach my service, but it failed. vTune reports that it can't find PID after I click Start button in XE GUI. My anaylysis type is HotSpots and both PID and process name are failed. I will post detail error message when I go to office.
0 Kudos
Highlighted
18 Views

Ok. Just make sure the process is really running in the system.
0 Kudos
Highlighted
Employee
18 Views

Please see my reply in another thread. Basically, if you can attach to the process with a debugger from the user account that is running VTune Amplifier XE, then you should be able to attach to it with the profiler.
0 Kudos
Highlighted
Beginner
18 Views

The error message is: Process with the specified PID is not found. Specify another PID and try attaching again. As I mentioned in previous post, I try to specify PIDor Process Name in Project Properties, but both failed. I just download XE 2011 yesterday and want to try it, does this has any relationship with issue?
0 Kudos
Highlighted
Beginner
18 Views

Hi

Thanks. This computer is my developing tool and I try to use Visual Studio2005 to attach it, it can. My account belongs to Adminstrator group.
0 Kudos
Highlighted
18 Views

Please, attach the screenshot of the Visual Studion 'Attach to Process' dialog with the mame and ID of the process in the focus, and thescreenshot of the VTune's error report. Thanks.
0 Kudos
Highlighted
Beginner
18 Views

Sorry for so late replying your post. I struggle for a while but I still can't upload my screenshot. Do you have any help or training materials for this one?

Thanks
0 Kudos
Highlighted
18 Views

Use the 'Add Files' button in the edit pane. Create a folder and add the pictures into there. Add them to a message. That should work.
0 Kudos
Highlighted
Employee
18 Views

Also see this article for info on attaching files.
0 Kudos
Highlighted
Beginner
18 Views

Thanks. Below are my screenshot:
1. XE project properties
2. VS2005

3. Task Manager

4. XE Error message

0 Kudos
Highlighted
18 Views

Thank you for the screenshots. Now I see that the process was started by the System user. This is not something we support with attachment, sorry. We will consider how to fix that in the future releases.

Im not an expert in Windows services, so you probably could find a way how to launch the service process as not System user this should help to workaround the problem.

Thanks again for the reproducer.

0 Kudos
Highlighted
Beginner
18 Views

Thanks. I will try your proposed workaround, but I think this restriction is a big issue which prevent many applications.

0 Kudos
Highlighted
Beginner
18 Views

I test again. You workaround doesn't work. Environment: Windows 7 and VS2005.

0 Kudos
Highlighted
18 Views

We need some time to investigate it further. Thanks for patience.
0 Kudos