Solaris Debugging

Problem

You have a problem with a process, running some job on Solaris and need to see some debug information.

Sometimes the problem is a missing library, etc and you need to spot the missing dependency.

Symptoms could be a binary runs fine on one system and fails on another.



Solution

Run truss with the binary, to spot all the files it opens and for additional information. Sometimes you can even spot where the log files are. 🙂



Example


This will show system process debug (solaris) for all exec/reads for a running process.

truss -xall -vall -rall -t'read' -p PID

This will run truss with the process.

truss -xall -vall -rall -t'read' program



Reference

[tags]Solaris Debugging, truss, UNIX Coding School[/tags]



Leave a Reply

Your email address will not be published. Required fields are marked *