[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] Output in parallel mode.
From: |
Morgan Goose |
Subject: |
Re: [Fab-user] Output in parallel mode. |
Date: |
Tue, 15 May 2012 12:42:34 -0700 |
This should help:
http://docs.fabfile.org/en/1.4.2/usage/parallel.html#linewise-vs-bytewise-output
-goose
On Tue, May 15, 2012 at 7:20 AM, David Röhr <address@hidden> wrote:
> I've tried looking at some documentation to handle the output when
> running in parallel mode but can't seem to find anything regarding why
> the output sometimes adds a newline and sometimes discards it.
>
> $ fab -V
> Fabric 1.4.2
> ssh (library) 1.7.14
>
> I have a very simple example of a task that just checks uptime on nodes.
>
> @task
> @parallel
> @roles('uptime')
> def uptime():
> run('uptime')
>
> The usual output from this is something like this:
>
> [10.20.108.111] out: 16:12:25 up 29 days, 5:38, 1 user, load
> average: 0.00, 0.00, 0.00
> [10.20.108.36] out: 16:12:45 up 21 days, 5:05, 3 users, load
> average: 0.05, 0.01, 0.00
> [10.20.108.94] out: 16:12:25 up 32 days, 4:06, 2 users, load
> average: 0.07, 0.02, 0.00
> [10.20.108.80] out: 16:12:25 up 32 days, 5:31, 2 users, load
> average: 0.04, 0.06, 0.03
>
> But now and then you get something like this:
>
> [10.20.108.36] out: 16:12:47 up 21 days, 5:05, 3 users, load
> average: 0.05, 0.01, 0.00
> [10.20.108.111] out: 16:12:27 up 29 days, 5:38, 1 user, load
> average: 0.00, 0.00, 0.00
> [10.20.108.94] out: 16:12:27 up 32 days, 4:06, 2 users, l
> oad average: 0.06, 0.02, 0.00
> [10.20.108.80] out: 16:12:27 up 32 days, 5:31, 2 users, load
> average: 0.04, 0.06, 0.03
>
> Or something like this:
>
> [10.20.108.36] out: 16:13:52 up 21 days, 5:06, 3 users, load
> average: 0.01, 0.01, 0.00
> [10.20.108.111] out: 16:13:32 up 29 days, [10.20.108.94] out:
> 16:13:32 up 32 days, 4:07, 2 us 5:40, 1 user, loaers, load
> average: 0.02,d average: 0.00, 0.00 0.01, 0.00
> , 0.00
> [10.20.108.80] out: 16:13:32 up 32 days, 5:32, 2 users, load
> average: 0.33, 0.12, 0.04
>
> Is this intended? I don't care in which order the output gets, but I
> do care that the output looks nice. I guess it has to do with the
> line-wise vs byte-wise output.
>
>
> /D.
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user