Skip to content

UltraMessaging/UM_debug_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UM_debug_script

A diagnostic collector for a live Ultra Messaging (UM) process. When directed to do so by Informatica UM support, run this script against the misbehaving process and upload the archive it produces — it bundles the evidence a support engineer typically asks for.

What it collects

For a given UM process (identified by PID or executable name), the script captures:

  • UM internal debug log for a configurable window (attached via gdb, default 60 seconds)
  • Four pstack samples during the window plus one after
  • top, lsof, pidstat, netstat / ss, free, uname, /proc/cpuinfo, /proc/meminfo
  • tcpdump on lo and any for the duration of the window
  • Webmon page scrape via wget (automatic for tnwgd and umestored; otherwise on demand)
  • Optionally, a gcore core file packaged with the executable and its shared libraries (-c)

Collected files land in /tmp/UM/<pid>/ and the archive is written alongside it at /tmp/UM/UM_debug_script_output.<pid>.tar.gz. Send that one file to support.

Platform

Supported: Linux (RHEL / Rocky 8 or 9 recommended). The scripts contain code paths for Solaris, HP-UX, AIX, and macOS, but those are deprecated and not maintained.

Prerequisites

Install on RHEL / Rocky:

sudo dnf install -y gdb gcc tcpdump wget lsof procps-ng sysstat psmisc tar gzip

That provides gdb, gcore, tcpdump, wget, lsof, top, free, ss, pidstat, pstack, tar, and gzip. Any missing tool is skipped with a warning — the run still produces a useful archive.

Additional requirements:

  • You must run UM_debug_script.sh as root. Otherwise gdb attach fails with a ptrace permission error.
  • libscollector.sh must sit next to UM_debug_script.sh (it ships in this repo). It is invoked automatically when -c is used; you do not run it directly.

Usage

UM_debug_script.sh -p <pid|appname> [-t secs] [-m mask] [-d dir] [-w ip:port] [-c]
Option Meaning
-p <pid|appname> Required. Numeric = PID; non-numeric is resolved via pgrep. If the name matches more than one process, the script exits and asks you to re-run with a specific PID.
-t <secs> UM debug log capture time. Default 60.
-m <mask> UM debug log mask. Default 0xffffffff0000DFB9 (or $LBM_DEBUG_MASK if set). Change only if Informatica support asks you to.
-d <dir> Output base directory. Default /tmp/UM.
-w <ip:port> Webmon endpoint to scrape. Auto-set to 127.0.0.1:8456 for tnwgd (DRO) and umestored (UMP store).
-c Also produce a gcore snapshot of the process and bundle it with libraries for offline analysis.

Example

Collect all information from a DRO process given it's PID. For this example, the PID is 12345 and the web mon is configured for port 8080.

su  # must be root
PID=12345
rm -rf /tmp/UM_debug_data/$PID  # make sure no previous run's files are left.
script -c "./UM_debug_script.sh -p $PID -d /tmp/UM_debug_data -w 127.0.0.1:8080 -c" /tmp/UM_debug_script.$PID.log

The "script" command is used to capture all the screen output of the program.

Output

/tmp/UM_debug_data/UM_debug_script_output.$PID.tar.gz
/tmp/UM_debug_script.$PID.log

Upload those files to your Informatica support ticket. The script prints a one-line summary at the end listing which collectors succeeded, were skipped, or failed.

Cautions

  • Test in a non-production environment first. With the default mask the debug log can grow fast; confirm the size is acceptable and that gdb can attach to your process before relying on this in production.
  • The script attaches gdb to a live process. gdb briefly pauses the process while it sets up and tears down the debug log. Keep the capture window as short as your investigation allows.
  • If the script is interrupted mid-capture (Ctrl-C, terminal closed, etc.), it attempts to reset the debug mask to 0 on the target process before exiting. If for any reason it cannot, the process will keep writing debug output until it restarts — watch for that on the target host.
  • The archive can contain hostnames, process arguments, open file paths, and network peer addresses. Review before sharing outside your organization.

Help

./UM_debug_script.sh        # prints usage and exits
./UM_debug_script.sh -h

About

Scripts to help users collect diagnostic information on misbehaving UM processes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages