0

when I for example execute the command poweroff, there is no output of the command visible.

This happens with systemctl restart apache2 as well. I assume that system ouput is forwarded to somewhere. How can I "repair" that.

Darth Vader
  • 4,218
  • 24
  • 47
  • 70

1 Answers1

1

when I for example execute the command poweroff, there is no output of the command visible.

I would not expect to see any output after issuing poweroff over an SSH connection. That's not to say there won't be any in all cases, or that you couldn't customize a configuration to produce more of it, but one of the things that will happen early on in the sequence of events is your SSH connection will be lost.

So it you might want to explain more clearly and explicitly exactly what you are expecting here.

This happens with systemctl restart apache2 as well.

Yes, I think systemctl has perhaps gotten more terse -- I'm not sure because it was pretty terse to begin with. At least in cases where it succeeds in doing what it was supposed to do, it usually says nothing. You could use a simple shell wrapper instead:

#!/bin/sh

systemctl $1 $2
systemctl status $2

Call it sysdctl and then it's shorter to type too (don't call it sysctl, there's already a command with that name and it will lead to problems). If you are running this as user pi you may have to prefix those with sudo, or you could try just running it sudo, I'm not sure which one works.

Just use that sysdctl restart apache and you will get some feedback. If it's not clear, you can also use this sysdctl start apache, sysdctl stop apache, and if you are into redundant redundancy, sysdctl status apache.

I assume that system ouput is forwarded to somewhere. How can I "repair" that.

Generally it is forwarded to journald, the zany futuristic systemd logger, but I think what's above is about as useful and easy a "repair" as you are likely to find.

goldilocks
  • 60,325
  • 17
  • 117
  • 234