[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] How to get Machine Availability using Condor



> A quick question on how to retrieve machine's availability
> using Condor, I do not want to use condor_stats command
> every time I check for a machine availability.

Do you mean you don't want to use condor_status? That's the traditional
way to see machine availabilty in Condor. Condor Quill in 7.0.x has
added a bunch of new tables that track the machine information -- might
be something to investigate if you want to deal with a DB instead of the
condor_status command line tool.
	
> I know there is a ClassAd for each resource under Condor called
> as "LoadAvg" which gives me a machine current load average and
> which guarantees that the machine is running under Condor perfectly.
> So is there a way I can use this ClassAd expression to be exported
> in my script, which will check for the resource load? 

Yes: condor_status is the answer. Specifically:

condor_status -f "%s\t" machine -f "%f\n" loadavg

Prints a list of slots and their associated loadavg classad attribute.

> So, how can we export already set ClassAds to my script?
> I can use both Shell Scripting or C Programming to write the
> STARTD_CRON_JOBLIST script.

I'll have to leave this one to the STARTD_CRON experts. I don't know if
there's a better way to access machine attributes from a STARTD_CRON
job. It sounds like you don't want to know the loadavg for *all* the
machines in the pool, just the machine the cron job is running on. You
can modify my above condor_status call to show you this information:

condor_status -direct localhost -f "%s\t" machine -f "%f\n" loadavg
	
> I need this feature so that I could check few of the set ClassAds

You can string together lots of -f options to see any attribute in the
machine's classad.

- Ian


Confidentiality Notice.  This message may contain information that is confidential or otherwise protected from disclosure.
If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution, 
or copying of this message, or any attachments, is strictly prohibited.  If you have received this message in error, 
please advise the sender by reply e-mail, and delete the message and any attachments.  Thank you.