Skip to content

Instantly share code, notes, and snippets.

View maxfischer2781's full-sized avatar

Max Kühn maxfischer2781

  • Karlsruhe, Germany
View GitHub Profile
@maxfischer2781
maxfischer2781 / htcce-apel.md
Last active April 13, 2024 17:35
HTCondor-CE APEL Notes

Notes on using HTCondor-CE with APEL accounting for WLCG

These are tales of An Admin getting APEL+HTCondor-CE to work at GridKa/FZK Tier 1.

As background information, see

Setting up HTCondor-CE for APEL

@maxfischer2781
maxfischer2781 / condor_switch.py
Created April 23, 2020 11:37
Compile HTCondor if-then cases to a single if-then-else tree
#!/usr/bin/env python3
from typing import Dict
def switch(cases: Dict[str, str], default='UNDEFINED', separator='\n'):
# ["IfThenElse(ac, am", "IfThenElse(bc, bm", "IfThenElse(cc, cm", ...]
switch_expression = separator.join(
f"IfThenElse({condition}, {on_match},"
for condition, on_match in cases.items()
)
What exactly is "iowait"?
To summarize it in one sentence, 'iowait' is the percentage
of time the CPU is idle AND there is at least one I/O
in progress.
Each CPU can be in one of four states: user, sys, idle, iowait.
Performance tools such as vmstat, iostat, sar, etc. print
out these four states as a percentage. The sar tool can
print out the states on a per CPU basis (-P flag) but most