LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 03-27-2003, 10:58 AM   #1
asharma
LQ Newbie
 
Registered: Mar 2003
Posts: 3

Rep: Reputation: 0
CPU usage of a process


Hey there,
Which file has the information about a process' CPU usage ? I went as far as /proc/<pid_no>/
what next ?
 
Old 03-27-2003, 07:36 PM   #2
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Does prstat have the info that you're looking for?
 
Old 03-27-2003, 09:38 PM   #3
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
type top and it will list all the proc by their cpu usage
 
Old 03-28-2003, 12:08 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by nakkaya
type top and it will list all the proc by their cpu usage
I don't believe top is installed by default with a Solaris install, but you can install it afterwards.

You can also try a ps -e or ps -el to list your processes running which I believe will display cpu usage of running processes.
 
Old 03-28-2003, 12:11 AM   #5
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
btw how do you know its solaris?
 
Old 03-28-2003, 09:00 AM   #6
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
ummm... because the question was asked in the Solaris forum. And top isn't included in a default install. It might be included in the SFW packages though.

Last edited by stickman; 03-28-2003 at 09:02 AM.
 
Old 03-28-2003, 09:02 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by nakkaya
btw how do you know its solaris?
And how do you know its not Solaris he's talking about?
I would presume it is since he seems to be posting in the Solaris Forum where I haven't seen any mistakes for members to ask something that wasn't Solaris related.
 
Old 03-29-2003, 02:17 PM   #8
asharma
LQ Newbie
 
Registered: Mar 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Hi all,
Yup, iam looking for info on solaris.
The problem is, i want the information of CPU usage in a particular CPU intensive operation part of my application.

That info cannot be obtained by a utility like ps -ef or top.
I want the CPU Time usage at instant x, perform the operation and then see the CPU time used at instant 'y'.

the diff. in readings at 'y' and 'x' will gimme an idea ...
I've looked into times( ) call. But its granularity is only 1/100 of a second.
Thanks for the interest.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
limit cpu % usage for a process student04 Linux - General 15 03-18-2014 07:22 PM
How to get %CPU usage of a process devershetty Linux - Newbie 1 08-18-2008 01:52 AM
How to get %CPU usage of a process devershetty Linux - Newbie 13 08-16-2008 11:51 AM
process cpu usage vanv101 Fedora 9 06-24-2005 05:53 PM
Limiting a process CPU usage therandomthing Linux - Software 1 06-07-2005 09:00 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration