Some things to note about siebsrvobj.pm:
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);
#methods #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 ##########others........ $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