Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Print log at runtime instead of dumping all at once later.. Net::SSH output buffer

by Discipulus (Canon)
on Jul 02, 2015 at 10:52 UTC ( [id://1132951]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Print log at runtime instead of dumping all at once later.. Net::SSH output buffer
in thread Print log at runtime instead of dumping all at once later

Ah thanks for the clarification salva so they are strings and the method wait the remote command to complete before passing to next instruction? How the stdout_fh => $fh option is inteded to be used? is sufficient a waitpid call to be sure no more infos will came in the buffer? As you can understand i lack a lot of info about the overall schema, but if you have the patience to write some lines i'll be glad.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
  • Comment on Re^3: Print log at runtime instead of dumping all at once later.. Net::SSH output buffer
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: Print log at runtime instead of dumping all at once later.. Net::SSH output buffer
by salva (Canon) on Jul 02, 2015 at 11:04 UTC
    If you check the documentation for the capture2 method, you will see that it doesn't accept a stdout_fh argument.

    capture2 starts the remote command, and captures any output it sends to stdout and stdin until it exits. Under the hood, it also calls waitpid, and the return code from the remote process can be inspected afterwards, just looking at $?.

      Thanks for sharing the details @salva! Thanks for the pointers @Discipulus!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1132951]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-25 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found