Skip to main content

logs

This command retrieves all log messages that has been collected so far from a job container. It doesn't block if the job is still running.

info

If you want to block and receive future log messages as they are generated, use bx attach instead.

Usage

bx logs [-r] [--help] [-l=<limit>] <jobId>

Parameters and inputs

ShorthandLong versionDescription
-l--limit=<limit>Max number of lines to retrieve
-r--reverseGet latest logs first
--helpDisplay this help message and exit

Examples

Get job logs

Display the job registry using the bx jobs command and select the job id from the list.

$ bx jobs -a -l 4
ID IMAGE AGO USER BX-UNITS INPUT STATUS COST/H RUNTIME COST
1092 b@t/hello-world:1.0.0 15 h david 1x1000x0 SUCCEEDED 0.34 USD 13 s 0.01 USD
1091 b@b/ctat/starfusion:0.0.1 2 d david 1x8000x0 33.6 GB FAILED 0.67 USD 21 m 0.24 USD
1090 b@b/ctat/starfusion:0.0.1 2 d david 1x8000x0 33.6 GB CANCELLED 0.67 USD 30 s 0.01 USD
1089 b@b/bwa/mem:1.0.0 4 d david 1x8000x0 6.4 GB SUCCEEDED 0.67 USD 4 m 0.05 USD

Use the bx logs command to retrieve the logs generated by the container during execution. You can limit the number of lines with the -l parameter.

$ bx logs -l 10 1089
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:43] [M::bwa_idx_load_from_disk] read 0 ALT contigs
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:44] [M::process] read 99010 sequences (10000010 bp)...
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:45] [M::process] read 99010 sequences (10000010 bp)...
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:56] [M::mem_pestat] # candidate unique pairs for (FF, FR, RF, RR): (0, 0, 0, 0)
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:56] [M::mem_pestat] skip orientation FF as there are not enough pairs
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:56] [M::mem_pestat] skip orientation FR as there are not enough pairs
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:56] [M::mem_pestat] skip orientation RF as there are not enough pairs
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:56] [M::mem_pestat] skip orientation RR as there are not enough pairs
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:57] [M::mem_process_seqs] Processed 99010 reads in 12.488 CPU sec, 12.832 real sec
[batchx@bioinformatics/bwa-mem:1.0.0] [2020/03/02 13:41:58] [M::process] read 99010 sequences (10000010 bp)...