Mailing List Archives
Public Access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] condor node status
- Date: Wed, 23 May 2012 21:24:03 -0400
- From: Ben Cotton <bcotton@xxxxxxxxxx>
- Subject: Re: [Condor-users] condor node status
On Wed, May 23, 2012 at 9:06 PM, Santanu Das <santanu@xxxxxxxxxxxxxxxxx> wrote:
> Yes, true, but still doesn't give any definitive answer:
Yes it does. There are multiple states a slot can be in anyway, so
trying to treat it as a boolean won't work. For a down node, you get
an empty response. If you're simply trying to test if a node is in a
pool or not, you can do something like this (bash)
status=`condor_status -format "%s\n" State $machine`
if [ $status ]; then
# do whatever you'd do if the host is up
else
# do whatever you'd do if the host is down
fi
One thing to note is that if a host has multiple slots, you'll get
multiple output (with the specific format example, you'll have a line
per slot). If you want to do anything more than a simple comparison as
above, you should either specify slot1@$machine or use head or tail to
get only a single line of output.
--
Ben Cotton
Systems Research Engineer
IT Research Systems
Purdue University