Hy,

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 pty
my ($vsppty, vsppid)=$kssh->open2pty("vsp");
then I can write to to the $vsppty, but I cannot see any information that goes through it(stdout). I tried opening file handles:
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;
but this gives me error:
Error: could not connect pty as controlling terminal!
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.

In reply to Perl HP ilo vsp by s4mur4i

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.