Return 0 usage times for scheaduler (PID 0).
* proctime.c: Return 0 usage times for scheaduler (PID 0).
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
1999-05-11 Drazen Kacar <dave@srce.hr>
|
||||||
|
|
||||||
|
* proctime.c: Return 0 usage times for scheaduler (PID 0).
|
||||||
|
|
||||||
1999-05-10 Drazen Kacar <dave@srce.hr>
|
1999-05-10 Drazen Kacar <dave@srce.hr>
|
||||||
|
|
||||||
* proclist.c: Added process selection mechanism. It's not
|
* proclist.c: Added process selection mechanism. It's not
|
||||||
|
@@ -48,6 +48,10 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
|
|||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_time));
|
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||||
|
|
||||||
|
/* Don't do it for scheduler, we don't want to frighten our users */
|
||||||
|
|
||||||
|
if(pid)
|
||||||
|
{
|
||||||
if (glibtop_get_proc_data_usage_s (server, &prusage, pid))
|
if (glibtop_get_proc_data_usage_s (server, &prusage, pid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -60,6 +64,7 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
|
|||||||
prusage.pr_utime.tv_nsec / 1E+3;
|
prusage.pr_utime.tv_nsec / 1E+3;
|
||||||
buf->stime = prusage.pr_stime.tv_sec * 1E+6 +
|
buf->stime = prusage.pr_stime.tv_sec * 1E+6 +
|
||||||
prusage.pr_stime.tv_nsec / 1E+3;
|
prusage.pr_stime.tv_nsec / 1E+3;
|
||||||
|
}
|
||||||
|
|
||||||
buf->flags = _glibtop_sysdeps_proc_time;
|
buf->flags = _glibtop_sysdeps_proc_time;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user