s4mur4i has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to write a script which will trigger a core dump on the server. The first part (triggering the dump) is complete, i am writing the second part at moment which monitors the core dump procedure.
The idea is that I log into the servers vsp and monitor it from there.
The problem: after i succesfully log into server and send a:
my ($out, $err) = $kssh->capture2("vsp");
the screen just hangs since vsp requires a esc( key combination to terminate.
When I try to solve the issue with a ptythen I can write to to the $vsppty, but I cannot see any information that goes through it(stdout). I tried opening file handles:my ($vsppty, vsppid)=$kssh->open2pty("vsp");
but this gives me error:my $tty = $vsppty->slave; $vsppty->make_slave_controlling_terminal(); my $ttyfd=$tty->fileno; close $vsppty; open STDIN, "<&$ttyfd" or die $!; open STDOUT, ">&$ttyfd" or die $!; open STDERR, ">&STDOUT" or die $!; close $tty;
I am not that expirienced yet, so I might be overlooking or not understanding something. Digging into the NET::Openssh module documents I was hoping that there is a possibility to use stdout_fh, and stdin_fh and read write to these handles, but open2pty doesnt support it.Error: could not connect pty as controlling terminal!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl HP ilo vsp
by salva (Canon) on May 29, 2012 at 20:44 UTC | |
by s4mur4i (Initiate) on May 31, 2012 at 08:15 UTC | |
by salva (Canon) on May 31, 2012 at 10:25 UTC | |
by s4mur4i (Initiate) on Jun 01, 2012 at 10:25 UTC | |
|
Re: Perl HP ilo vsp
by bulk88 (Priest) on May 30, 2012 at 03:20 UTC | |
by s4mur4i (Initiate) on May 31, 2012 at 07:55 UTC | |
by bulk88 (Priest) on May 31, 2012 at 20:59 UTC | |
by being_rachna (Initiate) on Oct 17, 2016 at 13:32 UTC |