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

Re: [HTCondor-users] customizing condor_who output




Great!!!

Thank You John
Stefano

On 23/09/22 19:25, John M Knoeller via HTCondor-users wrote:

Well, I thought the answer was going to be no, but it turns out there is a hacky way to do what you want.Â

Â

The way the code works there are these sort of âmagicâ attribute names that can be used to grab some information that condor_who knows but which are not in the ad being printed.ÂÂ These are

Â

#PID ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ-- the value for the PID column

#SLOT or #SLOTID Ââ the value for the SLOT column

#PROGRAM ÂÂÂÂÂÂÂÂÂÂÂÂâ the value for the PROGRAM column

Â

So to print the PID along with your other output, you can do this

condor_who -af 'split(ClientMachine,".")[0]' 'split(Name,"@.")[1]' 'split(RemoteOwner,"@")[0]' JobId Cpus 'ImageSize/1e6' '#PID'Â

-tj

Â

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Stefano Dal Pra
Sent: Friday, September 23, 2022 10:02 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] customizing condor_who output

Â

Hello all,

condor_who without arguments yields:
Â[root@mywn ~]# condor_who

OWNER ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂCLIENT ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂSLOT JOB ÂÂÂÂÂÂÂÂÂÂÂRUNTIME ÂÂÂPID ÂÂÂÂÂÂÂÂÂPROGRAM
[...] ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ


It is possible to query for classad attributes using for example:

[root@mywn ~]# condor_who -af 'split(ClientMachine,".")[0]' 'split(Name,"@.")[1]' 'split(RemoteOwner,"@")[0]' JobId Cpus 'ImageSize/1e6'

shinyschedd-01 mywn niceuser001 8223408.0 1 3.519132

greatschedd-02 mywn fineuser037Â 7337671.0 8 1.939228

Now I would d like to also get the PID value, which comes for free with the plain condor_who command,
but it seems that no classad attribute actually yields that.

Is there any way to retrieve the PID value together with the other attributes withing a single condor_who execution?

Stefano




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