Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Find memory usage for a process

Solaris


Tags
memory usage, oracle, process

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 08-11-2017   -   Original Discussion by yashreads
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 23 November 2017, 11:21 AM EST
Location: In the leftmost byte of /dev/kmem
Posts: 5,637
Thanks: 107
Thanked 1,604 Times in 1,181 Posts
Notice that Oracle relies heavily on shared memory: in addition to listing all the processes for the database you need to issue a ipcs -m th display the shared memory segments and analyse what you get there.

I am no Oracle expert but i recall vaguely that any Oracle instance will allocate only a certain amount of memory for all its processes and this value is configurable. I am not sure, anyhow, if this value is the SGA, the PGA or whatever - check this with the DBAs, they should know. It might be easier to do this than to list and add and analyse some OS-output.

I hope this helps.

bakunin
The Following User Says Thank You to bakunin For This Useful Post:
jim mcnamara (08-11-2017)
Sponsored Links
    #9  
Old Unix and Linux 08-11-2017   -   Original Discussion by yashreads
yashreads yashreads is offline
Registered User
 
Join Date: Aug 2017
Last Activity: 11 August 2017, 10:50 AM EDT
Location: INDIA
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Running ipcs -m gave me

Code:
oraent@DBSRV1 $
oraent@DBSRV1 $ ipcs -m
IPC status from <running system> as of Friday, August 11, 2017 03:07:22 PM IST
T         ID      KEY        MODE        OWNER    GROUP
Shared Memory:
m         15   0x3f81fc70 --rw-r-----   oraent oinstall
m         14   0x0        --rw-r-----   oraent oinstall
m         13   0x0        --rw-r-----   oraent oinstall
m          7   0xeb0a8b74 --rw-r-----   oraent oinstall
m          6   0x0        --rw-r-----   oraent oinstall
m          5   0x0        --rw-r-----   oraent oinstall
m          3   0xf6b11ac0 --rw-r-----   oraent oinstall
m          2   0x0        --rw-r-----   oraent oinstall
m          1   0x0        --rw-r-----   oraent oinstall
You have new mail in /var/mail/oraent
oraent@DBSRV1 $
oraent@DBSRV1 $

The oracle database allocates memory equivalent to the SGA parameter.
Thsi is needed to only start the database and to keep it running.
But as new user connect to the database and perform theis tasks. Each user has its own process on the server. This process consumes memory.

So, such connections per database differs.
In my case i have three database opn the server.
Out of the three, one database consumes apporx 80% of the CPU and memory. This is just an estimate depending on the number of connections see at the database level.
Thats why i need to find the memory usage per database.
Sponsored Links
    #10  
Old Unix and Linux 08-11-2017   -   Original Discussion by yashreads
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 22 November 2017, 2:26 PM EST
Location: NM
Posts: 11,240
Thanks: 571
Thanked 1,117 Times in 1,031 Posts
What Bakunin is politely telling you -

Depending on the oracle version and what the db is configured to do, there are oracle configuration files and tables. You as root cannot easily get into each instance and see what is going on. You pretty much have to know how the db was set up beforehand.

Go ask your DBA's what they have done for each database. Unless you want to spend two days wading knee deep through a wall of oracle documentation. And your interpretation of the "80%" thing probably is wrong, IMO (see last line)

Why? Because it all depends on whether sqlplus is running on the Solaris box itself for each user process, which it may look like to you, but whether the user's desktop or an application server is involved.

FWIW your pmon output ( I did not count) shows six(?) databases - anyway way more than three instances. You've got problems beyond what you are aware of, IMO.

Last edited by jim mcnamara; 08-11-2017 at 09:13 AM..
    #11  
Old Unix and Linux 08-11-2017   -   Original Discussion by yashreads
yashreads yashreads is offline
Registered User
 
Join Date: Aug 2017
Last Activity: 11 August 2017, 10:50 AM EDT
Location: INDIA
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
The pmon was from another server, hence the 6 databases.

The connections are not from the server. They arw coming from various sources. Some from Windows machine some from inhouse application server and some web based application. Few from the developer also.
Only the jobs which are scheduled as crontab make connection to the database. And these jobs are scheduled at night..
Sponsored Links
    #12  
Old Unix and Linux 08-11-2017   -   Original Discussion by yashreads
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 22 November 2017, 2:26 PM EST
Location: NM
Posts: 11,240
Thanks: 571
Thanked 1,117 Times in 1,031 Posts
Look, you can dispute what you want. You seem to want to diagnose this on a per process basis. Okay, then the use ps command and netstat to show who comes from what source.

The base point: if you do not have the full picture you will very likely incorrectly diagnose problems. For example are there lots of TIMED_WAIT in netstat? - I had that cause the problem you see. The windows boxes mostly and other servers had issues, but the oracle system showed the symptoms - lots of cpu, poor performance.

Do what you want. You have your mind set on per process analysis, so go for it.
Sponsored Links
Reply

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
Process memory usage oakville Solaris 5 02-15-2016 04:31 AM
How to find out memory & cpu usage of a process learn more UNIX for Advanced & Expert Users 5 10-26-2009 10:51 AM
how could I get a process Memory Usage alert0919 HP-UX 3 06-11-2009 08:35 AM
how can I find cpu usage memory usage swap usage and logical volume usage alert0919 HP-UX 3 12-02-2008 02:38 PM
Memory usage of a process tafil Shell Programming and Scripting 7 09-03-2008 04:02 AM



All times are GMT -4. The time now is 11:44 PM.