# Trace Process performance Using PID

**URL:** <https://community.unix.com/t/trace-process-performance-using-pid/330668>\
**Category:** UNIX for Advanced & Expert Users\
**Created:** [June 18, 2013, 6:56am UTC](https://community.unix.com/t/trace-process-performance-using-pid/330668 "2013-06-18T06:56:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![senkerth](https://community.unix.com/letter_avatar/senkerth/32/6_449c533f586939b6e5f246632a46421f.png) [@senkerth](https://community.unix.com/u/senkerth)\
**Post date:** [June 18, 2013, 6:56am UTC](https://community.unix.com/t/trace-process-performance-using-pid/330668/1 "2013-06-18T06:56:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Just\_Ice](https://community.unix.com/user_avatar/community.unix.com/just_ice/32/165_2.png) [@Just\_Ice](https://community.unix.com/u/Just_Ice)\
**Post date:** [June 18, 2013, 10:28am UTC](https://community.unix.com/t/trace-process-performance-using-pid/330668/2 "2013-06-18T10:28:14Z")

</div>

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](http://docs.oracle.com/cd/E19253-01/817-6223/) or [truss](http://docs.oracle.com/cd/E23823_01/html/816-5165/truss-1.html) or [lsof](http://en.wikipedia.org/wiki/Lsof) to check what your program is actually doing ...

---

<div class="post-metadata">

**Author:** ![shamrock](https://community.unix.com/letter_avatar/shamrock/32/6_449c533f586939b6e5f246632a46421f.png) [@shamrock](https://community.unix.com/u/shamrock)\
**Post date:** [June 18, 2013, 2:47pm UTC](https://community.unix.com/t/trace-process-performance-using-pid/330668/3 "2013-06-18T14:47:54Z")

</div>

> [@senkerth](#):
>
> 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.

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...

---

<div class="post-metadata">

**Author:** ![jlliagre](https://community.unix.com/letter_avatar/jlliagre/32/6_449c533f586939b6e5f246632a46421f.png) [@jlliagre](https://community.unix.com/u/jlliagre)\
**Post date:** [June 18, 2013, 5:19pm UTC](https://community.unix.com/t/trace-process-performance-using-pid/330668/4 "2013-06-18T17:19:39Z")

</div>

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](https://blogs.oracle.com/pnayak/entry/finding%5C_memory%5C_leaks%5C_within_solaris)

[check Command (Sun Studio 12 Update 1: Debugging a Program With dbx)](http://docs.oracle.com/cd/E19205-01/820-7597/blauh/index.html)
