You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,24 @@ Dell (FTOS)
8
8
<b><h3>What is InterStat?</h3></b>
9
9
<b>InterStat</b> is a simple python script for saving the output of the current interface status from a list of devices. It is using the libary paramiko for building up a ssh connection to the network devices (switches, routers,...) which are defined in a list of ip adresses.
10
10
11
-
After successful connection to a device, the script collect some device informations like privilege mode, paging, brand hostname and of course the interface status. The device information will just printed out to the command line and only the interface status output will be saved to a file called the hostname of the device.
11
+
After successful connection to a device, the script collect some device informations like check privilege mode, paging, brand, hostname and of course the status of the interfaces. The device information will just printed out to the shell and only the interface status output will be saved to a file named like the hostname of the device.
12
12
13
13
14
14
<b><h3>How to use?</h3></b>
15
-
Before you can start the script, you have to change some parameters. There are three variables you have to look for.
15
+
Before you can start the script, maybe you have to change some parameters. There are three variables you have to look for.
16
16
17
17
<b><h4>1. SSH-Port </h4></b>
18
18
By default the ssh port is <b>22</b>. If you want to take another port for the ssh connection, you have to edit the <code><b>line 38</b></code> which defines the ssh port. Change the <b>22</b> to the port you prefer.
19
19
20
20
<code>port = ('22')</code>
21
21
22
22
<b><h4>2. Destination path </h4></b>
23
-
By default the destination path is <b>"G:/InterStat/"</b>. Normally you want to costumize the path where the files should be saved. In this reason you have to edit the <code><b>line 41</b></code> which defines the path to the destination directory. Change the path to the directory you prefer.
23
+
By default the destination path is <b>G:/InterStat/</b>. Normally you want to costumize the path where the files should be saved. In this reason you have to edit the <code><b>line 41</b></code> which defines the path to the destination directory.
24
24
25
25
<code>path = (r'G:/InterStat/')</code>
26
26
27
27
<b><h4>3. IP-List </h4></b>
28
-
By default the ip list for the devices is named <b>"ip_list.txt</b>. Maybe you want to rename the filename. For this case you have to edit the <code><b>line 44</b></code>, <code><b>line 45</b></code> and <code><b>line 57</b></code> which defines the the filename. Change the filename <b>"ip_list.txt</b> you prefer.
28
+
By default the ip list for the devices is named <b>ip_list</b>. Maybe you want to change the filename. For this case you have to edit the <code><b>line 44</b></code>, <code><b>line 45</b></code> and <code><b>line 57</b></code> which defines the ip list.
29
29
30
30
<code>with open('ip_list.txt', 'r') as ip:</code><br>
31
31
and<br>
@@ -45,7 +45,7 @@ After you changed the parameters and the directories are defined, you can start
45
45
46
46
4. The script will disable the paging function to get the maximum output.
47
47
48
-
5. To get the hostname of the device the script will find out with the <b>show version</b> command, which brand the device is of. By default the brand could be cisco (IOS, IOS-XE, NX-OS, ...) and dell (Force 10). Depending on which one, the script will prompt the <b>show run | include hostname</b> or <b>show run | find hostname</b> command to pick out the hostname of the device.
48
+
5. To get the hostname of the device the script will ask the device with the <b>show version</b> command, which brand the device is of. By default the brand could be cisco (IOS, IOS-XE, NX-OS, ...) and dell (Force 10). Depending on which one, the script will prompt the <b>show run | include hostname</b> or <b>show run | find hostname</b> command to pick out the hostname of the device.
49
49
50
50
6. After that the main function will start his work. The <b>interface status</b> command will be promt and the output will be saved to a textfile with the hostname fo the device as filename to the directory you defined at the start. If this succeed the script will pick the next ip address of the ip list and repeat the process.
0 commit comments