systemctl list-units [Solved]

Post Reply
Message
Author
pkmorrison
Posts: 5
Joined: Mon Jul 15, 2019 9:45 am

systemctl list-units [Solved]

#1 Post by pkmorrison »

$ sudo systemctl list-units
Failed to list units: No such method 'ListUnitsFiltered'

Is this as expected? I'm trying to get to the status of
systemd timers
Last edited by pkmorrison on Tue Jul 16, 2019 8:17 am, edited 1 time in total.

User avatar
ChrisUK
Qualified MX Guide
Posts: 299
Joined: Tue Dec 12, 2017 1:04 pm

Re: systemctl list-units

#2 Post by ChrisUK »

Chris

MX 18 MX 19 - Manjaro

User avatar
Jerry3904
Administrator
Posts: 21881
Joined: Wed Jul 19, 2006 6:13 am

Re: systemctl list-units

#3 Post by Jerry3904 »

Did you in fact boot into systemd instead of the default sysV?
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
JayM
Qualified MX Guide
Posts: 6793
Joined: Tue Jan 08, 2019 4:47 am

Re: systemctl list-units

#4 Post by JayM »

Also see the Our Positions section of
https://mxlinux.org/about-us/
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

pkmorrison
Posts: 5
Joined: Mon Jul 15, 2019 9:45 am

Re: systemctl list-units

#5 Post by pkmorrison »

OK, I get it now about systemd.
Given that where can I do the equivalent of "sudo crontab -l"
to show system cron jobs. It says "no crontab for root"

btw thank you for your replies

User avatar
ChrisUK
Qualified MX Guide
Posts: 299
Joined: Tue Dec 12, 2017 1:04 pm

Re: systemctl list-units

#6 Post by ChrisUK »

I might be misinterpreting what info you're looking for, but I think you want this:

Code: Select all

service --status-all
Or install bum...

Code: Select all

sudo apt install bum
Chris

MX 18 MX 19 - Manjaro

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: systemctl list-units

#7 Post by fehlix »

pkmorrison wrote: Mon Jul 15, 2019 9:51 am $ sudo systemctl list-units
Failed to list units: No such method 'ListUnitsFiltered'

Is this as expected? I'm trying to get to the status of systemd timers
Yes it is.
If you boot with sysVinit, which is the default in Mx Linux, the existing systemd timers:

Code: Select all

/etc/systemd/system/timers.target.wants/fstrim.timer
/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer
/etc/systemd/system/timers.target.wants/apt-daily.timer
/etc/systemd/system/timers.target.wants/anacron.timer
are not functional when booting in sysVinit.
You might rather look in the corresponding ancacron entries used in sysVinit:

Code: Select all

 cat  /etc/anacrontab 
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root

# These replace cron's entries
1	5	cron.daily	run-parts --report /etc/cron.daily
7	10	cron.weekly	run-parts --report /etc/cron.weekly
@monthly	15	cron.monthly	run-parts --report /etc/cron.monthly
and, e.g. here how mine are look like:

Code: Select all

 ls -1 /etc/cron*/*
/etc/cron.daily/0anacron
/etc/cron.daily/1-quick-live-update
/etc/cron.daily/2-apt-compat
/etc/cron.daily/apt-compat
/etc/cron.daily/aptitude
/etc/cron.daily/bsdmainutils
/etc/cron.daily/dpkg
/etc/cron.daily/logrotate
/etc/cron.daily/man-db
/etc/cron.daily/mlocate
/etc/cron.daily/ntp
/etc/cron.daily/opera-browser
/etc/cron.daily/passwd
/etc/cron.daily/vivaldi
/etc/cron.d/anacron
/etc/cron.monthly/0anacron
/etc/cron.monthly/vrms
/etc/cron.weekly/0anacron
/etc/cron.weekly/apt-xapian-index
/etc/cron.weekly/fstrim-mx
/etc/cron.weekly/man-db
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

pkmorrison
Posts: 5
Joined: Mon Jul 15, 2019 9:45 am

Re: systemctl list-units [Solved]

#8 Post by pkmorrison »

Thank you all for your replies. I now get the bigger picture re systemd
and cron.

Post Reply

Return to “Software / Configuration”