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

Re: [HTCondor-users] headers on condor_status command



You can split the slotname into slot and host using the *splitslotname* function.


   splitslotname(RemoteHost)[1]        AS WorkerNode



From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Beyer, Christoph
Sent: Wednesday, December 14, 2022 2:10 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] headers on condor_status command

 

Hi,

 

the '-compact' option somehow does what you want I suppose (?)

 

Best

christoph

 


--
Christoph Beyer
DESY Hamburg
IT-Department

Notkestr. 85
Building 02b, Room 009
22607 Hamburg

phone:+49-(0)40-8998-2317
mail: christoph.beyer@xxxxxxx

 


Von: "Jeff Templon" <templon@xxxxxxxxx>
An: "HTCondor-Users Mail List" <htcondor-users@xxxxxxxxxxx>
Gesendet: Mittwoch, 14. Dezember 2022 08:59:44
Betreff: Re: [HTCondor-users] headers on condor_status command

 

Hi,

Coming back to this,  I have the following cpf file:

 

SELECT NOSUMMARY

   ClusterId  AS  JOB_ID PRINTAS JOB_ID

   Owner AS Username

   Cmd               AS CMD WIDTH 15 PRINTAS JOB_DESCRIPTION

   CpusProvisioned   AS CPUS

   MemoryProvisioned AS MEMREQ PRINTAS READABLE_MB

   JobStatus         AS ST PRINTAS JOB_STATUS

   RemoteUserCpu     AS RUN_TIME  WIDTH 12    PRINTAS CPU_TIME

   RemoteHost        AS WorkerNode PRINTAS REMOTE_HOST

 

That last one is bugging me, because I really want a remote HOST, but what I get is a remote SLOT.

 

49718.224 templon  ferm.condor 274 1    128.0 MB R   19+21:43:30 slot1_24@xxxxxxxxxxxxxxxxxxxx

49718.226 templon  ferm.condor 276 1    128.0 MB R   19+21:43:30 slot1_24@xxxxxxxxxxxxxxxxxxxx

49718.243 templon  ferm.condor 293 1    128.0 MB R   19+21:43:30 slot1_24@xxxxxxxxxxxxxxxxxxxx

 

Is there some way I can get just the HOST (ie wn-lot-054.nikhef.nl or even better wn-lot-054)?  Iâve tried several permutations (also with WIDTH and TRUNCATE) but canât make it work.

 

Thanks,

 

JT

 

 

On 22 Nov 2022, at 17:26, John M Knoeller via HTCondor-users <htcondor-users@xxxxxxxxxxx> wrote:

 

You canât control the headers using -af,  but you can if you use a print format file with the -pr option.

Custom print formats can fully control the classad print engine that -af and -format use, including the headings and specialized data formatters.

 

 

For example, if you create file named templon.cpf with this content:

 

SELECT NOSUMMARY

   Cmd

   Arguments

   CpusProvisioned AS CPUs

   JobId 

   Owner

   formatTime(Qdate) AS Qdate

  formatTime(JobCurrentStartDate) AS StartDate 

   Machine

   interval(time()-JobCurrentStartDate) AS RunTime

   CpusUsage

   NumJobStarts

GROUP BY

  JobCurrentStartDate DECENDING

 

 

then run this 

 

condor_status -claimed -pr templon.cpf -constraint 'Owner=="templon"'

 

 

To duplicate some of the time formatting of the regular condor_status output, try using FORMATAS QDATE

 

-tj

 

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Jeff Templon
Sent: Tuesday, November 22, 2022 7:10 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] headers on condor_status command

 

Hi,

I have commands like this:

â  gofact_extendrange_ganymede git:(master) â condor_status -claimed -af:h Cmd Arguments CpusProvisioned JobId Owner 'formatTime(Qdate)' 'formatTime(JobCurrentStartDate)'  Machine  'interval(time()-JobCurrentStartDate)' CpusUsage NumJobStarts -sort "-JobCurrentStartDate" -constraint 'Owner=="templon"'
Cmd                                                   Arguments CpusProvisioned JobId     Owner   formatTime(Qdate)        formatTime(JobCurrentStartDate) Machine              interval(time()-JobCurrentStartDate) CpusUsage             NumJobStarts
/user/templon/gofact_extendrange_ganymede/mers.condor 214       1               49710.152 templon Fri Nov 18 10:21:07 2022 Fri Nov 18 10:22:33 2022        wn-lot-048.nikhef.nl 4+03:08:05                           0.9994810870997662    0
/user/templon/gofact_extendrange_ganymede/mers.condor 242       1               49710.180 templon Fri Nov 18 10:21:07 2022 Fri Nov 18 10:23:56 2022        wn-lot-047.nikhef.nl 4+03:06:42                           0.9995679102645538    0
/user/templon/gofact_extendrange_ganymede/mers.condor 254       1               49710.192 templon Fri Nov 18 10:21:07 2022 Fri Nov 18 10:32:35 2022        wn-lot-050.nikhef.nl 4+02:58:03                           0.9994999861801459    0
/user/templon/gofact_extendrange_ganymede/mers.condor 257       1               49710.195 templon Fri Nov 18 10:21:07 2022 Fri Nov 18 10:39:16 2022        wn-lot-050.nikhef.nl 4+02:51:22                           0.9995049555423193    0

The output gets really bulky, partially because I have headers in the output with names like interval(time()-JobCurrentStartDate). Is there a way (aside from wrapping stuff in a script that does the substitution) to give the headers different names?

JT

_______________________________________________
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/

 


_______________________________________________
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/