Re: [systemd-devel] start/stop messages when activating a target?

2013-07-16 Thread Lennart Poettering
On Wed, 12.06.13 01:32, Michael Olbrich (m.olbr...@pengutronix.de) wrote:

> Hi,
> 
> When booting or during shutdown systemd prints the start stop messages for
> the services. Is it possible to get those messages when activating a target
> with systemctl?

The boot-time output is done by PID 1 itself and directly to the system
console, and we turn it off as soon as the machine is up (and as long as
it stays up) in order to not interfere with any output of whatevr is
running on the console after bootup.

Now, I figoure what you actually want is some output of systemctl
(i.e. not PID1) and directly to the tty that you ran it from? 

We could certainly add that, and it has been requested before. It's a
change with implications however, given that people who are already
using things now in scripts expect that no output is generated and might
be annyoed if it now is.

That said, I am not against changing systemctl to actually inform the
user what is going on even if the operation it executed was
successful. The least to make sure though would be that the output is
suppressed if --quiet is used.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] start/stop messages when activating a target?

2013-06-12 Thread Andrey Borzenkov
В Wed, 12 Jun 2013 12:39:00 +0100
Colin Guthrie  пишет:

> [ Please try to avoid top posting and HTML emails if possible!]
> 
> 
> 'Twas brillig, and Umut Tezduyar at 12/06/13 07:39 did gyre and gimble:
> > On Wed, Jun 12, 2013 at 5:02 AM, Andrey Borzenkov  > > wrote:
> > 
> > В Wed, 12 Jun 2013 01:32:37 +0200
> > Michael Olbrich  > > пишет:
> > 
> > > Hi,
> > >
> > > When booting or during shutdown systemd prints the start stop
> > messages for
> > > the services. Is it possible to get those messages when activating
> > a target
> > > with systemctl?
> > >
> > 
> > systemctl already prints status of job unless called with --no-block.
> > Do you want additional status messages on console?
> 
> > Same thing with isolating a target. Job statuses are not printed out on
> > the console and it would be great to see what is being stopped/started
> > at which order for debugging.
> 
> This was discussed very recently on this list, but I forget the exact
> message. Lennart thought it would be tricky due to the async nature, but
> with the standard --no-block behaviour I think this could be achievable
> (and very useful).
> 

Actually in this case it looks relatively trivial.

---
 src/systemctl/systemctl.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 3cca861..aa37b7a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1580,7 +1580,11 @@ static int wait_for_jobs(DBusConnection *bus, Set *s) {
 log_error("Job for %s canceled.", 
strna(d.name));
 else if (streq(d.result, "dependency"))
 log_error("A dependency job for %s failed. See 
'journalctl -xn' for details.", strna(d.name));
-else if (!streq(d.result, "done") && !streq(d.result, 
"skipped"))
+else if (streq(d.result, "done"))
+log_info("Job for %s completed.", 
strna(d.name));
+else if (streq(d.result, "skipped"))
+log_info("Job for %s skipped.", strna(d.name));
+else
 log_error("Job for %s failed. See 'systemctl 
status %s' and 'journalctl -xn' for details.", strna(d.name), strna(d.name));
 }
 
-- 
tg: (12f25b6..) systemctl/job_status (depends on: master)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] start/stop messages when activating a target?

2013-06-12 Thread Reindl Harald

Am 12.06.2013 08:30, schrieb David Strauss:
> On Tue, Jun 11, 2013 at 10:59 PM, Michael Olbrich
>  wrote:
>> Not for me. "systemctl {start,stop} " never prints anything.
> 
> I think it "prints status" in the Unix way: stderr explanation on
> failure and nothing on success

i don't now what is the real unix-way in this case but before systemd
/etc/init.d/whatever-service gave feedback and even if this was
Linux special and not the sysvinit way systemd does not care
for "the unix way" in so many caes - why here?

if you do not want the output in cron-script you can "> /dev/null"
add to the command, but currently it is hard to get the messages
in there an dhave it in automatic generated mails from cronjobs
and if i do not sit and type the single command in doubt i
will see it was even called



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] start/stop messages when activating a target?

2013-06-12 Thread Colin Guthrie
[ Please try to avoid top posting and HTML emails if possible!]


'Twas brillig, and Umut Tezduyar at 12/06/13 07:39 did gyre and gimble:
> On Wed, Jun 12, 2013 at 5:02 AM, Andrey Borzenkov  > wrote:
> 
> В Wed, 12 Jun 2013 01:32:37 +0200
> Michael Olbrich  > пишет:
> 
> > Hi,
> >
> > When booting or during shutdown systemd prints the start stop
> messages for
> > the services. Is it possible to get those messages when activating
> a target
> > with systemctl?
> >
> 
> systemctl already prints status of job unless called with --no-block.
> Do you want additional status messages on console?

> Same thing with isolating a target. Job statuses are not printed out on
> the console and it would be great to see what is being stopped/started
> at which order for debugging.

This was discussed very recently on this list, but I forget the exact
message. Lennart thought it would be tricky due to the async nature, but
with the standard --no-block behaviour I think this could be achievable
(and very useful).

See this thread.

http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/10880/focus=11081

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] start/stop messages when activating a target?

2013-06-11 Thread Umut Tezduyar
Hi,

Same thing with isolating a target. Job statuses are not printed out on the
console and it would be great to see what is being stopped/started at which
order for debugging.

Thanks.


On Wed, Jun 12, 2013 at 5:02 AM, Andrey Borzenkov wrote:

> В Wed, 12 Jun 2013 01:32:37 +0200
> Michael Olbrich  пишет:
>
> > Hi,
> >
> > When booting or during shutdown systemd prints the start stop messages
> for
> > the services. Is it possible to get those messages when activating a
> target
> > with systemctl?
> >
>
> systemctl already prints status of job unless called with --no-block.
> Do you want additional status messages on console?
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] start/stop messages when activating a target?

2013-06-11 Thread David Strauss
On Tue, Jun 11, 2013 at 10:59 PM, Michael Olbrich
 wrote:
> Not for me. "systemctl {start,stop} " never prints anything.

I think it "prints status" in the Unix way: stderr explanation on
failure and nothing on success.

--
David Strauss
   | da...@davidstrauss.net
   | +1 512 577 5827 [mobile]
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] start/stop messages when activating a target?

2013-06-11 Thread Michael Olbrich
Hi,

On Wed, Jun 12, 2013 at 07:02:34AM +0400, Andrey Borzenkov wrote:
> В Wed, 12 Jun 2013 01:32:37 +0200
> Michael Olbrich  пишет:
> 
> > Hi,
> > 
> > When booting or during shutdown systemd prints the start stop messages for
> > the services. Is it possible to get those messages when activating a target
> > with systemctl?
> > 
> 
> systemctl already prints status of job unless called with --no-block.
> Do you want additional status messages on console?

Not for me. "systemctl {start,stop} " never prints anything. It
just blocks until the unit is started/stoped.
Hmmm, I'm working on embedded systems here, and a lot of stuff is disabled.
But which configure option could cause something like this?

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] start/stop messages when activating a target?

2013-06-11 Thread Andrey Borzenkov
В Wed, 12 Jun 2013 01:32:37 +0200
Michael Olbrich  пишет:

> Hi,
> 
> When booting or during shutdown systemd prints the start stop messages for
> the services. Is it possible to get those messages when activating a target
> with systemctl?
> 

systemctl already prints status of job unless called with --no-block.
Do you want additional status messages on console?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] start/stop messages when activating a target?

2013-06-11 Thread Michael Olbrich
Hi,

When booting or during shutdown systemd prints the start stop messages for
the services. Is it possible to get those messages when activating a target
with systemctl?

Regards,
Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel