jdescription, jtool description
A platform agent tool used to update the process's description. You can call it as jdescription
or jtool description
This tool cannot be used outside job-context, so the -j
or -job-context
parameter is implied. The update of the description is performed asynchronously so there is no guarantee that the operation has finished when the tool returns.
Syntax
jdescription [-h|-?|-help] [-l <loglevel>] [-f <logfile>] [-j|-job-context] [-stderr] [-stdout] [-log] [-log-with-level <loglevel>] <description>
Argument | Default | Description |
---|---|---|
-h, -?, -help | Show usage and exit. | |
-l <loglevel> | ${JCS_LOGLEVEL:-info} | Set the logging level; defaults to 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 | Run the command in job-context (implied). | |
-stderr | Send description to stderr as well as job description. | |
-stdout | Send description to stdout as well as job description. | |
-log | Send description to stdout or stderr in standard log format at level INFO. | |
-log-with-level <loglevel> | INFO | Send description to stdout or stderr in standard log format at given level. |
<description> | New description for the job. |
Example
The following UNIX shell example shows how to set the process's description as progress of the process continues.
jdescription "Starting operations"
percentage=0
while [ ${percentage} -le 100 ]
do
jsleep 5
jdescription "Running operations... ${percentage}%"
percentage=$((${percentage} + 10))
done