Downloads

Foundation of the site:

January 2000

Last update:

13 Dezember, 2009

Yet another monitoring tool ? - Oh no !!!

Do you remember the lewd comment of Stephe Johnson about the parser generator he developed at AT&T in the seventies? He called it Yacc, i.e. “Yet another compiler-compiler”, because there were already many similar programs . After a little  while Yacc used to be available as the default parser generator on most Unix systems.

ohon0

It has since been supplanted as the default by more recent, largely compatible, programs such as Berkely Yacc, GNU Bison or Abraxas pcyacc. An updated version of the original AT&T version is included as part of Sun's Open Solaris project. Each offers slight improvements and additional features over the original yacc, but the concept has remained the same. Yacc has also been rewritten for other important  languages.

I dont’ want to give the impression as if I could compare with Stephe Johnson, but fact is that I missed painfully a tool like that in my job as DBA in companies with thousands of servers, clusters and databases. I’ll show you the README of this tool and then you decide if you can use it or not. I hate that usual download procedure with adress forms and acceptance buttons of developer’s license and so on. If you want it, simply write me a mail with some comments about your person and what you are doing, because I like to have contact with colleagues and - who knows? - there may be an opportunity to work together.

So here is the README which I wrote for my colleagues on the job. Meanwhile I developed a series of new scripts - analyzing system events, active session history, advisors, library cache locks, etc, And - very important - two different implementations: one running on a database server connecting “as sysdba”, another one running on a portal server connecting via a central tnsnames.ora.

TODO: demonstration of function tree with examples and handling techniques.

 

README for monitor.ksh
======================

CONTENTS:
1) Purpose of this tool
2) Architecture
3) Handling
4) TODO

1) Purpose of this tool

There a some really good GUI-tools for assisting DBAs - have
a look at Quest's Toad which comes with expert databases for
DBAs and Developers; or look at Oracles SQL Developer or
Grid Control. This is really fine in companies with a handful
of databases, but not in companies with thousands of servers,
clusters and databases simply because you can't establish
the connections because of security issues or the pure number of
instances to be monitored or the cluster software which forces
to guess where the database actually lives.

Expert DBAs in these environments have developed their preferred
and beloved set of scripts, but unfortunately this set has grown
and grown in the course of the years and it is not funny to grep
through this large library of old and new scripts for the appropriate
script when you are on emergency-service and there is a critical
situation an 3:00 AM.

So if we are not allowed to use GUI-tools, then we write some
tools with a "smell of GUI". This one comes out from my actual
situation and I am sure that some smart DBAs on the world have
already done similar things, but until now I have seen only
these script libraries with hundreds of scripts forcing me to
guess for the contents.  Take this one as proposal to make your
own solution and feel free to adapt or complete it with other
reports. If you know the kornshell you will easily understand
how to do this.

The "GUI-smell" is achieved by old features of the korn shell:
the select-feature and the capability of the terminfo database
applied by the tput commands. The terminfo manual shows a rich
variety of features including colours. But with respect to the
variety of different ksh-releases I limit myself to black,
white and bold.

2) Architecture

There is a script bundle which comes in mon[version].tar.gz .
After unpacking this tar you will see
README
monitor.ksh
 

But for the sake of design and simplicity the code is distributed
between the central script monitor.ksh and helper scripts named
.Dba.ksh, etc. in order not to confuse the user. Actually there
are
.monitor.lib (contains the global functions)
.About.ksh
.Ash.ksh
.Dba.ksh
.Dict.ksh
.Jobs.ksh
.Locks.ksh
.Objects.ksh
.Security.ksh

.Session.ksh

This architecture reflects the report section of Oracle's SQLDEVELOPER.
The functions of every script are listed in the respective script headers.

3) Handling

The first window coming up shows my old technique of presenting the running
oracle instances for selecting one of them, thus proceeding to the further
functions. If there is no instance running, the tool exits with a message.

When you know the common GUI tools, the handling is mostly self-explaining.
It was quite a bit of work to persuade the kornshell performing a sort of
"window dialog" for select object_names, owners, synonym_names, beginSnapIds,
endSnapIds, DBID, Instance_number, etc. So, starting a report, there is first
coming up a window with up to 4 parameters you can choose.

There are simple reports which don't need any parameters. Then the window just
offers c(ancel), r(eset), s(ave report: y). If you let this single field null,
then report runs only at stdout. If you say "y", then report ist saved in a
logfile which is shown at the and of the report. c is really cancel and r is
resetting the dialog mask because of typos.

There are other reports with one or two paramters. For example the "All Objects-
Report". If you let the owner null, then report will show all objects in the
database which will probably last minutes to do. So be wise and select an owner
and probably an object_name. You can do this case insensitive, because there
is an upper(...)-function in my scripts. You may - and I encourage you to do
so - choose a partial string of owner or object_name or other parameters,
because there is also a LIKE upper('%variable%') in my scripts. Therefore it does not
make sense to choose with wildcards. SQLDEVELOPER behaves similar.

There are some reports which accept only exact inputs - e.q. the "View columns report"
or the "Enqueue Activity report" which understably need an exact Viewname, BeginSnap, EndSnap, DBID and Instance Number.

As you see, there are some reports which cant' run on Oracle9, but most of them run on
all actual Oracle Releases.

4) TODO

As I'm working in my freetime on the completion of the tool or only when I urgently
need a special report for my work, there are a lot of features not yet implemented.
When you choose a report section or a report which is not yet implemented, the tool
sends a message.

Feel welcome to contribute your favourites.

Hans Werner Koertgen
13 December 2009