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.

  • you execute poweroff mean you ask the Pi to quit everything and shut it down, including your ssh session. so what output do you expect for? – Huy.PhamNhu May 15 '16 at 20:53
  • A successful run of systemctl restart apache2 does not provide any output. This is different from the old /etc/init.d/apache2 restart command from Wheezy which provides output. – Hydraxan14 May 16 '16 at 20:08
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.

  • I think you missunderstood. I never get output from commands. I assume they are printed somewhere else. poweroff was just an example (before jessie I got the message "system going down") I asume there must be a general config somewhere to set the output. – Matthias May 17 '16 at 11:15
  • I suggest you re-read your question and consider why I, or someone else, might "misunderstand", and ask a clearer version of this question on Unix & Linux. Please read meta.raspberrypi.stackexchange.com/q/794/5538 first. – goldilocks May 17 '16 at 11:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.