Skip to content
/ dsm2 Public

Direct SGA access without SQL for Oracle RDBMS

License

Notifications You must be signed in to change notification settings

N3i1/dsm2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Direct Session Memory Monitor (dsm2)

Direct SGA access without SQL for Oracle RDBMS

AUTHOR

Neil C

WHAT IS DSM2?

A light weight command line interface which enables you to:

  • List all sessions
  • Retrive detailed wait event metadata
  • Set a listener to only report when a certian wait event has been triggered.

This is all done in real time directly from memory which means zero load within the database.

ON WHAT OS, ORACLE RELEASE DOES IT RUN?

Any Linux distro upto kernel v4.1 running Oracle versions >= 12.1.0.1

SAMPLE OUTPUT

alt tag

Running "report SID" you can get more detailed metrics:

alt tag

NOTES

  • To run initdsma.bsh you need to be able to connect to Oracle DB with SYSDBA privileges
  • The environment can be configured by running ". oraenv"
  • You only need to re-run initdsm2.bsh to recompile dsm2 after the database is bounced/restarted
  • DBNAME implies the INSTANCE_NAME of the Container DB.
  • From 12.2 onwards, by default only the Oracle software owner can connect to the SGA mapped file
  • You can set a "listen" on any wait event found by querying:
    select NAME from v$event_name;

INSTALLING

  • extract dsm2
$> gunzip dsm2-*.zip
  • Set the permission of compile_dsm2.bsh
$> chmod 775 compile_dsm2.bsh
  • Run compile_dsm2.bsh for a given database
$> ./compile_dsm2.bsh -d <DBNAME>

This will compile an executable named: dsm2.<DBNAME>

EXAMPLES

  • Run dsm2 for a given database, our example uses a DB called "orc"
$> ./dsm2.orc
    
dsm2:>

From within the dsm2 prompt:

  • Show help
dsm2:> help
  • Show ALL sessions
dsm2:> show
  • Show detailed stats for a given session
dsm2:> report <SID>
  • Set listener to report only for a specifc wait event
dsm2:> listen "buffer busy waits"

LICENCE

Dsm2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Dsm2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with dsm2. If not, see http://www.gnu.org/licenses/.