Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Find active cluster node in Solaris 10

by maskull (Novice)
on Aug 22, 2012 at 16:36 UTC ( #989092=perlquestion: print w/replies, xml ) Need Help??
maskull has asked for the wisdom of the Perl Monks concerning the following question:

Hello. The cluster is two nodes running Solaris 10. From within a Perl script I need to detemine which is the active node. Optionally, determine whether the script is being run from the active node. Hope there is someone who can figure this one out, thanks!

Replies are listed 'Best First'.
Re: Find active cluster node in Solaris 10
by flexvault (Monsignor) on Aug 22, 2012 at 17:29 UTC

    maskull,

    I saw your question earlier, but since no one has commented, I'll take a shot!

    I haven't used a Solaris system in 10+ years, but on other *nix systems, I would use:

    my @results = qx/ . . . /;
    Whatever system command you would use on the console, you can issue via 'qx' and it will give you the answer. In this context, I'm using the array @results, so you can get multiple lines of output. And, as usual there are multiple ways of doing this.

    Good Luck!

    "Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://989092]
Approved by sundialsvc4
help
Chatterbox?
[stevieb]: I *finally* have my automated RPi::WiringPi and related distribution automated test build system done! It's easy to use (relatively), simple to set up, and works awesome! Cycles every X mins, checks github for new commits, and builds...
[stevieb]: ...optionally displaying the results to a connected LCD with the dist name, date, time and commit of the last run along with a FAIL/PASS. Obviously I can't get CI with Travis for a RPi, so I built my own :) It'll take a couple of blog posts I think...
[stevieb]: ...to cover it all. Awesome thing is that you can dispatch ANY distribution to it (and include all revdeps if desired), and it works all the same as if I'm just testing the RPI code itself
[stevieb]: I'm rather pleased with myself and everything I've leared along this arduous and sometimes frustrating path
[stevieb]: Just need to implement an email plugin or something so I can get alerted remotely if the status of a build has changed from the last run

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2017-04-28 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (529 votes). Check out past polls.