In this lesson, we will cover:
- Review of single-threaded Netmiko execution.
- How to write a multiple threaded Netmiko script.
- Time testing and comparing single-threaded vs multi-threaded Netmiko execution.
So far through this guide, we have run Netmiko against a single device. However, what about if we want to start running Netmiko across multiple devices? This section will look at how we can use multithreading to scale Netmiko to run across multiple devices.
Let's create a script to run a command against multiple devices. To do so, we use many of the commands and Netmiko methods that we have previously learnt, along with:
- defining a
- adding a timer to time how long the script takes using the
- iterating over our device
list(), performing the
send_commandon each iteration, collects the output of