Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Collecting logs using batch file wit telnet

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
Silver

Re: Collecting logs using batch file wit telnet

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

New Member

Re: Collecting logs using batch file wit telnet

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.

Silver

Re: Collecting logs using batch file wit telnet

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

New Member

Re: Collecting logs using batch file wit telnet

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

New Member

Re: Collecting logs using batch file wit telnet

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

601
Views
0
Helpful
5
Replies
CreatePlease to create content