Ask a Question related to PERL Beginners, Design and Development.
-
Aman Thind #1
Remote script execution
Hello Friends,
I would be really grateful if someone could help me out with this.
I want to write a script that when executed will get lots of details from 10
different Unix(AIX) and Windows(XP) boxes and generate a report.
The details to be gathered about the machines include :
1) Names and versions of all the softwares on the machines.
2) Disk space usage.
Etc...
Please guide me how I could go about it...
I am not aware of how a script running on 1 machine take data from commands
that are to be run on other...(like rsh)
Thanks in advance
-aman
Aman Thind Guest
-
timing a script execution
Can someone plase help me? I've got a database of links. And I need to regularly check, whether these links are valid or no. In addition, I need to... -
<img> tag ASP script execution
I have an asp page that contains a simple insert statement and redirect i.e.: Page1.asp <%oconn.execute "insert into table 1 values(1)"... -
execution of script from button
Hi all: I am a newbie in terms of PERL. Here's what i want to do. I ahve a HTML page that has a button on it. I want a user to click on that... -
[PHP] Script Execution Time
Petya A Shushpanov <mailto:shpa@eastof.ru> on Monday, July 28, 2003 3:41 PM said: You could one up this class by creating another method that... -
Script Execution Time
Could someone pass on a snippet, a function or a technique for measuring script times. It appears the host I am with is having some PHP engine... -
Charles K. Clarkson #2
RE: Remote script execution
Thind, Aman <aman.thind@fidelity.co.in> wrote:
:
: Hello Friends,
:
: I would be really grateful if someone could help me out with
: this.
:
: I want to write a script that when executed will get lots of
: details from 10 different Unix(AIX) and Windows(XP) boxes and
: generate a report.
:
: The details to be gathered about the machines include :
[snip]
How are the machines connected?
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328
Charles K. Clarkson Guest
-
Wolf Blaum #3
Re: Remote script execution
For Quality purpouses, Thind, Aman 's mail on Thursday 05 February 2004 06:24
may have been monitored or recorded as:Hi> Hello Friends,
my ideas:> I want to write a script that when executed will get lots of details from
> 10 different Unix(AIX) and Windows(XP) boxes and generate a report.
>
> The details to be gathered about the machines include :
>
> 1) Names and versions of all the softwares on the machines.
>
> 2) Disk space usage.
>
> Etc...
either see if you can get these information from each of these machines by
establishing a telnet or ssh connection to them and remotly executing
commands (maybe own perlscripts) on the remote machines - Net::Telnet
from CPAN allows you client side connections using the telnet protocol.
Net::SSH goes for ssh.
Or - but that gets complicated: write client and server side software using
IO::Socket and establish your own commands.
Since you will probably need OS depending software on the remote machines
anyway to get you infos I would go with the first solution.
Also take a look at the available remote backup solutions on the net: maybe
you find something to modify.
But maybe you first want to see how OS dependend your queries are and what
"lots" means: your network admin might appreciate the idea of localy
generating the reports and sending them to the query machine at once
instead of generating them by remotly executing commands.
I think, whether you go with a centralisied or local solution depends on how
often you expect to change the details you want to query and the frequency in
which new systems and OSs are added to your net.
If seldom or never, you might think of generating the reports localy and
mailing them independently to the query machine (eg, via email).
If frequently, then you might not want to run arround and change your local
scripts everytime - see first ideas.
You see: it gets out of hand - i better stop here.
good luck, Wolf
Wolf Blaum Guest
-
Aman Thind #4
RE: Remote script execution
Hello Charles,
We have a 100 mbps LAN running tcp\ip...typical to company networks.
Thanks
Aman Thind
-----Original Message-----
From: Charles K. Clarkson [mailto:cclarkson@htcomp.net]
Sent: 05 February 2004 11:31
To: [email]beginners@perl.org[/email]
Subject: RE: Remote script execution
Thind, Aman <aman.thind@fidelity.co.in> wrote:
:
: Hello Friends,
:
: I would be really grateful if someone could help me out with
: this.
:
: I want to write a script that when executed will get lots of
: details from 10 different Unix(AIX) and Windows(XP) boxes and
: generate a report.
:
: The details to be gathered about the machines include :
[snip]
How are the machines connected?
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328
--
To unsubscribe, e-mail: [email]beginners-unsubscribe@perl.org[/email]
For additional commands, e-mail: [email]beginners-help@perl.org[/email]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Aman Thind Guest
-
Charles K. Clarkson #5
RE: Remote script execution
Thind, Aman <aman.thind@fidelity.co.in> wrote:
:
: We have a 100 mbps LAN running tcp\ip...typical to company networks.
:
: -----Original Message-----
: From: Charles K. Clarkson [mailto:cclarkson@htcomp.net]
: Sent: 05 February 2004 11:31
: To: [email]beginners@perl.org[/email]
: Subject: RE: Remote script execution
:
:
: Thind, Aman <aman.thind@fidelity.co.in> wrote:
: :
: : Hello Friends,
: :
: : I would be really grateful if someone could help me out with
: : this.
: :
: : I want to write a script that when executed will get lots of
: : details from 10 different Unix(AIX) and Windows(XP) boxes and
: : generate a report.
: :
: : The details to be gathered about the machines include :
: [snip]
:
: How are the machines connected?
:
You might try the Operating System Interfaces section of CPAN:
[url]http://search.cpan.org/modlist/Operating_System_Interfaces[/url]
The Quota module seems to do much of what you want. I don't
have experience with your problem. Perhaps someone else will come
on later and suggest a better module to start with.
HTH,
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328
Charles K. Clarkson Guest
-
Chris McMahon #6
RE: Remote script execution
As Wolf pointed out, this can get complex. Here's some code that> -----Original Message-----
> From: Thind, Aman [mailto:aman.thind@fidelity.co.in]
> Sent: Wednesday, February 04, 2004 10:25 PM
> To: [email]beginners@perl.org[/email]
> Subject: Remote script execution
>
>
> Hello Friends,
>
> I would be really grateful if someone could help me out with this.
>
> I want to write a script that when executed will get lots of
> details from 10
> different Unix(AIX) and Windows(XP) boxes and generate a report.
ssh's to a remote machine, runs a little script "/usr/newPort/addOne.pl"
(not shown) to add one to a number in a file "portNum" on the remote
machine, then ssh's to the machine again and uses "cat" to assign the new
number in the file to a variable $port for the script on the local machine.
qx/\/usr\/bin\/ssh -n -l root 172.26.10.10 'perl
\/usr\/newPort\/addOne.pl'/;
$port = qx/\/usr\/bin\/ssh -n -l root 172.26.10.10 'cat
\/usr\/newPort\/portNum'/;
chomp $port;
Please investigate the difference between "qx" and "system"-- they
are not the same. For the first example above, either would work; for the
second, only "qx" will work. That you need to capture information leads me
to think you probably need "qx", but I could be wrong. For "ssh" and "perl"
and "cat" in the examples above, substitute whatever you need to do to get
your information on the remote machines.
I hope that's enough information to get you started...
-Chris
Chris McMahon Guest
-
Angel De Vicente #7
RE: Remote script execution
Hi there,
Sorry if this has already been mentioned (I didn't get the original message),>> > Hello Friends,
> >
> > I would be really grateful if someone could help me out with this.
> >
> > I want to write a script that when executed will get lots of
> > details from 10
> > different Unix(AIX) and Windows(XP) boxes and generate a report.
but if what you want to do is have some degree of interaction in the remote
machine you might want to consider Perl-Expect :
[url]http://sourceforge.net/projects/expectperl[/url]
I actually use it for a very similar task as yours, running periodically to
obtain data (ram, hard disk space, etc) on a large number of machines in our
institute. (It can do for you so much more than just this, but this is also
possible).
Cheers,
Angel de Vicente
--
----------------------------------
[url]http://www.iac.es/galeria/angelv/[/url]
PostDoc Software Support
Instituto de Astrofisica de Canarias
Angel De Vicente Guest



Reply With Quote

