 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

24th August 2011, 09:41 PM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 26

|
|
|
systemctl list all services
I'm trying to find the systemctl equivalent of "chkconfig --list".
$ systemctl -t service -a
looks like the command, but it does not return any line about the ntp service. It does exist because I get this:
$ systemctl status ntpd.service
ntpd.service - Network Time Service
Loaded: loaded (/lib/systemd/system/ntpd.service)
Active: inactive (dead)
CGroup: name=systemd:/system/ntpd.service
So I guess I really have two questions:
1. what is the systemd "equivalent" to chkconfig --list
2. why doesn't the above (systemctl -t service -a) return a line with the ntp service?
|

24th August 2011, 10:22 PM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930

|
|
|
Re: systemctl list all services
Try
PHP Code:
systemctl list-units
Is that what you're looking for?
Not to be a wise guy, but I got that from
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|

24th August 2011, 10:25 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
Re: systemctl list all services
Try running
Code:
su
service ntpd start
Then look again
|

25th August 2011, 05:49 AM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 2

|
|
|
Re: systemctl list all services
I think it's because NTP isn't enabled. I ran this to get NTP working:
Code:
% systemctl enable ntpd.service
% systemctl --no-page -t service -a | grep ntp
ntpd.service loaded inactive dead Network Time Service
ntpdate.service loaded inactive dead Set time via NTP
% systemctl start ntpd.service
% systemctl --no-page -t service -a | grep ntp
ntpd.service loaded active running Network Time Service
ntpdate.service loaded inactive dead Set time via NTP
|

30th August 2011, 04:29 PM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 26

|
|
|
Re: systemctl list all services
Quote:
Originally Posted by glennzo
Try
PHP Code:
systemctl list-units
|
no that doesn't show the ntp service (unless it's enabled, see below).
Quote:
Originally Posted by leigh123linux
Try running
Code:
su
service ntpd start
|
Well that starts ntpd (which I did know how to do), it looks like the service command calls systemd to do the work.
Quote:
Originally Posted by glroman
I think it's because NTP isn't enabled. I ran this to get NTP working:
Code:
% systemctl enable ntpd.service
% systemctl --no-page -t service -a | grep ntp
ntpd.service loaded inactive dead Network Time Service
ntpdate.service loaded inactive dead Set time via NTP
% systemctl start ntpd.service
% systemctl --no-page -t service -a | grep ntp
ntpd.service loaded active running Network Time Service
ntpdate.service loaded inactive dead Set time via NTP
|
Ok, so I guess the question is narrowed down now to: how do I list all "disabled" systemd services?
chkconfig --list gave me output of _all_ services that are installed on the system and what their status was, whether they were "enabled"/"disabled".
It seems the systemctl utility only ever shows "enabled" services... I could be wrong. So if so, how do I see which services are disabled?
|

30th August 2011, 06:16 PM
|
 |
Registered User
|
|
Join Date: Jul 2006
Location: Montana
Posts: 731

|
|
|
Re: systemctl list all services
systemctl without any arguments will show information.
Code:
systemctl | grep ntp
ntpd.service loaded active running Network Time Service
See also http://0pointer.de/public/systemd-ebook-psankar.pdf
__________________
If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p
|

30th August 2011, 10:04 PM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 26

|
|
|
Re: systemctl list all services
Quote:
Originally Posted by bodhi.zazen
systemctl without any arguments will show information.
Code:
systemctl | grep ntp
ntpd.service loaded active running Network Time Service
|
No. I am looking for "disabled" services.
systemctl shows ntp here only because it's "active". Go ahead and run
Code:
systemctl stop ntpd.service
and notice
Code:
systemctl | grep ntp
comes back empty. I guess that systemctl by default only shows "active" "units". I want the "disabled" units.
Quote:
Originally Posted by bodhi.zazen
|
Thanks for the pdf pointer. AFAICT, they did not mention anywhere an equivalent to .
Anyway, with what I've browsed through, I hacked up a shell script which kind of gives me what I'm after. I'd much rather have systemd tell me this info, since I'm sure what I did here is wrong.
Last edited by balken; 31st August 2011 at 07:47 PM.
Reason: newer script version
|

30th August 2011, 11:17 PM
|
 |
Registered User
|
|
Join Date: Jul 2006
Location: Montana
Posts: 731

|
|
|
Re: systemctl list all services
Quote:
Originally Posted by balken
I'd much rather have systemd tell me this info, since I'm sure what I did here is wrong.
|
Try the man page
What is the output of
Code:
systemctl -a | grep ntp
Is that what you are looking for ? The -a flag ?
Keep in mind, systemd is not fully implemented and you may wish to consider filing a bug report / feature request if you have suggestions.
---------- Post added at 03:38 PM ---------- Previous post was at 03:17 PM ----------
Oh I see ntp is no longer listed if it is first disabled and then you reboot.
I would file a bug report on that, be sure to mention a reboot as I really could not follow your problem from your original description.
---------- Post added at 04:17 PM ---------- Previous post was at 03:38 PM ----------
From a chat on IRC:
Quote:
mezcalero bodhi_zazen: on f16 you can use "systemctl list-unit-files"
mezcalero bodhi_zazen: that will list you all unit files and whether they are enabled
mezcalero indepdentely of whether they are referenced/running
|
So it looks as if this functionality is in the works.
__________________
If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p
Last edited by bodhi.zazen; 30th August 2011 at 10:20 PM.
|

31st August 2011, 02:11 AM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 26

|
|
|
Re: systemctl list all services
Quote:
Originally Posted by bodhi.zazen
---------- Post added at 03:38 PM ---------- Previous post was at 03:17 PM ----------
Oh I see ntp is no longer listed if it is first disabled and then you reboot.
I would file a bug report on that, be sure to mention a reboot as I really could not follow your problem from your original description.
|
Ah, I think in your case, ntpd.service was "disabled", but was still "active". After a reboot, you indeed wouldn't see ntpd listed, but would still see it before rebooting... If you did a "systemctl stop ntpd.service", then "systemctl|grep ntp" would be empty without having to reboot.
Hope that was clear? Sorry, my explanation was a bit roundabout.
Quote:
Originally Posted by bodhi.zazen
---------- Post added at 04:17 PM ---------- Previous post was at 03:38 PM ----------
From a chat on IRC:
So it looks as if this functionality is in the works.
|
That is good news! Thanks for querying IRC.
|

31st August 2011, 02:19 AM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: systemctl list all services
Another option is to yum install systemd-gtk then run systemadm and on the units tab pick "Show All Units"
Last edited by marko; 31st August 2011 at 02:22 AM.
|

8th April 2013, 04:30 AM
|
|
Registered User
|
|
Join Date: Dec 2012
Location: East Coast
Posts: 104

|
|
|
Re: systemctl list all services
I am not used to this systemctl but am trying to learn
I am running gnome
I ran the cmd
Code:
systemctl list-units|grep [Gg]nome
which does not list the window environment
I just installed Xfce and want to enable it as the default
thanks for any tips
F17/Gnome
|

8th April 2013, 01:46 PM
|
 |
Registered User
|
|
Join Date: Jul 2004
Location: Wake Forest, NC
Age: 59
Posts: 1,182

|
|
|
Re: systemctl list all services
Quote:
Originally Posted by marko
Another option is to yum install systemd-gtk then run systemadm and on the units tab pick "Show All Units"
|
Yum install systemd-gtk returns a not found error message. However, yum install systemd-ui works. It puts a "Services" entry in the "System" section of the Applications Menu.
__________________
StephenH
"We must understand the reality that just because our culture claims certain things are true it does not mean they are!" --M. Liederbach
http://pilgrim-wanderings.blogspot.com
Last edited by StephenH; 8th April 2013 at 01:48 PM.
Reason: More information
|

8th April 2013, 03:02 PM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: West Lafayette, Indiana
Posts: 28

|
|
|
Re: systemctl list all services
|

8th April 2013, 03:11 PM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,612

|
|
|
Re: systemctl list all services
Quote:
Originally Posted by techsupport
I am not used to this systemctl but am trying to learn
I am running gnome
I ran the cmd
Code:
systemctl list-units|grep [Gg]nome
which does not list the window environment
I just installed Xfce and want to enable it as the default
thanks for any tips
F17/Gnome
|
That is because there isn't a Gnome unit for systemd. Systemd doesn't start Gnome. It starts GDM which in turn starts Gnome.
If you wish to start Xfce, then you can log into Xfce from GDM, or you can use a different display manager, like LightDM.
If you wish to change to a completely different desktop manager, like LightDM, then you can change it using systemd.
Code:
systemd --force enable lightdm.service
|

10th April 2013, 03:32 AM
|
|
Registered User
|
|
Join Date: Dec 2012
Location: East Coast
Posts: 104

|
|
|
Re: systemctl list all services
Thanks for the help
what did we gain with systemctl ?
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 05:57 (Friday, 24-05-2013)
|
|
 |
 |
 |
 |
|
|