-condor_status and condor_q each take an argument
- -pr[intf-format] <file>
-
-the contains of <file> has the following syntax
-syntax is
+condor_status and condor_q each take the argument =-pr[intf-format] <file>=
+where =<file>= has the following syntax:
{code}
SELECT [BARE | NOTITLE | NOHEADER | NOSUMMARY] [LABEL] [SEPARATOR <string>] [RECORDPREFIX <string>] [FIELDPREFIX <string>] [FIELDSUFFIX <string>]
@@ -24,10 +21,25 @@
Available keywords for PRINTAS can be found only in the code. search for CustomFormatFnTable, you should find one table in queue.cpp and one in prettyPrint.cpp (for condor_status).
*: be aware that many PRINTAS functions are very special case and pay little or no attention to the attribute that they are told to print.
-Here are some examples
+You can set the default output of condor_status and/or condor_q to use one of these files by setting config parameters:
+
+for condor_status
+{verbatim} STATUS_DEFAULT_<adtype>_PRINT_FORMAT_FILE=<file>{endverbatim}
+*: =<adtype>= can be one of the following ad type(s){linebreak}
+=DEFRAG, STARTD, SCHEDD, SUBMITTOR, MASTER, CKPT_SRVR, GATEWAYS, COLLECTOR, NEGOTIATOR, GRID, LICENSE, STORAGE, ANY, GENERIC=
+
+for condor_q
+{verbatim} Q_DEFAULT_PRINT_FORMAT_FILE=<file>
+ Q_DEFAULT_<arg>_PRINT_FORMAT_FILE=<file>
+{endverbatim}
+*: =<arg>= can be =RUN, HOLD, GOODPUT, GLOBUS, GRID= corresponding to the -run, -hold, etc arguments to condor_q
- # produce the standard output of condor_q
- SELECT
+Here are some sample print-format files
+
+{code}
+# queue.cpf
+# produce the standard output of condor_q
+SELECT
ClusterId AS " ID" NOSUFFIX WIDTH 4
ProcId AS " " NOPREFIX PRINTF ".%-3d"
Owner AS "OWNER" WIDTH -14 PRINTAS OWNER
@@ -37,11 +49,13 @@
JobPrio AS PRI
ImageSize AS SIZE WIDTH 4 PRINTAS MEMORY_USAGE
Cmd AS CMD WIDTH -18 PRINTAS JOB_DESCRIPTION
- SUMMARY STANDARD
-
+SUMMARY STANDARD
+{endcode}
- # produce the standard output of condor_status
- SELECT
+{code}
+# status.cpf
+# produce the standard output of condor_status
+SELECT
Name AS Name WIDTH -18 TRUNCATE
OpSys AS OpSys WIDTH -10
Arch AS Arch WIDTH -6
@@ -50,11 +64,13 @@
LoadAvg AS LoadAv PRINTAS LOAD_AVG
Memory AS Mem PRINTF "%4d"
EnteredCurrentActivity AS " ActvtyTime\n" NOPREFIX PRINTAS ACTIVITY_TIME
- SUMMARY STANDARD
-
+SUMMARY STANDARD
+{endcode}
- # modified default condor_status output designed to show blackholes
- SELECT
+{code}
+# blackhole.cpf
+# show static slots with high job churn
+SELECT
Machine WIDTH -24
splitslotname(Name)[0] AS Slot WIDTH -8
Strcat(Arch,"_",IfThenElse(OpSys=="WINDOWS",OpSysShortName,OpSysName)) AS Platform
@@ -64,13 +80,15 @@
EnteredCurrentActivity AS " StatusTime" PRINTAS ACTIVITY_TIME NOPREFIX
IfThenElse(JobId isnt undefined, JobId, "no") AS JobId WIDTH -11
RecentJobStarts/20.0 AS J/Min PRINTF "%.2f"
- WHERE RecentJobStarts >= 1 && PartitionableSlot =!= true && DynamicSlot =!= true
- SUMMARY
-
+WHERE RecentJobStarts >= 1 && PartitionableSlot =!= true && DynamicSlot =!= true
+SUMMARY
+{endcode}
- # condor_status query for slot pairs, use with condor_status -direct to see hidden pairs.
- SELECT
- # Machine WIDTH AUTO
+{code}
+# pairs.cpf
+# condor_status query for slot pairs, use with condor_status -direct to see hidden pairs.
+SELECT
+ Machine WIDTH AUTO
splitslotname(Name)[0] AS SlotName WIDTH -8
IfThenElse(SlotPairName isnt undefined,splitslotname(SlotPairName)[0],"-") AS Paired
Strcat(Arch,"_",IfThenElse(OpSys=="WINDOWS",OpSysShortName,OpSysAndVer)) AS Platform
@@ -81,18 +99,55 @@
EnteredCurrentActivity AS " StatusTime" PRINTAS ACTIVITY_TIME NOPREFIX
Strcat(State,"/",Activity) AS Status WIDTH -14 TRUNCATE
ifthenelse(JobId isnt undefined, JobId, "") AS JobID
- # unparse(IsOwner) AS ISOWNER
+# unparse(IsOwner) AS ISOWNER
unparse(start) AS START
- # unparse(requirements) AS Requirements
+# unparse(requirements) AS Requirements
+{endcode}
+{code}
+# q_totals.cpf
+# show only totals with condor_q
+SELECT NOHEADER NOTITLE
+SUMMARY STANDARD
+{endcode}
- # show only totals with condor_q
- SELECT NOHEADER NOTITLE
- SUMMARY STANDARD
+{code}
+# status_wide.cpf
+# a wider version of standard condor_status output
+SELECT
+ Name AS Name WIDTH -34 TRUNCATE
+ OpSys AS OpSys WIDTH -10
+ Arch AS Arch WIDTH -6
+ State AS State WIDTH -9
+ Activity AS Activity WIDTH -8
+ LoadAvg AS LoadAv PRINTAS LOAD_AVG
+ Memory AS Memory PRINTF "%6d"
+ EnteredCurrentActivity AS "ActivityTime" PRINTAS ACTIVITY_TIME
+SUMMARY STANDARD
+{endcode}
+{code}
+# testy.cpf
+# Improved condor_status output showing Gpus, compact platform & churn.
+SELECT
+ Machine WIDTH AUTO
+ splitslotname(Name)[0] AS Slot WIDTH -8
+ Strcat(Arch,"_",IfThenElse(OpSys=="WINDOWS",OpSysShortName,OpSysAndVer)) AS Platform
+ Cpus AS CPU PRINTF "%3d"
+ IfThenElse(GPUs isnt undefined,GPUs,0) AS GPUs PRINTF "%4d"
+ Memory PRINTF "%4d" AS Mem
+ Strcat(State,"/",Activity) AS Status WIDTH -14 TRUNCATE
+ EnteredCurrentActivity AS " StatusTime" PRINTAS ACTIVITY_TIME NOPREFIX
+ IfThenElse(JobId isnt undefined, JobId, "no") AS JobId WIDTH -6
+ RecentJobStarts/20.0 AS J/Min PRINTF "%.2f"
+GROUP BY Machine
+SUMMARY
+{endcode}
- # STARTD output in compact long format
- SELECT RECORDPREFIX "\t***\n" RECORDSUFFIX "\n\n" FIELDPREFIX "\n" NOHEADER LABEL SEPARATOR "\t: "
+{code}
+# status_long.cpf
+# STARTD output in compact long format
+SELECT RECORDPREFIX "\t***\n" RECORDSUFFIX "\n\n" FIELDPREFIX "\n" NOHEADER LABEL SEPARATOR "\t: "
Machine AS "Machine\t"
splitslotname(Name)[0] AS "Slot\t"
strcat(Arch,"_",IfThenElse(OpSys=="WINDOWS",OpSysName,OpSysAndVer)) AS Platform
@@ -101,3 +156,4 @@
Cpus AS "Cpus\t"
Memory AS "Memory\t"
Disk AS "Disk\t"
+{endcode}