On Fri, Dec 24, 2021 at 7:18 PM Marc Haber <mh+debian-packa...@zugschlus.de> wrote:
> On Fri, Dec 24, 2021 at 05:17:07PM +0800, 李菲 wrote: > > On Fri, Dec 24, 2021 at 3:02 AM Marc Haber < > mh+debian-packa...@zugschlus.de> > > wrote: > > > > > On Thu, Dec 23, 2021 at 07:48:19PM +0100, Marc Haber wrote: > > > > The interesting line of code is > > > > > > > > deb-systemd-invoke $_dh_action 'atop-rotate.service' > 'atop-rotate.timer' > > > 'atop.service' 'atopacct.service > > > > > > > > which will instruct systemd to start all those four services. I am > not > > > > sure whether it makes sense for atop to explicitly start the two > > > > atop-rotate units, and I think that systemd decides by itself in > which > > > > order the units are started. > > > > > > The atopacct unit (systemctl cat atopacct) has an explicit "Before: > > > atop.service" listed. So, systemd SHOULD take care of starting > atopacctd > > > first before atop is started. > > > > > Actually I am not sure whether "before: " only guarantees this > > when the host machine restarts, but not installing packages. > > I surely do hope that this also applies to systemctl transactions. > atop's maintainer scripts group all unit starts into a single > transaction, leaving the order of execution to systemd. That's done by > debhelper, and as a package maintainer I am not going to interfere with > that. The best I can do is to help upstream to properly design their > systemd units and probably make code changes to make startup more > robust. Sure. > > > > Can you please verify (maybe from syslog?) that the start order is > > > actually wrong when you encounter the situation of misbehavior? > > > > > > Run `dpkg --purge atop && dpkg -i ../atop_2.6.0+byted3_amd64.deb`, > > and see the log, just as follows: > > # journalctl | grep atop > > > > Dec 24 17:08:22 n198-252-111 atopacctd[27883]: Terminated by signal 15 > > > > Dec 24 17:08:22 n198-252-111 systemd[1]: atopacct.service: Succeeded. > > > > Dec 24 17:08:22 n198-252-111 systemd[1]: atop.service: Succeeded. > > > > Dec 24 17:08:22 n198-252-111 systemd[1]: atop-rotate.timer: Succeeded. > > > > Dec 24 17:08:22 n198-252-111 systemd[1]: Stopped Daily atop restart. > > > > Dec 24 17:08:31 n198-252-111 systemd[1]: Started Daily atop restart. > > > > Dec 24 17:08:32 n198-252-111 atopacctd[29508]: Version: 2.6.0+byted3 - > > 2021/12/23 17:02:33 <gerlof.langev...@atoptool.nl> > > > > Dec 24 17:08:32 n198-252-111 atopacctd[29508]: accounting to > > /run/pacct_source > > Is that reproducible? > > > > (2) psacct is installed or not? > > > > > Yes, > > > > # dpkg -L atop |grep pacct > > > > /etc/init.d/atopacct > > > > /lib/systemd/system/atopacct.service > > > > /usr/sbin/atopacctd > > /usr/share/man/man8/atopacctd.8.gz > > pSacct is a different package, dpkg --list psacct please. > Just make sure if the package's name is called psacct. As after installing v2.6.0 from https://salsa.debian.org/debian/atop/-/tree/debian/2.6.0-1, I still can not find this package: # atop -V Version: 2.6.0 - 2020/12/21 20:45:10 <gerlof.langev...@atoptool.nl> # dpkg --list psacct dpkg-query: no packages found matching psacct Have a nice day, thanks Fei > Greetings > Marc > > -- > > ----------------------------------------------------------------------------- > Marc Haber | "I don't trust Computers. They | Mailadresse im Header > Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 > Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 >