Trace Process performance Using PID | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Trace Process performance Using PID

UNIX for Advanced & Expert Users


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-18-2013
senkerth senkerth is offline
Registered User
 
Join Date: Dec 2010
Last Activity: 24 December 2013, 2:01 AM EST
Posts: 92
Thanks: 1
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #2  
Old 06-18-2013
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
 
Join Date: Mar 2005
Last Activity: 20 September 2013, 10:59 AM EDT
Location: Philadelphia metro
Posts: 958
Thanks: 3
Thanked 67 Times in 60 Posts
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 ...
Sponsored Links
    #3  
Old 06-18-2013
shamrock shamrock is offline Forum Advisor  
Registered User
 
Join Date: Oct 2007
Last Activity: 25 November 2014, 2:06 PM EST
Location: USA
Posts: 1,545
Thanks: 25
Thanked 149 Times in 141 Posts
Quote:
Originally Posted by senkerth View Post
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...
    #4  
Old 06-18-2013
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 27 November 2014, 1:13 PM EST
Location: Paris
Posts: 4,454
Thanks: 17
Thanked 480 Times in 432 Posts
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/entr...within_solaris

check Command (Sun Studio 12 Update 1: Debugging a Program With dbx)
The Following User Says Thank You to jlliagre For This Useful Post:
jim mcnamara (06-21-2013)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Trace an extinct process Hari_Ganesh Linux 1 09-20-2012 12:26 PM
How to trace an AIX Process? steiner UNIX for Advanced & Expert Users 2 03-22-2010 07:27 AM
Help to trace process consuming more space naw_deepak Solaris 5 10-07-2009 12:57 PM
how to trace iowait to a certain process will_mike Linux 3 09-09-2008 06:58 PM
Need to get pid of a process and have to store the pid in a variable samudha UNIX for Dummies Questions & Answers 7 08-05-2008 04:24 AM



All times are GMT -4. The time now is 09:20 PM.