09-15-2010 09:44 AM - edited 03-06-2019 12:59 PM
Hello expert,
I using putty software to access my router.
I would like to copy the result of SH POLICY-MAP INT to a text file for analysis.
The problem I encounter is the display is beyond the screen hence I have to press space bar for further display.
Is there a way I can execute the SH POLICY-MAP INT and redirect the output a text file or remove the more prompt found below the result page.
Regards
Jomo
Solved! Go to Solution.
09-16-2010 09:35 AM
09-15-2010 09:49 AM
rbglusers wrote:
Hello expert,
I using putty software to access my router.
I would like to copy the result of SH POLICY-MAP INT to a text file for analysis.
The problem I encounter is the display is beyond the screen hence I have to press space bar for further display.
Is there a way I can execute the SH POLICY-MAP INT and redirect the output a text file or remove the more prompt found below the result page.
Regards
Jomo
Jomo
In enable mode on your router -
router# term len 0 <--- this will mean there is no prompt and the full output is displayed
your command goes here
router# term len 24 <-- this just puts it back to normal
Jon
09-15-2010 10:08 AM
hello Jon,
I tried the command
>> router# term len 0 <--- this will mean there is no prompt and the full output is displayed.
The display is so large that i cannot capture all the info by scrolling and paste to a text file .
Is there any method i could use to redirect output
Regards
09-15-2010 10:15 AM
rbglusers wrote:
hello Jon,
I tried the command
>> router# term len 0 <--- this will mean there is no prompt and the full output is displayed.
The display is so large that i cannot capture all the info by scrolling and paste to a text file .
Is there any method i could use to redirect output
Regards
There are quite a few ways to do this but as you have the putty client simply use that to capture the text. See this link for details -
Jon
09-15-2010 10:39 AM
Also if you want to remove the "more" from a text file just do this in notepad......
Let's say you see this in your text file...
--More-- dot11 syslog
What you need to do is highlight from the beginning of the line to the d
include the spaces at the end of and begining of --More--
Then right click on what you highlighted and choose copy
Now go to Edit----->Replace
and right click in the Find what box and choose paste
now just clcik once in the Replace with box and leave it blank
Now choose Replace All
and you should be good.
Mike
09-15-2010 10:59 AM
Hi Jomo,
Another option, you can do; but I think that is more complex than Jon's suggestion:)
3750_2#show policy-map int | redirect ?
flash1: Uniform Resource Locator
flash: Uniform Resource Locator
ftp: Uniform Resource Locator
http: Uniform Resource Locator
https: Uniform Resource Locator
nvram: Uniform Resource Locator
rcp: Uniform Resource Locator
scp: Uniform Resource Locator
tftp: Uniform Resource Locator
HTH,
Lei Tian
09-16-2010 08:06 AM
Hello Tan,
I am interested in your suggestion i attempted to redirect to a remote tftp server see command
router11#show policy-map int | redirect tftp:xxx.xxx.xxx.xxx
but when a check the tftp root direct location on my computer no file is copied maybe i am missing some step in the above command.
Regards
Jomo
09-16-2010 08:21 AM
Can you ping the tftp server ?
Does it have permissions to write the file ?
What tftp server is it ?
Jon
09-16-2010 08:43 AM
hello Jon,
Can you ping the tftp server ?
yes i test from within the router
Does it have permissions to write the file ?
unsure about the question.
What tftp server is it ?
Cisco tftp server 1.1
Regards
Jomo
09-16-2010 08:48 AM
Hi Jomo,
Do some quick test.
show policy-map int | red flash:show
copy flash:show tftp:
Are you able to copy the file to tftp srv?
Regards,
Lei Tian
09-16-2010 09:14 AM
hello Tian,
The test was sucessful . the file was transfer to tftp site
Regards
Jomo
09-16-2010 09:35 AM
09-16-2010 10:06 AM
Hello Tian,
Thanks a million , the command given in your post did the trick .
Keep up the good work.
Regards
Jomo
06-08-2020 01:38 AM
Hi,
I am also facing the same problem with the long output of the sh tech command.
Do you think that it's also possible to send the output file into the windows-server from which I am using Putty ? Because I am trying to get set the explorer address 10.x.x.103\C:\Users\chris\sh-tech without success.
I don't have any tftp server and the enterprise policy doesn't allow to install it.
Best regards and big thanks in advance !
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide