condor_status and condor_q each take the argument =-pr[intf-format] = where == has the following syntax: {code} SELECT [BARE | NOTITLE | NOHEADER | NOSUMMARY] [LABEL] [SEPARATOR ] [RECORDPREFIX ] [FIELDPREFIX ] [FIELDSUFFIX ] [AS ] [PRINTF | PRINTAS | WIDTH [AUTO | [-]] ] [TRUNCATE] [LEFT | RIGHT] [NOPREFIX] [NOSUFFIX] ... repeat the above line as needed... [WHERE ] [GROUP BY [ASCENDING | DECENDING] ] [SUMMARY [STANDARD | NONE]] {endcode} *: Lines beginning with # are comments *: escapes such as \n and \t are translated for most arguments. *: may be wrapped in " or ', but can't contain imbedded quotes of the same type as the outer quote, (the parser currently doesn't support escaping of quotes). *: if no quotes are used around arguments, the first whitespace ends the argument. *: statements end at a newline, there is no line-continuation character. arguments may be wrapped in quotes like strings with the same rules applying regarding nested strings. *: =GROUP BY= currently only controls sorting, the code does not yet do any kind of aggregating. *: =PRINTAS=, =PRINTF= & =WIDTH= are not entirely mutually exclusive, but more than one will play strangely together, there's actually a bunch of "intelligence" in the pretty printer code regarding the correct way to format strings vs numbers that's not desirable here but can't be disabled, you may need to play with combinations of formatting options to get things to line up perfectly. for instance negative WIDTH statements and the LEFT keyword _should_ be interchangeable, but they aren't at present. 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. 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__PRINT_FORMAT_FILE={endverbatim} *: == 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= Q_DEFAULT__PRINT_FORMAT_FILE= {endverbatim} *: == can be =RUN, HOLD, GOODPUT, GLOBUS, GRID= corresponding to the -run, -hold, etc arguments to condor_q 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 QDate AS " SUBMITTED" WIDTH 11 PRINTAS QDATE RemoteUserCpu AS " RUN_TIME" WIDTH 12 PRINTAS CPU_TIME JobStatus AS ST PRINTAS JOB_STATUS JobPrio AS PRI ImageSize AS SIZE WIDTH 4 PRINTAS MEMORY_USAGE Cmd AS CMD WIDTH -18 PRINTAS JOB_DESCRIPTION SUMMARY STANDARD {endcode} {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 State AS State WIDTH -9 Activity AS Activity WIDTH -8 TRUNCATE LoadAvg AS LoadAv PRINTAS LOAD_AVG Memory AS Mem PRINTF "%4d" EnteredCurrentActivity AS " ActvtyTime\n" NOPREFIX PRINTAS ACTIVITY_TIME SUMMARY STANDARD {endcode} {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 Cpus AS CPU Memory PRINTF "%6d" 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 -11 RecentJobStarts/20.0 AS J/Min PRINTF "%.2f" WHERE RecentJobStarts >= 1 && PartitionableSlot =!= true && DynamicSlot =!= true SUMMARY {endcode} {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 Cpus AS Cpus PRINTF "%.3f" # IfThenElse(GPUs isnt undefined,GPUs,0) AS GPUs PRINTF "%4d" Memory WIDTH 6 Disk WIDTH 8 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(start) AS START # unparse(requirements) AS Requirements {endcode} {code} # q_totals.cpf # show only totals with condor_q SELECT NOHEADER NOTITLE SUMMARY STANDARD {endcode} {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} {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 strcat(State,"/",Activity) AS "State\t" EnteredCurrentActivity AS StateTime PRINTAS ACTIVITY_TIME PRINTF "%s" Cpus AS "Cpus\t" Memory AS "Memory\t" Disk AS "Disk\t" {endcode}