Fedora Linux Support Community & Resources Center
  #1  
Old 24th August 2011, 09:41 PM
balken Offline
Registered User
 
Join Date: May 2011
Posts: 32
linuxfedoraseamonkey
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?
Reply With Quote
  #2  
Old 24th August 2011, 10:22 PM
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Age: 57
Posts: 14,767
windows_xp_2003firefox
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
PHP Code:
man systemctl 
__________________
Glenn
The Bassinator © ®

[SIGPIC][/SIGPIC]
Laptop: Just a couple of old single core units
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / Kingston HyperX 3K SSD 240GB SATA 3.0 / 1TB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #3  
Old 24th August 2011, 10:25 PM
leigh123linux
Guest
 
Posts: n/a
linuxredhatfirefox
Re: systemctl list all services

Try running

Code:
su
service ntpd start
Then look again
Reply With Quote
  #4  
Old 25th August 2011, 05:49 AM
glroman Offline
Registered User
 
Join Date: Aug 2011
Posts: 2
windows_7firefox
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
Reply With Quote
  #5  
Old 30th August 2011, 04:29 PM
balken Offline
Registered User
 
Join Date: May 2011
Posts: 32
linuxfedoraseamonkey
Re: systemctl list all services

Quote:
Originally Posted by glennzo View Post
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 View Post
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 View Post
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?
Reply With Quote
  #6  
Old 30th August 2011, 06:16 PM
bodhi.zazen Offline
Registered User
 
Join Date: Jul 2006
Location: Montana
Posts: 731
windows_xp_2003firefox
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
Reply With Quote
  #7  
Old 30th August 2011, 10:04 PM
balken Offline
Registered User
 
Join Date: May 2011
Posts: 32
linuxfedoraseamonkey
Re: systemctl list all services

Quote:
Originally Posted by bodhi.zazen View Post
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 View Post
Thanks for the pdf pointer. AFAICT, they did not mention anywhere an equivalent to
Code:
chkconfig --list
.

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.
Attached Files
File Type: sh showservices.sh (275 Bytes, 307 views)

Last edited by balken; 31st August 2011 at 07:47 PM. Reason: newer script version
Reply With Quote
  #8  
Old 30th August 2011, 11:17 PM
bodhi.zazen Offline
Registered User
 
Join Date: Jul 2006
Location: Montana
Posts: 731
windows_xp_2003firefox
Re: systemctl list all services

Quote:
Originally Posted by balken View Post
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.
Reply With Quote
  #9  
Old 31st August 2011, 02:11 AM
balken Offline
Registered User
 
Join Date: May 2011
Posts: 32
linuxfedoraseamonkey
Re: systemctl list all services

Quote:
Originally Posted by bodhi.zazen View Post
---------- 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 View Post

---------- 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.
Reply With Quote
  #10  
Old 31st August 2011, 02:19 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,062
linuxfirefox
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.
Reply With Quote
  #11  
Old 8th April 2013, 04:30 AM
techsupport Offline
Registered User
 
Join Date: Dec 2012
Location: East Coast
Posts: 167
linuxfirefox
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
Reply With Quote
  #12  
Old 8th April 2013, 01:46 PM
StephenH Offline
Registered User
 
Join Date: Jul 2004
Location: Wake Forest, NC
Age: 60
Posts: 1,385
linuxfirefox
Re: systemctl list all services

Quote:
Originally Posted by marko View Post
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
Reply With Quote
  #13  
Old 8th April 2013, 03:02 PM
marco765 Offline
Registered User
 
Join Date: Mar 2012
Location: West Lafayette, Indiana
Posts: 32
macossafari
Re: systemctl list all services

http://fedoraproject.org/wiki/SysVin...emd_Cheatsheet

i found this immensely useful during the transition
Reply With Quote
  #14  
Old 8th April 2013, 03:11 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,320
linuxfirefox
Re: systemctl list all services

Quote:
Originally Posted by techsupport View Post
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
Reply With Quote
  #15  
Old 10th April 2013, 03:32 AM
techsupport Offline
Registered User
 
Join Date: Dec 2012
Location: East Coast
Posts: 167
linuxfirefox
Re: systemctl list all services

Thanks for the help
what did we gain with systemctl ?
Reply With Quote
Reply

Tags
list, services, systemctl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between service and systemctl roger F15 Development 1 23rd April 2011 02:05 AM
services delayed start, services dependencies, bootup pankajp Using Fedora 0 9th September 2008 02:23 PM
Minimum List of Services/Processes InfRecursion Using Fedora 2 10th August 2007 03:38 AM
minimum services list in runlevel 3 Wolle Servers & Networking 4 20th March 2007 04:52 PM
system-config-services services? morganread Using Fedora 2 29th April 2005 04:42 AM


Current GMT-time: 15:07 (Thursday, 23-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Kafr Manda Travel Photos on Instagram - Tando Adam Instagram Photos - Ipueiras Instagram Photos