Koozali.org formerly Contribs.org

atop and systemctl

atop and systemctl
« on: July 29, 2019, 06:10:29 PM »
I installed atop, a utility to help understand resource usage on Linux systems. It works well as far as I can tell. However, each night an error message is generated and sent via email to "root".
Code: [Select]
Subject: Cron <root@myservername> systemctl restart atop
Message: /bin/sh: systemctl: command not found

I wrote to the maintainer asking if that was a bug or there something I needed to do on our server. I have not yet received a reply.

I suspect that systemctl is related to sysctl. Has anyone encountered this? Is there something I can or should do about it?
- Mark

Offline Jean-Philippe Pialasse

  • *
  • 1,448
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: atop and systemctl
« Reply #1 on: July 29, 2019, 06:56:57 PM »
Something freshly installed believes it has been installed on a systemd system which sme 9 is not. 

Offline mmccarn

  • *
  • 2,476
Re: atop and systemctl
« Reply #2 on: July 30, 2019, 01:49:33 PM »
How did you install atop?

atop v1.27 is available from the epel repository:
Code: [Select]
# configure the epel repo
# https://wiki.contribs.org/Epel
/sbin/e-smith/db yum_repositories set epel repository \
Name 'Epel' \
BaseURL 'http://download.fedoraproject.org/pub/epel/$releasever/$basearch' \
MirrorList 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-$releasever&arch=$basearch' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL \
Exclude perl-Razor-Agent \
Visible no \
status disabled

# update /etc/yum.smerepos.d/sme-base.repo
expand-template /etc/yum.smerepos.d/sme-base.repo

# install atop
yum --enablerepo=epel install atop

If this is the current home for atop on github:
  1) The current version is v2.4
  2) you would need to use "make sysvinstall" when installing, otherwise you get systemd-based scripts

install:
      @echo Choose either \'make systemdinstall\' or \'make sysvinstall\'