Knowledgebase: MarkLogic Server
Creating a pstack movie for support
27 June 2023 05:31 PM

Introduction

Attached to this article is a bash script (pstack.sh), which will generate a zip file containing a lot of useful information for the support team in cases where assistance is required troubleshooting a problem in a development, QA/UAT or production environment.

When would I need to create a pstack movie for support

In situations where you're facing a particular performance problem - this may be a query that seems to be displaying unexpected behaviour or a situation where the server appears to become unresponsive for a period of time.

The "pstack movie" generates a stack trace of the MarkLogic process at intervals of 5 seconds for a period of time specified by the user running the script; we generally recommend running this script for one minute (60 seconds)

Example Usage:

./pstack.sh 60

This will cause the script to execute for 1 minute. The output will be saved to a zip file mounted at /tmp.

The script will generate a filename from the current server time and date. The zip file can then be attached to the case for the engineering team to review.

The script (pstack.sh)

The entire script is available for download from this page and the source is available from here:

A longer pstack script (ml-support-dump.sh)

This script also gets essential OS level information in addition to the pstack output:

Prerequisites

Before running this pstack script, please ensure you have the following packages installed on your host:

yum -y install pstack sysstat psutils gdb

Someone with root access to the host will need to execute this script.



Attachments 
 
 ml-support-dump.sh (2.43 KB)
 pstack.sh (0.77 KB)
(15 vote(s))
Helpful
Not helpful

Comments (0)