[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: No feedback from systemd / "systemctl stop X"... Nothing on stdout, nothing that `echo $?` can see...



On 03/11/2015 at 06:41 PM, Don Armstrong wrote:

> On Wed, 11 Mar 2015, Martinx - ジェームズ wrote:
> 
>> But, I'm not seeing the same behavior when using systemd
>> commands... I mean, how can I "track" systemd if it does provides
>> any kind of "usual" outputs to stdout?
>> 
>> What am I missing?
> 
> If you want to know what the status of a service, you run
> 
> systemctl status foo;
> 
> If you want to test to see if a service is running, use:
> 
> systemctl is-active foo;

Running those commands doesn't give you output from 'systemctl stop foo'
or the like, however.

I thought the OP was asking how to determine, from the exit code and/or
the console output of 'systemctl stop foo' (or a similar command, one
that actually _alters_ the status of a service), whether the command
actually succeeded.

You can certainly run these commands afterwards, and get the status of
the service that way, but that's no substitute for being able to get
output or the like directly from the original control command.

Does systemd really not provide any "verbose" mode for its
service-control commands, in which they report what they are doing?

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: