Bug 633287 - RFE: additional systemctl command line parameters
RFE: additional systemctl command line parameters
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks: systemd-RFE
  Show dependency treegraph
 
Reported: 2010-09-13 09:53 EDT by Jóhann B. Guðmundsson
Modified: 2013-07-25 21:07 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-25 21:07:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jóhann B. Guðmundsson 2010-09-13 09:53:43 EDT
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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Bill Nottingham 2010-09-13 14:17:41 EDT
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 04:47:43 EDT
Hum I'm not following you here 

Running

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 11:37:59 EDT
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 18:46:31 EDT
Moving systemd bugs to f15, since the systemd feature got delayed.
Comment 5 Lennart Poettering 2011-02-21 20:41:49 EST
--failed is supported now. The other three not yet.
Comment 6 Fedora Admin XMLRPC Client 2011-10-20 12:26:05 EDT
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 04:35:18 EST
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
etc...

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-25 21:07:09 EDT
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.