This two-part article covers essential and practical information for WebSphere® Application Server administrators, and for system administrators who must cope with the heterogeneous operating system and database environments supported by WebSphere Application Server. Since this information, which is often considered common knowledge for administrators, is sometimes difficult or cumbersome to obtain, instructions and commands for getting this important data has been compiled here in a simple, comprehensive format.
Part 1 includes information on tasks performed by WebSphere Application Server administrators. Part 2 includes information on tasks performed by system administrators. Each task is grouped, where appropriate, into sections focusing on UNIX® (AIX®, Solaris™ and Linux) and Windows®.
This article assumes the reader is familiar with basic UNIX and/or Windows concepts. Some tasks presented here are UNIX-specific, due to the multi-user characteristics of this class of operating system. Finally, keep in mind that unless there is a need to refer to a specific version:
- The names of operating systems will be used without version numbers. For example, the term "AIX" in this document will refer to AIX Version 4.3.2 or later.
- The term UNIX will be used as a generic term for all the different UNIX versions.
- The term Windows will be used as a generic term for both Windows NT© and Windows 2000.
Today, it is common for developers to deploy WebSphere applications to production using WebSphere Application Server Version 4.0, Advanced Edition, while developing them on WebSphere Application Server Advanced Single Server Edition (single server with no database repository). Naturally, it's crucial for all involved to have current and comprehensive technical information available on all aspects of developing with WebSphere Application Server. The information presented in the sections that follow supplement the definitive material that is available from these resources:
- WebSphere Application Server Supported hardware, software, and APIs - Help for identifying what versions of prerequisite software work with each supported version of WebSphere Application Server.
- WebSphere Application Server InfoCenter - Extensive documentation reference library for all editions and versions of WebSphere Application Server.
- WebSphere Application Server Support - Fixes, hints, tips, and other information.
- IBM HTTP Server Library and IBM HTTP Server Support - Documentation and support information on the IBM HTTP Server.
Documents available on these IBM Web sites supercede any corresponding versions delivered via CD-ROM.
Finding what versions are running
While version information is available from the admin console, it is also
available for most IBM products in the source file
product.xml. Beginning with WebSphere
Application Server Version 4.0.x, this file will also include information
on eFixes that have been installed. Access this file for WebSphere
Application Server using these commands:
| AIX |
cat /usr/WebSphere/AppServer/properties/com/ibm/websphere/product.xml
|
| Solaris/Linux |
cat /opt/WebSphere/AppServer/properties/com/ibm/websphere/product.xml
|
| Windows |
c:\WebSphere\AppServer\properties\com\ibm\websphere\product.xml
|
The most common software prerequisites for which you will need to check version numbers are listed below. Use these commands or instructions to help you get the appropriate version information. Issue these commands from a command prompt window, unless otherwise specified.
| Java JDK |
Notes:
| ||||||
| IBM HTTP Server |
Notes:
| ||||||
| Browsers and other GUI tools | From the menu bar of the Web browser, select Help -> About... | ||||||
| X-Windows |
Notes:
|
The table below shows the default locations for the WebSphere Application Server code:
| AIX | /usr/WebSphere/AppServer
May also have alias: /usr/WebAS |
| Solaris/Linux | /opt/WebSphere/AppServer
May also have alias: /opt/WebAS |
| Windows |
c:\WebSphere\AppServer
|
The home directory for WebSphere Application Server will be referred to as
WAS_HOME throughout this document, since this
variable is set during execution of the Windows batch files or the UNIX
script files that start WebSphere and its associated tools:
| UNIX | setupCmdLine.sh(in WAS_HOME/bin) |
| Windows | setupCmdLine.bat(in WAS_HOME\bin) |
Location of WebSphere customization files
While the majority of configuration options are stored in the repository
database, some properties may be modified in the
bin/admin.config file in the properties
directory. Batch files or scripts in the bin
directory may also be modified, for example, to accomodate a JDK
upgrade.
To extract the configuration from the database use the command:
XMLconfig -export FileName -adminNodeName HostName
For example:
XMLconfig -export WasServer1.xml -adminNodeName
WasServer1
Automating WebSphere administration tasks
WebSphere provides two tools to help automate WebSphere administrative tasks:
| XMLConfig |
|
| WCSP |
|
Examples of using both of these program are available in the WebSphere Application Server InfoCenter.
For the purpose of problem determination, it is very helpful to delete or empty log files each time WebSphere Application Server is stopped and started. Further, it is often easier to empty the files than delete them, particularly in cases where the permissions had to be changed, such as when running the application server as non-root. To do this, enter the following commands from a command prompt window:
| UNIX |
cp /dev/null logfile.log
|
| Windows |
copy nul: logfile.log
|
Although it may occasionally be desireable to empty log files while WebSphere Application Server is running, it is not recommended that you do so. Always stop WebSphere Application Server prior to "nulling out" log files.
On UNIX, new log files may be automatically generated on a regular basis,
such as daily or each time a process is started. After a newer log file
has been generated, older empty log files can be deleted with this
command:
find $WAS_HOME/logs -size 0 -exec rm {} \;
Finding what processes are running
In some situations, it is not always obvious what runtime processes are actually running, or whether a specific process is running or not. Use these system commands to indentify which processes are running at a given time:
To see the processes related to WebSphere that are running, use this
command:
ps -ef | grep -i java
Of course, not all Java processes will necessarily be WebSphere-related. Java processes run by WebSphere Application Server generally have longer argument lists. Special parameters must be used to find all WebSphere processes that are running on some UNIX operating systems:
| Solaris | There is typically a
different ps command in /usr/bin:/usr/ucb/ps -auxww |
| AIX |
/usr/bin/ps -elf
|
Issue these commands in a command prompt window to find out which processes are running that are associated with WebSphere Application Server:
| Admin server process |
ps -ef | grep java | grep AdminServer
|
| Nanny process (restarts servers that terminate) |
ps -ef | grep java | grep Nanny
|
| Other processes |
ps -ef | grep java | grep ManagedServer
|
In Linux, each thread runs in a separate process.
There are two easy ways to check which processes are running in Windows:
| Using Task Manager: | From the task bar (default location is at the bottom of the screen), right-click and select Task Manager -> Applications -> Processes. The active processes along with the actual names of the executables will be displayed. |
Using net start:
|
|
When backing up files for WebSphere Application Server, be absolutely sure the files and information listed here are included your backup:
- The
XMLConfig -exportcommand will document the current configuration in the repository. - The files
admin.config(orserver-cfg.xmlfor WebSphere Application Server Advanced Single Server Edition) andsetupCmdLine.sh/setupCmdLine.batdocument the environment settings required to connect to the repository. - The files
obj.conf/httpd.confand appropriate SSL files, if used (e.g.*.sth,*.kdb), document the webserver's configuration. - Beginning with WebSphere Application Server Version 4.0, all user applications are delivered as EAR, WAR or JAR files. These should be backed up as well, but that is actually done outside of WebSphere. The same is true for static Web pages written by users and served by the Web server.
Using CD-ROMs during installation
WebSphere Application Server is installed from CD-ROM. (Fixpaks are available via download .) The information provided here will be helpful when dealing with CD-ROMs in these various configurations, since each operating system handles CD-ROMs differently.
In AIX, a CD-ROM must be logically mounted before it can be accessed by the system for installation.
To mount a CD-ROM in AIX:
- Insert the CD-ROM into the CD-ROM drive.
- Log in as user ROOT or type
su - rootto login using the root profile. - Create a
/cdromdirectory by entering mkdir /cdrom. - Enter smit to add a CD-ROM file system.
- Select System Storage Management (Physical & Logical Storage) -> File Systems -> Add/Change/Show/Delete File Systems -> CDROM File Systems -> Add a CDROM File System.
- Select a device name, such as cd0. CD-ROM file system device names must be unique.
- Type
/cdromto get the Mount Point prompt. - Select OK, or press Enter if using the smit ASCII interface, returning to the previous smit level, System Storage Management (Physical & Logical Storage).
- Select File Systems -> Mount a File System.
- For file system name, select /dev/cd0.
- For directory over which to mount, select /cdrom.
- For type of file system, select cdrfs.
- For Mount as a READ-ONLY system, select Yes.
- Select OK, or press Enter if using the smit ASCII interface.
- Exit smit.
To install WebSphere Application Server from CD-ROM using tar files:
- Add and mount the CD-ROM, following the steps above.
- Log in with root authority.
- Change the directory to
/cdrom. - Invoke
./install.shby following the standard installation instructions. - When the installation is complete, dismount the CD-ROM by typing:
cd .. umount /cdrom. - Eject the CD.
If Volume Management is running on Solaris, the operating system will logically mount the CD-ROM as soon as it is inserted into the drive. If Volume Management is not running, you will need to logically mount the CD-ROM.
To mount a CD-ROM on Solaris:
- Login as root.
- Start the Volume Management daemon by executing the commands:
/etc/init.d/volmgt start
ps -ef | grep voldProcess
/usr/sbin/voldshould then be started.
To install WebSphere Application Server from CD-ROM using tar files:
- Insert the CD-ROM into the CD-ROM drive and mount, if necessary. The
CD-ROM will be mounted, for example, as
/cdrom/was350. When a CD-ROM is inserted as root, a File Manager window will be started. Do not kill it. You need this window to eject the CD-ROM. If you kill the window, an orphan process will be using the CD-ROM, resulting in "device busy" errors when you try to eject the CD. - Log in as root and run the CD by typing:
cd /cdrom/was350 - Invoke
./install.shby following the standard installation instructions. - When the installation is complete, dismount the CD-ROM by typing:
cd eject cdrom.
To detect if a CD-ROM is already in the drive, use the
volcheck command. For example:
$ volcheck -v /cdrom. If no CD-ROM is present,
the message /cdrom has no media will
display.
In HP-UX, a CD-ROM must be logically mounted before it can be accessed by the system for installation.
To mount a CD-ROM on HP-UX:
- Insert the CD-ROM into the CD-ROM drive.
- Log in as user ROOT or type
su - rootto login using the root profile. - Issue the
mountcommand to determine if the CD-ROM file system is already mounted and operational by verifying that/cdromis listed. If it is, then you may install the contents of the CD. If not, then you need to create a file system and then logically mount the CD-ROM by continuing with the remaining steps. - Create a directory for the CD-ROM, by typing:
mkdir /cdrom. - Type:
sam & - Select Disks -> File Systems -> Disk Devices -> CDFS (for CD-ROM File System).
- From the menu bar, select Actions -> View more information -> Show Device Files.
- Do not select raw devices such as
/dev/rdsk/c0t2d0. Make a note of the value for Device File. For example, in HP-UX 10, it might be:/dev/dsk/c0t2d0. - Close the windows and exit
sam. - Logically mount the CD-ROM drive manually with the command:
mount /dev/dsk/c0t2d0 /cdrom - Issue the mount command again and verify that
/cdromis listed.
The normal mount in HP-UX is sometimes unable to handle very long file names, which may hinder the installation of DB2. To overcome this:
- Mount the CD-ROM with the command:
pfs_mountd & pfsd 4& pfs_mount /CDROM - Proceed with the installation as normal.
- When you have finished using the CD, unmount the CD usith the command:
pfs_umount /CDROM
Always unmount the CD before logging out of the session to avoid shutdown problems or the need to reboot.
Windows recognizes the CD-ROM drive during boot and treasts it as a read-only drive.
Hopefully, the information presented here will help WebSphere Application Server administrators quickly find the commands they need to perform specific tasks with this product. In Part 2, the scope of commands includes tasks related to system administration.
Many of the questions and answers compiled in this document were obtained from co-workers. We wish to thank in particular the following co-workers:
- Jessica Greco
- Larry Henson
Lee R. Perlov is an Advisory Software Engineer and one of the team leads in the WebSphere Application Server support group. He started working for IBM in 1985 in Gaithersburg, MD, working in the Federal Systems Division on various projects for the United States intelligence community. He then moved to RTP to work on library development and support. Mr. Perlov received a B.S.Acc degree in Accounting from the University of Florida in 1983. He also completed two years of graduate work in the Department of Computer Science at the University of Florida.
Angel Rivera is an advisory software engineer and is working with the SDWB and CMVC team in IBM. He joined IBM in 1989 and since then had worked in the development and support of library systems. He was the technical lead for CMVC Version 2 for many years. He was also the team lead of the technical support team for VisualAge TeamConnection. Mr. Rivera has an M.S. in Electrical Engineering from The University of Texas at Austin, and a B.S. in Electronic Systems Engineering from the Instituto Tecnologico y de Estudios Superiores de Monterrey, Mexico.
Edna Wong Kyu is a Staff Software Engineer for the Software Solutions division at Research Triangle Park. She joined IBM in 1987 and has worked in testing, VM systems programming, support of library platforms and support of various UNIX platforms. Mrs. Kyu received a B.A. in Computer Science and a minor in Business from New York University in 1985.



