|[ Team LiB ]|
Command Examples and Scripts
For the remainder of the chapter, we illustrate how to use some commands and scripts to make it easier to administer WebLogic.
All command examples (except where noted) in this chapter run against WebLogic Server configured in the directory F:\bea\weblogic81\server\bin. Your installation directly might be different. Most users typically install WebLogic Server in the C:\partition, so they have the WebLogic Server directory as C:\bea\weblogic81\server\bin.
The common requirement for running all commands is that the WebLogic server must be up and running.
The command window will now show the various ways you can invoke the HELP command. The good thing is you don't have to remember even the HELP command (see Figure 38.1).
PING is an extremely useful command. It is used to determine whether a given instance of WebLogic Server is up and running. It can detect the running servers and gives an error message in case of a failure of WebLogic administration server. If the administration server is not running, the Web-based console will not run and you cannot determine from the console (because the console doesn't run) whether the various managed servers in the domain are running. Figure 38.2 shows various ways you can run this command.
The LIST command is used to view the bindings of a node in the JNDI naming tree.
The data returned from the LIST command will resemble the output in Figure 38.3, showing the contents of the examples program that's installed by default in WebLogic Server 8.1.
In a new command window, run the following command:
java weblogic.Admin -url t3://localhost:7001 -username weblogic -password weblogic THREAD_DUMP
Note that the THREAD_DUMP command prints the thread dump in the window running WebLogic Server and not in the window where the command was issued (see Figure 38.4).
|[ Team LiB ]|