Unix/Linux 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 Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-18-2013   -   Original Discussion by senkerth
senkerth's Unix or Linux Image
senkerth senkerth is offline
Registered User
 
Join Date: Dec 2010
Last Activity: 18 September 2015, 7:09 AM EDT
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 Unix and Linux 06-18-2013   -   Original Discussion by senkerth
Just Ice's Unix or Linux Image
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
 
Join Date: Mar 2005
Last Activity: 18 October 2016, 12:06 PM EDT
Location: Philadelphia metro
Posts: 961
Thanks: 3
Thanked 67 Times in 61 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 Unix and Linux 06-18-2013   -   Original Discussion by senkerth
shamrock's Unix or Linux Image
shamrock shamrock is offline Forum Advisor  
Registered User
 
Join Date: Oct 2007
Last Activity: 21 August 2017, 1:53 PM EDT
Location: USA
Posts: 1,599
Thanks: 37
Thanked 158 Times in 148 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 Unix and Linux 06-18-2013   -   Original Discussion by senkerth
jlliagre's Unix or Linux Image
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 17 December 2017, 4:12 PM EST
Location: Outside Paris
Posts: 4,876
Thanks: 18
Thanked 637 Times in 556 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 Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 02:36 PM.