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