Hi Martins,
----- Original Message -----
> > ----- Original Message -----
> >>> [...]
> >>> # pmstore hotproc.control.config 'fname == "firefox"'
> >>>
> >> It should be working though, right? It shouldn't affect operation, but
> >> I can look into dumping the extra info at file parse time.
> > I've added qa/982 which does basically the above, but its failing currently
> > (nprocs == 0). I think I've got all your fixes though, Martins - could you
> > take a look if you get a minute?
> >
> >
> OK, tracked this down. Only happens on some OSs. I had assumed that
> all of /proc/<pid>/* should be available and files would only be missing
> if some badness happened or a pid was in the process of exiting. Turns
> out that schedstat is not enabled in some kernels by default. Will need
> a bit of rework to deal with this.
Aha, makes sense - good catch - and yep, can confirm its working here now.
> qa/800 should have caught this, so I will rework that as well.
Looks good.
I've updated the QA a little in my tree (please review), then found another
small issue I think, in the store handler, where it ignores an empty string.
I had expected to be able to use that to switch off the monitoring - is that
not right?
$ sudo pmstore hotproc.control.config ""
hotproc.control.config old value="(fname == "pmdaproc")" new value=""
$ sudo pmstore hotproc.control.config ""
hotproc.control.config old value="(fname == "pmdaproc")" new value=""
$ sudo pmstore hotproc.control.config ""
hotproc.control.config old value="(fname == "pmdaproc")" new value=""
If this is not a valid way to end hotproc-ing the store handler should probably
return an error instead of accepting the empty string and ignoring it. But, it
would be nice if it could be both dynamically enabled and disabled.
An update like the following could be used to test that, if thats the behaviour
you think we should go with...?
--- 982.orig 2015-04-24 11:20:30.556960974 +1000
+++ 982 2015-04-24 11:20:36.858964662 +1000
@@ -39,6 +39,7 @@
# restore defaults
$sudo pmstore hotproc.control.refresh 10 | _filter_store
$sudo pmstore hotproc.control.config "" | _filter_store
+$sudo pmstore hotproc.control.config "" | _filter_store
status=0
exit
cheers.
--
Nathan
|