3

When I run the command systemctl status, I got this output:

[root@192 ~]# systemctl status sshd.service
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2022-04-29 21:48:45 PDT; 3min 43s ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 1288 (sshd)
    Tasks: 1 (limit: 100917)
   Memory: 2.2M
   CGroup: /system.slice/sshd.service
           └─1288 /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-c>

Apr 29 21:48:45 localhost.localdomain systemd[1]: Starting OpenSSH server daemon... Apr 29 21:48:45 localhost.localdomain sshd[1288]: Server listening on 0.0.0.0 port 22. Apr 29 21:48:45 localhost.localdomain sshd[1288]: Server listening on :: port 22. Apr 29 21:48:45 localhost.localdomain systemd[1]: Started OpenSSH server daemon. [root@192 ~]#

As you can see, the CGroup output is truncated (note the last > character). How can I get the full output?

  • 1
    @muru I don't think that's relevant here. Systemd has its own way of doing things, including horizontal truncation/scrolling – Chris Davies Apr 30 '22 at 18:38
  • 1
    @roaima in that case, a dupe of https://unix.stackexchange.com/q/50766/70524 (also scrolling is left to the pager, systemctl doesn't do that) – muru Apr 30 '22 at 19:03
  • @muru not that one either, I think – Chris Davies Apr 30 '22 at 20:23
  • 1
    It is the same as the accepted answer, and of course the question is about truncated output in both cases. Sadly I can't change my dupe vote. – muru May 01 '22 at 04:35

1 Answers1

2

systemctl status --full

Enter the command above. Some people get confused with the full flag because they don't realize that it enables the use of the arrow key to scroll right. Depending on the color-scheme you are using with your terminal, you should see the > character (which you referred to as the last character) highlighted.


This is what it looks like when I execute the command.

enter image description here


If you look to the far right you will see the '>' characters are highlighted. When the command is executed with-out the --full, the '>' charcters are rendered unhighlighted.

JΛYDΞV
  • 136
  • For me using systemd 241 (241), the --full command adds no value - cursor right is already enabled. To list the output with wrap, use systemctl status | cat – Chris Davies Apr 30 '22 at 10:58
  • @roaima oh okay, well you might want to edit that into the answer above so anyone else that winds up in this Q&A has access to that information, as comments are subjugated to delation after a period of time. – JΛYDΞV Apr 30 '22 at 17:42
  • Happy to do so. Some people prefer to read the comments and update their own question so I tend to start with suggestions that way – Chris Davies Apr 30 '22 at 18:36
  • Some will people get really snarky over the answers they write. They fail to realize that the answers fall under the Creative Commons License, which means that anyone can use or update the answer, so long as the person who receives credit for originally authoring the answer is the one who wrote it. The creative commons is legally interpreted to mean that everyone has a write to the answer, but the name attached to the answer can never be removed. – JΛYDΞV May 01 '22 at 06:03
  • Besides I really hope the time I spend here is useful to someone. I mean what good are the answers I write if they arn't helpful to anyone? lol, anywho, ty @roaima – JΛYDΞV May 01 '22 at 06:04