Solved

Is there just one PID for an application and the services it loads

Posted on 2013-11-08
1
289 Views
Last Modified: 2013-11-16
Hi,

I have an android application that loads three services.  The application itself runs in the background with the three services.  I am wanting to do some CPU usage measures for the application and the three services.  I had placed the code that gathers the metrics that I am using in one of the services.  It occurred to me that the PID that I am getting me only be for the service.  I was hoping someone might know exactly how this works.  Does the application and the three services each have there own PID or is there one PID shared between the application and the services?  If I have not given enough information to answer this question, let me know and I will do what I can to supply more info.

Thanks
0
Comment
Question by:DLAtkinson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 39635212
Not a specific answer to android, usually.
Each application at the time of running has a unique ProcessID. When it exits and after enough time has passed, the PID numbers are reused..
The PID is assigned by the system.
As to your question, a process starts and gets a process ID of 1234 it then starts three additional services/processes 2345, 2346, and 2347
The parent process ID (PPID) of each of these three will be 1234.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Battery problems on Samsung Galaxy Note 4 10 87
Redhat upgrade 1 48
Manage Mobile Phones (devices) 6 56
regular expression help for sed command 5 40
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This is an explanation of a simple data model to help parse a JSON feed
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question