Here is my code which logs in and performs some task but it does not show the output of top and pstree command what would i do to get the output of these commands along with vmstat and iostat
#!/usr/bin/perl -w use Net::SSH::Perl $host = '192.168.3.36'; $username = 'root'; $login_passwd = 'password'; #$session -> close; #my $cmd = "ls -l"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($username, $login_passwd); #my $arg= join '',@ARGV; #while ($arg) { while(<>) { $cmd = $_; my($stdout,$sterr, $stderr) = $ssh->cmd("$cmd"); print "\n$stdout\n$stderr "; print "quiting from the server " if eof; } Thanks for all the responses .. Regards, Pratap