O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

There's more

In our preceding example, the debugging situation was quite simple. We just wanted to ensure that we were processing all of the interfaces that we expected to be processing. But sometimes debugging is much more complicated than that. When the troubleshooting process is more complex than printf-style debugging, JUNOS comes with a fully-fledged SLAX script debugger, which works in a similar manner to gdb and friends.

The steps for the recipe are as follows:

  1. Start the debugger on the show-int.slax file. The code is as follows:
      adamc@router> op invoke-debugger cli show-int          sdb: The SLAX Debugger (version 0.17.1)      Type 'help' for help      (sdb)
  1. List the code to get situational awareness (the optional line number argument allows us ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required