Using command line tools for Siebel server management - Siebel - CRM

In the previous section of this chapter, we learned how to use the Siebel Web Client's views—the graphical user interface (GUI)—to perform various tasks related to configuring, managing, and monitoring servers and components within a Siebel enterprise.Using the GUI has several benefits, such as the easier lookup and visualization of data.However, many administrators prefer to interact with the Siebel servers on a command line basis. Using commands at the command line is typically faster than using a graphical user interface. Furthermore,commands can be placed in script files, allowing administrators to accomplish complex tasks with a single keystroke.

Next, we will inspect the Siebel Server Manager command line utility and its commands.After this section, we will be able to accomplish the same tasks as have been described for the graphical user interface via the command line.These tasks are:

  • Listing and reviewing information about the Siebel enterprise
  • Backing up the enterprise configuration
  • Listing and modifying parameters
  • Creating and modifying component definitions
  • Controlling assignment of component groups to Siebel servers
  • Setting the start up mode of server components
  • Controlling server components
  • Running tasks for batch and background components

Before we begin, we will explore the basic command line utility,namely srvrmgr, which we must invoke before we can start issuing commands to the Siebel enterprise.

About the srvrmgr command line utility

The Siebel Server Manager—its official name—is a command line utility that can be located as an executable file for Microsoft Windows or UNIX-based operating systems.The srvrmgr.exe file (on Microsoft Windows) can be found in the bin directories of the Siebel Gateway Name Server, the Siebel server, or the Siebel Developer Web Client installation folders.

We can open a command shell, navigate to the folder containing the srvrmgr executable and simply type srvrmgr to obtain a list of required and optional input parameters.If no parameters are specified,the executable generates a list of parameters.

The following table describes the input parameters for the srvrmgr executable:

Table

input parameters for the srvrmgr executable

A typical command line to connect to a Siebel Gateway Name Server could look like the following:

srvrmgr /g appsrvrgw1 /e SIEBELEVAL /u SADMIN /p TJay357D

The above command will establish a connection to the Siebel Gateway Name Server on the appsrvrgw1 machine, open the configuration store for the SIEBELEVAL enterprise,and authenticate as the user SADMIN using TJay357D as the password.We can omit the /p parameter and the password to avoid exposing the administrator's password on the screen or in text files.The srvrmgr utility will then prompt for the password and the keystrokes will not be printed to the screen.

If the information in the command line is correct and the Siebel Gateway Name Server is operational, we should see the Server Manager start up information and the srvrmgr> prompt.Once logged in correctly, we can start issuing commands.Besides the information in the Oracle documentation (Siebel Bookshelf) we can also use the help command to assist us with the first steps at the srvrmgr> prompt. Typing help at the prompt provides a large list of possible commands.

We can use the spool command to write the information of the help command to a text file for better readability. At the srvrmgr> prompt, we enter a command similar to the following:

The above commands will create a text file on the local C: drive named srvrmgr_ help.txt.This text file now contains the output of the help command.The spool off command turns the spooling off to avoid other information being written to the text file.The screenshot below shows the beginning of the text file with the output of the help command:

Figure

shows the beginning of the text file with the output of the help command

As we can observe, the first command explained is the list command.It must be followed by a keyword such as component groups or an abbreviation such as compgrps.The help command itself can also be followed by the name of a command we wish to view details about.The following command for example explains the usage of the list session command:

help list session

The following screenshot shows the output of the help list session command at the srvrmgr> command prompt:

Figure

output of the help list session command at the srvrmgr> command prompt

We can observe that optional keywords such as active or hung can be inserted between the list and sessions keywords.In addition, the list session command allows the specification of server,component, or user login names. Optional keywords and commands are always put between square brackets in the help text.

Next,we will discuss typical administrative tasks and their srvrmgr command line syntax.

If you wish to follow along with the examples, use the help command frequently to familiarize yourself with the syntax and possibilities of the Siebel Server Manager command line utility.

Listing and reviewing information about the Siebel enterprise

We can use the various list commands to review information about the building blocks of a Siebel enterprise.Viewing this information on the command line—or spooling it to files—is similar to using the list applets in the server management views in the Siebel Web Client.

The following table describes the most important list commands that we can issue at the srvrmgr> prompt:

Table

most important list commands that we can issue at the srvrmgr> prompt

Note: Server1 is an example of a logical Siebel server name.

As the output of the list command can be quite wide, it is recommended to adjust the settings for the command shell to allow more row width.The list command can be used in conjunction with the show command to define the columns and their width to use for the output.The following command line serves as an example on how to retrieve only three columns of information about tasks.

list tasks for comp SCC% show CC_ALIAS,TK_DISP_RUNSTATE(10), TK_LABEL

We can learn from this example that the show command must be followed by a comma-separated list of precisely written column names.Column names can be followed by the desired number of characters to display in parentheses.Furthermore, we can use the percentage sign (%) as a wildcard character to filter the information in the list output as indicated in the above example.The following screenshot shows the output of the example command:

Figure

output of the example command

Backing up the enterprise configuration

As discussed in previous sections of this chapter, we should consider creating a backup copy of the siebns.dat file before we undertake major modifications. We learned that this can be accomplished by pressing the Backup Enterprise button in the graphical user interface (GUI).At the srvrmgr> prompt, we can use the followingcommand to accomplish the same task:

The command can be optionally followed by a file path, which allows us to define the location and name of the backup file.

Listing and modifying parameters

In the above sections, we already learned about the list params command, which allows us to create lists of parameters at various levels such as enterprise, server, component definition, or component.If we wish to modify parameters, we have to use the change param command followed by the parameter's alias name, an equals sign,and the new value for the parameter.The following is an example:

change param EnableEAIMemoryMetrics=True for compdef eaiobjmgr_enu

The above command changes the value of the parameter EnableEAIMemoryMetrics of the EAI Object Manager component definition to True.We can obtain the alias name of parameters by using the list params command.We can combine multiple parameter-value pairs to a comma-separated list such as in the following example:

change param MaxMTServers=2,MaxTasks=100 for comp sccobjmgr_enu server Eval_1

Using a command similar to the above, we can change two parameters at once. The example shows how to change the values for the MaxMTServers and the MaxTasks parameter to 2 and 100 respectively.The change is made for the Call Center Object manager component on the Eval_1 server.The MaxMTServers parameter defines the maximum number of multi-threaded operating system processes that can be instantiated for the component.The MaxTasks parameter defines the maximum number of threads—or tasks—for the component.Setting these two parameters allows administrators to adjust the CPU and memory allocation on the Siebel server machines.

Creating and modifying component definitions

Even if it is not a daily task, a Siebel server administrator must be able to create additional component definitions and make the respective components available in the enterprise.The following example explains how to use the create compdef command to create a new component definition for a workflow monitor agent.Workflow monitor agents are background components that monitor the Siebel database for certain events and execute the actions defined in so-called workflow policies.

create compdef EvalWorkMon for comptype WorkMon compgrp Workflow run mode background full name "Evaluation Workflow Monitor Agent" desc "Created for testing purposes" with param SleepTime=20,GroupName="Assignment Group",DfltTasks=1

When we inspect the example more closely we find that the new component definition will have an alias name of EvalWorkMon,its component type will be set to WorkMon and it will belong to the Workflow component group.The run mode will be background.The above example also shows how to set the full name and description text for the new component definition as well as how to provide values for some In order to make the new component definition available, we must activate it using the following command:activate compdef EvalWorkMon

The activate compdef command sets the component definition's status from Creating to Active, thus enabling the instantiation
of components.However, the new components will not be available on any Siebel server before the server itself is restarted.It is highly recommended to put complex commands like the above example in text files.The reason for this is that the text file can be saved and reused later to create the same component definition in other environments, which is a very likely scenario.

Furthermore, storing the creation scripts and other frequently used commands in text files allows for easier documentation of changes. The read command can be used to open a text file and execute the commands in that file while we have a Siebel Server Manager session window open.The following example explains how to use the read command:

read c: empcreate_custom_compdefs.txt

Entering this line at the svrmgr> prompt will open the file specified in the path and execute all commands contained in that file.

Controlling assignment of component groups to Siebel servers

The Siebel Server Manager command line also allows administrators to control the assignment and enablement of component groups to Siebel servers.The following table provides examples for assigning, enabling, disabling, and removing a component group association for a Siebel server:

Table

Controlling assignment of component groups to Siebel servers

Controlling assignment of component groups to Siebel servers

As we learned in this,component groups are already pre-assigned to all Siebel servers but not yet enabled. If our task is to enable a component group on a specific server,the only command needed would be similar to the following:

enable compgrp workflow for server Eval_1

We must restart the Siebel server for the changes to take effect.

Setting the start up mode of server components

In order to speed up the start up of a Siebel server, it is beneficial to set certain components to manual start up.This will cause the component to be in shutdown state when the server is started, thus consuming no CPU or memory.The Siebel Server Manager command to set components to manual start up mode is similar to the following example:

manual start comp sccobjmgr_deu for server Eval_1

The above command sets the start up mode for the German Call Center object manager on server Eval_1 to manual.To set the start up mode to automatic, we can use a command similar to the following:

auto start comp sccobjmgr_deu for server Eval_1

To view the current start up mode for a server's components, we can use a command similar to the following:

list comps for server Eval_1 show CC_ALIAS, CP_STARTMODE

To avoid having to specify the Siebel server name with every command, we can use the /s flag with the srvrmgr executable followed by the Siebel server's logical name.During a srvrmgr session, we can use the set server command followed by the logical Siebel server name to focus the prompt on that server.

Controlling server components

Similar to using the buttons on the component list applets in the Server management screen in the Siebel web client, we can issue commands at the srvrmgr> prompt to control the state of server components.The following table describes the commands to control server components. As discussed above, we can use the set server command followed by the logical Siebel server name to specify the target server for the commands.The examples in the table assume that the server has been set, and use the English Call Center object manager as the target component.
Table

Controlling server components

To verify the current state of server components, we can use a command similar to the following:

list comps for server Eval_1 show CC_NAME, CP_RUN_STATE

The above command will write the component name and the current run state of all components hosted by Siebel server Eval_1 to the console.

Running jobs for batch and background components

While the graphical user interface (GUI) allows administrators to store job templates and repeating job definitions for batch components,the Siebel Server Manager command line only provides commands to start tasks—the server manager term for jobs—immediately. However, if we wish to invoke a task for a background component while the Siebel server is running, the command line is the only location to accomplish that.

In the following example, we use the start task command to invoke a task for the Generate New Database component.

start task for comp gennewdb with sqlflags=1

The above command invokes a task for the Generate New Database component and passes one parameter override to the task.

Using input files

As indicated in this and previous chapters, it is highly recommended to use input files to store complex command combinations.We can use the /i flag with the srvrmgr executable to direct it to read the file at the path following the flag and execute all commands in the file.The following is an example for a command line that invokes the Siebel Server Manager and executes the contents of a text file:

srvrmgr /g appsrvrgw1 /eSIEBELEVAL /u SADMIN /p TJay357D /i c:daily_ batch.txt /o c:daily_batch_log.txt

When this command is executed in a command shell, the Siebel server manager will connect to the Siebel Gateway Name Server on appsrvrgw1 machine, open the SIEBELEVAL enterprise configuration store, and log in as user SADMIN.The executable will open the daily_batch.txt file on the local C: drive, execute all commands in the file and exit on completion. The complete output that would be typically written to the command shell will be directed to the daily_batch_log.txt file on the C: drive.

Commands similar to the above can be placed in script files, which can subsequently be registered in a scheduling facility such as the Microsoft Windows task scheduler or cron if we are using Linux or other UNIX-based operating systems.On your demonstration machine, use the srvrmgr executable and experiment with the commands explained in this

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Siebel - CRM Topics