cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1498
Views
0
Helpful
5
Replies

Collecting logs using batch file wit telnet

qwertys21
Level 1
Level 1

Hi All

I am in the process of writing a batch file to collect logs for some switches every week automatically. The only thing is that when I put in

telnet x.x.x.x

It stops at password and waits for the password?

I need to be able to do this without user intervention.

How can I do this? I will be running this from a Windows XP PC.

Thanks

5 Replies 5

miheg
Level 5
Level 5

use perl;

:-) It's worth learning it. It has modules to let you telnet into devices.

But it might be easier to let the devices send their logs to a syslog server

A good free one in tftpd32 (google it)

Cheers,

Michel

amorales
Level 1
Level 1

I had almost the same need, I had to backup the every week the configuration on all cisco devices.

We have SecureCRT to do Telnet, so I created an script on SecureCRT to do that For me, Then I used Scheduled Tasks on Windows to Run it every friday.

SecureCRT has great scripting indeed. I hope that this sort of scripting gets incorporated into putty some day.

Problem that remains is that you never know if you missed something because the log buffer was to small, and if you put the buffer very large you have to find where you left of last time to avoid saving the same data multiple times.

Cheers,

Michel

Thanks a lot.

I have SecureRT and have fidgured out how to log on and automate. I can also get it to do a show log.

How do I get it so send the show logs to a file? Also how do I tell it to go continous and not wait for a carriage return?.

Thanks

Ok. I have figured out how to log to a file with dates etc. but how do I get it not to stop, waiting for a spacebar or carriage return. I just need the logs to scroll through into the file?

Thanks

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: