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

Re: [HTCondor-users] Evaluate expression with -json option



Sorry, yes skip the r.  but you need to add V to have strings quoted.  g is only needed if there is more than one classad returned.

 

condor_status -const partitionableslot testnode1.test.test1-test2.com -af:lVn start machine | condor_status -json -ads â

 

-tj

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Vikrant Aggarwal
Sent: Thursday, November 28, 2019 1:36 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Evaluate _expression_ with -json option

 

Thanks for your response. It was really helpful. 

 

May be I need to skip r in -af:lrng as r is giving me a unevaluated _expression_ also g also can be skipped. 

 

With some attributes output gets mangled example machine name. 

 

$ condor_status -const partitionableslot testnode1.test.test1-test2.com -af:ln start machine | condor_status -json -ads -
[
{
  "machine": "\/Expr(testnode1.test.test1 - test2.com)\/",
  "start": true
}
]

 


Thanks & Regards,

Vikrant Aggarwal

 

 

On Wed, Nov 27, 2019 at 11:46 PM John M Knoeller <johnkn@xxxxxxxxxxx> wrote:

condor_status -const partitionableslot -af:lrng start | condor_status -json -ads â

 

the first invocation of condor_status with -af:lrng evaluates and prints attrbutes as key = value,  that is piped to the second invocation

of condor_status what reads ads from stdin and formats writes them back out in json format

 

But be aware that if the start _expression_ depends on any job attributes, then it will  always evaluate to undefined in the absence of a job ad.

 

-tj

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Vikrant Aggarwal
Sent: Wednesday, November 27, 2019 3:32 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Evaluate _expression_ with -json option

 

Hello Experts,

 

Any thoughts on this query?


Thanks & Regards,

Vikrant Aggarwal

 

 

On Mon, Nov 25, 2019 at 5:25 PM Vikrant Aggarwal <ervikrant06@xxxxxxxxx> wrote:

Hello Experts,

 

Below command is giving me the condition set for start not the evaluated _expression_. 

# condor_status  -const partitionableslot -json -attr start

Adding eval(start) also doesn't help. Can we get the evaluated _expression_ with -json or -xml option?


Thanks & Regards,

Vikrant Aggarwal

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/