Creating log files: Difference between revisions

From wiki.comcert.com
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 8: Line 8:
== Solution ==
== Solution ==


 
Using the SSH client of you choice, login to the command line interface of TVC. Once logged in successfully, execute the following command to create a file containing all the logs required.


{{#invoke:Message box|ambox |type=content|text=Always be very careful when manipulating files in Linux. One false manoeuvre can break the software.}}
Keep all services running and run the following script as sudoer:
 
 
 
Usinging the SSH client of you choise, login to the command line interface of TVC. Once logged in successfully, execute the following command to create an archive (tarball) that contains all the logs required by support.
 
You do not have to stop services, unless instruted so by support.
<pre>$ sudo su -
<pre>$ sudo su -
# cd /opt/tv
# cd /opt/tv
# sh -x collect_logs.sh
# ./collect_logs.sh
</pre>
</pre>


This may take a whilt to complete.
Still within the same directory, list all regular files:
 
<pre># ls
Once you get the command prompt back list all files in the /opt/tv directory:
<pre>[root@crt-vir-a-tvc11 tv]# ls
appliance    collect_logs.sh  dataengine  flow    personality  queryengine  serverhealth                        tv-reboot.sh            tv-shutdown.sh        tv-stop-services.sh
appliance    collect_logs.sh  dataengine  flow    personality  queryengine  serverhealth                        tv-reboot.sh            tv-shutdown.sh        tv-stop-services.sh
application  configengine    dds        manager  portal      repository  tv-logs_2018-01-19_13-22-44.tar.gz  tv-restart-services.sh  tv-start-services.sh  userdiscovery</pre>
application  configengine    dds        manager  portal      repository  tv-logs_2018-01-19_13-22-44.tar.gz  tv-restart-services.sh  tv-start-services.sh  userdiscovery</pre>


Notice the file carrying the name '''tv-logs_YYYY_MM_DD_HH-MM-SS.tar.gz&nbsp;'''? This is the archive&nbsp;you have to send to TAC.&nbsp;&nbsp;
Notice the file '''tv-logs*.&nbsp;'''&nbsp;This is the file you have to transfer&nbsp;to support.&nbsp;&nbsp;
 
Transfer this file to the destination using WinSCP or any SCP tool of your choice.


Make sure to delete these files once they are no longer needed:
These type of files could be large;&nbsp;make sure to delete afterwards:
<pre># rm tv-logs_YYYY_MM_DD_HH-MM-SS.tar.gz
<pre># rm tv-logs*
</pre>
</pre>

Latest revision as of 07:09, 19 April 2020

Introduction

In case of an incident, it is advisable to send logs together with the creation of the ticket or anytime the support engineer asks you to.  This solution applies to all TruView devices.

 

Solution

Using the SSH client of you choice, login to the command line interface of TVC. Once logged in successfully, execute the following command to create a file containing all the logs required.

Keep all services running and run the following script as sudoer:

$ sudo su -
# cd /opt/tv
# ./collect_logs.sh

Still within the same directory, list all regular files:

# ls
appliance    collect_logs.sh  dataengine  flow     personality  queryengine  serverhealth                        tv-reboot.sh            tv-shutdown.sh        tv-stop-services.sh
application  configengine     dds         manager  portal       repository   tv-logs_2018-01-19_13-22-44.tar.gz  tv-restart-services.sh  tv-start-services.sh  userdiscovery

Notice the file tv-logs*.  This is the file you have to transfer to support.  

These type of files could be large; make sure to delete afterwards:

# rm tv-logs*