Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2020, 06:48 AM
ashishk.sarker ashishk.sarker is offline
Registered User
 
Join Date: Jul 2020
Posts: 1
Merging log file

Scenario-
  1. Open multiple session in Tab
  2. Click send command to this group
  3. Execute commands, and same commands are executed in different sessions.
Outcome- we get a log file from each session.

What is the objective of raising this thread?

We need to combine/redirect all these session log for all the commands run for a group to a single file. Would you please share how can we achieve this target?

Regards,
Ashish
Reply With Quote
  #2  
Old 09-14-2020, 12:23 AM
kingzleshe kingzleshe is offline
Registered User
 
Join Date: Feb 2018
Posts: 24
HI

this is my workaround

1.install powershell core on your computer.
2.go to your log file folder
3.run command
Code:
cat *.txt | Get-Content all.txt
OR
Code:
cat *.log | Get-Content all.log
Reply With Quote
  #3  
Old 09-14-2020, 07:20 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,449
Hi Ashish,

A workaround such as kingzleshe has suggested may be your best option.

The problem with your objective is if you have multiple sessions open writing to one log file (as configured in the sessions) then there could be a race condition among them with regards to which session is writing to the file at any given time.

If your goal is just to run commands to multiple hosts and capture the output, you can set the variable on line 164 of this example Python script from the forums to False and it will log multiple sessions with a separator between each host.

g_bLogToIndividualFilesPerHost = False
__________________
Thanks,
--Brenda

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

Tags
log_for_multiple_session


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 07:06 PM.