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

Re: [HTCondor-users] collecting job statistics

Hi Michael and Todd,

sorry for my late reply - but you quite helped me!
Actually, it was my fault not reading the documentation properly, so I
had not realized that the ClassAds are passed via stdin to exit hooks
and went for something unnecessary complicated...

Anyway, I am now using python's fileinput for reading from stdin and
parsing the ClassAds into a collections.defaultdict

Cheers and thanks,

On 2016-06-13 21:06, Michael V Pelletier wrote:
> From: Thomas Hartmann <thomas.hartmann@xxxxxxx>
> Date: 06/10/2016 11:22 AM
>> I trying to collect job statistics in an exit hook.
>> Since I have not yet found a way to collect job statistics, i.e. the
>> job's ClassAds, from the context of the job, I go somewhat of a detour.
>> So, effectively I am querying the collector for all schedds and query
>> these for the job I am on, to get the job's ClassAds:
> The hook_job_exit script gets the full job ClassAd passed to it on
> the standard input. In Perl, I usually do this:
>         while(<STDIN>) {
>                 chomp;
>                 my ($key, $val) = split(m{\s=\s}, $_, 2);
>                 $ad{lc($key)} = $val;
>         }
> Is this what you're looking for?
> Also, the "Local__Cpu" values reflect the CPU time used on the submitting
> machine. For a typical vanilla universe job this is normally going to be
> less than one tenth of a CPU-second given how little the submit machine
> needs to do to submit the job, so the 0.0 numbers in those values are not
> surprising.
>         -Michael Pelletier.
> _
> _______________________________________________
> 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/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature