Re: Using ssh for uptime?

2002-12-11 Thread zentara
On Tue, 10 Dec 2002 18:37:50 -0500, [EMAIL PROTECTED] (Chad Kellerman) wrote: >Mark, >This is a pain to install. I would do it thru CPAN. >perl -MCPAN -e shell >cpan>install Net::SSH::Perl > I fyou don't have root access to install perl modules, try to use >Net::SSH. > >use strict; >use warni

RE: Using ssh for uptime?

2002-12-10 Thread chad kellerman
OTECTED] > > > > -Original Message- > From: zentara [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 7:58 AM > To: [EMAIL PROTECTED] > Subject: Re: Using ssh for uptime? > > > On Sun, 8 Dec 2002 23:14:36 -0900, [EMAIL PROTECTED] (Mark-Nathan

RE: Using ssh for uptime?

2002-12-10 Thread Mark-Nathaniel Weisman
[mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 7:58 AM To: [EMAIL PROTECTED] Subject: Re: Using ssh for uptime? On Sun, 8 Dec 2002 23:14:36 -0900, [EMAIL PROTECTED] (Mark-Nathaniel Weisman) wrote: >Mark, > I've got the code you sent installed and working (or almost work

Re: Using ssh for uptime?

2002-12-09 Thread zentara
On Sun, 8 Dec 2002 23:14:36 -0900, [EMAIL PROTECTED] (Mark-Nathaniel Weisman) wrote: >Mark, > I've got the code you sent installed and working (or almost working >anyway) snippet below: >I'm trying to get this silly thing working, so any ideas or suggestions >are more than appreciated. Hi, I use

Re: Using ssh for uptime?

2002-12-09 Thread Mark Goland
Well whats not working ?? Mark - Original Message - From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]> To: "Mark Goland" <[EMAIL PROTECTED]> Cc: "perl" <[EMAIL PROTECTED]> Sent: Monday, December 09, 2002 3:14 AM Subject: RE: Using ssh for

RE: Using ssh for uptime?

2002-12-09 Thread Mark-Nathaniel Weisman
el Weisman Cc: perl Subject: Re: Using ssh for uptime? system returns shell exit status - Original Message - From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]> To: "perl" <[EMAIL PROTECTED]> Sent: Sunday, December 08, 2002 3:23 AM Subject: RE: Using ssh f

Re: Using ssh for uptime?

2002-12-08 Thread Mark Goland
system returns shell exit status - Original Message - From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]> To: "perl" <[EMAIL PROTECTED]> Sent: Sunday, December 08, 2002 3:23 AM Subject: RE: Using ssh for uptime? > This is the line that allowed me

RE: Using ssh for uptime?

2002-12-08 Thread Mark-Nathaniel Weisman
2002 1:21 PM To: Mark Weisman Cc: perl Subject: Re: Using ssh for uptime? why are you printing the comman to a file... this is how I would rewrite the part that does the command. If you dont want to write it as a shell command use Socket, or use IO::Socket. use FileHandle; use IPC::Open2; My (

Re: Using ssh for uptime?

2002-12-07 Thread Dr. Poo
HAHAHAHaHa always happens! -Chris On Saturday 07 December 2002 11:23 am, chad kellerman wrote: > Dammit, got the split wrong. > > try this: > my ( $time, $uptime ) = ( split / /, $out[0] )[0,1]; > > my bad.. > > > > chad > > On Sat, 2002-12-07 at 12:11, Mark Weisman wrote: > > I've

Re: Using ssh for uptime?

2002-12-07 Thread Mark Goland
why are you printing the comman to a file... this is how I would rewrite the part that does the command. If you dont want to write it as a shell command use Socket, or use IO::Socket. use FileHandle; use IPC::Open2; My (@machines,$host,$user,$pass) # read your record Open(INFILE," ); Close(INFILE

Re: Using ssh for uptime?

2002-12-07 Thread chad kellerman
Dammit, got the split wrong. try this: my ( $time, $uptime ) = ( split / /, $out[0] )[0,1]; my bad.. chad On Sat, 2002-12-07 at 12:11, Mark Weisman wrote: > I've got a script that I'm working on that will use SSH to check the > uptime on servers within my domain. However, I'm unsure of how

Re: Using ssh for uptime?

2002-12-07 Thread chad kellerman
Mark, It may be easier to go by route of the Net::SSH::Perl module or Net::SSH module #!/usr/bin/perl use strict; use warnings; my $user = "bob"; my @hosts = "host1, host2, host3, host3"; foreach my $host (@hosts) : my $cmd = "/usr/bin/uptime"; my $ssh = Net::SSH::Perl->new( $host, po

Using ssh for uptime?

2002-12-07 Thread Mark Weisman
I've got a script that I'm working on that will use SSH to check the uptime on servers within my domain. However, I'm unsure of how exactly to do this this is what I have so far. ##!/usr/bin/perl #My (@machines,$host,$user,$pass) #Open(INFILE,"; #Close(INFILE); #Foreach my $rec (@machines) { #