Advertisement

04.23.2008 at 12:54PM PDT, ID: 23348098
[x]
Attachment Details

perl report generation

Asked by saibsk in Perl Programming Language

I am reading the client info from a file and then looking for whether these processes exist for the client.

Server, Position, DV01r, Dfltr, JFlow, JServer, Order. I need to look for all these processes and report the ones not there as missing
 I want to generate the report with the clientname and the process missing for the associated client usign Perl. I tried something like but it is not complete.

open(FH,"<clients.txt");
while($currLine = <FH>){
if ($currLine =~ /(client\d+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/){
open STDOUT,">data_bk.out" or die $!;
print "Checking for missing daemons for CLIENT:$1\n";
@args=("ssh","user\@$2","ptree $1");
system(@args);

clients.txt
 Client     Host         Instance        Client Name             Server      Port   Size
#--------------------------------------------------------------------------------------------------
client12       app07           client12     Batch_34      10.100.155.210  12    S
client24       app07            client24     Batch_35      10.100.155.247  12   SStart Free Trial
[+][-]04.23.2008 at 01:17PM PDT, ID: 21424892

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 01:27PM PDT, ID: 21424982

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 01:33PM PDT, ID: 21425039

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 01:34PM PDT, ID: 21425056

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628