In each column, The Support Authority discusses resources, tools, and other elements of IBM® Technical Support that are available for WebSphere® products, plus techniques and new ideas that can further enhance your IBM support experience.
As always, we begin with some new items of interest for the WebSphere community at large:
- Check out the IBM Conferences & Events page for a list of upcoming conferences. The IBM European WebSphere Technical Conference is a 4.5 day event to be held 11-15 October 2010 in Düsseldorf, Germany. This event combines the WebSphere and Transaction & Messaging Conferences of previous years into one seamless agenda, offering two great conferences for the price of one. This year’s conference will be co-located with the Portal Excellence Conference, dedicated to portal business solutions and technical strategies..
- Last month, the IBM Support Portal was named one of the Top Ten Support Sites of 2010 by the Association of Support Professionals. Have you tried the IBM Support Portal yet? All IBM software products are now included, and all software product support pages have been replaced by IBM Support Portal. See the Support Authority's Introduction to the new IBM Support Portal for details.
- Learn, share, and network at the IBM Electronic Support Community blog on developerWorks.
- Check out the new Global WebSphere Community at websphereusergroup.org. Customize the content on your personalized GWC page and connect to other "WebSpherians" with the same interests.
- Several exciting webcasts are planned in through September at the WebSphere Technical Exchange. Check the site for details and become a fan on Facebook!
Continue to monitor the various support-related Web sites, as well as this column, for news about other tools as we encounter them.
And now, on to our main topic...
Using interactive tools to avoid confusion and errors (Part 2)
Earlier this year, The Support Authority presented an interactive tool for the WASService command. This time, we present yet another such tool that was recently developed.
At the heart of this interactive tool is the manageprofiles command, which provides
the means for performing normal maintenance activities for profiles. For
example, you can call this command to create profiles natively or
silently, to list or delete profiles, to validate the profile
registry, and more. The manageprofiles
command can be found in the install_root/bin directory. The syntax
is:
manageprofiles(.sh) –mode –arguments
There are 18 modes available, as shown in the tool’s main menu (Figure 1) and in Table 1.
Figure 1. manageprofiles command menu
Table 1. manageprofiles modes
| Mode | Use |
|---|---|
| -create | Creates a new profile. |
| -delete | Deletes a profile. |
| -augment | Augments the given profile using the given profile template. |
| -unaugment | Unaugments the profile. |
| -unaugmentAll | Unaugments all the profiles. |
| -deleteAll | Deletes all registered profiles. |
| -listProfiles | Lists the profiles in the profile registry. |
| -listAugments | Lists the registered augments on a profile that is in the profile registry. |
| -getname | Returns the name of the profile at the path specified. |
| -getPath | Returns the path of the profile name specified. |
| -validateRegistry | Validates the profile registry and returns a list of profiles that are not valid. |
| -validateAndUpdateRegistry | Validates the profile registry and lists the non-valid profiles that it purges. |
| -getDefaultName | Returns the name of the default profile. |
| -setDefaultName | Sets the default profile. |
| -backupProfile | Backs up the given profile into a.zip file. |
| -restoreProfile | Restores the given profile from a .zip file. |
| -response | Manage profiles from a response file. |
| -help | Shows help. |
Each mode takes several arguments -- in some cases, as many as 50 or more.
Some of these arguments include several long path strings; in fact, there
can be several nested levels. For example, if you choose mode 1 (create), then you are asked to choose a template path from among eight choices. Different templates take a different number of optional parameters. Not only can this be easily confusing, but it also presents an excellent opportunity to make a mistake.
Figures 2 and 3 show the steps needed for the create mode. Don’t worry if they are not terribly legible. You can see that there are many optional parameters. In fact, there are more than 200 combinations possible just for the create mode alone; there are 40 optional parameters for the appserver template, 39 for the cell template, 29 for the deployment manager template … you get the idea.
Figure 2. Steps for the create mode
Figure 3. Steps for the create mode, continued
In addition to being confusing and error prone, entering all these parameters on the command line can also be time consuming and frustrating. Beyond that, it can sometimes take an hour or more to determine why a WebSphere Application Server failed to start, based on a profile created this way.
To help you create WebSphere Application Server profiles quickly and
without confusion, the Manage Profiles Interactive utility was
developed. This new, interactive wizard can help you quickly manage the
profiles for WebSphere Application Server V6.x and V7x. This wizard is a
front end to the manageprofiles command line utility shipped with WebSphere Application Server in the bin dir. You can
download and run
this tool from <WebSphere_Install_Root>\bin\.
To illustrate how to use this utility, let’s step through the procedure for two separate scenarios: first, to augment a profile, then to create a profile.
To use the utility to augment a profile:
- Run the
run_manageprofilesInteractivecommand from the WebSphere/AppServer/bin directory (Figure 1). - For Select number next to the options on the main menu, select
item
2to augment a profile (Figure 4).
Figure 4. Augment
- For Enter number to select or change, select
1to choose a profile to augment, as shown at the bottom of Figure 4. - After selecting the profile (select
1for AppSrv01 profile), you are instructed to select the templatePath (Figure 5). There are eight options shown for the template path. If you choose7(Other), you must enter the full template path. (In the create example, you will see what happens when you choose a given templatePath option rather than Other.
Figure 5. Augment, continuation
- For the augment mode, there are only two required parameters,
profileName and templatePath. The tool now displays the required
parameters selected, as shown in Figure 6 (which is a continuation of
Figure 5). The tool displays the required parameters selected, and, if you are satisfied, displays the full command and adds it to the log file that shows that profile augmentation succeeded.
Figure 6. Augment, completion
Now, contrast this with the task of creating a profile. The regular steps to do this were shown in Figures 2 and 3. Let’s look at those steps in the tool and compare them to the steps for augmenting a profile.
To use the utility to create a profile:
- Run the
run_manageprofilesInteractivecommand from the WebSphere/AppServer/bin directory (Figure 1). - For Select number next to the options on the main menu, select
item
1to create a profile (Figure 7).
Figure 7. Create
- You are instructed to select the templatePath (Figure 8).
Figure 8. templatePath for create
There are nine options shown for the template path. In the augment example, there were eight template path options. Each selection at a given step affects the options you are presented with at the next step. The tool helps you by listing all the available options at every step and always offers you the choice of choosing the default value.
This time, you select
2for Application server profile (default). - Next, you are asked for the profile name, hostname, and profile path,
pressing the Enter key each time to select the default values (Figure 9). Notice that there are four required parameters for create mode, compared to only two for augment (Figure 6).
Figure 9. Required parameters for create
- Press Enter to accept the required parameters summary, and the tool displays the optional parameters. In the case of create using the application server template, there are 40 optional parameters (Figure 10).
Figure 10. Optional parameters for create
- You can skip the optional parameters by entering a
c, as shown in Figure 10. At this point, the final steps for create are same as for augment. The CREATE command summary is displayed. If you accept it, the full command is listed, executed, and added to the log file, which shows that the profile was successfully created (Figure 11).
Figure 11. Completion of create
As mentioned above, a command log is also kept for every command that gets issued. If the command contains a password, the password appears as "*******" in the <WebSphere_Install_Root>\logs\manageprofilesInteractive.log file. Figure 12 shows an example of what the log file contains.
Figure 12. Example log contents
One unique benefit of using this utility is that it lets you easily create a separate response file. Figure 13 shows an example of a response file.
Figure 13. Example of a response file
If you select option 17 (response) on the main
menu (Figure 13), you are asked to supply the name of the response file,
which the tool will read and execute. This functionality is supplied by
manageprofiles command and enables you to carry out the tasks silently.
Figure 14. Using a response file
Before this utility, you had to create this response file manually, which is again error prone. This tool enables you to create this response file automatically, after you have seen the command at the end and are satisfied with your selections. At that point, it gives you the choice of either running the command or adding to a response file for later use. This way, you can also run multiple commands at the same time.
You can see this in the middle of Figure 11. After giving the command
summary, you are asked by the utility to choose q to quit, r to add to
the response file, or c to run the command. In
the figure, c was entered and the command was
run. If r had been entered instead, then a response file, similar to the one shown in Figure 12 would have been created.
This article explained how the Manage Profiles Interactive utility guides you through the creation, listing, deleting, and augmenting of profiles for WebSphere Application Server quickly and without making common errors. This is a great tool for administrators in production environments, as well as in development and test systems where more frequent profile creation and deletions might be required.
Learn
-
Information Center: manageprofiles command
-
Using the Manage Profiles Interactive tool to create new profiles in WebSphere Application Servers
-
Video: Demonstration
of the Manage Profiles Interactive tool
-
The Support Authority: If you need help with WebSphere products, there are many ways to get it
-
IBM Software product
Information Centers
-
IBM Software Support Web site
-
IBM Education Assistant
-
IBM developerWorks
-
IBM Redbooks
-
WebSphere Software Accelerated Value Program
Get products and technologies
Discuss
-
Forums and newsgroups
-
Java
technology Forums
-
WebSphere
Support Technical Exchange on Facebook
-
Global WebSphere Community on WebSphere.org
- Follow IBM Support on Twitter!
- WebSphere Electronic Support
- WebSphere Application Server information
- WebSphere Process Server
- WebSphere MQ
- WebSphere Business Process Management
- WebSphere Business Modeler
- WebSphere Adapters
- WebSphere DataPower Appliances
- WebSphere Commerce
- IBM Support Assistant Tools
Paul Van Norman received B.Sc. in Computer Science in 1996 from the University of Regina. He moved from Regina, Canada to Austin, Texas where he has been working in WebSphere Application Server Level 2 support since May, 2000. Paul is the team lead of the WASADM team and has previously led several other L2 teams. Paul enjoys the outdoors and can often be seen in the Texas hill country back roads on his trusted Honda motorcycle.
Dr. Mahesh Rathi has been involved with WebSphere Application Server product since its inception. He led the security development team before joining the L2 Support team, and joined the SWAT team in 2005. He thoroughly enjoys working with demanding customers, on hot issues, and thrives in pressure situations. He received his PhD in Computer Sciences from Purdue University and taught Software Engineering at Wichita State University before joining IBM.




