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

Re: [Condor-users] Has use of regexps with condor_status changed between 7.4 and 7.7?



On Wed, Mar 21, 2012 at 05:00:20PM -0700, Rob wrote:
> I have tried "-attributes" but it does not work they way I expect.
> 
> It seems to work only when also used with "-l" or "-long", otherwise condor_status will just output its standard output. When used with "-long", I get some unexpected attributes as unwanted bonus, for example:
> 
> $ condor_status -l -attributes MyAddress
> 
> 
> MyType = "Machine"
> MyAddress = "<105.125.228.61:1048>"
> TargetType = "Job"
> CurrentTime = time()
> 
> MyType = "Machine"
> MyAddress = "<105.125.228.68:1047>"
> TargetType = "Job"
> CurrentTime = time()
> 
> 
> Why do I also get "MyType", "TargetType", and "CurrentTIme", if they are not listed as "-attributes"?
> 
> 
> More importantly: I don't understand how to use the attribute flag in order to achieve my original goal:
> 
> condor_status -f "%s " MyAddress -f "%s \n" 'regexps("<([^:]+):\d+>", MyAddress, "\1")'
> 
> 
> which only displays a list of IP numbers.
> 
> 
> Thank you.
> 
> Rob.

condor_status requires only necessary attributes from server. This speeds up
condor_status on big pools. "condor_status -long" require all attributes. 

If you use custom formatting, then condor will not append default attributes to
projection list of attributes. You can expicitly require attributes with command
line argument "-attributes", which expect comma separated list of attributes.

So in your case:

condor_status -f "%s \n" 'regexps("<([^:]+):\d+>", MyAddress, "\1")' -attributes
MyAddress

Regards,
Lukas