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

[HTCondor-users] condor_status: sort vs limit



Hello,
I have a "bug or feature" question.

Today I was looking for a way to identify a few of the oldest running jobs in the cluster, so i tried something like this:

[root@farm-ops ~]# date
gio 11 giu 2020, 21.13.49, CEST
[root@farm-ops ~]# condor_status -sort JobStart -af 'formatTime(JobStart,"%Y-%m-%d:%H:%M:%S")' GlobalJobId -lim 2
2020-06-11:15:12:17 ce01-htc.cr.cnaf.infn.it#494816.0#1591881064
2020-06-11:20:51:55 sn-01.cr.cnaf.infn.it#5037059.0#1591899848

Which doesn't work as i would expect, as the sort operates on the "limit-ed" resultset.

In fact, the desired result comes truncating later, this way.
[root@farm-ops ~]# condor_status -sort JobStart -af 'formatTime(JobStart,"%Y-%m-%d:%H:%M:%S")' GlobalJobId | head -2
2020-06-06:23:06:06 sn-01.cr.cnaf.infn.it#4907255.5#1591477533
2020-06-06:23:06:06 sn-01.cr.cnaf.infn.it#4907255.8#1591477533

Is that intended behaviour?

Cheers,
Stefano