Accessing Job Logs

Accessing Job Logs

Gurobi Optimizer log output from a previous or currently running job can be retrieved by using the log command. For example:

> grbcluster --server=server1 --password=pass log 58780a22
info  : Found matching job is 58780a22-8acc-499e-b73c-da6f2df59669
  Flow cover: 20
  Zero half: 4

Explored 54868 nodes (381866 simplex iterations) in 4.27 seconds
Thread count was 4 (of 4 available processors)

Solution count 4: 30 31 32 33

Optimal solution found (tolerance 1.00e-04)
Best objective 3.000000000000e+01, best bound 3.000000000000e+01, gap 0.0000%

The argument to this command is the JOBID for the job of interest (which can be retrieved using the jobs command), you can use the full ID or the short ID. If you don't specify a JOBID, the command will display the log for the last job submitted.

The log command accepts the following arguments:

  grbcluster log <JOBID> [flags]

Flags can be set using --flag=value or the short form -f=value if defined.
A boolean flag can be enabled using --flag or the short form -f if defined.

  -b, --begin             Display log from the beginning
  -f, --continuous        Display log continuously until job completion
      --help              Display usage of log
  -n, --lines int         Display only the last n lines (default 10)
  -p, --password string   Password, overrides license file PASSWORD (default "pass")
  -r, --router string     Router URL, overrides license file ROUTER
  -s, --server string     Cluster representative node address, overrides license file COMPUTESERVER
      --tls-insecure      Skip TLS certificate verification, overrides GRB_TLS_INSECURE variable

Global Flags:
      --console-ts   Add timestamps to console log messages
  -v, --verbose      Enable verbose logging
      --version      Display version information

For example, to get the entire log, from the beginning of the job, use the -b (or --begin) flag.

> grbcluster --server=server1 --password=pass log 58780a22 -b

You can get a continuous feed of the log for a running optimization job with the -f (or --continuous) flag.