pssh -P should output stderr too

838 views
Skip to first unread message

Stepan Koltsov

unread,
Mar 10, 2011, 4:36:04 PM3/10/11
to parallel-ssh
Hi, all.

pssh -P writes stdout but hides stderr. It is very inconvenient to me.
Because stderr is important, and even more important than stdout: I
need to know if something goes wrong.

pssh -i option shows both stdout and stderr, but it is buffered, that
is not suitable for long running commands.

I requested this change (pssh -P to print both stdout and stderr) in
the issue tracker, and Andrew requested me to bring this question to
the mailing list. So I'm here. What do people think about this
backward incompatible feature request?

Thank you.

--
Stepan

Andrew McNabb

unread,
Mar 10, 2011, 6:14:01 PM3/10/11
to parall...@googlegroups.com

I think Stepan has a good point, but I've been a bit hesitant because of
the backwards-incompatible nature of the change. Also, I'm not sure if
I have a good intuition for how people are using the -P option. Mark,
KevSmith, wjlroe, and jbyers have all mentioned that they've used the -P
option. Do any of you have insights? Thanks.

--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868

Özgür KURU

unread,
Mar 11, 2011, 1:20:18 AM3/11/11
to parall...@googlegroups.com
Maybe new parameter is better for stdout and stderr. So old user should not change their usage 

--
Özgür Kuru
Php Developer, Linux Server Admin(nokta.com), Blog Dergisi Yazarı
www.ozgurkuru.net

Stepan Koltsov

unread,
Mar 11, 2011, 12:43:10 PM3/11/11
to parallel-ssh
Too many command-line options is bad, because it is entropy increase.

I assume that pssh is not used in nontrivial output-capturing scripts,
so change of -P behavior won't harm users.

--
Stepan

Andrew McNabb

unread,
Mar 11, 2011, 2:45:43 PM3/11/11
to parall...@googlegroups.com
On Fri, Mar 11, 2011 at 09:43:10AM -0800, Stepan Koltsov wrote:
> Too many command-line options is bad, because it is entropy increase.
>
> I assume that pssh is not used in nontrivial output-capturing scripts,
> so change of -P behavior won't harm users.

By the way, there are a couple of other improvements that could be made
to the -P option:

1) Right now, the output of pssh -P is printed as soon as input arrives.
It might make sense to do line buffering to keep output from different
hosts from mixing within a line. This change would be mostly
backwards-compatible with the output-capturing scripts you describe.

2) It might also make sense to put the name/port of the host at the
beginning of each line output by -P. In my opinion, this would make -P
more useful, but it would be very much backwards incompatible.

Reply all
Reply to author
Forward
0 new messages