Bug 633287 - RFE: additional systemctl command line parameters
Summary: RFE: additional systemctl command line parameters
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
Keywords: Triaged
Depends On:
Blocks: systemd-RFE
TreeView+ depends on / blocked
Reported: 2010-09-13 13:53 UTC by Jóhann B. Guðmundsson
Modified: 2013-07-26 01:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-26 01:07:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Jóhann B. Guðmundsson 2010-09-13 13:53:43 UTC
Description of problem:

Add --active to show only active services/targets 
( systemctl list-units -t service --active )

Add --inactive to show only inactive services/targets 
( systemctl list-units -t service --inactive )

Add --failed to show only failed service/targets 
( systemctl list-units -t service --failed )

Add --error to show error on load for service/targets. 
( systemctl list-units -t service --error )

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Bill Nottingham 2010-09-13 18:17:41 UTC
I think the '-t service' might not be an obvious change here. For example, you may want active/failed sockets as well.

Comment 2 Jóhann B. Guðmundsson 2010-09-14 08:47:43 UTC
Hum I'm not following you here 


systemctl list-units -t service
(or systemctl list-units --type=service )

Will show you active and failed by default as things are now. 

What I'm suggesting is that you can list by "status" instead of having to resort to '| grep/awk/sed' fu magic 

For example if I want to know all failed service I simply pass 

systemctl list-units -t service --failed

Comment 3 Bill Nottingham 2010-09-14 15:37:59 UTC
OK. Your first comment wasn't clear - from the wording it looked like you were suggesting that --active *implied* -t service.

Comment 4 Matthias Clasen 2010-10-08 22:46:31 UTC
Moving systemd bugs to f15, since the systemd feature got delayed.

Comment 5 Lennart Poettering 2011-02-22 01:41:49 UTC
--failed is supported now. The other three not yet.

Comment 6 Fedora Admin XMLRPC Client 2011-10-20 16:26:05 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Jóhann B. Guðmundsson 2011-12-26 09:35:18 UTC
It probably would be a good idea to add to that list --enabled, --disabled as well to replace the chkconfig --list which would list the unit along with the target it's enabled in.  

Something like...

systemctl list-units -t service --enabled

UNIT                    STATE     TARGET             DESCRIPTION
dbus.service            Enabled   multi-user.target  D-Bus System Message Bus
display-manager.service Enabled   graphical.target   Display Manager

And to list services enabled in specific target it would be 

systemctl list-units -t service --enabled multi-user.target

UNIT                            STATE     TARGET             DESCRIPTION
dbus.service                    Enabled   multi-user.target  $DESC
plymouth-quit.service           Enabled   multi-user.target  $DESC
plymouth-quit-wait.service      Enabled   multi-user.target  $DESC
rc-local.service                Enabled   multi-user.target  $DESC
systemd-logind.service          Enabled   multi-user.target  $DESC
systemd-user-sessions.service   Enabled   multi-user.target  $DESC

I think the best way to map all of which get started in the boot process for users/admins is not using a an list like chkconfig did to but rather using a simple pstree like layout ( systemd-tree or systemctl --tree ) on which target get started and service and what else get started/run beneath them ( sockets,timer units, mount unit,path units etc...). 

I think doing so ( tree layout ) would be the quickest to be adopted and also help in eliminating the "run level" thinking people have.

Comment 8 Lennart Poettering 2013-07-26 01:07:09 UTC
This is now available in 206 with the new --state= switch.

Note You need to log in before you can comment on or make changes to this bug.