Hi Sunil, On Thu, Sep 30, 2021 at 3:52 AM Sunil Mohan Adapa <su...@medhas.org> wrote: > > On Sun, 5 Sep 2021 16:51:46 +1000 Nathan Scott <nath...@redhat.com> wrote: > > Hi Petter, > > > > On Sun, Sep 5, 2021 at 4:45 PM Petter Reinholdtsen <p...@hungry.com> wrote: > > > [...] This approach is known as multilevel configuration. > > > > > > I recommend it over modifying conffiles in /etc/. > > > > I'll discuss with other upstream folks and see if we can transition > > to this style of solution & for all distros. It's a fairly major change, > > so it won't happen overnight, but I agree it is a good way to tackle > > this. > > > > There is a simpler solution. The configuration option in question is an > environment variable. This can be passed to the daemon by shipping a
Interesting idea. > systemd service configuration file in pmlogger packaging. > > $ cat /usr/lib/systemd/system/pmlogger.service.d/pcp-zeroconf.conf > [Service] > > Environment=PMLOGGER_INTERVAL=10 > > [...] > I have tested this solution as follows: > > (comment out PMLOGGER_INTERVAL in /etc/default/pmlogger) > # systemctl daemon-reload > # systemctl show pmlogger.service | grep Environment > Environment=PMLOGGER_INTERVAL=10 > > # systemctl restart pmlogger.service > # systemctl status pmlogger.service > (pickup main PID from output) > # cat /proc/{pid}/environ | tr '\0' '\n' | grep PMLOGGER_INTERVAL > PMLOGGER_INTERVAL=10 Yep, well played - neat solution. > Non-systemd systems: > > In addition to this solution the change in pmlogger.postinst can be > confined to non-systemd systems: > +1 > > > # increase default pmlogger recording frequency > > > if [ ! -e /run/systemd ]; then > > sed -i 's/^\#\ PMLOGGER_INTERVAL.*/PMLOGGER_INTERVAL=10/g' > /etc/default/pmlogger > > > fi > > > If better approach for non-systemd systems is desired, then we canpatch > [...] I think this would do for now. Could you post a patch? Either here, or to me directly, or p...@groups.io, or a PR on the PCP github repo? (all the debian build files are there too). > Severity: > > Currently, this bug is threatening to remove all of pcp, cockpit and > freedombox from Debian on October 10th. Please consider adopting some > solution to avoid this. That'd be good - if you can send through that tested solution, I'll endeavour to get a build uploaded with it next week. cheers. -- Nathan