code: public static CommandOutput traceJob(String jobId, int numberOfDays, boolean quiet) {
          final CommandLine cmdLine = new CommandLine(COMMAND_TRACEJOB);
          cmdLine.addArgument(PARAMETER_NUMBER_OF_DAYS);
          cmdLine.addArgument(Integer.toString(numberOfDays));
          if (quiet) {
              cmdLine.addArgument(PARAMETER_QUIET_MODE);
          }
          cmdLine.addArgument(jobId);
  
          final OutputStream out = new ByteArrayOutputStream();
          final OutputStream err = new ByteArrayOutputStream();
  
          DefaultExecuteResultHandler resultHandler;
          try {
              resultHandler = execute(cmdLine, null, out, err);
              resultHandler.waitFor(DEFAULT_TIMEOUT);
          } catch (ExecuteException e) {
              throw new PBSException("Failed to execute tracejob command: " + e.getMessage(), e);
          } catch (IOException e) {
              throw new PBSException("Failed to execute tracejob command: " + e.getMessage(), e);
          } catch (InterruptedException e) {
              throw new PBSException("Failed to execute tracejob command: " + e.getMessage(), e);
          }
  
          final int exitValue = resultHandler.getExitValue();
          LOGGER.info("tracejob exit value: " + exitValue);
          LOGGER.fine("tracejob output: " + out.toString());
  
          return new CommandOutput(out.toString(), err.toString());
      }
docs: PBS tracejob command.
  <p>
  Equivalent to tracejob -n [numberOfDays] [jobId]
  
  @param jobId job id
  @param numberOfDays number of days to look for the job
  @param quiet quiet mode flag
  @return tracejob output