Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

For capacity planning on existing RedHat servers hosting Oracle Databases, I was asked how to find out the CPU utilization per database.

Thought it would be as simple as

ps -eo pcpu,comm |grep -i oracle_dbname

But I'm not sure if this is the right approach.

share|improve this question

migrated from superuser.com Jul 20 '11 at 12:06

This question came from our site for computer enthusiasts and power users.

2  
Do you need to do this through the command line? The enterprise manager shows this information on it's console. –  Vitor Braga Jul 20 '11 at 11:56
    
Victor- Thanks for your comments. Unfortunately, I'm a SysAd and have to stick with command line to make it scripted across all the servers but I'll check with my fellow DBA friends on this. –  Mario Jul 24 '11 at 9:16

1 Answer 1

All the oracle processes are kicked off by the oracle executable, and if you're running multiple databases on a server, all of the processes for each database will show up with just that executable.

Adding the args option to the ps command will add the database name both for the instance processes (such as pmon) and server processes (those satisfying user activity) to the ps output to allow grepping.

What I don't know is what you'll get is useful, considering ps is a snapshot of activity as of a given instant in time, and that seems like a very strange way to do capacity planning.

share|improve this answer
    
Thx Adam. Even I doubt 'ps', but would welcome any other command line tool for that matter. –  Mario Jul 24 '11 at 9:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.