Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-140843

[RFE] Add Option To 'systemctl' Command To Show Status And Logs

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-10.1
    • systemd
    • No
    • Low
    • rhel-systemd
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      When one attempts to start a systemd service, and it fails, the only output is a generic comment on where to look for more information.  Example:

      # systemctl start named.service 
      Job for named.service failed because the control process exited with error code.
      See "systemctl status named.service" and "journalctl -xeu named.service" for details.

      While it would instead be helpful if the failed command just output the log entries so as to save the sysadmin the extra step of running the 'journalctl' or 'systemctl status' commands, I can see where that might break existing workflows.

      Therefore, I would like to request that a new 'systemctl' switch/option be added:  '--status' .

      If a sysadmin runs the 'systemctl --status start', 'systemctl --status stop' or 'systemctl --status restart' commands, then the normal start/stop/restart action will be taken and the output of running 'systemctl status' will be displayed.

      This will confirm to the sysadmin that the command executed and (in the case of a failure) save the sysadmin time in seeing why it failed.

      Additional options, like the following, should be allowed:

      systemctl --status --full --no-pager start ...

      Having some option in /etc/systemd/system.conf to always behave as if '--status' was part of the command line would also be nice to have.

       

              systemd-maint systemd maint mailing list
              rhn-support-bhoefer Bernie Hoefer
              systemd maint mailing list systemd maint mailing list
              Frantisek Sumsal Frantisek Sumsal
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: