We're back. Kind of. Clearing out the cobwebs. Much stuff broken. Much stuff coming. More details to come. So much spam.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

6
Failover Cluster Resource Management script help
Post Body

Every time I try to sit down and write this script, I spend a day in front of a command prompt... then I realize its too hard there so I open up a powershell prompt, spend 2 more days... and then my head explodes.

I'm not looking for somebody to write it, but maybe just somebody to point me in the direction of something that is similar.


The environment:

  • Multiple Server 2008
  • Failover Clustering
  • Many-person administration
  • Running the script on a server that isn't one of the failover nodes
  • 100 Resources spread out across 1 cluster, 4 nodes, with about 20 groups.
  • About 50% of the resources are java.exe...

The problem:

My coding team doesn't have the time to fix a problem with their code. When failover manager fails over (or even gracefully turns off) the java.exe's they don't always turn off. Leaving us to find and kill erroneous javas.

What I'd like to do:

Get a list of the PIDs for all the JAVA.exe's on each node of the cluster. Then look on each node/server for any JAVA.exe's that aren't on that list and terminate the process.

It seems so simple. I don't know why I've been having so much trouble. I am generally just a script-kiddy, googling something similar and adjusting it to fit my own needs, but this is something a bit too specialized I guess. I could PROBABLY do it with a batch file, but our group and resource names are pretty dynamic and I'd hate to make something that breaks when somebody puts a space in a group name or something.


D:>cluster /cluster:CLUSTER RES /priv | findstr "CurrentPID"

D RESOURCE_NAME CurrentPID 21768 (0x5508)

Our script puts a /priv property for "CurrentPID" . There's about 50 or so on some clusters. No Javas are running on the servers that aren't managed by the cluster. The Get-Cluster powershell commands seem powerful, but I'm unsure how to do this...

Author
Valendr0s

15 years old ยท 237k karma

Account strength 100%
Age
15 years
Total karma
237k
Comment karma
235k
Signals Verified email Verified flair
View profile
Profile refreshed 1 year ago Posts refreshed 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
13 years ago