RE: [Ssh-sftp-perl-users] What is the best way to Install Net::SSH::Perl on WinXP
Brought to you by:
dbrobins
From: Bobby J. <bob...@se...> - 2006-03-30 22:18:02
|
Hi All, >Make sure you use the correct repo. >Installing on Perl 5.8.x ( It uses old versions, but it works ) >ppm3 >rep add soulcage http://www.soulcage.net/ppds.58/ install Net-SSH-W32Perl >Installing on Perl 5.6.x ( It uses old versions, but it works ) >rep add soulcage http://www.soulcage.net/ppds/ install Net-SSH-W32Perl Note that I have successfully installed Net::SSH:w32Perl. How ever I have problems running my scripts. Is this module suppose to be equivalent to Net::SSH:Perl (A Perl module for Linux). I have a script that runs in Linux land without any problems but I can't get it to run on WinXP. I need to provide a WinXP box for a third party to run some tests and Hence the need for using window (Even though I personally can't stand WinXP). My Linux based script is: #!/usr/bin/perl use strict; use Net::SSH::w32Perl; use Net::SSH::Perl; my $user =3D "root"; my $pass =3D "password"; my $host =3D "192.168.0.173"; my $cmd =3D "cat /proc/meminfo | grep MemFree"; my $ssh =3D Net::SSH::Perl->new($host); $ssh->login($user, $pass); for (1..1000) { my ($stdout, $stderr, $exit) =3D $ssh->cmd($cmd); my @temp =3D split /\s+/, $stdout; my $FreeMem =3D $temp[1]; Print "Current Free memory is: $FreeMem" if ($FreeMem > 10000); print "Current Free memory has dropped below 10K. Free Mem is: $FreeMem" if ($FreeMem < 10000); if ($FreeMem < 2000) { print "Critical Error. Current Free memory has dropped below 2K. Free Mem is: FreeMem"; last; } sleep 600; } |