- custom methods for accessing Siebel

Siebel Monitoring

VA2 has several libraries that make monitoring your Siebel Environment easier. The primary one is This article tells you a little about, and how to use it.

Some things to note about


To use siebsrbobj, first you need to import it. To do that import it using the perl key work "use";

use siebsrvobj;

In Siebel environments, most siebsrvobj methods you will need to set the $enterprise parameter, many of them the $appserver parameter, and some of them the $component parameter. Example continues below:

my $enterprise = 'siebel';
my $appserver = 'compaqamd';
my $comp = 'TxnMerge';

The next thing to do with siebsrvobj is to call the "constructor". This is the newobj method call, in Perl, the line + arrow is equivelant to a . in many other object oriented languages. So In this case, we are contructing the object "$entobj", and setting one parameter, the Siebel Enterprise parameter:

my $entobj = siebsrvobj->newobj($datasession,$debug,$enterprise);

Now that we have constructed the object siebsrvrobj, we can call a method on it. In this case, we call the "isappsrvrcomprunning" method. To call this, we need to pass in the name of the appserver, and the component name. The method will return a 0 if the component is not online or running:

$retval = $entobj->isappsrvrcomprunning($appserver,$comp);

Here is the compelete rule. It will determine whether a component, TxnMerge, is online or not. This code could be used for creating a VA2 Analysis Rule:
use siebsrvobj;

my $enterprise = 'siebel';
my $appserver = 'compaqamd';
my $comp = 'TxnMerge';

my $entobj = siebsrvobj->newobj($datasession,$debug,$enterprise);  	#initialize the enterprise object

$retval = $entobj->isappsrvrcomprunning($appserver,$comp);

Other Siebel Monitoring methods. is a library that deals with the Siebel Server status information collected for each Siebel Server. is designed to simplify access to Siebel Server information. The methods below each have notes after them. Keep in mind that the for each rule, you have to import the library, and typically set some parameters as seen in the example above. You can also find the most current list of methods by reading the headers in, search for it on your central server host.
#listed below are heavily used and usefull methods, enabling you to easily write rules about your siebel server

$siebelobject->isentcomprunning($compalias);					#pass in siebel component alias - note this different than component name or description, returns true if it is running for any appserver in the enterprise
$siebelobject->isappsrvrcomprunning($appserver,$comp);				#pass in appserver, component alias, returns true if the component is running for the specified siebel appserver
$siebelobject->numoftasksforappsrvrcomp($appserver,$comp);			#pass in appserver, component alias, returns number of mt_tasks for the siebel appserver component
$siebelobject->isenttaskrunning($taskalias);					#checks siebel enterprise to determine if specified task is running
$siebelobject->isappsrvrtaskrunning($appserver,$taskalias);			#checks if specified siebel task is running for specified siebel appserver 
$siebelobject->field_name_x_forappsrvrcomp($appservername,$compalias,$field_name);		#$fieldname is the VA2 database column (which matches the Siebel srvrmgr column name). This generic function can be used to return any field for a component per Seibel server
$siebelobject->memuse_forappsrvrcomp($appserver,$comp,$memorytype);			#takes cc_name (instead of alias), as input, as that is what is mostly in the processes table type of memory = 1 = physical, 2 virtual, 3 = virtual + physical, returns total memory for Siebel component in MB
$siebelobject->memuse_forappsrvr_processname($appserver,$processname,$memorytype);		#returns amount of memory used for siebel process, such as siebproc.exe, or siebmtsh.exe, etc)
$siebelobject->memuse_forappsrvr($appserver,$type);					#returns sum of all memory used by siebel appserver in tracked processes
$siebelobject->cputime_forappsrvr_processname($appserver,$process,$type);		#returns time in seconds of CPU time for siebel process name. 1, = total cpu time, 2 = kernel time for sieble process, 3 = usertime
$siebelobject->cputime_forappsrvr_cc_alias($appserver,$alias,$type);		#returns time in seconds of CPU time for Siebel component alias, all process under the compoent
$siebelobject->stopalltasksforcomponent($comp)			#stops all tasks for Siebel component
$siebelobject->averagetasktime($taskalias,$appservername);		#returns average time in seconds a siebel task takes...this one is pretty high tech


$siebelobject->setenterprise();			#pass in a new name of the Siebel enterprise,if not added on contructor
$siebelobject->runningappservers();			#returns a list of running siebel appservers - uses VA2 tables
$siebelobject->isappsrvrunning($appserver);			#returns appserver name if it found to be running for enterprise - uses VA2 tables
$siebelobject->activeforappsrvrcomp($appserver,$comp);			#pass in appserver, component, returns number of active processes for Siebel component
$siebelobject->activeprocsforservercomplist($appserver,@componentlist);			#pass in appserver, array of components, returns total number of active processes for all the components
$siebelobject->activeprocsenterprisecomplist(@componentlist);			#returns total number of active processes for all appservers in siebel enterprise for the list of components
$siebelobject->sumtasksforcompappsrvr(@componentlist);			#take in a list of components, return sum of all active components for all components in the list for appservr
$siebelobject->listofentappservers();			#returns array of siebel appservers for an enterprise
$siebelobject->hashoflowercaseactivecomps();			#takes in siebel enterprise, returns a hash for each siebel server > lowercase(component) > cp_actv_mt
$siebelobject->entcomps();			#returns and array of hashes, all active components in the siebel enterprise
$siebelobject->entasks();			#returns and array of hashes, all active tasks in the siebel enterprise
$siebelobject->$getapptasksforcomponent($taksalias,$appserver);				#returns array of hashes (records) for specific component
$siebelobject->$getrunningapptasksforcomponent($taskalias,$appserver);			#returns array of hashes (records) for specific component, for tasks that running

#### new ones
$siebelobject->$getmaxtaskdelta($taskalias,$appserver);			#requires appserver and comp, returns difference between CP_MAX_TAS and CP_NUM_RUN. If 0, component has reached max tasks