Troubleshooting Tips

.

Setting the log level

Crossbelt allows you to specify the log level which will show additional output when running commands. This is accomplished by setting the LOG_LEVEL environment variable.

There are five types of output levels and each shows a different amount of logging:

  • info
  • warn
  • debug
  • fatal
  • error
$ LOG_LEVEL=debug cb mining
DEBUG - Crossbelt: Last miner: Crossbelt::Miner::XmrStak
DEBUG - Crossbelt: Creating class Crossbelt::Miner::XmrStak
DEBUG - Crossbelt: Looking for miner process xmr-stak
DEBUG - Crossbelt: Trying webhost http://127.0.0.1:8080/api.json for xmr-stak
DEBUG - Crossbelt: Trying webhost http://127.0.0.1:5001/api.json for xmr-stak
DEBUG - Crossbelt: Looking up memory cache for http://127.0.0.1:4444/api.json
DEBUG - Crossbelt: Response received from http://127.0.0.1:8080/api.json with code: 404
DEBUG - Crossbelt: Response received from http://127.0.0.1:4444/api.json with code: 200
DEBUG - Crossbelt: Caching content with key : 8e075fa7d34189e7c8311413837be4d5585f2a39
DEBUG - Crossbelt: xmr-stak signature match true
DEBUG - Crossbelt: Response received from http://127.0.0.1:4444/api.json with code: 200
DEBUG - Crossbelt: Caching content with key : 8e075fa7d34189e7c8311413837be4d5585f2a39
DEBUG - Crossbelt: xmr-stak signature match true
DEBUG - Crossbelt: Response received from http://127.0.0.1:5001/api.json with code: 404
DEBUG - Crossbelt: Looking up memory cache for http://127.0.0.1:4444/api.json
DEBUG - Crossbelt: Memory cache hit 8e075fa7d34189e7c8311413837be4d5585f2a39
BUSID        | NAME          | ACCEPTED | REJECTED | TEMPERATURE | POWER_USAGE | SPEED | EFFICENCY | INVALID
-------------|---------------|----------|----------|-------------|-------------|-------|-----------|--------
0000:01:00.0 | Radeon RX 570 | 0        | 0        | 39          | 89          | 771   | 8.66      | 0
0000:03:00.0 | Radeon RX 570 | 0        | 0        | 36          | 89          | 777   | 8.73      | 0
0000:06:00.0 | Radeon RX 570 | 0        | 0        | 36          | 91          | 774   | 8.51      | 0
0000:07:00.0 | Radeon RX 480 | 0        | 0        | 62          | 84          | 778   | 9.26      | 0
0000:08:00.0 | Radeon RX 570 | 0        | 0        | 42          | 81          | 747   | 9.22      | 0
0000:09:00.0 | Radeon RX 480 | 0        | 0        | 41          | 80          | 818   | 10.23     | 0

Showing the stack trace

While crossbelt contains code to work around many types of situations. There are some cases there have not been tested which will cause errors. If such an errors occur you can show the stack trace in order provide this information in a support issue. This can be done by setting the GLI_DEBUG environment variable.

$ GLI_DEBUG=true cb cu power --limit 120
error: Please run this command as root or with sudo
Traceback (most recent call last):
    20: from /usr/bin/cb:23:in `<main>'
    19: from /usr/bin/cb:23:in `load'
    18: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/crossbelt-0.11.0/exe/cb:5:in `<top (required)>'
    17: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/gli-2.18.0/lib/gli/app_support.rb:83:in `run'
    16: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/gli-2.18.0/lib/gli/app_support.rb:309:in `call_command'
    15: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/gli-2.18.0/lib/gli/app_support.rb:296:in `block in call_command'
    14: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/gli-2.18.0/lib/gli/command_support.rb:131:in `execute'
    13: from (eval):6:in `block (3 levels) in load_sub_commands'
    12: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/base.rb:134:in `block in event'
    11: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/aasm.rb:121:in `aasm_fire_event'
    10: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/core/event.rb:48:in `fire'
     9: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/core/event.rb:139:in `_fire'
     8: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/core/event.rb:139:in `each'
     7: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/core/event.rb:149:in `block in _fire'
     6: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/core/transition.rb:47:in `execute'
     5: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/core/transition.rb:80:in `invoke_callbacks_compatible_with_guard'
     4: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/aasm-4.12.3/lib/aasm/core/transition.rb:80:in `instance_exec'
     3: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/crossbelt-0.11.0/lib/crossbelt/client.rb:41:in `block (3 levels) in <class:Client>'
     2: from (eval):9:in `block (4 levels) in load_sub_commands'
     1: from /opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/crossbelt-0.11.0/lib/crossbelt/commands/compute_unit/power.rb:16:in `set_limit'
/opt/crossbelt/embedded/lib/ruby/gems/2.5.0/gems/crossbelt-0.11.0/lib/crossbelt/utils.rb:58:in `check_for_root': Please run this command as root or with sudo (Crossbelt::Exceptions::NoPermission)

Enabling both

You can enable both the logging and stacktrace by combining the variables above.

Example sudo GLI_DEBUG=true LOG_LEVEL=debug cb cu power --limit 120