Process for capturing logs using the saveLogs.pl utility
search cancel

Process for capturing logs using the saveLogs.pl utility

book

Article ID: 315718

calendar_today

Updated On:

Products

VMware Smart Assurance Network Observability

Issue/Introduction

The NCM saveLogs.pl utility provides for a number of options for capturing logs for troubleshooting.

Environment

All Supported NCM versions

Resolution

The saveLogs.pl utility is located in the tools directory:

$VOYENCE_HOME/tools/saveLogs.pl

You can see all of the "saveLog.pl" tool options by typing:

 ./saveLogs.pl

./saveLogs.pl CS                             - Create a zip file containing all current Combo Server logs

./saveLogs.pl DS                             - Create a zip file containing all current Device Server logs

./saveLogs.pl AS                             - Create a zip file containing all current App Server logs

./saveLogs.pl all                            - Create a zip file containing all current logs

./saveLogs.pl logs                           - Create a zip file containing logs from <Product_Home>/logs

./saveLogs.pl tomcat                         - Create a zip file containing tomcat logs

./saveLogs.pl database                       - Create a zip file containing database logs

./saveLogs.pl install                        - Create a zip file containing install logs

./saveLogs.pl search <string>                - Create a zip file containing logs with <any string>

./saveLogs.pl date <MMM DD> <HH:MM>          - Create a zip file containing logs with formatted date (Time is optional)

./saveLogs.pl time <HH:MM>                   - Create a zip file containing logs where time is HH:MM or HH:MM:SS

./saveLogs.pl exception <# of leading lines> - Create a zip file containing java exceptions from the logs

./saveLogs.pl ds_cache                       - Create a zip file containing the Device Server cache if applicable

./saveLogs.pl snapshot                       - Create a zip file containing the snapshot information

./saveLogs.pl core                           - Create a zip file containing core files

./saveLogs.pl jstack                         - Create a zip file containing java stack trace files

./saveLogs.pl msa                           - Create a zip file containing msa files

./saveLogs.pl Adapter                   - Create a zip file containing adapter log files

Add --save-rolled-logs to save any of the rolled logs for any option.

An example on how to use the "saveLogs.pl" would be:

[<USER>@<HOSTNAME> tools]# ./saveLogs.pl search 19478232


The output will be similar to this:  

adding: search_19478232.log (deflated 94%)

The logfile zip is at $VOYENCE_HOME/logs/logs-17_16_50-5-1-2026-search.zip (16288 bytes)

This would collect all lines in all logs that containing the string "19478232".  This would be useful to capture a thread that is present is multiple logs such as commmgr.log and session.log.

Another example:

[<USER>@<HOSTNAME> tools]# ./saveLogs.pl all --save-rolled-logs

The output will be similar to this:  

  adding: etc/hosts (deflated 71%)

The logfile zip is at $VOYENCE_HOME/logs/logs-4_7_31-5-1-2026-all.zip (337161572 bytes)

This would collect all logs from NCM server (AS/DS/CS).

 

Additional Information

The variable $VOYENCE_HOME refers to the installed location of Network Configuration Manager, by default it is /opt/smarts-ncm until NCM 24.x and now /opt/ncm for NCM 25.x and above.