Getting "Last Input" and "Last Output" from 100's of Switches

Unanswered Question
Jul 16th, 2007

Hello,

I'm trying to get the "last input" and "last output" from 100's of switch in our network. I have Ciscoworks but I don't see a way to do a custom report for that. Does anyone have any suggestions for pulling it from CW2K 2.5 or by making a script and pulling the MIB? Thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (2 ratings)
Loading.
Pavel Bykov Tue, 07/17/2007 - 02:28

I'm not sure how to go about it in CW. I'd probably go with a script. But first you'd have to get all interface indexes for all the switches.

gng4life Tue, 07/17/2007 - 04:02

Of course, I've already done an snmpwalk on many of the switches but I don't see an OID that pertains to the "last input". BTW, most of them are 2950's with 12.2x IOS.

If anyone knows of an OID that I can walk/get or run a custom report in CW2K, please let me know. I've searched Google and have not come up with a way to do this but it should be simple, any suggestions are appreciated!

Martin Ermel Tue, 07/17/2007 - 05:02

You can create a job that will issue the command 'show inter stats' on the devices you want and export the result into a flat file.

RME > Tools > NetShow > Command Sets

Create > Name: Interface Statistics

Device Type Selector: Switches and Hubs

=> NEXT

in the box 'Adhoc Commands' enter 'show inter stats'

=> Add Adhoc

then drill down in the left 'Available Commands' box and select 'show inter stats'

=> ADD

=> FINISH

Depending on you policy you should now be able to use this command set for a new job

RME > Tools > NetShow > NetShow Jobs

Create >

Select the devices (SwitchesAndHubs ...)

drill down to your command set name ('Interface Statistics') and check the box next to it

=> NEXT

enter a job description

=> NEXT

=> FINISH

Click on the job ID to see details about the running job

in the 'Device Details' go to 'Succesful Devices' click on the 'success' behind each device to see the result

To get the results in one file:

In the upper right corner of the 'Job Details' click the export icon to export the results into a file on the LMS server

When the Box 'Export to File' opens, click on 'BROWSE', change the path to the directory where you want to save the file and then INSIDE the 'Directory' Box, click on the path, point the cursor to the end and enter the filename you want to have.

sh inter stats

gng4life Tue, 07/17/2007 - 05:40

Yeah, that sounds right, I must have missed the Adhoc area.

I'll try tomorrow when I get to the office and post back here with the results.

Much thanks for the help...

gng4life Tue, 07/17/2007 - 16:33

Thanks mermel!

Yes, that was the missing link. I was able to get that going this morning and I'm writing a Perl script to extract only the needed info to check for ports being down too long (they should be shut for security).

Also, you can run the "netshow" by CWCLI. This is helpful if you have a Solaris platform and want to set up cron jobs to run the netshows at intervals.

Thanks again!!

Actions

This Discussion