|[ Login | Enhancements Process | Newsletter | Techcasts | Technical Journal | Jobs | PB Training | Sybase FAQ | Technical Resources | Tools ]|
1.6.1 What is Monitor Server and how do I configure it?
1.6.2 OK, that was easy, how do I configure a client?
1.6.3 What about historical server?
1.6.4 Why does sp_sysmon cause Monitor Server to go crazy?
1.6.6 What are the MDA tables?
Monitor Server is a separate server from the normal dataserver. Its purpose, as the name suggests, is to monitor ASE. It uses internal counters to determine what is happening. On its own, it does not actually do a lot. You need to hook up a client of some sort in order to be able to view the results.
Configuration is easy. The Sybase documentation is very good on this one for either Unix or NT. Rather than repeat myself, go to the Sybase web site and check out the Monitor Server User's Guide. Obviously the link should take you to the HTML edition of the book. There is also a PDF available. Look for "monbook.pdf". If Sybase has skipped to ASE 99.9 and this link no longer works, then you will have to go search the Sybase home pages.
I see that you like a challenge! Syase offer a Java client to view the output from Monitor Server. It is accessible either standalone or via the Win32 edition of Sybase Central.
Standalone on NT/2000
I could not find anything about setting up the clients in the standard documentation set. However, there is a small paper on it here (towards the bottom). It does miss out a couple of important details, but is helpful for all that.
I did not try too hard to get the 11.9.2 version running, since the 12.5 version will monitor 11.9 servers.
I do not have a boxed release of ASE 12.5 for NT, just the developers release. This does not come with all of the necessary files. In order to run the Monitor Client, you will need the PC Client CD that came with the boxed release. If all you have is the developer's edition, you might be stuck. It would be worth getting in touch with Sybase to see if they could ship you one. There is probably a charge!
You will need to install the client software. If you have a release of ASE already installed and running you might want to install this into a separate area. I am not sure what files it includes and versions etc, but if you have the space I recommend saving yourself some hassle. If you have an older edition of ASE installed, the installation will ask if you want to overwrite two files, mclib.dll and mchelp.dll, both of which should reside in your winnt/system32 directory. It is important that you accept both of the overwrites. The older versions of these files do not seem to work.
Once installed, you will also need to spend some time playing with environment variables. I have got 3 editions of ASE all running successfully on the one machine (see Q1.3.9). I chose to have one user for each ASE instance, each with their own local environment variables pointing to the relevant installation for them, plus a generic account for my main user that I configured to use the software installed from the client CD. I adjusted the variables so that each user had their own set of variables and all of the installations worked OK.
Next, you need a copy of Java 1.1.8 installed. The client CD has a copy of JDK 1.1.8 in the "ASEP_Win32" directory. This is the one to go for, as I am sure that it was the one that the Monitor Client was built with. I did try a version from Sun's Java archive, but it failed.
Next, set up the JAVA_HOME environment variable. If you installed the JDK into its default location, that will be C:\jdk1.1.8.
Check to ensure that your CLASSPATH is defined as (assuming that you installed
the client into C:\Sybase_Client):
You may want to check that the files mclib.dll and mchelp.dll exist in
your winnt/system32 directory if you were not asked to replace them earlier. You may also
want to check that the defauly Java command is correct with java -version. It should
java version "1.1.8"
You should now be able to fire up the main window with:
12.5 sa "sa_password" en 0 sccsen.hlp
(The paper says that you should use "jre" and not "java". That gives me a cosistent "Class not found...". I do not know why.)
You should be presented with a screen like this, which will fill with process information after 10 seconds. Choose "File->Monitors >" to choose a monitoring graph. Here are a couple of screenshots from various monitors:
Obviously, all of this can be set from the command line or via a batch script. Shove the following into a file called mon.bat and invoke using mon ASE_SERVER MON_SERVER PASSWORD
SET JAVA_HOME=C:\JDK1.1.8 SET PATH=%JAVA_HOME%\bin;%PATH% SET CLASSPATH=C:\SYBASE_CLIENT\ASEP_Win32\monclass.zip;C:\SYBASE_CLIENT\ASEP_Win32\3pclass.zip java sybase.monclt.mcgui.procact.ProcActApp %1 12.5 %2 sa "%3" en 0 scssen.hlp
Obviously, you will need to replace "C:\SYBASE_CLIENT" with the correct string pointing to your Sybase ASE installation.
You will need to have installed the version of the Java Development Kit that comes with your CD, as per standalone installation. Next, create a shortcut to the file %SYBASE%\Sybase Central 3.2\win32\scview.exe. This is the Win 32 version of Sybase Central. Next, edit the shortcut's properties (right click on the shortcut and select "Properties"). Now, edit the "Start In" field to be "C:\jdk1.1.8\bin", assuming that you installed the JDK into its default location.
Now, assuming that both the ASE and Monitor servers are running, start up this version of Sybase Central. Unlike the Java edition, all of the Servers from the SQL.INI file are displayed at startup. Right click on the ASE server you wish to monitor and select "Properties". This brings up a triple tabbed screen. Select the "Monitor Server" tab and use the drop down to select the appropriate monitor server. Click OK, returning you to the server tree. Now, connect to the ASE server and you will see below it another option in the options tree called "Monitors". Click on it and you should see a complete list of the monitors you can choose from in the right hand panel. Double clicking on one should display it. The output is exactly the same as for standalone operation.
OK, this Monitor Server client can be run as a standalone Java application. Surely that means it can run on any platform that supports Java? Sadly, NO! The client relies on two W32 DLLs: MCHELP.DLL and MCLIB.DLL. They are needed to support the application. The first is obvious and I suspect that the second contains drawing routines. Why would anyone use a Java front end to call W32 backend functions? To prove that it can be done? To make people think that it would be possible to run it on other platforms? Not sure. Whatever it is, I sure that it should be possible to cobble them together somehow, but I have neither the time nor the inclication.
Historical server is a specialised Monitor Server client. Its job is to collect statistics from Monitor Server and save them away. The following picture shows the Monitor Server architecture and where Historical Server fits into that picture.
Getting Historical Server is straight forward, it is using it that is tricky. There is often so much information that displaying it in a meaningful manner is tricky. To be honest, the product pre-dates sp_sysmon and it may well be that you only really need to use that. In effect, sp_sysmon provides a single, comprehensive report for a fixed amount of time. You could reproduce the report using Historical Server and serveral hours of work. Where Historical Server/Monitor Server come into their own is being able to run continually, allowing you to take a peak at the statistics using Historical Server whilst Monitor Server is still collecting.
Both sp_sysmon and Monitor Server use the same internal counters to do their work. Prior to ASE 12.5, the first thing that sp_sysmon did was to reset the counters to zero, thus messing with Monitor Server well and truly. So the moral of the story was use one or the other but not both.
Fortunately, an option was added to sp_sysmon in the 12.5 series ("noclear") that forced sp_sysmon to save off a copy of the counters prior to sampling, and then compare the results to that data before printing the results. This option became the default as of ASE 15.0.1.
Thanks to Dean Morgan I have tracked down Xsybmon. I have managed to get it to compile on Linux (spits out a lot of warnings, but gcc is more aggresive these days). Whilst I don't think that it will cause any of you to jump for joy, it is certainly a nice little monitor and would certainly make a good starting point for a project to write a more comprehensive tool. I have not tried it on any other platforms, but it claims Sun OS, Solaris, AIX and HP/UX.
The source code can be found here. I have done a couple of screen shots, so that you can see what it does.
Warning: This program is old. It may not compile, and it may not work against newer releases of ASE. There may also be newer versions of the code available. Use at your own risk!
The Monitoring and Diagnostic tables were introduced in ASE 18.104.22.168 as an alternative method for monitoring ASE. Rob Verschoor has an excellent resource page for the MDA tables.
In addition, ISUG has additional resources on this topic: