[systemd-devel] Outputting STDOUT and STDERR to current $SSH_TTY
Sergei Franco
sergei.franco at gmail.com
Mon Aug 14 21:14:40 UTC 2017
Please accept my apologies for HTML email (using gmail client).
For our organisation mid-2016 was the year of systemd, and exposure
has been minimal (only new builds), so I guess you had a head start. I
fully grasp the config file layout and overrides (I use them to deal
with things like LimitNOFILE and ExecStartPost). My comments were from
perspective of someone recently coming from init scripts. I still
thinks /lib/ is bad place for system config (should have been another
directory in /etc/systemd).
In contrast I had no issues with upstart what so ever.
In any way, since it is going down towards personal attacks, lets go
back to original problem:
How does one convey the service output (stdout/stderr) to the console
from which user initiated systemctl? I guess consensus is that you
cannot.
If so, is it possible to make systemctl to display status after a state change?
Eg: running systemctl restart apache2 it fires off systemctl status
apache2 after?
I guess I could alias systemctl with a wrapper...
Regards.
Sergei.
On 15 August 2017 at 02:14, Reindl Harald <h.reindl at thelounge.net> wrote:
>
>
> Am 14.08.2017 um 12:31 schrieb Sergei Franco:
>>
>> Even simple things like where is the bloody unit defined, is it in
>> /etc/systemd/system/ or /lib/systemd/system/ or is it in
>> /usr/lib/systemd/system/?
>
>
> guess what the loaded line tells you...
>
> [root at rh:~]$ systemctl status httpd
> ? httpd.service - Apache Webserver
> Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor
> preset: disabled)
> Active: active (running) since Mo 2017-08-14 15:11:06 CEST; 58min ago
>
> [root at rh:~]$ systemctl status dhcpd-vmware.service
> ? dhcpd-vmware.service - DHCPD VMWare
> Loaded: loaded (/etc/systemd/system/dhcpd-vmware.service; enabled; vendor
> preset: disabled)
> Active: active (running) since Mo 2017-08-14 09:59:18 CEST; 6h ago
>
>> What about tail -f 1000 /var/log/messages | grep bla | awk .. Can't really
>> do that any more, as journalctl does not support number of lines to follow
>> from (and again, I could be wrong here, I have been wrong many times).
>
>
> what about forward it to rsyslog as i do and just continue using what you
> used before
>
>> Why /lib/ for essentially config files? Isn't what /etc/ is for?
>
>
> beause now you can override distribution configs and unit-files in a
> predictable way by just create the eactly same file below /etc/systemd/sysem
> as the distribution shipped it with /usr/lib/systemd/system
>
> because now you have things like /etc/systemd/system/servicename.d/ for
> specific overrides which works *predictable* and can be combined as you want
> it - but you probably don't gasp that by lack of basic understanding
>
> and if you want to be taken serious stop convert a plaintext mail
> conversation into useless HTML responses overrding my font and color
> settings
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list