<?xml version="1.0" encoding="windows-1252"?>
<node id="1007481" title="Need Help in NET::SSH::Perl to fetch the status of remote pid" created="2012-12-06 01:31:28" updated="2012-12-06 01:31:28">
<type id="115">
perlquestion</type>
<author id="1007479">
HariTheNewMonk</author>
<data>
<field name="doctext">
&lt;p&gt; Hello enlightened monks. I am new in community and I need some help. I want to know if a particular process Id is running on remote machine.But When I use the NET::SSH::Perl I get "stdout" as 0 always, irrespective of process is running or not. Please help below is my code &lt;/p&gt;

&lt;code&gt; #!/usr/bin/perl
 
use Net::SSH::Perl;
 
my $host = 'xl-blr-03.ban';
my $user = 'mcsi_user';
my $password = 'password';
#-- set up a new connection
my $ssh = Net::SSH::Perl-&gt;new($host);
#-- authenticate
$ssh-&gt;login($user, $password);
#-- execute the command
my($stdout, $stderr, $exit) = $ssh-&gt;cmd("kill -0 28075 ; echo $?");
  
print " Output is $stdout \n"; &lt;/code&gt; 
</field>
</data>
</node>
