TextView tv=(TextView) findViewById(R.id.mainTextView1);
tv.setText("");
ActivityManager am=(ActivityManager) getSystemService(ACTIVITY_SERVICE);
List<ActivityManager.RunningServiceInfo> list=am.getRunningServices(Integer.MAX_VALUE);
for(ActivityManager.RunningServiceInfo current:list)
{
tv.append(String.format("pid:%s , process:%s \n",current.pid,current.process));
}