Showing posts with label hack. Show all posts
Showing posts with label hack. Show all posts

Friday, 24 July 2009

OBIEE Windows PerfMon counters

Yet another way to access the BI Management data discussed here - through Windows' PerfMon tool.

This will only work for installations where your OBIEE server is running on Windows. You should be able to run PerfMon locally or remotely. Standard practise would be not to run it locally on a Production machine :-)

To run PerfMon go to Start->Run and enter perfmon, or navigate Start -> Settings -> Control Panel -> Administrative Tools -> Performance

By default a handful of metrics about your local machine are displayed:

Right click and Add Counters:
If you want to monitor a remote installation of OBIEE (on Windows only, remember) then enter the network name eg \\MYREMOTESERVER in 'Select counters from Computer:', otherwise set this to 'Use local computer counters'.

Then click on Performance object dropdown, and you should see a long list of Oracle BI performance objects:
Pick one of these and a list of counters within the object will be listed. You can add all, some or just one of these.


By default the Performance Counters are installed I think, but both NQSServer.exe and sawserver.exe have commandline options for reinstalling them (or uninstalling, if you want to):
NQSServer.exe /installperf
NQSServer.exe /uninstallperf


sawserver.exe /installperf

sawserver.exe /uninstallperf

PerfMon is documented well elsewhere on the web so I won't say much more other than that you can use it interactively or logging to file. The latter would be very useful for trending of performance data, you could even go full circle and analyse it with Answers :-)

Final thought is that exposing the data this way is very helpful for Systems Management, as you now have the option of using MOM/SCOM, etc to monitor and alert on your BI servers.

I would imagine some or all of the above functionality is also available through the BI Management Pack for Enterprise Manager, but this is another way to skin the cat.

Thursday, 23 July 2009

sawserver logging configuration - logconfig.xml

The configuration of how Presentation Services (sawserver) does its logging is in the file web/config/logconfig.xml (same directory as instanceconfig.xml).

It's all nice and XML'd:
Logging Detail
Change the numerical values in the FilterRecord entries to alter the detail level of the logging. Lower means less detail, higher means more.

Be aware that your log files can grow very rapidly if you set the logging too high, and unless you're troubleshooting then leave them at the defaults.

Logging Configuration
You can change various things like how many log files are written, to what size, and also the format of the log entries:
This configuration is in the Writer definition, in the case of format set fmtName="short"
Being able to write a single-line entry is very useful in the case of monitoring software (eg. OpenView) which can't parse multiple line log entries.

sawserver.out.log and saw[x].log
sawserver.out.log is the stdout logging from presentation services. In Unix this is captured to sawserver.out.log, whereas in Windows I don't think it's captured.
saw[x].log is the file logging from presentation services

The level of information for both files is defined in logconfig.xml:
<filterrecord writerclassgroup="Cout" path = "saw" information="31" warning="41" error="41" security="41">
<filterrecord writerclassgroup="File" path = "saw" information="31" warning="100" error="100" security="41">

So by default you'll more detail in your saw[x].log (writerClassGroup="File") than sawserver.out.log (the redirected stdout, writerClassGroup="Cout"). In sawserver.out.log you'll get the same Information and Security type messages as saw[x].log, but fewer (only those of greater severity) Warning and Error type messages.

More detail
See Presentation Services Administration Guide "Using the Oracle BI Presentation Services Logging Facility" for more very detailed information.

psservice - Windows command line goodness!

Our main servers are Unix and I'm as happy as a pig in muck at the command line, so when I'm working on Windows (where I've got a test OBIEE install) I like to stick with the CLI where possible.

PSService is one of those tools that I instinctively reach for without realising it. Combined with Launchy, it's even better.

Simply put, you can control windows services from the command line.

So to restart Presentation Services, instead of
Start -> Settings -> Control Panel -> Administrative Tools -> Services, scroll down, find service, right click, select restart,
I do
alt-space -> cmd [tab] psservice restart sawsvc
You can query service statuses, and for multiple services at a time:
C:\Windows\System32>psservice query "Oracle BI"
PsService v2.21 - Service information and configuration utility
Copyright (C) 2001-2006 Mark Russinovich
Sysinternals - www.sysinternals.com

SERVICE_NAME: Oracle BI Cluster Controller
DISPLAY_NAME: Oracle BI Cluster Controller
(null)
TYPE : 10 WIN32_OWN_PROCESS
STATE : 1 STOPPED
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 1077 (0x435)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Oracle BI Scheduler
DISPLAY_NAME: Oracle BI Scheduler
(null)
TYPE : 10 WIN32_OWN_PROCESS
STATE : 1 STOPPED
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 1077 (0x435)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Oracle BI Server
DISPLAY_NAME: Oracle BI Server
(null)
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: sawjavahostsvc
DISPLAY_NAME: Oracle BI Java Host
(null)
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: sawsvc
DISPLAY_NAME: Oracle BI Presentation Server
(null)
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PSService can be run remotely too, so you could use it for remote administration of your servers.

You can get full syntax from psservice -help

Services can be referenced by either their name (sawsvc) or display name (Oracle BI Presentation Server)

BTW if you like this kind of thing and work with Windows rather than Unix, check out Microsoft's PowerShell - it's one of the few things I've missed since moving back to working primarily with Unix! :-D (I don't mean that in a Microsoft-bashing way, just that it's really satisfying to work with)

[Edit]
You can also use the builtin net command for controlling services, but it's not as functional as psservice
[/edit]

Tuesday, 21 July 2009

OBIEE admin tools & hacks

As a kid I loved the idea of lego where you can disassemble and reassemble something from the ground up. As soon as I got my hands on a computer it was the same. You can have your Acorn Archimedes with its games, where do I find the sprites and sound files behind it? Likewise Microsoft Word, let me at the VBA underneath to hack it around and see what else it can do.

With that in mind I've enjoyed discovering bits of the "underbelly" of OBIEE from manuals, blogs and a few SRs I've raised.

Here's my list so far, please feel free to add to it in the comments and correct any errors or missing credits :)

Oracle BI Management data
This server-based performance and diagnostic data can be access through at least two methods:

perfmon
Credit: http://obiee101.blogspot.com/2009/07/obiee-perfmon-performance-monitor.html


Go to http://[server]:[port]/analytics/saw.dll?perfmon and you'll get the Performance Monitor. This is the same data that's used by the BI Management Pack and is accessible through the jmx agent

oc4j MBeans
An alternative to jconsole is to access the Oracle BI Management MBeans through oc4j. @lex has details here

Windows perfmon
More details in separate post here

jmxagent / jconsole
The same data as through perfmon above, full details here: jmx agent
sawping
Credit: http://tipsonobiee.blogspot.com/2009/07/sawping.html
C:\OracleBI\web\bin>sawping.exe -help
sawping [-p port] [-s host] [-v (verbose mode)] [-q (quiet mode)] [-h]

C:\OracleBI\web\bin>sawping.exe -s myPSserver.company.net -v
Server alive and well
NB not got this working yet on unix:
obiee/web/bin64 $./sawping64
/usr/lib/hpux64/dld.so: Unable to find library 'libsawcomm643r.so'.
Found in [OracleBI Home]/web/bin (or Bin64)

nqcmd
Great little command line tool. We're using it for some crude load testing (get a bunch of logical-SQL statements and use unix scripting to fire them in parallel at the BI Server) as well as monitoring of the BI Server ("pinging" it regularly with some small logical-SQL to make sure it responds correctly)
Found in [OracleBI Home]/server/Bin (or Bin64)

UnixChk
(UNIX only, duh)
What it says on the tin - validates your Unix environment is suitable for OBIEE
Usage: UnixChk.sh [-b] [-s | ]
diagcap
Support asked me to run this, you'll find it in [OBIEE home]/server/Bin
Usage: ./diagcap.sh -d [-p] [-h]
-d : directory that info will be stored
The directory must be empty
-p : absolute path to Oracle BI root directory
May be omitted if the SAROOTDIR
environment variable is set
-h : show this help message

It collects all the config files and log files from your environment into a TAR archive, which you can then send to support.

tusc
Not OBIEE as such, but interesting for the truly nosy. This is a unix (HP) tool which you use to invoke a program and then get low-level diagnostics on what it's up to. Most of the output may be gobbledegook to all but the hardcore programmer, but it does sometimes pick out if a library file is missing etc.
For example to invoke nqqserver in run-sa.sh:
tusc -vfe ${ANA_BIN_DIR}/nqsserver 2>&1 &
Administration Tool
Maybe not so unknown, but has front-end for monitoring clusters which I liked

Other stuff
This is a list of binaries that might or might not be of interest and that I plan to have a play with at some point

NB obiee/setup/sa-init64.sh and common.sh scripts might need running first to set the environment variables correctly.

obiee/web/bin
  • cryptotools - used for generating keys for authentication between obiee/delivers/xmlp
  • sawmigrate - for migrating from older versions of OBIEE?

obiee/server/Bin
  • equalizerpds - For equalising RPDs?! Reference
  • ErrorMsgCheck (directory) - not sure
  • nqerrormsgcompiler - not sure
$nqerrormsgcompiler
ErrorMessageCompiler [
] []
Exiting
  • nqlogviewer - For parsing BI server logs. Can be useful for clustered instances?
  • nqschangepassword - For changing of RPD user passwords
  • nqscripthostexec - not sure
$nqscripthostexec
Usage: nqscripthostexec Memory fault(coredump)
  • nqsshutdown - To shut down a BI Server via DSN reference (see here)
  • nqsudmlcli - something to do with UDML?
  • nqudmlexec - executing UDML against the RPD?
  • nqudmlgen - generating UDML to run against the RPD?
  • openssl - OpenSSL command line
  • sametaexport - Oracle Database Metadata Generator. See Oracle Business Intelligence Server Administration Guide and Venkat's blog
  • saschinvoke - invoke Delivers jobs & iBots (see here)
  • schconfig - Scheduler [Delivers] configuration program
  • schshutdown - Shutdown Scheduler remotely?

In Googling these various binaries I found an excellent PDF from Andreas Nobbmann's presentation in Brighton earlier this year: Scripting OBIEE - Is UDML and XML all you need?

Another useful page is here: http://gerardnico.com/wiki/dat/obiee/executable_files/start