一直在找一款能夠?qū)崟r(shí)監(jiān)控WebSphere的工具,今天終于在quest網(wǎng)站上下載到一個(gè)免費(fèi)試用版的Spotlight on WebSphere,據(jù)說還不錯(cuò),內(nèi)存和CPU占用都比較少,并且支持Websphere6,所以迫不及待的就拿來試用一把,但是在試用過程中想要遠(yuǎn)程連接WebSphere來監(jiān)控參數(shù)。
        根據(jù)幫助文件中jar包生成步驟來一步一步執(zhí)行,碰到一點(diǎn)小問題,已經(jīng)成功解決,寫下這篇文章記錄下來:) 
     幫助原文如下:
     If WebSphere and Spotlight are on different machines, it is strongly
recommended that you point Spotlight to a local WebSphere JAR file that you
create in the Spotlight tools folder. This file contains all the WebSphere classes
that Spotlight requires.
            To create a local websphere.jar file:
            1. Open a command console and navigate to the common/tools folder of the
Spotlight installation. The folder contains slfileload.jar.
            2. Copy slfileload.jar to a machine on which WebSphere is installed and ensure
that there is a Java JDK 1.3+ on that machine.
            3. Open a command window on the WebSphere machine and ensure that the
environment variable that specifies the location of the JDK is set.
            4. From the directory where you placed slfileload.jar, issue one of the following
commands:
            WebSphere 4 and WebSphere 5
java -jar slfileload.jar <appserver_folder> websphere.jar
            WebSphere 6
java -jar slfileload.jar <core_folder> websphere.jar
            As you see from the examples above, you point to the AppServer folder on
WebSphere 4 and 5, and the Core folder on WebSphere 6, which is located
on the target machine. Here are examples of where these folders are located
on a Windows machine:
            WebSphere 4
\mymachine\WebSphere\WAS4\AppServer
            WebSphere 5
\mymachine\WebSphere\WAS5\AppServer
            WebSphere 6
\mymachine\WebSphere\WAS6\Core
            Hint: you may want to give your file a more specific name, like
websphere4.jar, to distinguish it from another JAR file that you create
later on for WebSphere 5 or 6.
            5. The command creates websphere.jar in the directory in which it was
executed. Move the created JAR to the tools folder on the machine with
your Spotlight installation.
            6. When you start Spotlight and the connection dialog appears, choose the
appropriate Profiles tab and then click either Locate WebSphere Home
directory or websphere.jar file (WebSphere 4), or Locate WebSphere Jar Files
(WebSphere 5).
            7. Click the Import Jar File button and point to the newly created
<SPOTLIGHT_HOME>\common\tools\websphere.jar. The JAR file is
expanded and the result is placed in Spotlight’s
<SPOTLIGHT_HOME>\data\ws4 , ws5, or ws6 folder, depending on the
version of your WebSphere server. Note that <SPOTLIGHT_HOME>
denotes the location of the Spotlight installation directory.
            8. Once the files have been expanded, websphere.jar is no longer needed. You
can delete it to conserve disk space.
       按照幫助文件的步驟進(jìn)行jar包的生成,在第4步執(zhí)行 WebSphere 6 java -jar slfileload.jar websphere.jar 命令時(shí)并沒有自動(dòng)生成websphere.jar文件,系統(tǒng)提示命令語法不對(duì)。 
       于是嘗試使用以下命令,命令執(zhí)行成功。 
         C:\Program Files\WebSphere\AppServer>java -jar slfileload.jar ./ websphere6.jar 
      這樣我們的遠(yuǎn)程監(jiān)控jar包就生成了:) 
注:我的JDK環(huán)境為1.4.2 
java -version java version "1.4.2_06"