Sunday, July 20, 2008

A Man on the Moon

I'll write a longer post tomorrow of the next day, but I've got to put something up now. 39 years ago, at 02:56 GMT 21st of July, 1969 a man, Neil Armstrong, stepped on the Moon.

"That's one small step for [a] man, one giant leap for mankind"

If thinking about that doesn't make you pause, then think about it again.

Read more about the mission here on Kennedy Space Center's site and Wikipedia.

During the last few days there have been some amazing results from some newer missions:
The EPOXI mission has video showing the Moon orbiting the Earth. I know that we all know this logically, but here you can actually SEE the moon moving!


For more details, see the Bad Astronomy Blog - which is actually very good.

 

Another space probe, called SELENE, has taken pictures of the moon which show debris from a later moon landing, Apollo 15.

Last link for now - VERY high resolution images of Tycho, one the largest craters on the Moon taken by SELENE,

 

Think about it again when you look up at the moon. 39 years ago there was someone there!

-- Robert

Friday, July 18, 2008

TBSM tips

Due to a few bureaucratic problems. I found myself installing TADDM and TBSM about 6 times over the last few days!

 

The first good news is that everything works.
The second good news is that I've got a list of problems and solution which I can share.

 

Most of these have solutions in the documentation, but it's not always clear.
All my installations were on Windows 2003, but I assume the problems are pretty platform agnostic.

 

  1. The Omnibus service stops after a while / Error 500 in the TBSM default screen.
    For some reason, on two of the servers, the Omnibus service kept dying. This is apparently a known bug in the version of Omnibus which is shipped with TBSM 4.1.1. You can solve this problem by upgrading the Omnibus to a more current version.
    SOLUTION : Add the parameter -regexplib TRE to the startup configuration of the Omnibus server (and upgrade when you get the chance)

  2. XMLToolkit service does not start. The Tivoli Discovery Library Reader service is the component of TBSM which loads DLA files or TADDM data into TBSM, This way you don't have to build the Lines Of Business yourself, rather you can load them from somewhere where they have already been defined.
    The service wouldn't start and kept giving the message "The Tivoli BSM CCMDB Discovery Library Reader service started on Local Computer and then stopped".
    SOLUTION : Copying the file mscvr71.dll from %SystemRoot%\System32 to the toolkit's \bin directory solved the problem.


  3. TBSM starts with incorrect/blank main display screen. The other symptom is seeing the following message in the browser's java console:
    Sorry, there has been a problem responding to your request. Database may be unavailable. Please report this to the server administrator: Error rendering Velocity template: layouts/ngf-default.vm: Unable to find resource 'layouts/ngf-default.vm' not found
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
    Now, if you're just reading this line, then you might figure out the solution for yourself. However, the problem is that the line is buried between many others.
    SOLUTION : Copy %NCHOME%\guifoundation\webapps\desktop\WEB-INF\system-templates\vm\layouts\html\ngf-default.vm to the directory %NCHOME%\guifoundation\webapps\dNesktop\WEB-INF\system-templates\vm\layouts


  4. The biggest problem I had was quite bizarre: The Service Component Repository was not initialized properly.
    The SCR is the repository where all the various objects (Servers, Databases, Services, etc) are kept. One of the automatic post-installation steps is the running of a script called tbsmdefaultimport. You should then see the following tab in the Service Administration screen: 
Good_SCR Unfortunately, what I saw was this : Bad_SCR

The garbled entries make it impossible to import data into TBSM, because the tree does not contain the proper entries.

SOLUTION: My solution was uninstalling/reinstalling. On the THIRD attempt, the TBSM installed correctly. Since then, Doug McClure has given me the following undocumented procedure to reset the SCR without needing to reinstall:

UNIX :
run "setdbschema -U <dbuserid> -f a". This will drop and recreate all of the tables associated with the SCR. After you have done this, you should invalidate the "Imported Business Service" and the "Component Registry". That should delete everything.

Windows:
run (using psql) the following files (found in .../XMLtoolkit/sql):
scc_staging_schema_deletes.sql
scc_schema_deletes.sql
scc_schema_setup.sql
scc_staging_schema_index_setup.sql
scc_staging_schema_setup.sql
Then you should invalidate the "Imported Business Service" and the "Component Registry"

I hope I've saved some of you some time...

-- Robert

Friday, June 27, 2008

Troubleshooting ITM OS agent on Windows

One of the most common tasks a Tivoli admin has to do is installing an OS agent (TEMA) on a server.
From my experience, it's a reasonably trouble free task, with few gotchas.
First, I'm talking mostly about local installation.
Second, the solutions mostly modify the registry - care must be used when doing so and obviously, I take no responsibility for any problems :)
Here's my list of common problems/solutions :
  1. Install from a local disk, not a network drive - i.e. no \\ in the installation directory.

  2. Simple directory names.
    The most common problems I've had are after installing Java and GSKit, the installation suddenly quits with no warning.
    This is either because:
      1. The TEMP/TMP environment variables point to a "complex" directory - i.e. one with spaces or is longer than 8 characters.
      2. The installation directory is a "complex" directory
      3. The target directory is a "complex" directory
    This is because the installation program is looking for the 8.3 format of the file (not C:\Program Files, but C:\PROGRA~1). When the registry setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Filesystem/NtfsDisable8dot3NameCreation is set to 0, then windows will create both filenames. If it doesn't exist, or is set to 1, then only the complex name is found and the installation fails.
    Another way of checking is running a dir /x command in a DOS box.
    <Caution>
    You must reboot the server for the new setting to be active. I find it's easier to just use simple directory names. The TEMP/TMP environment variables are changed in the Advanced settings of System Properties.
    IBM link : Setup program suddenly terminates after JRE and GSKit installation
  3. Cannot install because a reboot is pending.
    Often when I try to install ITM on a server that hasn't been rebooted in a long time, I'll get that error.
    A reboot will solve the problem, but from then on you'll have a tough time convincing people that ITM doesn't require a reboot!
    The registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations (PendingFileRename for Windows 2000) holds the list of filenames which have been marked as changed and are waiting for a reboot. Check them, if they're harmless (I often see adobe files) then just remove them from the registry (export them to a backup file first) and run the installation again. Import the files back to the registry if you like.

    Note: Since ITM6.1 Fixpack 5 Interim Fix 2, the setup ignores most of the files so this should occur less.
    IBM Link: Windows agent reboot pending to rename locked files

  4. GSKit errors in general
    GSKit is something required for ITM and it is installed by the setup program before the ITM agent itself.
    However, sometimes you'll encounter problems with GSKIT and you'll want to uninstall it. There is no built-in uninstallation for a damaged GSKit.
    Here is a step-by-step uninstall routine : http://www-1.ibm.com/support/docview.wss?uid=swg21258721
    There's also a link to ITMRemoveAll in the link - a fast and dirty uninstall for ITM.  

  5. Another option for GSKit problems is this:
    1. Manually copy Windows\InsGSKit\setup.iss to the desired hard-drive in a directory of choice. 
    2. Alter the szDir=C:\Candle\GSK7 statement to use the desired drive letter  (Since Candle management agent was running)
    3. From command line execute:  setup.exe ITM61 --logfile=D:\GSKitTemp\GSKit.log -z -s                
    -SMS -f1"D:\GSKitTemp\setup.iss"

    This will install the GSKit. Once it is completed run the setup.exe of the Agent media. This will install the agent successfully.
These are the most common problems I've had with installing ITM. They're all easily avoidable once you know about them - but are a bit voodoo-like if you don't.
Drop me a line / add a comment if you think there's something I've forgotten.
-- Robert

Wednesday, June 25, 2008

Getting the date of an ancient date

There have recently been a few studies of the ancient world which have been aided by astronomy:

Dating Julius Caesar's invasion of Britain through tides (effects of the moon) 
http://www.txstate.edu/news/news_releases/news_archive/2008/06/Caesar062308.html

Dating Odysseus's Return from the Trojan War through a (suspected) Solar Eclipse
http://www.breitbart.com/article.php?id=2008-06-23_D91G27MO0&show_article=1&cat=breaking
http://www.sciam.com/article.cfm?id=homers-odyssey-may-document-eclipse

And Thale's eclipse which I blogged about before.

A lot of this stuff I get from Rogueclassicism.

-- Robert

Using Extended Attributes in TADDM with the TADDM API

As I've mentioned before, TADDM is the heart of IBM's CMDB solution.

Now, each Configuration Item (CI) in the CMDB has a very long list of attributes; For a computer it's the computer's name, IP address, amount of memory and so on. For a database it's the list of schemas, physical files and so on.

Now, TADDM is smart and can extract just about everything possible about a system. However, there's no way in the world it can know about outside information - such as the name of the person in charge of the specific server. That's why there are a number of attributes which are not discovered automatically, but are entered manually. These are called administration attributes are mainly names, phone-numbers and so on.

Now, you may have a use for information of this sort that does not appear as one of the administration attributes. The classic example is the physical location of the server. To solve this problem, TADDM has Extended Attributes which you can create and add to any type of CI. You could add a PhysicalLocation field to every ComputerSystem and a NeedsToBeBackedUp field to every database.

The only problem is that the default reports will not show you your Extended Attributes.

There are two solutions at the moment (I understand that the default reporting options should improve by the end of this year).

The smart solution is to download the TADDM connector for TDI which will enable you to manipulate your TADDM database easily. (After you've gone through the learning curve, of course)

The simple(r) solution is to write a short Java program which will extract the information for you.

I recommend you do both - and see what works best for you. You'll certainly learn more about TADDM this way.

Here is a short Java program which will demonstrate how to use the Java API to get data out of TADDM


----- Begin ShowAttributes.java

// I don't think you need ALL these includes for this specific program to run, but they never hurt...
import com.collation.platform.model.Guid;
import com.collation.platform.model.AttributeNotSetException;
import com.collation.platform.model.ModelObject;
import com.collation.platform.model.topology.extattrib.UserData;
import com.collation.platform.model.topology.meta.UserDataAttributeMeta;
import com.collation.platform.model.topology.meta.UserDataMeta;
import com.collation.platform.model.topology.sys.ComputerSystem;
import com.collation.platform.model.topology.sys.OperatingSystem;
import com.collation.platform.model.topology.sys.windows.WindowsOperatingSystem;
import com.collation.platform.util.ModelFactory;
import com.collation.proxy.api.client.ApiConnection;
import com.collation.proxy.api.client.ApiException;
import com.collation.proxy.api.client.ApiSession;
import com.collation.proxy.api.client.CMDBApi;
import com.collation.proxy.api.common.AttrNameValue;
import com.ibm.cdb.api.ApiFactory;
import java.io.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Vector;

public class ShowAttributes{

        String usage = "Usage: ShowAttributes <hostname> <port> <username> <password> <condition>";
        if (args.length < 6) {
            System.out.println(usage);
            System.exit(1);
        }
        String hostname = args[0];
        int port = Integer.parseInt(args[1]);
        String username = args[2];
        String password = args[3];
        String condition = args[4];
        String extendedAttribute = args[5];

        //We've got our initial arguments. Lets access the TADDM database!
        CMDBApi Api= null;
        ApiSession Session = null;
        ApiConnection Conn = ApiFactory.getInstance().getApiConnection(hostname, port, null, false);
        Session = ApiFactory.getInstance().getSession(Conn, username, password, ApiSession.DEFAULT_VERSION);
        Api = Session.createCMDBApi();

        //We'll extract a list of ComputerSystems
        Query = "SELECT * FROM ComputerSystem where fqdn contains '" + condition + "'";            
        ModelObject mo[] = Api.find(Query, -1, null, null);
        System.out.println("Found " + String.valueOf(mo.length) + " items."); 
       
        //Loop over the list of computers
        for (int j=0; j<mo.length; j++) {   

              //Print out the computer's name
              ComputerSystem computer = (ComputerSystem) mo[j];
              System.out.println(computer.getDisplayName()); 
                                          
              //Extract the list of Extended Attributes for our specific computer
              Guid guid = mo[j].getGuid();
              AttrNameValue[] attrNameValGet = api.getExtendedAttributes(guid);
              //Loop over the list of Extended Attributes  
              for (int jj=0; jj<attrNameValGet.length; jj++) { 
                    
                          System.out.println(">" + attrNameValGet[jj].name + "," + attrNameValGet[jj].value + ","); 

               }

         } 
}

---- End ShowAttributes.java

(This has been cut & pasted without re-double-triple-checking, so please tell me if there are problems)

Now, the problems don't end just with writing the program. How do you compile and run it?
Java being Java, you need a ton of parameters so that the right jar files will be found.
Here's a batch file which compiles our program and runs it.

---- Begin ShowAttributes.bat

@echo off
rem You must set these two to suit your environment.
set COLLATION_HOME=D:\IBM\cmdb\dist
set JAVA_HOME=%COLLATION_HOME%\external\jdk-1.5.0-Windows-i386

rem We will now set TADDM's environment so we can compile java
set path=%path%;%JAVA_HOME%\bin
set TADDM_SDK_HOME=%COLLATION_HOME%\sdk
call %TADDM_SDK_HOME%\bin\setTaddmEnv.bat

echo Compiling ShowAttributes.java
javac -Xlint:deprecation -cp %TADDM_CLASSPATH% -d . ShowAttributes.java
if %errorlevel% neq 0 exit /b
Rem Continue if there were no compiler errors

java -Dcom.collation.home=%COLLATION_HOME% -cp %COLLATION_HOME%\lib\api-client.jar;%COLLATION_HOME%\lib\api-dep.jar;%COLLATION_HOME%\lib\platform-model.jar;. ShowAttributes %1 %2 %3 %4 %5 %6 %7 %8

pause

---- End ShowAttributes.bat

Read more about the TADDM API and other TADDM tricks and tips with the new Redbooks which have just been published.

IBM Tivoli Application Dependency Discovery Manager Capabilities and Best Practices

Deployment Guide Series: IBM Tivoli Application Dependency Discovery Manager V7.1

Have fun!

Thursday, June 5, 2008

Getting on with Greek

This week was the 37th annual conference of The Israel Society for the Promotion of Classical Studies (ISPCS)

My bosses had other ideas about my being there, however.

I only managed to sign up as a member of the ISPCS and purchase a few books to help me with my Greek.
I bought the Joint Association of Classical Teacher's (JAST) series of Reading Greek textbooks.

(There are so many complicated acronyms in the last paragraph that you'd think it was about something in hightech...)

I bought the Grammar, the Reader and the Independent Study guide. I linked to Amazon because the official JACT site is strangely silent about the books. (at least, I haven't found anything)

Anyway, it's now official - I'm spending too much time BUYING Greek books instead of LEARNING Greek!

I've got an exam next Friday - it's a good thing that it's a long weekend here in Israel.

A Fistful of Tools...

Here are two more excellent ITM tools

GBSCMD is a command line tool which was developed in house by Gulfsoft which provides functionality which does not exist in ITM. ITM 6.2 and 6.2FP1 have added more options to tacmd, but GBSCMD is a high bar to reach.

ITMSUPER is a new OPAL offering which allows the user to view managed system data, debug situations, and correct environment configurations.
It basically collects and improves on the existing ITM tools in OPAL which I mentioned here.

You may be able to do your work without these tools, but you're certainly handicapping yourself if you don't take the time to download them and give them a spin!