From: Andreas Dilger Date: Sun, 30 Mar 2025 20:17:28 +0000 (-0600) Subject: LU-17512 jobid: describe '%j?' jobid_name conditional X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F98%2F58598%2F2;p=doc%2Fmanual.git LU-17512 jobid: describe '%j?' jobid_name conditional Describe usage of the "jobid_name=%j?" conditional operator. Signed-off-by: Andreas Dilger Change-Id: I87a75947c7a48fa3edc1cf82ff569d9b8ca96e1a Reviewed-on: https://review.whamcloud.com/c/doc/manual/+/58598 Tested-by: jenkins --- diff --git a/LustreMonitoring.xml b/LustreMonitoring.xml index dd24526..8743e82 100644 --- a/LustreMonitoring.xml +++ b/LustreMonitoring.xml @@ -727,27 +727,30 @@ Lustre Jobstats - %e print executable name + %e Print executable name. - %g print group ID number + %g Print group ID number. - %h print fully-qualified hostname + %h Print fully-qualified hostname. - %H print short hostname + %H Print short hostname (preferred over %h). - %j print JobID from the source named - by the jobid_var parameter + %j Print JobID from the environment + variable named by the jobid_var parameter. + If %j? is specified then conditionally + use the following format if jobid_var + is empty. - %p print numeric process ID + %p print numeric process ID - %u print user ID number + %u print user ID number @@ -774,6 +777,19 @@ Lustre Jobstats However, the actual JobID value is local to each process environment and it is possible for multiple jobs with different JobIDs to be active on a single client at one time. + + In Lustre 2.16 and later, it is possible to + specify the %j? conditional format operator. + If jobid_var cannot be found in the environment + (e.g. process is run outside of the job scheduler), then the format + immediately following %j? is used + instead of %j. + This is useful on nodes that may have processes accessing the + filesystem outside of the batch-scheduled process group. + For example, %j?%H will resolve to only + jobid_var if it exists in the environment and + is not empty, otherwise it will resolve to the short hostname. +