Perl crash course for bedtime literature? Amazing!  Thanks for finding the 
cure for the problem. We'll test it and check the code in.

Ling

Ling Gao
Poughkeepsie Unix Development Lab
IBM Systems and Technology Group
Internal: T/L 293-5692 
External: [email protected], 845-433-5692

"I never worry about the future. It comes soon enough." --- Albert 
Einstein 



From:   Velibor Tonkovic <[email protected]>
To:     [email protected]
Date:   02/08/2012 08:54 AM
Subject:        Re: [xcat-user] nodestat bug in xcatmon



Hi, took a Perl crash course for bedtime litterature. :)

The solution was simple, here's a fix:

trunk/xCAT-server/lib/xcat/plugins/nodestat.pm

1126c1126
<                        $newappstatus =~ s/(\w+)\=(\w+)//;
---
 >                        $newappstatus =~ s/(\w+)\=(\w+)//g;


Cheers,
Velli




On 02/07/2012 10:17 PM, [email protected] wrote:
> Hi
>
> It's version 2.6.9.
>
> Version 2.6.9 (svn r10986, built Wed Nov  9 04:49:31 EST 2011)
>
>
> Cheers,
> Velli
>
>
>
> -----Lissa Valletta<[email protected]>  wrote: -----
> To: xCAT Users Mailing list<[email protected]>
> From: Lissa Valletta<[email protected]>
> Date: 02/07/2012 09:19PM
> Cc: [email protected]
> Subject: Re: [xcat-user] nodestat bug in xcatmon
>
> What level of xCAT are your running
> run lsxcatd -a
>
> Lissa K. Valletta
> 2-3/T12
> Poughkeepsie, NY 12601
> (tie 293) 433-3102
>
>
>
>
>
> From:          [email protected]
> To:            [email protected]
> Date:          02/07/2012 01:50 PM
> Subject:               [xcat-user] nodestat bug in xcatmon
>
>
>
> Hi,
>
> When using xcatmon to test some simple service monitoring and I noticed
> a bug in nodestat functionality. The appstatus field in nodelist table
> isn't updated correctly.
>
> My tables look like this:
>
> tabdump monitoring
> #name,nodestatmon,comments,disable
> "xcatmon","N",,"0"
>
> #name,key,value,comments,disable
> "xcatmon","ping-interval","5",,
> "xcatmon","apps","ssh,sunrpc,nis,sge_execd",,
> "xcatmon","ssh","port=ssh,group=idx",,
> "xcatmon","sunrpc","port=111,group=idx",,
> "xcatmon","nis","cmd=/install/custom/monitoring/nis,group=idx",,
> "xcatmon","sge_execd","port=6445,group=idx",,
>
> nodestat all -m -u
> idx01-01: sge_execd,sshd,sunrpc,nis=up
> idx01-02: sge_execd,sshd,sunrpc,nis=up
> idx01-03: sge_execd,sshd,sunrpc,nis=up
>
> tabdump nodelist
> 
#node,groups,status,statustime,appstatus,appstatustime,primarysn,hidden,comments,disable
>
> "gs01","gs","ping","02-07-2012 12:31:46",,"02-07-2012 12:31:46",,,,
> "idx01-01","idx,compute,all","ping","02-07-2012
> 14:11:19",",sshd=up","02-07-2012 18:02:11",,,,
> "idx01-02","idx,compute,all","ping","02-07-2012
> 14:11:19",",sshd=up","02-07-2012 18:02:11",,,,
> "idx01-03","idx,compute,all","ping","02-07-2012
> 14:11:19",",sshd=up","02-07-2012 18:02:11",,,,
>
> I'm not a Perl programmer, but mostly I'm uncertain how it's intended to
> work, to send a fix. That's why I started testing this in the first
> place, the documentation is a bit vague on this topic.
>
> But I believe the bug is in /opt/xcat/lib/perl/xCAT_plugin or
> trunk/xCAT-server/lib/xcat/plugins in SVN, in file nodestat.pm
>
> The error is in the function process_request in the while loop on line
> 1118.
>
> while ($newappstatus =~ /(\w+)\=(\w+)/) {
> my $tmp1=$1;
> my $tmp2=$2;
> if($oldappstatus =~ /$tmp1\=/){
> $oldappstatus =~ s/$tmp1\=\w+/$tmp1\=$tmp2/g;
> }else{
> $oldappstatus = $oldappstatus."\,$tmp1\=$tmp2";
> }
> $newappstatus =~ s/(\w+)\=(\w+)//g;
> }
> $status1->{$node1}->{appstatus}= $oldappstatus;
> $status1->{$node1}->{appstatustime}= $currtime;
>
>
>
> Cheers,
> Velli
> 
------------------------------------------------------------------------------
>
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> xCAT-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xcat-user
>
>
>
>
> 
------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> xCAT-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xcat-user
>
>
> 
------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> xCAT-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xcat-user
>


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to