The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Monitoring for a hung process prismtx Shell Programming and Scripting 2 03-08-2008 09:31 AM
monitoring process list via snmp, hrSWRun Bzubi AIX 0 10-18-2007 05:43 AM
process monitoring eric_wong_ch Shell Programming and Scripting 3 10-11-2007 07:08 AM
Process Monitoring Script Help rdc69 Shell Programming and Scripting 0 08-30-2006 07:55 PM
Monitoring ftp process arkhewit UNIX for Dummies Questions & Answers 2 06-29-2005 07:56 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-30-2008
jayana jayana is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 5
Monitoring a single process in solaris

Hi All,
I need help to monitor a single process in solaris to identify if it leaks memory or is using up too much system resources. I need to collect data over a period of time and plot graph for that single process

I tried using SAR & GNOME-perfmeter but both of them give me performance metrics for all processes running on the OS. There is no way I can use them to monitor a single process

vmstat & iostat give a cumulative output in one shot for the entire system, not process specific

I tried "prstat -L -p <processid> 30 > /tmp/sample.out", so that every 30 seconds sample are collected and written to sample.out file. But the disadvantage is that it does not have timestamp for us to know when a problem occured, if there is a memory leak.

Prstat seems the best as of now from my investigation, but it has no timestamp to be able to plot graph for the statistics collected. Can you please suggest if there are any more similar tools to monitor a single process over a period of time for memory leaks?
Thanks in advance for your support

Regards,
Jayana
  #2 (permalink)  
Old 05-30-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Cool a couple of things to think about

take a look at this thread on prstat
prstat problem

also if you
Code:
in a loop
   prstat -L -p <processid> 1 1
   will collect for one second
   direct this to temp file
   combine this data with current data/time writing to another file
   wait 30 seconds
I know I did not write the code, but perhaps this 'thought' can get you going on a Friday afternoon.

Last edited by joeyg; 06-02-2008 at 12:03 AM..
  #3 (permalink)  
Old 05-30-2008
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
Code:
#!/bin/sh
#Untested top-of-my-head code!
while [ 1 ]
do
echo "`date` - `ps -lfy -p <PID>|tail -1`" >> /tmp/ps.log
sleep 30
done
  #4 (permalink)  
Old 05-31-2008
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,983
if it is solaris 10, you can use "dtrace" to get all the information you need.

http://www.brendangregg.com/DTrace/dtrace_oneliners.txt
DTrace Tools
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0