Lines Matching refs:pid
42 static void print_exe_abi(int pid);
44 static int ps_line(int pid, int tid) in ps_line() argument
60 sprintf(statline, "/proc/%d", tid ? tid : pid); in ps_line()
64 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid); in ps_line()
66 snprintf(macline, sizeof(macline), "/proc/%d/task/%d/attr/current", pid, tid); in ps_line()
68 sprintf(statline, "/proc/%d/stat", pid); in ps_line()
69 sprintf(cmdline, "/proc/%d/cmdline", pid); in ps_line()
70 snprintf(macline, sizeof(macline), "/proc/%d/attr/current", pid); in ps_line()
146 ppid = pid; in ps_line()
147 pid = tid; in ps_line()
173 printf("%-9s %-5d %-5d %-6d %-5d", user, pid, ppid, vss / 1024, rss * 4); in ps_line()
180 if (get_sched_policy(pid, &p) < 0) in ps_line()
186 snprintf(path, sizeof(path), "/proc/%d/wchan", pid); in ps_line()
196 print_exe_abi(pid); in ps_line()
206 static void print_exe_abi(int pid) in print_exe_abi() argument
211 sprintf(exeline, "/proc/%d/exe", pid); in print_exe_abi()
240 void ps_threads(int pid) in ps_threads() argument
246 sprintf(tmp,"/proc/%d/task",pid); in ps_threads()
253 if(tid == pid) continue; in ps_threads()
254 ps_line(pid, tid); in ps_threads()
324 int pid = atoi(de->d_name); in ps_main() local
325 if(!pidfilter || (pidfilter == pid)) { in ps_main()
326 ps_line(pid, 0); in ps_main()
327 if(threads) ps_threads(pid); in ps_main()