Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2008, 10:52 AM
rleon rleon is offline
Registered User
 
Join Date: Jan 2008
Posts: 116
capture output to text file ..

Right now I am running commands on a unix system that generate big files. I can not copy past the text screen because some of the data is beyond the scrollback buffer.

So I have to either sftp the file down to my pc.

I was wondering if there was a way for me to capture all of the output of a command ran to a text file on my local machine.


Thanks
Ricardo
Reply With Quote
  #2  
Old 01-30-2008, 10:53 AM
rleon rleon is offline
Registered User
 
Join Date: Jan 2008
Posts: 116
I am testing Version 6.0.0 (build 183) ..
But have a lic for Version 5.5.3 (build 536)


Thanks
Ricardo
Reply With Quote
  #3  
Old 01-30-2008, 11:33 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Ricardo,

SecureCRT can be set to create a log file which will log the information from the remote from the time the log is started to the time it ends.

I have attached a sample script of how logging could be used for this.

Another option is to increase the size of the scroll back buffer so that the text is not lost.

In the latest release of SecureCRT (6.0), the scroll back buffer can be set to a maximum of 128,000 lines in the 'Emulation' sub-category of the 'Session Options'.

Would either of these options help?
Attached Files
File Type: txt LoggingTipsAndTricks.txt (2.0 KB, 3617 views)
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #4  
Old 02-01-2008, 08:54 AM
rleon rleon is offline
Registered User
 
Join Date: Jan 2008
Posts: 116
Hi

your two solutions are great.

the script is great .. and does exactly what I want. My only question is it keeps logging everything ..

how do I get it to stop ?
Reply With Quote
  #5  
Old 02-01-2008, 09:42 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Rleon,

To stop logging in SecureCRT from the script, use the following line in the script to stop logging where needed:

crt.session.log false

Since you are capturing the output from a command in a log file, you may want to have the script wait for the prompt to reappear after issuing the command (crt.screen.waitforstring) and then turn off logging.

Does this help?
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #6  
Old 07-29-2020, 01:24 AM
HN6366 HN6366 is offline
Registered User
 
Join Date: Jul 2020
Posts: 1
Basic Questions

Hi,
I'm so amature and have couple of questions.
1- When I run the script, it asks me for a path for the logs, regardless if there is a path in the session setting or not.
2- The script runs the command ps and then nothing. how should I force it to go for the next commands and how to change the log file name?
Reply With Quote
  #7  
Old 07-29-2020, 09:54 AM
cboyack cboyack is offline
VanDyke Technical Support
 
Join Date: Apr 2020
Location: Albuquerque, NM
Posts: 116
Hi HN6366,

Could you please share with me what you're trying to accomplish with this script?

I would recommend that if you're trying to send a number of commands to a host (or a few different hosts) and log the output, that you utilize the script "RunCommandsOnMultipleHostsAndLogResults" that we have made available for you.

For other example scripts that you may be able to utilize to increase your efficiency, please see our Script Examples Sticky.
__________________
Thanks,
--Cameron

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730

Last edited by cboyack; 07-29-2020 at 11:01 AM. Reason: spelling
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:43 PM.