Trace Process performance Using PID

Hi,

i want to track a process using its PID in SOLARIS.

i have a code in C++ , which memory is increasing steeply increasing every 20 days, from the code i couldn't see any memory leak.

is there any way in UNIX where with the help of PID i can trace the Process usage evry hour.

thanks,
senthil

your issue may not exactly be a memory leak but rather an unplanned consequence of one of the lines in your program ... use either dtrace or truss or lsof to check what your program is actually doing ...

If you cant see any memory leaks in your code then how come its incore footprint is increasing steadily so use valgrind or "electric fence" to detect these sort of errors...

There are a couple of tools that are very efficient to track memory leaks under Solaris. Not Valgrind or Electric Fence which are as far as I know not ported (or reliable) on that platform.

You can use libumem and mdb ::findleaks which are standard tools or use dbx which is part of the studio compiler and its "check" command.

https://blogs.oracle.com/pnayak/entry/finding\_memory\_leaks\_within_solaris

check Command (Sun Studio 12 Update 1: Debugging a Program With dbx)

1 Like