jdescription, jtool description
jdescription
is a command-line tool used to update a process's description. You can call it as jdescription
or jtool description
.
Note: This tool cannot be used outside of job context. The -j
or -job-context
parameter is implied.
Note: The update of the description is performed asynchronously, so there is no guarantee that the operation has finished when the tool returns.
Note: For installation instructions, see jtool
.
Syntax
Copy
jdescription [-h|-?|-help] [-l <loglevel>] [-f <logfile>] [-j|-job-context] [-stderr] [-stdout] [-log]
[-log-with-level <loglevel>] <description>
Argument | Default | Description |
---|---|---|
-h, -?, -help |
|
Shows help. |
-l <loglevel> |
${JCS_LOGLEVEL:-info}
|
Sets the logging level. Defaults to the environment variable ${JCS_LOGLEVEL} or info when the environment variable is not set. |
-f <logfile> |
${JCS_LOGFILE:-stderr}
|
Log to file instead of stderr; defaults to environment variable ${JCS_LOGFILE} or stderr when the environment variable is not set. |
-j, -job-context |
|
Gets the environment from the job context. |
-stderr |
|
Sends the description to stderr as well as job description. |
-stdout |
|
Sends the description to stdout as well as job description. |
-log |
|
Sends the description to stdout or stderr in standard log format at log level info . |
-log-with-level <loglevel> |
info
|
Sends the description to stdout or stderr in standard log format at the given log level. |
<description>
|
|
New description for the job. |
Example
The following UNIX shell example shows how to update a process's description as the process executes.
Copy
jdescription "Starting operations"
percentage=0
while [ ${percentage} -le 100 ]
do
jsleep 5
jdescription "Running operations... ${percentage}%"
percentage=$((${percentage} + 10))
done