How to compare and find the difference between output of a command on a SRX device ?

This article provides information on how to compare two files or outputs of a command run at different timestamps on a SRX device.

Use this command incase you want to compare the output of a command run in time intervals to check for any specific counters

For troubleshooting purpose, we need to compare the output of a command run in an interval to check the counters.

On SRX devices, you can use the following command to find the difference between two outputs.
Example command and output:
Let us consider , for example the “no route present” counter is exhibiting a slow, constant increment. Something on the  order of a few pps:

We capture the output to a file ,

We can check for the difference in the output as below :

With this output, we are able to compare the counters, which will be helpful during the troubleshooting.

About the author

James Palmer

Leave a Comment