in reply to Re: net::OpenSSH several commands, stdout are mixed up
in thread net::OpenSSH several commands, stdout are mixed up
I tried something. I added a tee to the remote command to log its output in a file (on the host, a different file for each call).
It appears that it is traceroute that is mixing up its outputs on the host; Net::OpenSSH is working fine.
What the traceroute should return:root@HERMES:/tmp/mnt/sda1$ cat test_77.95.71.196.tee traceroute to 77.95.64.123 (77.95.64.123), 6 hops max, 38 byte packets 5 10.2.0.211 8.592 ms 2.467 ms 2.718 ms 2.530 ms 2.561 ms 2.56 +1 ms 2.687 ms 2.749 ms 2.405 ms 2.561 ms 2.562 ms 2.562 ms 6 77.95.70.196 18.432 ms 18.244 ms 18.431 ms 18.119 ms 18.463 m +s 18.213 ms 18.619 ms 18.151 ms 18.369 ms 18.119 ms 18.556 ms +18.682 ms
root@HERMES:/tmp/mnt/sda1$ traceroute -w 1 -f 5 -m 6 -q 12 -n 77.95.64 +.123 traceroute to 77.95.64.123 (77.95.64.123), 6 hops max, 38 byte packets 5 77.95.71.196 18.806 ms 18.244 ms 18.619 ms 17.995 ms 18.807 m +s 18.463 ms 18.495 ms 18.307 ms 18.744 ms 18.276 ms 18.588 ms +18.307 ms 6 77.95.70.196 18.588 ms 18.276 ms 18.432 ms 18.089 ms 18.588 m +s 18.088 ms 18.463 ms 18.119 ms 18.432 ms 18.151 ms 18.588 ms +18.181 ms
So this traceroute does not work properly when called multiple times at the same time.
Net::OpenSSH output is similar to the one on the tee file, so behaves as expected.
In Section
Seekers of Perl Wisdom