TIBCO Hawk® Methods Reference

Software Release 4.9 November 2010 Important Information SOME TIBCO EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE. USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN LICENSE FILE) OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE BOUND BY THE SAME. This document contains confidential information that is subject to U.S. and international copyright laws and treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO Software Inc. TIBCO, The Power of Now, TIBCO ActiveMatrix BusinessWorks, TIBCO Hawk, TIBCO Designer, TIBCO Rendezvous, TIBCO Enterprise Message Service, TIBCO Runtime Agent, TIBCO Administrator, TIBCO ActiveEnterprise and TIBCO Repository are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries. EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only. THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM. THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME. THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES. Copyright © 1996-2010 TIBCO Software Inc. ALL RIGHTS RESERVED. TIBCO Software Inc. Confidential Information | iii Contents

Tables ...... xiii

Preface ...... xv Changes from the Previous Release of this Guide ...... xvi Related Documentation ...... xviii TIBCO Hawk Documentation ...... xviii Other TIBCO Product Documentation ...... xix Third-Party Documentation...... xix Typographical Conventions ...... xx Connecting with TIBCO Resources ...... xxii How to Join TIBCOmmunity ...... xxii How to Access All TIBCO Documentation ...... xxii How to Contact TIBCO Support ...... xxii

Chapter 1 Overview of TIBCO Hawk Microagents and Methods ...... 1 About Microagents...... 2 Microagent Types...... 3 Method Returns ...... 4 Additional Information ...... 5

Chapter 2 Platform-Independent Microagents and Methods ...... 7 Summary of Platform-Independent Microagents ...... 8 Common Methods for Platform-Independent Microagents ...... 11 getReleaseVersion ...... 12 getTraceLevel ...... 13 setTraceLevel ...... 14 getTraceParameters ...... 15 setTraceParameters ...... 16 _onUnsolicitedMsg ...... 17 COM.TIBCO.hawk.microagent.Self ...... 18 Self:getReleaseVersion ...... 20 Self:getMicroAgentInfo ...... 21 Self:getSecurityInfo...... 22 Self:getComponentInfo ...... 23 Self:turnDiagnosticsOn...... 24

TIBCO Hawk Methods Reference iv | Contents

Self:turnDiagnosticsOff ...... 25 Self:getUptime ...... 26 Self:doAMIDiscovery ...... 27 Self:onMicroAgentEvent ...... 28 COM.TIBCO.hawk.microagent.HawkEventService ...... 29 HawkEventService:_onUnsolicitedMsg ...... 30 HawkEventService:onAgentAlive...... 31 HawkEventService:onAgentExpired ...... 32 HawkEventService:onAlert ...... 33 HawkEventService:onClear ...... 35 HawkEventService:onMicroAgentChange...... 36 HawkEventService:onRulebaseChange ...... 37 COM.TIBCO.hawk.microagent.RuleBaseEngine ...... 38 RuleBaseEngine:deleteRuleBase ...... 41 RuleBaseEngine:getExternalVariables ...... 42 RuleBaseEngine:getRuleBaseNames ...... 43 RuleBaseEngine:getScheduleNames ...... 44 RuleBaseEngine:loadRuleBase...... 45 RuleBaseEngine:loadRuleBaseFromFile...... 46 RuleBaseEngine:unloadRuleBase...... 47 RuleBaseEngine:getConfigInfo ...... 48 RuleBaseEngine:sendMail...... 49 RuleBaseEngine:onAlertCount ...... 50 RuleBaseEngine:suspendAlert ...... 51 RuleBaseEngine:suspendAllAlerts ...... 52 RuleBaseEngine:resumeSuspendedAlerts ...... 53 RuleBaseEngine:updateExternalVariables ...... 54 COM.TIBCO.hawk.microagent.Custom ...... 55 Custom:executeForString ...... 56 Custom:executeForNumber ...... 57 Custom:execute ...... 58 COM.TIBCO.hawk.microagent.Logfile ...... 59 Logfile:onNewLine ...... 60 Logfile:onXMLElement...... 61 Logfile:onNewLinewithPatternFile ...... 62 Logfile:reEvaluateLogFileNames ...... 64 COM.TIBCO.hawk.microagent.SysInfo ...... 65 SysInfo:getOperatingSystem ...... 66 SysInfo:getArchitecture ...... 67 SysInfo:getHostName ...... 68 SysInfo:getNetworkAddress...... 69 COM.TIBCO.hawk.hma.FileStat ...... 70 FileStat:getFileStatus...... 71

TIBCO Hawk Methods Reference Contents | v

FileStat:getFileCount ...... 75 COM.TIBCO.hawk.hma.TibRendezvous ...... 76 TibRendezvous:onRvDaemonStatus ...... 78 TibRendezvous:onRvDataLoss ...... 82 TibRendezvous:onRvdDisconnectOrConnect ...... 83 TibRendezvous:onRvLicenseExpire...... 84 TibRendezvous:onRvdRetransmissionSuppressed ...... 85 COM.TIBCO.hawk.microagent.Repository ...... 86 Repository:getName...... 88 Repository:getScheduleNames ...... 89 Repository:getRuleBaseName ...... 90 Repository:onRepositoryEvent ...... 91 COM.TIBCO.hawk.microagent.Messaging ...... 92 Messaging:sendMessage...... 93 Messaging:onMessage...... 94 Messaging:onTimeout ...... 95 Messaging:onNumber ...... 96 com.tibco.hawk.jvm.JavaVirtualMachine ...... 97 JavaVirtualMachine Microagent Configuration ...... 97 getVirtualMachineInfo...... 98 getThreadInfo ...... 100 com.tibco.hawk.amx.AMXHost ...... 103 AMXHost Microagent Configuration File...... 103 AMX Host Microagent Configuration ...... 105 isHostRunning ...... 106 getHostInfo ...... 107 getNodeInfo ...... 110 onHostEvent ...... 114 onNodeEvent ...... 117 startNode ...... 119 stopNode ...... 120 com.tibco.hawk.commonlogging.event.CLEventPublisher ...... 121 CLEvent Publisher Microagent Configuration...... 121 startPublisher ...... 122 stopPublisher ...... 123 startAllPublishers ...... 124 stopAllPublishers ...... 125 getEventPublisherInfo...... 126 getEventDataSourceDetails ...... 127 reloadEventDefinitions ...... 128 Sample Event Definitions Configuration to CLEvents from Hawk...... 134

TIBCO Hawk Methods Reference vi | Contents

Chapter 3 Microsoft Windows Microagents and Methods ...... 141 Summary of Microsoft Windows Microagents...... 142 Common Methods on Microsoft Windows...... 146 getReleaseVersion...... 147 getTraceLevel...... 148 setTraceLevel...... 149 getTraceParameters...... 150 setTraceParameters...... 151 _onUnsolicitedMsg...... 152 COM.TIBCO.hawk.hma.Performance ...... 153 Performance:System ...... 155 Performance:Processor ...... 157 Performance:Memory ...... 158 Performance:Cache ...... 160 Performance:PhysicalDisk ...... 162 Performance:LogicalDisk ...... 164 Performance:Process...... 166 Performance:ProcessCount...... 168 Performance:Thread ...... 169 Performance:Objects ...... 170 Performance:Redirector...... 171 Performance:Server...... 173 Performance:Server Work Queues ...... 175 Performance:Paging File ...... 177 Performance:Browser ...... 178 Performance:Telephony ...... 180 Performance:NBT Connection ...... 181 Performance:Network Interface ...... 182 Performance:IP ...... 184 Performance:ICMP...... 185 Performance:TCP ...... 187 Performance:UDP ...... 188 Performance:restart ...... 189 COM.TIBCO.hawk.hma.Eventlog ...... 190 Eventlog:getRecentApplicationEvents ...... 191 Eventlog:getRecentSystemEvents...... 193 Eventlog:getRecentSecurityEvents ...... 195 Eventlog:onApplicationEvent ...... 197 Eventlog:onSecurityEvent ...... 199 Eventlog:onSystemEvent...... 201 Eventlog:logEvent ...... 203 COM.TIBCO.hawk.hma.Registry ...... 204 Registry:setDWORD ...... 205

TIBCO Hawk Methods Reference Contents | vii

Registry:setString ...... 206 Registry:getDWORD...... 207 Registry:getString...... 208 Registry:getMultiString ...... 209 Registry:setExpandString...... 210 Registry:EnumerateKey ...... 211 Registry:CreateKey...... 212 Registry:setQWORD ...... 213 Registry:getQWORD ...... 214 COM.TIBCO.hawk.hma.Services ...... 215 Services:getServiceConfiguration ...... 216 Services:getServiceStatus ...... 219 Services:setServiceStartType...... 221 Services:startService ...... 222 Services:stopService ...... 223 Services:pauseService...... 224 Services:continueService ...... 225 Services:controlService ...... 226 COM.TIBCO.hawk.hma.Process ...... 227 Process:getInstanceCount ...... 228 Process:getInstanceCountByCommand...... 229 Process:getProcess ...... 230

Chapter 4 Solaris Microagents and Methods ...... 233 Summary of Solaris Microagents...... 234 Common Methods on Solaris ...... 236 getReleaseVersion ...... 237 getTraceLevel ...... 238 setTraceLevel ...... 239 getTraceParameters ...... 240 setTraceParameters ...... 241 _onUnsolicitedMsg ...... 242 COM.TIBCO.hawk.hma.System ...... 243 System:getSystemInfo ...... 244 System:getCpuInfo ...... 246 System:getSwapInfo...... 247 System:getTunableInfo ...... 248 COM.TIBCO.hawk.hma.Process ...... 249 Process:getProcess ...... 250 Process:getInstanceCount ...... 251 Process:getInstanceCountByCommand...... 252 COM.TIBCO.hawk.hma.FileSystem ...... 253 FileSystem:getByPartition...... 254

TIBCO Hawk Methods Reference viii | Contents

FileSystem:getByMountPoint...... 255 FileSystem:getByFileSystem ...... 256 COM.TIBCO.hawk.hma.Network ...... 258 Network:getStatistics ...... 259 Network:getConfig ...... 260

Chapter 5 HP-UX Microagents and Methods ...... 261 Summary of HP-UX Microagents ...... 262 Common Methods on HP-UX ...... 264 getTraceLevel...... 265 setTraceLevel...... 266 _onUnsolicitedMsg...... 267 COM.TIBCO.hawk.hma.System ...... 268 System:getSystemInfo ...... 269 System:getCpuInfo ...... 271 System:getSwapInfo ...... 272 System:getTunableInfo...... 273 System:getTraceParameters ...... 274 System:setTraceParameters ...... 275 COM.TIBCO.hawk.hma.Process ...... 276 Process:getProcess...... 277 Process:getInstanceCount...... 278 Process:getInstanceCountByCommand ...... 279 COM.TIBCO.hawk.hma.FileSystem ...... 280 FileSystem:getByPartition ...... 281 FileSystem:getByMountPoint...... 283 FileSystem:getByFileSystem ...... 285 COM.TIBCO.hawk.hma.Network ...... 286 Network:getConfig ...... 287 Network:getStatistics ...... 288

Chapter 6 AIX Microagents and Methods...... 291 Summary of AIX Microagents ...... 292 _onUnsolicitedMsg...... 293 COM.TIBCO.hawk.hma.System ...... 294 System:getCpuInfo ...... 295 System:getSwapInfo ...... 297 System:getSystemInfo ...... 298 COM.TIBCO.hawk.hma.Process ...... 299 Process:getProcess...... 300 Process:getInstanceCount...... 301 Process:getInstanceCountByCommand ...... 302

TIBCO Hawk Methods Reference Contents | ix

COM.TIBCO.hawk.hma.FileSystem ...... 303 FileSystem:getByPartition...... 304 FileSystem:getByMountPoint ...... 305 FileSystem:getByFileSystem ...... 306 COM.TIBCO.hawk.hma.Network ...... 307 Network:getStatistics ...... 308 Network:getConfig ...... 309

Chapter 7 Linux Microagents and Methods...... 311 Summary of Linux Microagents ...... 312 _onUnsolicitedMsg ...... 314 COM.TIBCO.hawk.hma.System ...... 315 System:getSwapInfo...... 316 System:getSystemInfo ...... 317 System:getCpuInfo ...... 318 System:getTunableInfo ...... 319 COM.TIBCO.hawk.hma.FileSystem ...... 320 FileSystem:getByPartition...... 321 FileSystem:getByMountPoint ...... 322 FileSystem:getByFileSystem ...... 323 COM.TIBCO.hawk.hma.Network ...... 325 Network:getStatistics ...... 326 Network:getConfig ...... 327 COM.TIBCO.hawk.hma.Process ...... 328 Process:getProcess ...... 329 Process:getInstanceCount ...... 331 Process:getInstanceCountByCommand...... 332

Chapter 8 Mac OS X Methods ...... 333 Summary of Mac OS X Microagents ...... 334 _onUnsolicitedMsg ...... 336 COM.TIBCO.hawk.hma.System ...... 337 System:getSystemInfo ...... 338 System:getCpuInfo ...... 339 System:getProcessorSetInfo ...... 340 System:getSwapInfo...... 341 System:getTunableInfo ...... 342 COM.TIBCO.hawk.hma.FileSystem ...... 343 FileSystem:getByPartition...... 344 FileSystem:getByMountPoint ...... 345 FileSystem:getByFileSystem ...... 346 COM.TIBCO.hawk.hma.Network ...... 347

TIBCO Hawk Methods Reference x | Contents

Network:getStatistics ...... 348 Network:getConfig ...... 349 COM.TIBCO.hawk.hma.Process ...... 350 Process:getProcess...... 351 Process:getInstanceCount...... 353 Process:getInstanceCountByCommand ...... 354

Chapter 9 i5/OS Microagents and Methods ...... 355 Accessing Microagents and Microagent methods on i5/OS ...... 356 Summary of i5/OS Microagents ...... 357 _onUnsolicitedMsg...... 359 getReleaseVersion...... 360 getTraceLevel...... 361 getTraceParameters...... 362 setTraceLevel...... 363 setTraceParameters...... 364 COM.TIBCO.hawk.hma.GetJobInfo ...... 365 GetJobInfo:GetDataArea ...... 366 GetJobInfo: onJobPerformanceStatistics...... 368 GetJobInfo:SubmitJob ...... 371 GetJobInfo:getJobDescriptionInfo ...... 372 GetJobInfo:getJobList ...... 375 GetJobInfo:getJobQueueInfo...... 378 GetJobInfo:getSubSystemInfo ...... 380 COM.TIBCO.hawk.hma.GetNetworkOS400 ...... 381 GetNetworkOS400:getNetworkAttribute ...... 382 GetNetworkOS400:getNetworkConnection ...... 383 GetNetworkOS400:getNetworkInterface ...... 385 GetNetworkOS400:getNetworkRoute ...... 386 COM.TIBCO.hawk.hma.MessageHandler ...... 387 MessageHandler:getMessageInfo ...... 388 COM.TIBCO.hawk.hma.ListObjects ...... 391 ListObjects:getObjects...... 392 COM.TIBCO.hawk.hma.OS400Custom ...... 394 OS400Custom:ExecuteCLCommand ...... 395 COM.TIBCO.hawk.hma.SystemInfo ...... 396 SystemInfo:getSysInfo ...... 397 SystemInfo:getSysStorageInfo...... 399 SystemInfo:getSystemValue ...... 401

Chapter 10 Methods Available for TIBCO Runtime Agent ...... 403 COM.TIBCO.hawk.TIBCORuntimeAgent ...... 404

TIBCO Hawk Methods Reference Contents | xi

TIBCORuntimeAgent:getComponentInstanceStatus ...... 405 TIBCORuntimeAgent:getReleaseVersion...... 406 TIBCORuntimeAgent:getTIBCOHome ...... 407 TIBCORuntimeAgent:getTraceFileNames ...... 408 TIBCORuntimeAgent:startComponentInstanceFromUAC ...... 409 TIBCORuntimeAgent:stopComponentInstance ...... 410

Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples ...... 411 Overview ...... 412 Scenario A ...... 413 Implementation ...... 413 Scenario B ...... 414 Implementation ...... 415 Scenario ...... 416 SETUP Instructions ...... 418

Index ...... 423

TIBCO Hawk Methods Reference xii | Contents

TIBCO Hawk Methods Reference Tables | xiii Tables

Table 1 General Typographical Conventions ...... xx Table 2 Platform-Independent Microagents ...... 8 Table 3 Microsoft Windows Microagents...... 142 Table 4 Solaris Microagents ...... 234 Table 5 HP-UX Microagents ...... 262 Table 6 AIX Microagents...... 292 Table 7 Linux Microagents ...... 312 Table 8 Mac OS X Microagents ...... 334 Table 9 i5/OS Microagents ...... 357

TIBCO Hawk Methods Reference xiv | Tables

TIBCO Hawk Methods Reference | xv Preface

This manual covers the TIBCO Hawk microagents and their methods. TIBCO Hawk microagents are used to customize system monitoring by the TIBCO Hawk agent. This manual is intended as a reference for users or administrators who are configuring the TIBCO Hawk agent. This manual assumes you are familiar with TIBCO Rendezvous architecture and the concepts of system monitoring.

Topics

• Changes from the Previous Release of this Guide, page xvi • Related Documentation, page xviii • Typographical Conventions, page xx • Connecting with TIBCO Resources, page xxii

TIBCO Hawk Methods Reference xvi | Changes from the Previous Release of this Guide

Changes from the Previous Release of this Guide

This section itemizes the major changes from the previous release of this guide.

New Microagents The following enhancements are documented in Chapter 2, Platform-Independent Microagents and Methods, page 7: • com.tibco.hawk.jvm.JavaVirtualMachine - Monitoring and management of the Java Virtual Machine(s) processes started by the same user on a local machine using Java Attach API through Hawk. • com.tibco.hawk.amx.AMXHost - Allows monitoring and managing of TIBCO ActiveMatrix Host Instance running in the local machine. • com.tibco.hawk.commonlogging.event.CLEventPublisher - To publish events from TIBCO Hawk using the TIBCO Common Logging in the Base Event Format (BEF)/Common Base Event (CBE).

System:getSwapInfo Method (On Solaris) added. This method (on Solaris) returns information on the utilization of system swap space. Refer to System:getSwapInfo, page 247 for details. The following Return Values are added: • Up Time - for System up time in seconds. • Real Memory - for total physical memory in KBytes. • Free Memory - for total free memory in KBytes. • % Free Real Memory - for free real memory.

New Return Values added in COM.TIBCO.hawk.hma.System for System:getSystemInfo method. The following Return Values are added: • Up Time - for System up time in seconds. • Real Memory - for total physical memory in KBytes. • Free Memory - for total free memory in KBytes. • % Free Real Memory - for free real memory. Refer Chapter 4, Solaris Microagents and Methods, page 233, for details.

TIBCO Hawk Methods Reference Preface | xvii

System:getSwapInfo Method and System:getSystemInfo (on AIX) added. • System:getSwapInfo - This method (on AIX) gets system Swap utilization information. For details, refer to System:getSwapInfo, page 297. • System:getSystemInfo - This method (on AIX) gets system utilization information. For details, refer to System:getSystemInfo, page 298.

System:getCpuInfo (On Linux) added. This method (on Linux) returns operating system CPU utilization information. On multi-processor machines, CPU utilization for individual processors are returned. For details refer to, System:getCpuInfo, page 318.

TIBCO Hawk Methods Reference xviii | Related Documentation

Related Documentation

This section lists documentation resources you may find useful.

TIBCO Hawk Documentation The following documents form the TIBCO Hawk documentation set: • TIBCO Hawk Installation and Configuration Read this book first. It contains step-by-step instructions for installing TIBCO Hawk software on various operating system platforms. It also describes how to configure the software for specific applications, once it is installed. An installation FAQ is included. • TIBCO Hawk Administrator’s Guide This manual includes basic descriptions of TIBCO Hawk concepts, instructions for using TIBCO Hawk Display, monitoring strategies with examples, a comprehensive FAQ, and a glossary. All books in the documentation set refer to features explained in this book. • TIBCO Hawk Plug-in for TIBCO Administrator Contains detailed descriptions of the TIBCO Hawk plug-ins accessed via TIBCO Administrator. • TIBCO Hawk ’s Guide All should read this manual. It covers the AMI protocol, AMI messages, the AMI Workbench development tool, and the TIBCO Hawk security framework and its classes. Programmers should then refer to the appropriate language reference for the AMI API. The TIBCO Hawk Application Management Interface (AMI) exposes internal application methods to TIBCO Hawk. • TIBCO Hawk AMI C Reference Contains detailed descriptions of each datatype and function in the TIBCO Hawk C AMI API. • TIBCO Hawk AMI C++ Reference Contains detailed descriptions of each datatype and function in the TIBCO Hawk C++ AMI API. • TIBCO Hawk AMI Java Reference Contains detailed descriptions of each class and method in the TIBCO Hawk Java AMI API. • TIBCO Hawk Console API Reference Contains detailed descriptions of each class and method in the TIBCO Hawk Console API, a set of Java interfaces that allow you to manage and interact with TIBCO Hawk agents and monitor alerts generated by these agents. • TIBCO Hawk Configuration Object API Reference Contains detailed descriptions of each class and method in the TIBCO Hawk Configuration Object API. • TIBCO Hawk Methods Reference A reference to the microagents and methods used by a TIBCO Hawk Agent for system and application monitoring.

TIBCO Hawk Methods Reference Preface | xix

• TIBCO Hawk HTTP Adapter User’s Guide Contains information about performing discovery, monitoring of agent status, monitoring of agent alerts, method invocation, method subscription, and many more activities on TIBCO Hawk and third-party products. • TIBCO Hawk Enterprise Message Service Administrator Plug-in Microagent Reference Contains details about the microagent methods that are used to administer and monitor the TIBCO Enterprise Message Service server. • TIBCO Hawk Release Notes Read the release notes for a list of new and changed features. This document also contains lists of known issues and closed issues for this release.

Other TIBCO Product Documentation You may find it useful to read the documentation for the following TIBCO products: •TIBCO Rendezvous® — TIBCO Rendezvous Concepts — TIBCO Rendezvous Administration — TIBCO Rendezvous Configuration Tools • TIBCO Enterprise Message Service™ — TIBCO Enterprise Message Service Installation — TIBCO Enterprise Message Service User’s Guide • TIBCO Administator™ — TIBCO Administrator Installation Guide

Third-Party Documentation You may find the following third-party documentation useful. • The Java Language Specification by Gosling, Joy, and Steele

TIBCO Hawk Methods Reference xx | Typographical Conventions

Typographical Conventions

The following typographical conventions are used in this manual.

Table 1 General Typographical Conventions Convention Use Many TIBCO products CAN be installed within the same directory. This directory is referenced in documentation as TIBCO_HOME. The value of TIBCO_HOME TIBCO_HOME depends on the operating system. For example, on Windows systems, the default value is C:\tibco. Incompatible products and multiple instances of the same product should be installed into different installation environments.

CONFIG_FOLDER A TIBCO configuration folder stores configuration data generated by TIBCO products. Configuration data can include sample scripts, session data, configured binaries, logs, and so on. This folder is referenced in documentation as CONFIG_FOLDER. TIBCO Hawk installs into a directory within . This directory is HAWK_HOME referenced in documentation as HAWK_HOME. The value of HAWK_HOME depends on the operating system. For example on Windows systems, the default value is C:\tibco\hawk\4.9.

code font Code font identifies commands, code examples, filenames, pathnames, and output displayed in a command window. For example:

Use MyCommand to start the foo process.

bold code font Bold code font is used in the following ways:

• In procedures, to indicate what a user types. For example: Type admin. • In large code samples, to indicate the parts of the sample that are of particular interest. • In command syntax, to indicate the default parameter for a command. For example, if no parameter is specified, MyCommand is enabled: MyCommand [enable | disable]

TIBCO Hawk Methods Reference Preface | xxi

Table 1 General Typographical Conventions (Cont’d) Convention Use

italic font Italic font is used in the following ways: • To indicate a document title. For example: See TIBCO BusinessWorks Concepts. • To introduce new terms For example: A portal page may contain several portlets. Portlets are mini-applications that run in a portal. • To indicate a variable in a command or code syntax that you must replace. For example: MyCommand pathname

Key Key name separated by a plus sign indicate keys pressed simultaneously. For combinations example: Ctrl+C. Key names separated by a comma and space indicate keys pressed one after the other. For example: Esc, Ctrl+Q.

The note icon indicates information that is of special interest or importance, for example, an additional action required only in certain circumstances.

The tip icon indicates an idea that could be useful, for example, a way to apply the information provided in the current section to achieve a specific result.

The warning icon indicates the potential for a damaging situation, for example, data loss or corruption if certain steps are taken or not taken.

TIBCO Hawk Methods Reference xxii | Connecting with TIBCO Resources

Connecting with TIBCO Resources

How to Join TIBCOmmunity TIBCOmmunity is an online destinaton for TIBCO customers, partners, and resident experts—a place to share and access the collective experience of the TIBCO community. TIBCOmmunity offers forums, blogs, and access to a variety of resources. To register, go to http://www.tibcommunity.com.

How to Access All TIBCO Documentation After you join TIBCOmmunity, you can access the documentation for all supported product versions here: http://docs.tibco.com/TibcoDoc

How to Contact TIBCO Support For comments or problems with this manual or the software it addresses, please contact TIBCO Support as follows. • For an overview of TIBCO Support, and information about getting started with TIBCO Support, visit this site: http://www.tibco.com/services/support • If you already have a valid maintenance or support contract, visit this site: https://support.tibco.com Entry to this site requires a user name and password. If you do not have a user name, you can request one.

TIBCO Hawk Methods Reference | 1

Chapter 1 Overview of TIBCO Hawk Microagents and Methods

This chapter describes microagents and gives information about their uses and functions.

Topics

• About Microagents, page 2 • Microagent Types, page 3 • Method Returns, page 4 • Additional Information, page 5

TIBCO Hawk Methods Reference 2 | Chapter 1 Overview of TIBCO Hawk Microagents and Methods

About Microagents

The TIBCO Hawk agent uses processes known as microagents to collect information and carry out various tasks. These microagents are divided into specific tasks known as methods. Methods configure applications to collect information and perform tasks. Methods can be called directly or through a TIBCO Hawk rulebase. This manual provides a reference to uses and functions of the microagents and methods used by a TIBCO Hawk agent for system and application monitoring. Some of information in this manual is also provided in the online help areas of the TIBCO Hawk display screen. However, unlike the TIBCO Hawk display screen, this manual provides a complete listing and reference guide to the use of all of the available microagents and their methods.

TIBCO Hawk Methods Reference Microagent Types | 3

Microagent Types

TIBCO Hawk microagents are classified by the functions they perform and can be one of three types:

• IMPACT_INFO returns information.

• IMPACT_ACTION performs an action on the TIBCO Hawk system.

• IMPACT_ACTION_INFO both returns information and takes an action based on it.

TIBCO Hawk Methods Reference 4 | Chapter 1 Overview of TIBCO Hawk Microagents and Methods

Method Returns

Methods can return information by invocation or subscription. Invocation returns information on a one-time basis. Subscription information is returned either synchronously, on a regular time schedule, or asynchronously, when data becomes available. Method invocation returns a table of results, according to specified arguments (if any).

TIBCO Hawk Methods Reference Additional Information | 5

Additional Information

Help text for TIBCO Hawk microagent methods is also available in the microagent window of the TIBCO Hawk Display. Selecting a microagent and method in this window will bring up help text in the window. For more information on TIBCO Hawk microagents, refer to the TIBCO Hawk Administrator’s Guide.

TIBCO Hawk Methods Reference 6 | Chapter 1 Overview of TIBCO Hawk Microagents and Methods

TIBCO Hawk Methods Reference | 7

Chapter 2 Platform-Independent Microagents and Methods

The TIBCO Hawk microagents described in this section are available on all platforms.

Topics

• Summary of Platform-Independent Microagents, page 8 • Common Methods for Platform-Independent Microagents, page 11 • COM.TIBCO.hawk.microagent.Self, page 18 • COM.TIBCO.hawk.microagent.HawkEventService, page 29 • COM.TIBCO.hawk.microagent.RuleBaseEngine, page 38 • COM.TIBCO.hawk.microagent.Custom, page 55 • COM.TIBCO.hawk.microagent.Logfile, page 59 • COM.TIBCO.hawk.microagent.SysInfo, page 65 • COM.TIBCO.hawk.hma.FileStat, page 70 • COM.TIBCO.hawk.hma.TibRendezvous, page 76 • COM.TIBCO.hawk.microagent.Repository, page 86 • COM.TIBCO.hawk.microagent.Messaging, page 92 • com.tibco.hawk.jvm.JavaVirtualMachine, page 97 • com.tibco.hawk.amx.AMXHost, page 103 • com.tibco.hawk.commonlogging.event.CLEventPublisher, page 121

TIBCO Hawk Methods Reference 8 | Chapter 2 Platform-Independent Microagents and Methods

Summary of Platform-Independent Microagents

The platform-independent microagents are as follows.

Table 2 Platform-Independent Microagents Microagent Description Filestat These methods are common to the Filestat and TibRendezvous microagents. TibRendezvous Provide release and trace-related functions. For other microagents supporting these methods, refer to the microagents for specific platforms. Methods are: • getReleaseVersion • getTraceLevel • setTraceLevel • getTraceParameters • setTraceParameters • getTraceParameters • _onUnsolicitedMsg

Self Returns information from and takes actions that affect the TIBCO Hawk agent itself. Methods are: • Self:getReleaseVersion • Self:getMicroAgentInfo • Self:getComponentInfo • Self:turnDiagnosticsOn • Self:turnDiagnosticsOff

TIBCO Hawk Methods Reference Summary of Platform-Independent Microagents | 9

Table 2 Platform-Independent Microagents (Cont’d) Microagent Description HawkEventService This application reports on events generated by the TIBCO Hawk Agents across the network. • HawkEventService:_onUnsolicitedMsg • HawkEventService:onAgentAlive • HawkEventService:onAgentExpired • HawkEventService:onAlert • HawkEventService:onClear • HawkEventService:onMicroAgentChange • HawkEventService:onRulebaseChange

RuleBaseEngine Returns information from rulebases and takes actions on rulebases that affect the TIBCO Hawk agent itself. Methods are: • RuleBaseEngine:deleteRuleBase • RuleBaseEngine:deleteRuleBase • RuleBaseEngine:getExternalVariables • RuleBaseEngine:getRuleBaseNames • RuleBaseEngine:loadRuleBase • RuleBaseEngine:unloadRuleBase • RuleBaseEngine:getConfigInfo • RuleBaseEngine:sendMail • RuleBaseEngine:resumeSuspendedAlerts • RuleBaseEngine:resumeSuspendedAlerts

Custom Runs executable programs and scripts from within the TIBCO Hawk system. Methods are: • Custom:executeForString • Custom:executeForNumber • Custom:execute

Logfile Returns new lines added to a log file. Methods are: Logfile:onNewLine

TIBCO Hawk Methods Reference 10 | Chapter 2 Platform-Independent Microagents and Methods

Table 2 Platform-Independent Microagents (Cont’d) Microagent Description SysInfo Returns information on a network host: its name, address, type of computer and operating system. Methods are: • SysInfo:getOperatingSystem • SysInfo:getArchitecture • SysInfo:getHostName • SysInfo:getNetworkAddress

FileStat Returns information on files. Methods are: • FileStat:getFileStatus • FileStat:getFileCount

TibRendezvous Subscribes to TIBCO Rendezvous system messages. Methods are: • TibRendezvous:onRvDaemonStatus • TibRendezvous:onRvDataLoss • TibRendezvous:onRvdDisconnectOrConnect • TibRendezvous:onRvLicenseExpire

Repository Responds to configuration requests from TIBCO Hawk agents. Methods are: • Repository:getName • Repository:getScheduleNames • Repository:getRuleBaseName • Repository:onRepositoryEvent

The FileStat and Repository microagents are not available on the i5/OS platform.

TIBCO Hawk Methods Reference Common Methods for Platform-Independent Microagents | 11

Common Methods for Platform-Independent Microagents

The following methods are uniform across the FileStat and TibRendezvous microagents.

Method Description Page getReleaseVersion Returns version information. 12

getTraceLevel Gets trace level. 13

setTraceLevel Sets tracing bits. 14

getTraceParameters Gets the tracing parameters information. 15

setTraceParameters Sets the tracing parameters. 16

_onUnsolicitedMsg Returns unsolicited notifications. 17

TIBCO Hawk Methods Reference 12 | Chapter 2 Platform-Independent Microagents and Methods

getReleaseVersion Method

Purpose This method (on all platforms) returns version information about the current release of this microagent. The version is comprised of a major, minor, and update number separated by periods (for example, 3.1.1). Both a string representation of the version (Version) and an integer representation of the major, minor, and update components of the version (Major, Minor, and Update, respectively) is returned.

Type Synchronous, INFO.

Arguments None.

Returns Name Type Description Name String Name of the binary.

Version String Version number.

Date String Version date.

Major Integer Release version major number.

Minor Integer Release version minor number.

Update Integer Release version update number.

TIBCO Hawk Methods Reference getTraceLevel | 13 getTraceLevel Method

Purpose This method (on all platforms) returns the trace level settings.

Remarks Invocation will return a table, with the setting for each trace level (Information, Warning, Error, Debug, or AMI) listed as being either on or off.

Type Synchronous, INFO.

Arguments None.

Returns Name Type Description Information String Information trace setting, on or off value.

Warning String Warning trace setting, on or off value.

Error String Error trace setting, on or off value.

Debug String Debug trace setting, on or off value.

AMI String AMI debug trace setting, on or off value.

TIBCO Hawk Methods Reference 14 | Chapter 2 Platform-Independent Microagents and Methods

setTraceLevel Method

Purpose This method (on all platforms) sets the trace level bits.

Remarks Each trace level can be set to On (enabled), Off (disabled) or Current (leave setting as is). Invocation will return a table, with the setting for each trace level (Information, Warning, Error, Debug, or AMI) listed as being either On or Off.

Type Synchronous, ACTION_INFO.

Arguments Name Type Description Information String Information trace setting, on or off value.

Warning String Warning trace setting, on or off value.

Error String Error trace setting, on or off value.

Debug String Debug trace setting, on or off value.

AMI String AMI debug trace setting, on or off value.

Returns Name Type Description Information String Current information trace setting, on or off value.

Warning String Current warning trace setting, on or off value.

Error String Current error trace setting, on or off value.

Debug String Current debug trace setting, on or off value.

AMI String Current AMI debug trace setting, on or off value.

TIBCO Hawk Methods Reference getTraceParameters | 15 getTraceParameters Method

Purpose This method (on all platforms) returns tracing parameter information.

Type Synchronous, INFO.

Arguments None.

Returns Name Type Description Directory String Current trace file directory.

File Name String Current trace file name.

Max File Size Integer Current trace file maximum size (in kilobytes) before rollover.

Max Trace Integer Current maximum number of trace files to keep in File the trace directory.

TIBCO Hawk Methods Reference 16 | Chapter 2 Platform-Independent Microagents and Methods

setTraceParameters Method

Purpose This method (on all platforms) sets tracing parameters.

Remarks: Use string current for keeping the current setting for string parameters and use integer value 0 for keeping the current setting for integer parameters.

Type Synchronous, ACTION_INFO.

Arguments Name Type Description Directory String Trace file directory where the trace log file should be kept.

File Name String Trace file name.

Max File Size Integer Maximum size (in kilobytes) of trace file before rollover (kilobytes).

Max Trace Integer Maximum number of trace files to keep in trace File directory.

Returns Name Type Description Directory String Current trace file directory.

File Name String Current trace file name.

Max File Size Integer Current trace file maximum size (in kilobytes) before rollover.

Max Trace Integer Current maximum number of trace files to keep in File the trace directory.

TIBCO Hawk Methods Reference _onUnsolicitedMsg | 17

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on all platforms) returns any unsolicited notifications that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

Remarks An unsolicited message is an information, warning, or error message that is sent directly to the manager.

Type Asynchronous, INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

INBOX String An inbox address used to send the message.

TIBCO Hawk Methods Reference 18 | Chapter 2 Platform-Independent Microagents and Methods

COM.TIBCO.hawk.microagent.Self Microagent

Purpose The Self microagent (on all platforms) returns information from and takes actions that affect the TIBCO Hawk agent itself. You use its methods to examine release version and auto-configuration information, to examine active microagents, and to start and stop diagnostic tools you might need when speaking to technical support personnel.

Remarks Because the Self:turnDiagnosticsOn and Self:turnDiagnosticsOff methods can affect the agent’s performance, you should only use these methods when asked to do so by TIBCO Hawk technical support.

Methods Method Description Page Self:getReleaseVersion Returns version information about the 20 current release.

Self:getMicroAgentInfo Returns information about the 21 microagents currently active.

Self:getSecurityInfo Returns information about the current 22 security policy.

Self:getComponentInfo Returns version information about 23 components in the current release.

Self:turnDiagnosticsOn Turns on agent diagnostics. 24

Self:turnDiagnosticsOff Turns off agent diagnostics. 25

Self:getUptime Returns how long the agent has been 26 running.

Self:doAMIDiscovery Re-discovers all AMI instrumented 27 applications.

Self:onMicroAgentEvent Reports the change in the status of the 28 microagent.

Proprietary The following method of the Self microagent is proprietary. The TIBCO Hawk Methods system does not support direct user invocation of this method from the TIBCO Hawk Display or Console API.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.microagent.Self | 19

However, this method is used indirectly by the TIBCO Hawk Display when interacting with agents and thus has security implications. Method Name Impact Description describe Info This method retrieves microagent descriptors

TIBCO Hawk Methods Reference 20 | Chapter 2 Platform-Independent Microagents and Methods

Self:getReleaseVersion Method

Purpose This method (on all platforms) returns version information about the current release of the TIBCO Hawk software.

Remarks This is the same information you see when you choose Help > About TIBCO Hawk in the TIBCO Hawk Display.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Name String The release name.

Version String The release version. Same as the concatenation of the major, minor and update fields with periods (.) between.

Date String The release date.

Major Integer Version major number.

Minor Integer Version minor number.

Update Integer Version update number.

TIBCO Hawk Methods Reference Self:getMicroAgentInfo | 21

Self:getMicroAgentInfo Method

Purpose This method (on all platforms) returns information about the microagents currently active on a TIBCO Hawk agent.

Remarks Since applications instrumented with the TIBCO Hawk Application Management Interface (AMI) appear as microagents, this method can also gather information on AMI applications.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Name String The microagent name. If no name is specified, the method returns information on all microagents.

Returns Name Type Description Name String The microagent name. Table is indexed on the Name field.

Display Name String The microagent display name.

Count Integer The number of microagent instances with that name on the host.

Help String A brief description of the microagent. Retrieved from the microagent.

TIBCO Hawk Methods Reference 22 | Chapter 2 Platform-Independent Microagents and Methods

Self:getSecurityInfo Method

Purpose This method (on all platforms) returns information about the security policy currently in effect.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Parameter Type Description Policy Class string Name of security policy class.

Description string Text description of security policy class.

TIBCO Hawk Methods Reference Self:getComponentInfo | 23

Self:getComponentInfo Method

Purpose This method (on all platforms) returns version information about the components in the current release.

Remarks This is the same information displayed when you choose Help > About TIBCO Hawk Components from the TIBCO Hawk Display.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Component String The component name. If no component is specified, returns information for all components.

Returns Name Type Description Name String The component name. Table is indexed on the Name field.

Version String The component version.

Date String The component date.

TIBCO Hawk Methods Reference 24 | Chapter 2 Platform-Independent Microagents and Methods

Self:turnDiagnosticsOn Method

Purpose This method (on all platforms) turns on agent diagnostics.

Remarks The diagnostics microagent diagnoses problems that appear in the TIBCO Hawk system. Because the Self:turnDiagnosticsOn and Self:turnDiagnosticsOff methods can affect the agent’s performance, you should only use these methods when asked to do so by TIBCO Hawk technical support. Diagnostic microagent methods are not described in this documentation set, but could be created as an application. For more information on creating applications, refer to the TIBCO Hawk programming manuals.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

TIBCO Hawk Methods Reference Self:turnDiagnosticsOff | 25

Self:turnDiagnosticsOff Method

Purpose This method (on all platforms) turns off agent diagnostics.

Remarks The diagnostics microagent is used in diagnosis of problems that appear in the TIBCO Hawk system. Diagnostics microagent methods are not described in this documentation set.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None

TIBCO Hawk Methods Reference 26 | Chapter 2 Platform-Independent Microagents and Methods

Self:getUptime Method

Purpose This method (on all platforms) returns how long the agent has been running.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Parameter Type Description Uptime String Total days, hours, and minutes the agent has been running.

Total days String Total number of days the agent has been running.

Total hours String Total number of hours the agent has been running.

Total millisec Integer Total number of milliseconds the agent has been running.

TIBCO Hawk Methods Reference Self:doAMIDiscovery | 27

Self:doAMIDiscovery Method

Purpose This method (on all platforms) re-discovers all AMI instrumented applications.

Remarks When TIBCO Hawk agent looses contact with an AMI instrumented application due to a network failure, the microagent corresponding to the application will be removed after 90 seconds and will not be re-discovered after network connection is restored. This method when invoked re-discovers all AMI instrumented applications. After network failure, AMI applications will not get rediscovered if using an earlier AMI implementation (prior to TIBCO Hawk 4.5) or if using a custom AMI implementation that does not provide rediscovery. It is recommended that this method is not invoked frequently, as this will lead to the TIBCO Hawk agent receiving a number of AMI application discovery messages thereby increasing local traffic.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None

TIBCO Hawk Methods Reference 28 | Chapter 2 Platform-Independent Microagents and Methods

Self:onMicroAgentEvent Method

Purpose This method (on all platforms) reports the change in the status of the microagent.

Remarks If the TIBCO Hawk Agent is unable to communicate with the microagent, the status of the microagent is immediately changed to Unreachable. After 90 seconds of being inaccessible, the microagent status is changed to Removed, after which the TIBCO Hawk agent actually removes the microagent. The status of a newly discovered microagent is Added.

Type Asynchronous, IMPACT_INFO.

Arguments Parameter Type Description Name String The name of the microagent.

Returns Parameter Type Description Name String The name of the microagent.

Display Name String The microagent display name.

Status String Can be Unreachable, Removed, Added.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.microagent.HawkEventService | 29

COM.TIBCO.hawk.microagent.HawkEventService Microagent

Description This application reports on events generated by the TIBCO Hawk Agents across the network. Events reported include all instances of TIBCO Hawk Agent activation and expiration, add and remove operations for microagents and rulebases, all alerts generated and cleared.

Methods

Method Description Page HawkEventService: Subscribing to this method returns any 30 _onUnsolicitedMsg unsolicited notifications that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

HawkEventService: Reports all instances of TIBCO Hawk Agent 31 onAgentAlive activation events across the network.

HawkEventService: Reports all instances of TIBCO Hawk Agent 32 onAgentExpired expiration events across the network.

HawkEventService: Reports all alerts generated by TIBCO Hawk 33 onAlert Agents across the network.

HawkEventService: Reports all clears generated by TIBCO Hawk 35 onClear Agents across the network.

HawkEventService: Reports all instances of microagent added and 36 onMicroAgentChan removed events across the network. ge

HawkEventService: Reports all instances of rulebase added and 37 onRulebaseChange removed events across the network.

TIBCO Hawk Methods Reference 30 | Chapter 2 Platform-Independent Microagents and Methods

HawkEventService:_onUnsolicitedMsg Method

Purpose Subscribing to this method returns any unsolicited notifications that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

Remarks An unsolicited message is an information, warning, or error message that is sent directly to the manager.

Type Asynchronous, INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

TIBCO Hawk Methods Reference HawkEventService:onAgentAlive | 31

HawkEventService:onAgentAlive Method

Purpose Reports all instances of TIBCO Hawk Agent activation events across the network.

Type Open, Asynchronous, IMPACT_INFO

Arguments Name Type Description Agent Name String TIBCO Hawk Agent name. The | symbol can be used to perform an OR operation.

For example, abc | xyz | def will evaluate to true if Agent Name equals either abc or xyz or def.

Returns Name Type Description Hawk Domain String Value of the command line option "hawk_domain".

Agent Name String TIBCO Hawk Agent's name that generated this event.

Agent Domain String TIBCO Hawk Agent's domain name (dns).

Agent IP Address String TIBCO Hawk Agent's IP address.

Agent Start Time String TIBCO Hawk Agent's start time.

TIBCO Hawk Methods Reference 32 | Chapter 2 Platform-Independent Microagents and Methods

HawkEventService:onAgentExpired Method

Purpose Reports all instances of TIBCO Hawk Agent expiration events across the network.

Type Open, Asynchronous, IMPACT_INFO

Arguments Name Type Description Agent Name String TIBCO Hawk Agent name. The | symbol can be used to perform an OR operation. For example, abc | xyz | def, will evaluate to true if Agent Name equals either abc or xyz or def.

Returns Name Type Description Hawk Domain String Value of the command line option "hawk_domain".

Agent Name String TIBCO Hawk Agent's name that generated this event.

Agent Domain String TIBCO Hawk Agent's domain name (dns).

Agent IP Address String TIBCO Hawk Agent's IP address.

Agent Start Time String TIBCO Hawk Agent's start time.

Agent Expired Time String TIBCO Hawk Agent's expiry time.

TIBCO Hawk Methods Reference HawkEventService:onAlert | 33

HawkEventService:onAlert Method

Purpose Reports all alerts generated by TIBCO Hawk Agents across the network

Type Open, Asynchronous, IMPACT_INFO

Arguments Name Type Description Agent Name String TIBCO Hawk Agent name. The | symbol can be used to perform an OR operation.

For example, abc | xyz | def will evaluate to true if Agent Name equals either abc or xyz or def.

Rulebase String The name of the rulebase. The | symbol can be used to perform an OR operation.

For example, abc | xyz | def will evaluate to true if Rulebase Name equals either abc or xyz or def.

Returns Name Type Description Hawk Domain String Value of the command line option "hawk_domain".

Agent Name String TIBCO Hawk Agent's name that generated this event.

Agent Domain String TIBCO Hawk Agent's domain name (dns).

Agent IP Address String TIBCO Hawk Agent's IP address.

Rulebase String The rulebase that generated this alert.

AlertID Long The numeric ID assigned to this alert by the TIBCO Hawk Agent.

Time String Time at which this alert was generated.

Text String User defined alert text value.

State String Can be ALERT_LOW, ALERT_MEDIUM, ALERT_HIGH or NO_ALERT

Rule String The rule that generated this alert.

TIBCO Hawk Methods Reference 34 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description (Cont’d) Test String The test that generated this alert.

Alert Properties String Miscellaneous alert properties defined by the user.

TIBCO Hawk Methods Reference HawkEventService:onClear | 35

HawkEventService:onClear Method

Purpose Reports all clears generated by TIBCO Hawk Agents across the network

Type Open, Asynchronous, IMPACT_INFO

Arguments Name Type Description Agent Name String TIBCO Hawk Agent name. The | symbol can be used to perform an OR operation. For example, abc | xyz | def, will evaluate to true if Agent Name equals either abc or xyz or def.

Rulebase String The name of the rulebase. The | symbol can be used to perform an OR operation. For example, abc | xyz | def, will evaluate to true if Rulebase Name equals either abc or xyz or def.

Returns Name Type Description Hawk Domain String Value of the command line option "hawk_domain".

Agent Name String TIBCO Hawk Agent's name that generated this event.

Agent Domain String TIBCO Hawk Agent's domain name (dns).

Agent IP Address String TIBCO Hawk Agent's IP address.

Rulebase String The rulebase that generated this clear.

AlertID Long The numeric ID assigned to this clear by the TIBCO Hawk Agent.

Time String Time at which this alert was cleared.

Clear Reason String Reason for the clear.

TIBCO Hawk Methods Reference 36 | Chapter 2 Platform-Independent Microagents and Methods

HawkEventService:onMicroAgentChange Method

Purpose Reports all instances of microagent added and removed events across the network.

Type Open, Asynchronous, IMPACT_INFO

Arguments Name Type Description Agent Name String TIBCO Hawk Agent name. The | symbol can be used to perform an OR operation. For example, abc | xyz | def, will evaluate to true if Agent Name equals either abc or xyz or def.

Returns Name Type Description Hawk Domain String Value of the command line option "hawk_domain".

Agent Name String TIBCO Hawk Agent's name that generated this event.

Agent Domain String TIBCO Hawk Agent's domain name (dns).

Agent IP Address String TIBCO Hawk Agent's IP address.

Action String Type of event, could either be onMicroAgentAdded or onMicroAgentRemoved

MicroAgentID String Name and the instance of the microagent.

TIBCO Hawk Methods Reference HawkEventService:onRulebaseChange | 37

HawkEventService:onRulebaseChange Method

Purpose Reports all instances of rulebase added and removed events across the network.

Type Open, Asynchronous, IMPACT_INFO

Arguments Name Type Description Agent Name String TIBCO Hawk Agent name. The | symbol can be used to perform an OR operation. For example, abc | xyz | def, will evaluate to true if Agent Name equals either abc or xyz or def.

Returns Name Type Description Hawk Domain String Value of the command line option "hawk_domain".

Agent Name String TIBCO Hawk Agent's name that generated this event.

Agent Domain String TIBCO Hawk Agent's domain name (dns).

Agent IP Address String TIBCO Hawk Agent's IP address.

Action String Type of event, could either be onRulebaseAdded or onRulebaseRemoved

Rulebase String Name of the rulebase.

TIBCO Hawk Methods Reference 38 | Chapter 2 Platform-Independent Microagents and Methods

COM.TIBCO.hawk.microagent.RuleBaseEngine Microagent

Purpose The RuleBaseEngine microagent (on all platforms) returns information from rulebases and takes actions on rulebases that affect the TIBCO Hawk agent itself. RuleBaseEngine methods are used to examine auto-configuration information, to examine active microagents, and to load and unload rulebases (for example in a rulebase-management rulebase).

Remarks In prior releases of the TIBCO Hawk software, many of the RuleBaseEngine functions were handled by the Self microagent. Some methods of the RuleBaseEngine microagent are proprietary. They are listed here for completeness, but cannot be invoked directly.

Methods Method Description Page RuleBaseEngine:deleteRuleBase Deletes the specified 41 rulebase.

RuleBaseEngine:getExternalVariables Returns the currently 42 loaded external variables as tabular data.

RuleBaseEngine:getRuleBaseNames Returns the names of the 43 currently loaded rulebases.

RuleBaseEngine:getScheduleNames Returns names of 44 currently loaded schedules.

RuleBaseEngine:loadRuleBase Attempts to find and load 45 the named rulebase.

RuleBaseEngine:loadRuleBaseFromFile Attempts to find and load 46 a rulebase from a file path.

RuleBaseEngine:unloadRuleBase Attempts to unload the 47 named rulebase.

RuleBaseEngine:getConfigInfo Returns configuration 48 information for the rulebase.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.microagent.RuleBaseEngine | 39

Method Description Page RuleBaseEngine:sendMail Sends email notification 49 upon a rulebase event.

RuleBaseEngine:onAlertCount Provides current and 50 average rulebase engine alert rate statistics.

RuleBaseEngine:suspendAlert Suspends an alert. 51

RuleBaseEngine:suspendAllAlerts Suspends alerts for the 52 specified number of milliseconds.

RuleBaseEngine:resumeSuspendedAlerts Restarts alerts after alert 53 suspension.

RuleBaseEngine:updateExternalVariables Updates the external 54 variables and saves them to the variable file.

Proprietary The following methods of the RuleBaseEngine microagent are proprietary. The Methods TIBCO Hawk system does not support direct user invocation of these methods from the TIBCO Hawk Display or Console API. However, these methods are used indirectly by TIBCO Hawk Display when interacting with agents and thus have security implications. Access to proprietary methods with an impact of Action should only be granted to trusted users who are allowed access to all Action methods.

Proprietary Method Name Impact Description Method Summary getCommands Info Returns the rulebase commands.

getRuleBases Info Retrieves rulebases from the agent.

getSchedules Info Returns the Schedules List.

getRBMap Info Returns the RuleBaseMap file.

addRuleBase Action Sends rulebases to the agent.

updateRuleBase Action Updates rulebases on the agent.

setSchedules Action Sets the schedules list for an agent.

TIBCO Hawk Methods Reference 40 | Chapter 2 Platform-Independent Microagents and Methods

Method Name Impact Description

setRBMap Action This method sets the RuleBaseMap file for an agent.

runTest Action Runs tests for network queries.

onAlertPosted Info Provides data for alerts posted by the Rulebase Engine.

onAlertCleared Info Provides data for alerts cleared by the Rulebase Engine.

TIBCO Hawk Methods Reference RuleBaseEngine:deleteRuleBase | 41

RuleBaseEngine:deleteRuleBase Method

Purpose This method (on all platforms) deletes the specified rulebase.

Remarks The agent will delete the rulebase from its cache. If the agent is configured to run under auto config mode it will delete this rulebase from the auto config directory as well.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description RuleBaseName String The name of the rulebase to delete

Returns None.

TIBCO Hawk Methods Reference 42 | Chapter 2 Platform-Independent Microagents and Methods

RuleBaseEngine:getExternalVariables Method

Purpose This method (on all platforms) returns the currently loaded external variables as tabular data in two fields, variable name and value.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Variable Name String The name of the external variable.

Value String The value of the external variable.

TIBCO Hawk Methods Reference RuleBaseEngine:getRuleBaseNames | 43

RuleBaseEngine:getRuleBaseNames Method

Purpose This method (on all platforms) returns the names of the currently loaded rulebases.

Remarks Each record of the table identifies one rulebase. Therefore, tests that search for strings within a name (such as NT) will result in separate actions for each rulebase name that matches the criterion.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description RuleBaseName String The name of each rulebase. Table is indexed on the RuleBaseName field.

TIBCO Hawk Methods Reference 44 | Chapter 2 Platform-Independent Microagents and Methods

RuleBaseEngine:getScheduleNames Method

Purpose This method (on all platforms) returns the names of the currently loaded schedules.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description ScheduleName String The name of each schedule. Table is indexed on the ScheduleName field.

TIBCO Hawk Methods Reference RuleBaseEngine:loadRuleBase | 45

RuleBaseEngine:loadRuleBase Method

Purpose This method (on all platforms) attempts to find and load the named rulebase.

Remarks The agent will search all directories in its manual configuration path for the rulebase file, whether manual or automatic configuration is being used.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description RuleBaseName String The name of the rulebase to load.

Returns None.

TIBCO Hawk Methods Reference 46 | Chapter 2 Platform-Independent Microagents and Methods

RuleBaseEngine:loadRuleBaseFromFile Method

Purpose This method (on all platforms) attempts to find and load the rulebase in the named file. An absolute file path is required.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description File String The absolute path name of the file from which to load rulebases.

Returns None.

TIBCO Hawk Methods Reference RuleBaseEngine:unloadRuleBase | 47

RuleBaseEngine:unloadRuleBase Method

Purpose This method (on all platforms) attempts to unload the named rulebase.

Remarks If the rulebase is not currently loaded then no error is returned.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description RuleBaseName String The name of the rulebase to unload.

Returns None.

TIBCO Hawk Methods Reference 48 | Chapter 2 Platform-Independent Microagents and Methods

RuleBaseEngine:getConfigInfo Method

Purpose This method (on all platforms) returns information on how the rulebase is currently configured.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Name String Name of rulebase.

Reason Loaded String Reason for loading rulebase, such as auto-config startup.

Loaded From String Source of rulebase.

Load Time String Time rulebase was loaded, in format of day of week, month, day, time, year.

TIBCO Hawk Methods Reference RuleBaseEngine:sendMail | 49

RuleBaseEngine:sendMail Method

Purpose This method (on all platforms) sends an email notification.

Remarks From, CC and Content are optional. If From is not specified, the current host ID is used. If the Content field is blank, the text of the Subject line is used. Rulebases can send mail upon detecting a specified condition.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description From String Address of sender.

To String Address of receiver.

CC String Address of cc recipient.

Subject String Subject of email.

Mail String Mail server used to send message. Server

Content String Content of mail.

Returns None.

TIBCO Hawk Methods Reference 50 | Chapter 2 Platform-Independent Microagents and Methods

RuleBaseEngine:onAlertCount Method

Purpose Provides the rulebase engine alert rate statistics every 5 seconds. It provides alert rate averages over the previous 5, 10, 15, 30 and 60 seconds.

Remarks When using this method as a datasource in a rulebase, the test's clear condition will default to "Clear Timer" with a value of 900 seconds. However, because this async method provides statistics every 5 sec, choosing clear condition "First False" may be more useful.

RuleBaseEngine:onAlertCount and RuleBaseEngine:suspendAllAlerts can be used together to create an alert-rate circuit breaker that insulates the network from agents that produce alerts at message high rates that are too high. For example, using onAlertCount as a data source, if (5sec > 10) then suspendAllAlerts for 60,000 msec. This would suspend all alerts for 1min if the average rate of alerts over the last 5sec was greater than 2 alerts per sec.

Type Asynchronous, IMPACT_INFO

Arguments None

Returns Name Type Description 5sec Integer The alert rate averaged over the previous 5 seconds

10sec Integer The alert rate averaged over the previous 10 seconds.

15sec Integer The alert rate averaged over the previous 15 seconds.

30sec Integer The alert rate averaged over the previous 30 seconds.

60sec Integer The alert rate averaged over the previous 60 seconds.

TIBCO Hawk Methods Reference RuleBaseEngine:suspendAlert | 51

RuleBaseEngine:suspendAlert Method

Purpose This method suspends an alert for the specified number of milliseconds. The default is 10000 milliseconds.

Type Open, Synchronous, IMPACT_ACTION

Arguments Name Type Description AlertID Long Alert ID

Time Long Time in milliseconds.

Reason String Reason to suspend alert.

Returns None.

TIBCO Hawk Methods Reference 52 | Chapter 2 Platform-Independent Microagents and Methods

RuleBaseEngine:suspendAllAlerts Method

Purpose Suspends all current and future alerts in the rulebase engine for the specified number of milliseconds.

Remarks If a specific rulebase is provided as an argument, this method applies only the alerts generated by that rulebase.

This method is generally used as an Action to a Rule using RBE:onAlertRate as a data source to create an alert-rate circuit breaker.

RuleBaseEngine:suspendAllAlerts takes a rulebase argument. If empty, it suspends all alerts on all rulebases. After suspending all alerts, a high level alert (one per rulebase) is issued to indicate that the rulebase has been suspended. That alert will be cleared when the suspension period expires. When a rulebase is suspended, all its current and future alerts are suspended for the specified interval. Note that all other monitoring activity continues. For example, actions that send email or invoke scripts or other methods continue to operate normally.

Type Open, Synchronous, IMPACT_ACTION

Arguments Name Type Description RuleBaseName String The name of the rulebase whose alerts will be suspended. If omitted, this method applies to all rulebases.

Time Long The suspension period in milliseconds. Cannot be zero or negative.

Reason String The reason for this suspension. It is useful to also provide the time and source of suspension in this string. Cannot be empty string.

Returns None

TIBCO Hawk Methods Reference RuleBaseEngine:resumeSuspendedAlerts | 53

RuleBaseEngine:resumeSuspendedAlerts Method

Purpose This method (on all platforms) restarts all alerts after alert suspension.

Type Asynchronous, IMPACT_ACTION.

Arguments None.

Returns None.

TIBCO Hawk Methods Reference 54 | Chapter 2 Platform-Independent Microagents and Methods

RuleBaseEngine:updateExternalVariables Method

Purpose This method (on all platforms) reads the variables file and re-loads all rulebases that use the variables listed in the variable file.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.microagent.Custom | 55

COM.TIBCO.hawk.microagent.Custom Microagent

Purpose The Custom microagent (on all platforms) runs executable programs and scripts from within the TIBCO Hawk system. You can retrieve information from a script or program. Custom methods also allow you to write rules that act on that information as though it came from a microagent method call.

Methods Method Description Page Custom:executeForString Executes a command and returns 56 the output as a String.

Custom:executeForNumber Executes a command and parses 57 the string output to return both an Integer and a Double.

Custom:execute Executes a command and ignores 58 the result.

For instructions on how to disable execution of this method, refer to TIBCO Hawk Installation and Configuration.

TIBCO Hawk Methods Reference 56 | Chapter 2 Platform-Independent Microagents and Methods

Custom:executeForString Method

Purpose This method (on all platforms) executes a command and returns the output as a string.

Remarks The command that is executed can return information by sending strings to stdout. If the executed command returns more than one line, the lines are concatenated to produce one string. When using this method on the OS/400 platform, only commands that start with system (when using a CL command) and qsh (when using Q shell utilities) are supported. Use the -c option when using the qsh command. Examples,

qsh -c ls

system DSPDTAARA DTAARA (/)

Type Synchronous, IMPACT_ACTION_INFO.

Arguments Name Type Description command String The command to execute. Should be exactly as would be read on the command line. External and internal variables can be used in the command string.

Returns Name Type Description returnString String The String representation of the command’s output.

TIBCO Hawk Methods Reference Custom:executeForNumber | 57

Custom:executeForNumber Method

Purpose This method (on all platforms) executes a command and parses the output as a number which is then returned as both an integer and a double value. The integer value of a true double truncates the remainder.

Remarks The command that is executed can return information by sending a number to stdout. If the executed command returns more than one number, an error will result.

The executable can return information by sending strings to stdout. If the executable returns more than one line, the lines are concatenated to produce one string.

Type Synchronous, IMPACT_ACTION_INFO.

Arguments Name Type Description command String The command to execute. External and internal variables can be used in the command string.

Returns Name Type Description returnInteger Integer The integer value of the return string.

returnDouble Double The double value of the return string.

TIBCO Hawk Methods Reference 58 | Chapter 2 Platform-Independent Microagents and Methods

Custom:execute Method

Purpose This method (on all platforms) executes a command and ignores the result.

Remarks If this method call is performed within an action, you can provide parameters for a script or program by using variable substitution. Variable substitution will insert information into the command from the rule’s data source. When using this method on the OS/400 platform, only commands that start with system (when using a CL command) and qsh (when using Q shell utilities) are supported. Use the -c option when using the qsh command. Examples,

qsh -c ls

system DSPDTAARA DTAARA (/)

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description command String The command to execute.

Returns None.

All shell scripts called from your TIBCO Hawk environment must define the shell, for example #!/bin/csh.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.microagent.Logfile | 59

COM.TIBCO.hawk.microagent.Logfile Microagent

Purpose The Logfile microagent (on all platforms) monitors the contents of log files. It has only one method: onNewLine. When used as a data source in a rule, the onNewLine method monitors growing log files and provides each new line as a new data element for testing. The Logfile microagent can process rolling log files, and so it continues to monitor the correct data stream even when log files roll over.

The Logfile microagent assumes that the file being monitored is a constantly growing log file with all new data appended at the end. If it detects that a file has decreased in size, it assumes that the file has been overwritten (or rolled) and begins monitoring the new file from the beginning.

When the Logfile microagent is first directed to monitor a particular log file (such as when you first load a rulebase that uses it), monitoring begins from the end of the file. In other words, only new lines are reported and any lines that existed in the file before monitoring was initiated are ignored.

Methods Method Description Page Logfile:onNewLine Returns the text of a new line as it is 60 added to the named log file.

Logfile:onNewLinewithPattern Returns the test of a new line as it is 62 File added to the named log file using the specified pattern file as a filter.

Logfile:reEvaluateLogFileNam Forces re-evaluation of all logfiles 64 es that are currently being monitored.

TIBCO Hawk Methods Reference 60 | Chapter 2 Platform-Independent Microagents and Methods

Logfile:onNewLine Method

Purpose This method (on all platforms) returns the new line in a log file whenever a new line is appended to the log file.

The first time this method is invoked, the previousLine field will be blank. On s subsequent invocations, the previousLine field will contain the value of the nextLine field of the previous method invocation.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Logfile String The log file to be monitored. Back quoted strings, external and internal variables can be used. The TIBCO Hawk agent will execute the command within the back quotes and return the string for substitution. For example, ’echo /tmp/foo.log’ will be evaluated to /tmp/foo.log

Returns Name Type Description nextLine String The next available line in the log file.

previous String The previous line in the log file. Line

TIBCO Hawk Methods Reference Logfile:onXMLElement | 61

Logfile:onXMLElement Method

Purpose This method (on all platforms) monitors XML log files.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Logfile String The log file to be monitored. Back quoted strings, external and internal variables can be used. The TIBCO Hawk agent will execute the command within the back quotes and return the string for substitution. For example, ’echo /tmp/foo.log’ will be evaluated to /tmp/foo.log

element String The tag name of element to monitor.

xpath String The XPATH expression to apply to the element.

Returns Name Type Description nextResult String The result of the XPATH evaluation.

TIBCO Hawk Methods Reference 62 | Chapter 2 Platform-Independent Microagents and Methods

Logfile:onNewLinewithPatternFile Method

Purpose This method (on all platforms) applies the patterns from the pattern file to a new line from the log file. It returns the matching severity and pattern from the pattern file and the new line from the log file. The pattern file contains patterns that are used to match relevant log file entries. The pattern file is used as a filter to determine which lines are returned to the subscriber.

The first time this method is invoked, the previousLine field will be blank. On s subsequent invocations, the previousLine field will contain the value of the nextLine field of the previous method invocation.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Logfile String The log file to be monitored. Back quoted strings, external and internal variables can be used. The TIBCO Hawk agent will execute the command within the back quotes and return the string for substitution.

For example, ’echo /tmp/foo.log’ will be evaluated to /tmp/foo.log

patternfile String The pattern file containing the severity values and the Perl5 patterns. The pattern file cannot be empty, it should contain atleast one valid entry. Each line in the pattern file should contain an integer severity level followed by a white space and a valid Perl5 pattern. A negative severity level (for example, -1) means that all lines that match this pattern are to be ignored. All other severity levels (positive or 0) indicate that lines matching the corresponding patterns are of interest

Returns Name Type Description severity Integer The severity value of the matching pattern.

pattern String The Perl5 pattern string of the matching pattern.

nextLine String The next available line in the log file.

TIBCO Hawk Methods Reference Logfile:onNewLinewithPatternFile | 63

Name Type Description previousLi String The previous line in the log file. ne

TIBCO Hawk Methods Reference 64 | Chapter 2 Platform-Independent Microagents and Methods

Logfile:reEvaluateLogFileNames Method

Purpose This method (on all platforms) forces a re-evaluation of all log file names that are currently being monitored.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None

TIBCO Hawk Methods Reference COM.TIBCO.hawk.microagent.SysInfo | 65

COM.TIBCO.hawk.microagent.SysInfo Microagent

Purpose The sysinfo microagent (on all platforms) identifies a network host. Its methods return name, address, type of computer and operating system.

Methods Method Description Page SysInfo:getOperatingSystem Returns operating system 66 information.

SysInfo:getArchitecture Returns hardware architecture. 67

SysInfo:getHostName Returns the name of the host and the 68 agent domain.

SysInfo:getNetworkAddress Returns the IP address of the host. 69

TIBCO Hawk Methods Reference 66 | Chapter 2 Platform-Independent Microagents and Methods

SysInfo:getOperatingSystem Method

Purpose This method (on all platforms) returns operating system information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description OS Name String The operating system name.

OS Version String The operating system version.

TIBCO Hawk Methods Reference SysInfo:getArchitecture | 67

SysInfo:getArchitecture Method

Purpose This method (on all platforms) returns hardware architecture.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Architecture String The architecture name.

TIBCO Hawk Methods Reference 68 | Chapter 2 Platform-Independent Microagents and Methods

SysInfo:getHostName Method

Purpose This method (on all platforms) returns the name of the host.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Host Name String The host name.

Agent Domain String The name of the agent domain.

TIBCO Hawk Methods Reference SysInfo:getNetworkAddress | 69

SysInfo:getNetworkAddress Method

Purpose This method (on all platforms) returns the IP address of the host.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description IP Address String The IP address of the host. For example: 160.101.26.126.

TIBCO Hawk Methods Reference 70 | Chapter 2 Platform-Independent Microagents and Methods

COM.TIBCO.hawk.hma.FileStat Microagent

Purpose The FileStat microagent (on all platforms) monitors the status and operating statistics of files.

Methods Method Description Page FileStat:getFileStatus Returns file status information. 71

FileStat:getFileCount Returns the number of files matching 75 a regular expression.

FileStat:getReleaseVersion Returns release version number. 12

FileStat:getTraceLevel Gets trace level settings. 13

FileStat:setTraceLevel Sets trace level bits. 14

FileStat:getTraceParameters Returns tracing parameters. 15

FileStat:setTraceParameters Sets tracing parameters. 16

FileStat:_onUnsolicitedMsg Returns any unsolicited messages. 17

TIBCO Hawk Methods Reference FileStat:getFileStatus | 71

FileStat:getFileStatus Method

Description: This method returns status information for the directory(s) or file(s) contained in the specified directory whose names match the specified regular expression. Use a regular expression to query the status of a set of files. The regular expression can only be used on the file name portion of the input parameter. For example c:/temp/.*

This expression queries all the files in c:/temp directory. c:/temp/.*.tmp

This queries all the files in c:/temp directory that have the .tmp suffix.

Remarks The arguments and return values for this method are different for Microsoft Windows and Unix platforms.

Type Synchronous, IMPACT_INFO.

Microsoft Name Type Description Windows Only Arguments Directory String Name of the directory to be searched. No entry indicates the current directory. Regular expressions are not allowed for this argument.

File Name String Name of the file to query.

Unix Only Name Type Description Arguments File Name String Absolute path and name of the file to query.

Common to Name Type Description Both Microsoft Windows and File Name String Name of the file to query. Table is indexed Unix Returns on the File Name.

File Size Long Total size of the file in bytes.

Is Directory Boolean The handle identifies a directory.

Seconds Since Integer Number of seconds elapsed since last Accessed access.

Seconds Since Integer Number of seconds elapsed since last Modified modified.

TIBCO Hawk Methods Reference 72 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description Seconds Since Integer (Microsoft Windows only) Number of Creation seconds elapsed since creation. (UNIX only) Number of seconds since last status change.

Microsoft Name Type Description Windows Only Returns Alt File Name String (Microsoft Windows only) The alternate file name of this file or directory. This name is in the classic 8.3 (filename.ext) file name format.

Is Read Only Boolean (Microsoft Windows only) The file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it.

Is Hidden Boolean (Microsoft Windows only) The file or directory is hidden. It is not included in an ordinary directory listing.

Is System Boolean (Microsoft Windows only) The file or directory is part of the operating system or is used exclusively by the operating system.

Is Archive Boolean (Microsoft Windows only) The file or directory is an archive file or directory. Applications use this attribute to mark files for backup or removal.

Is Encrypted Boolean (Microsoft Windows only) The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and subdirectories.

Is Normal Boolean (Microsoft Windows only) The file or directory has no other attributes set. This attribute is valid only if used alone.

TIBCO Hawk Methods Reference FileStat:getFileStatus | 73

Name Type Description Is Offline Boolean (Microsoft Windows only) The file data is not immediately available. This attribute indicates that the file data has been physically moved to offline storage. This attribute is used by Remote Storage, the hierarchical storage management software. Applications should not arbitrarily change this attribute.

Has Reparse Point Boolean (Microsoft Windows only) The file has an associated reparse point.

Is Sparse Boolean (Microsoft Windows only) The file is a sparse file.

Is Temporary Boolean (Microsoft Windows only) The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access, rather than flushing it back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.

Unix Only Name Type Description Returns Major Integer Major number of the device on which the file resides.

Minor Integer Minor number of the device on which the file resides.

Inode Integer File inode number.

Mode String File mode as octal mask.

Is Character Special Boolean This file is a character special file.

Is Pipe Boolean This file is a pipe (FIFO).

Is Regular Boolean This file is a regular file.

Is Readable Boolean This file has readable permission set.

Is Writable Boolean This file has writable permission set.

TIBCO Hawk Methods Reference 74 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description Is Executable Boolean This file has executable permission set.

Links Integer Count of hard links to the file.

User String User name of the owner.

Group String Group name of the owner.

TIBCO Hawk Methods Reference FileStat:getFileCount | 75

FileStat:getFileCount Method

Description This method returns the count of directory(s) or file(s) contained in the specified directory whose names match the specified regular expression. The regular expression syntax follows the same syntax as specified for the getFileStatus method.

Remarks The arguments for this method are different for Windows and Unix platforms.

Type Synchronous, IMPACT_INFO.

Windows Only Name Type Description Arguments Directory String Name of the directory to be searched. No entry indicates the current directory. Regular expressions are not allowed for this argument.

File Name String Name of the file to query.

Unix Only Name Type Description Arguments File Name String Absolute path and name of the file to query.

Returns Name Type Description File Count Integer Number of files that match the specified query. Table is indexed on the File Count.

TIBCO Hawk Methods Reference 76 | Chapter 2 Platform-Independent Microagents and Methods

COM.TIBCO.hawk.hma.TibRendezvous Microagent

Purpose The TibRendezvous microagent (on all platforms) monitors the status and operating statistics of a TIBCO Rendezvous daemon.

Remarks Because the behavior and configuration of the TibRendezvous microagent is identical across platforms, it is included in the platform-independent section of this reference. However, this microagent runs within the HMA process, which is specific to each platform.

All TIBCO Rendezvous advisory messages of class ERROR and WARN will be monitored by the TibRendezvous microagent. If an ERROR or WARN advisory message is not monitored by any of the TibRendezvous microagent methods, the message is presented as an unsolicited message. The message text will include the TIBCO Rendezvous daemon parameters, which indicate the message origin. Refer to Common Methods for Platform-Independent Microagents, page 11, for TibRendezvous common methods.

Methods Method Description Page TibRendezvous:onRvDaemonStatus Subscribes to TIBCO 78 Rendezvous internal status messages.

TibRendezvous:onRvDataLoss Subscribes to TIBCO 82 Rendezvous data loss messages.

TibRendezvous:onRvdDisconnectOrCo Subscribes to TIBCO 83 nnect Rendezvous disconnected/connected advisory messages.

TibRendezvous:onRvLicenseExpire Subscribes to TIBCO 84 Rendezvous license expired advisory messages.

TibRendezvous:onRvdRetransmissionS Subscribes to TIBCO 85 uppressed Rendezvous daemon outbound retransmission suppressed advisory messages.

TibRendezvous:getReleaseVersion Returns the current version. 12

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.TibRendezvous | 77

Method Description Page TibRendezvous:getTraceLevel Returns the current tracing 13 level.

TibRendezvous:setTraceLevel Sets the tracing bits. 14

TibRendezvous:getTraceParameters Gets current trace 15 parameters

TibRendezvous:setTraceParameters Sets tracing parameters. 16

TibRendezvous:_onUnsolicitedMsg Subscribes to TIBCO 17 Rendezvous unsolicited messages.

TIBCO Hawk Methods Reference 78 | Chapter 2 Platform-Independent Microagents and Methods

TibRendezvous:onRvDaemonStatus Method

Purpose This method (on all platforms) subscribes to TIBCO Rendezvous internal status messages and reports TIBCO Rendezvous daemon status.

Remarks The method argument Interval specifies the interval in seconds at which daemon status is to be reported (that is, the rate at which asynchronous method onRvDaemonStatus is called.) The TIBCO Rendezvous status messages being monitored are reported at fixed 90 second intervals. The TibRendezvous Microagent must collect numerous status messages in order to construct an accurate view of the daemon status being reported. It is recommended that an Interval be specified that is a multiple of 90 seconds and no less than 90 seconds. If you enter a value less than 90 seconds, the default value (90 seconds) will be used. If you have more than one network interface on the machine where the TIBCO Rendezvous daemon is running, the method may not report the daemon status if the network parameter is not specified. To determine the network interface that the TIBCO Rendezvous daemon uses to publish the status, use the TIBCO Rendezvous HTTP interface and browse to the specific service.

Type Asynchronous, INFO.

Arguments Name Type Description Service String TIBCO Rendezvous service.

Network String TIBCO Rendezvous network.

Daemon String TIBCO Rendezvous daemon.

Interval Integer Report interval in seconds. (See Remarks above.)

Returns Name Type Description IP Address String Daemon IP address in standard form, for example 255.100.10.30.

TIBCO Hawk Methods Reference TibRendezvous:onRvDaemonStatus | 79

Name Type Description IP Address (bin) String Daemon IP address. 1. The return value is a string representation of the binary digits that make up the IP address. For example, the IP address 255.100.10.30 would be presented as "11111111.1100100.00001010.000 11110". The IP address in this form allows for more flexible rulebase tests to be constructed using the Perl5PatternMatch operator of the TIBCO Hawk rulebase editor

Uptime Integer The number of seconds since the start time on this service as reported by the TIBCO Rendezvous daemon.

Version String The version of the daemon executable formatted as a string. For example, 6.3.5.

HTTP IP String IP address of the TIBCO Rendezvous daemon HTTP interface.

HTTP Port Integer The IP port used in TIBCO Rendezvous daemon HTTP interface.

HTTP URL String URL to access the TIBCO Rendezvous daemon HTTP interface.

Messages Sent Long Number of messages sent to the network since the last interval.

Messages Long Number of messages received from the network Received since the last interval.

Bytes Sent Long Number of bytes in messages sent to the network since the last interval.

Bytes Received Long Number of bytes in messages received from the network since the last interval.

Packets Sent Long The total number of data packets transmitted since the last interval. This total counts initial transmission and all retransmissions; that is, each packet counts separately each time it is transmitted or retransmitted.

TIBCO Hawk Methods Reference 80 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description Retransmitted Long Number of data packets retransmitted to other Packets daemons since the last interval.

% Retransmitted Double Number of data packets retransmitted to other Packets daemons since the last interval expressed as a percent. Note that it is normal to have a value of several percentage points. A value that is consistently greater than 10 percent for more than 10 to 20 minutes is abnormal.

Packets Received Long The number of data packets received by this daemon process since the last interval.

Missed Packets Long The number of data packets missed since the previous data sample. This count includes only the initial transmission of a packet from another daemon; missed retransmissions are not counted.

% Missed Double The number of data packets missed since the Packets last interval expressed as a percent. Note that it is normal to have a value of several percentage points. A value that is consistently greater than 10 percent for more than 10 to 20 minutes is abnormal.

Time Double The time at which the host status message was generated.

Messages Double Messages sent per second in the last interval. Sent/Per Second

Messages Double Messages received per second in the last Received/Per interval. Second

Bytes Sent/Per Double Bytes sent per second in the last interval. Second

Bytes Double Bytes received per second in the last interval. Received/Per Second

TIBCO Hawk Methods Reference TibRendezvous:onRvDaemonStatus | 81

Name Type Description Packets Sent/Per Double Packets sent per second in the last interval. Second

Packets Double Packets received per second in the last interval. Received/Per Second

Inbound Data Long Inbound data loss (in packets). Loss

Outbound Data Long Outbound data loss (in packets). Loss

OS Type Integer A code number denoting the operating system of the daemon's host computer.

TIBCO Hawk Methods Reference 82 | Chapter 2 Platform-Independent Microagents and Methods

TibRendezvous:onRvDataLoss Method

Purpose This method (on all platforms) subscribes to TIBCO Rendezvous data loss messages and reports their occurrence.

Type Asynchronous, INFO.

Arguments Name Type Description Service String TIBCO Rendezvous service.

Network String TIBCO Rendezvous network.

Daemon String TIBCO Rendezvous daemon.

Returns Name Type Description Subject String Advisory message subject name.

IP Address String IP address of the other daemon where this daemon is experiencing data loss. The address is returned in standard form, for example 255.100.10.30.

IP Address String IP address of the other daemon where this daemon is (bin) experiencing data loss. The address is returned as a string representation of the binary digits that make up the IP address. For example, the IP address 255.100.10.30 would be presented as "11111111.1100100.00001010.000 11110". The IP address in this form allows for more flexible rulebase tests to be constructed using the Perl5PatternMatch operator of the TIBCO Hawk rulebase editor

Advisory String The description of the advisory message. Description

TIBCO Hawk Methods Reference TibRendezvous:onRvdDisconnectOrConnect | 83

TibRendezvous:onRvdDisconnectOrConnect Method

Purpose This method (on all platforms) subscribes to TIBCO Rendezvous disconnected/connected advisory messages and reports their occurrence.

Type Asynchronous, INFO.

Arguments Name Type Description Service String TIBCO Rendezvous service.

Network String TIBCO Rendezvous network.

Daemon String TIBCO Rendezvous daemon.

Returns Name Type Description Subject String Advisory message subject name that indicates whether the TIBCO Rendezvous daemon is disconnected or connected.

TIBCO Hawk Methods Reference 84 | Chapter 2 Platform-Independent Microagents and Methods

TibRendezvous:onRvLicenseExpire Method

Purpose This method (on all platforms) subscribes to TIBCO Rendezvous license expired advisory messages and reports their occurrence.

Type Asynchronous, INFO.

Arguments Name Type Description Service String TIBCO Rendezvous service.

Network String TIBCO Rendezvous network.

Daemon String TIBCO Rendezvous daemon.

Returns Name Type Description Subject String Subject name.

Expire String License expiration time. Time

TIBCO Hawk Methods Reference TibRendezvous:onRvdRetransmissionSuppressed | 85

TibRendezvous:onRvdRetransmissionSuppressed Method

Purpose This method (on all platforms) subscribes to TIBCO Rendezvous daemon outbound retransmission suppressed advisory messages.

Type Asynchronous, INFO.

Arguments Name Type Description Service String TIBCO Rendezvous service.

Network String TIBCO Rendezvous network.

Daemon String TIBCO Rendezvous daemon.

Returns Name Type Description Subject String Subject name.

IP String IP Address of the host computer where the Address chronically-lossy receiver (rvd) is running.

Lost Long The number of packets requested by the host, but not retransmitted by the sending daemon (during the interval since the last advisory of this type for the receiving host and service).

TIBCO Hawk Methods Reference 86 | Chapter 2 Platform-Independent Microagents and Methods

COM.TIBCO.hawk.microagent.Repository Microagent

Purpose The repository microagent (on all platforms) responds to configuration requests from TIBCO Hawk agents.

Remarks Some methods of the Repository microagent are proprietary. They are listed here for completeness, but cannot be invoked directly.

Methods Method Description Page Repository:getName Returns the name of the TIBCO 88 Hawk repository.

Repository:getScheduleNames Returns the list of schedule names 89 currently in the repository.

Repository:getRuleBaseName Returns the list of rulebase names 90 currently in the repository.

Repository:onRepositoryEvent Returns repository operation. 91

Proprietary The following methods of the RuleBaseEngine microagent are proprietary. The Methods TIBCO Hawk system does not support direct user invocation of these methods from the TIBCO Hawk Display or Console API. However, these methods are used indirectly by the TIBCO Hawk Display when interacting with agents and thus have security implications. Access to proprietary methods with an impact of Action should only be granted to trusted users who are allowed access to all Action methods

Proprietary Method Name Impact Description Methods Summary. getRuleBases Info This method retrieves rulebases from the repository

getSchedules Info This method returns the schedules list.

getRBMap Info This method returns the RuleBaseMap file.

addRuleBase IMPACT_ACTION This method send rulebases to the repository.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.microagent.Repository | 87

Method Name Impact Description updateRuleBase Action This method updates repository rulebases. setSchedules Action This method sets the schedules list for an repository deleteRuleBase IMPACT_ACTION This method deletes a rulebase from the repository. setRBMap Action This method sets the RuleBaseMap for a repository.

TIBCO Hawk Methods Reference 88 | Chapter 2 Platform-Independent Microagents and Methods

Repository:getName Method

Purpose Returns name of the repository.

Type Asynchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Name String Name of the repository.

TIBCO Hawk Methods Reference Repository:getScheduleNames | 89

Repository:getScheduleNames Method

Purpose Returns a table of names of the schedules currently in this repository.

Type Asynchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Schedule name String Name of the schedule in repository.

TIBCO Hawk Methods Reference 90 | Chapter 2 Platform-Independent Microagents and Methods

Repository:getRuleBaseName Method

Purpose Returns a table of names of the rulebases in this repository.

Type Asynchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Rulebase name String Name of the rulebase.

TIBCO Hawk Methods Reference Repository:onRepositoryEvent | 91

Repository:onRepositoryEvent Method

Purpose Returns information on repository events.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Object Type String Type of object associated with event.

Returns Name Type Description Event Type String Type of event that occurred.

Object Name String Name of object associated with event.

Object Type String Type of object associated with event.

TIBCO Hawk Methods Reference 92 | Chapter 2 Platform-Independent Microagents and Methods

COM.TIBCO.hawk.microagent.Messaging Microagent

Purpose The Messaging microagent (on all platforms) responds to requests from TIBCO Hawk agents to send and receive messages using either TIBCO Rendezvous or TIBCO EMS.

Methods Method Description Page Messaging:sendMessage Sends a simple message as a string 93 using the configured transport.

Messaging:onMessage Receives a message. 94

Messaging:onTimeout Returns the number of timeout 95 intervals that have elapsed since the arrival of the previous message or since the start of the subscription to this method.

Messaging:onNumber Receives a message with a _data_ 96 field having a numeric value.

TIBCO Hawk Methods Reference Messaging:sendMessage | 93

Messaging:sendMessage Method

Purpose Sends a simple message as a string (in the field _data_) using the configured transport.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Subject String Message subject. Any leading and trailing spaces in the subject are ignored.

Message String Content of the message.

Returns None.

TIBCO Hawk Methods Reference 94 | Chapter 2 Platform-Independent Microagents and Methods

Messaging:onMessage Method

Purpose Receives a message using the configured transport.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Subject String Message subject. Any leading and trailing spaces in the subject are ignored.

Returns Name Type Description Subscription Subject String Subscription subject.

Message Subject String Message subject specified by the sender.

MSG_CONTENT String Content of the message.

TIBCO Hawk Methods Reference Messaging:onTimeout | 95

Messaging:onTimeout Method

Purpose Returns the number of timeout intervals that have elapsed since the arrival of the previous message or since the start of the subscription to this method.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Subject String Subscription subject. Any leading and trailing spaces in the subject are ignored.

Timeout Interval Integer Timeout interval in seconds.

Returns Name Type Description Timeout Interval Count Integer The count of consecutive timeout intervals that have passed. The return value is reset to 0 (zero) when a message is received with the specified subject or topic. The return value of 0 can be used as a clear test condition within rulebases.

TIBCO Hawk Methods Reference 96 | Chapter 2 Platform-Independent Microagents and Methods

Messaging:onNumber Method

Purpose Receives a message with a _data_ field having a numeric value. The actual value could be either a string, integer, long, float, or double data type which is converted to a double data type.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Subject String Subscription subject. Any leading and trailing spaces in the subject are ignored.

Returns Name Type Description Subscription Subject String The subscription subject.

Message Subject String The message subject.

_data_ Double The numeric data.

TIBCO Hawk Methods Reference com.tibco.hawk.jvm.JavaVirtualMachine | 97 com.tibco.hawk.jvm.JavaVirtualMachine Microagent

Purpose Monitoring and management of the Java Virtual Machine(s) processes started by the same user on the local machine using Java Attach API through Hawk.

Methods Method Description Page getVirtualMachineInfo Discovers and provides detailed 98 information of all Java Virtual Machine(s) started by the same user on the local machine.

getThreadInfo Returns general thread 100 information, execution information, and synchronization statistics of a specific thread or all threads of a particular Java Virtual Machine.

JavaVirtualMachine Microagent Configuration

For configuration of JavaVirtualMachine Microagent, refer readme.txt available in plugin/jvm.

TIBCO Hawk Methods Reference 98 | Chapter 2 Platform-Independent Microagents and Methods

getVirtualMachineInfo Method

Purpose Returns details of Java Virtual Machine processes started by the same user on the local machine by Java Virtual Machine process name. It discovers all Java Virtual Machine(s) and returns the details of each Java Virtual Machine, if the process name argument is blank. On providing a process name argument, it serves as a regular expression used to filter the details of the Java Virtual Machine.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String The name. Empty argument string provides information on all Java Virtual Machine processes.

Returns Name Type Description Process Id String JAVA Process Id.

Name String The name representing the running Java Virtual Machine.

Up Time Long The uptime of the Java Virtual Machine in milliseconds.

Start Time Long The start time of the Java Virtual Machine in milliseconds.

Process CPU Time Integer The CPU time used by the process on which the Java Virtual Machine is running.

Current Heap Size Long The size of used memory in bytes.

Committed Memory Long The size of memory in bytes that is committed for the Java Virtual Machine to use.

Maximum Heap Size Long The maximum size of memory in bytes that can be used for memory management.

TIBCO Hawk Methods Reference getVirtualMachineInfo | 99

Name Type Description Non Heap Memory Long The amount of used non heap Used memory in bytes.

Live Threads Integer The current number of live threads including both daemon and non-daemon threads.

Peak Threads Integer The peak live thread count since the Java Virtual Machine was started or peak was reset.

Daemon Threads Integer The current number of live daemon threads.

Total Threads Started Long The total number of threads created and started since the start of Java Virtual Machine.

Current classes loaded Integer The number of classes currently loaded into Java Virtual Machine.

Total classes loaded Long The total number of classes loaded since the start of Java Virtual Machine execution.

Total classes unloaded Long The total number of classes unloaded since the start of Java Virtual Machine execution.

Virtual Machine Name String The Java Virtual Machine implementation name.

Virtual Machine Vendor String The Java Virtual Machine implementation vendor.

Virtual Machine Version String The Java Virtual Machine implementation version.

TIBCO Hawk Methods Reference 100 | Chapter 2 Platform-Independent Microagents and Methods

getThreadInfo Method

Purpose Returns general, execution information and synchronization statistics of Thread by Thread Name, Java Virtual Machine process name and/or Thread State. It returns general, execution information and synchronization statistics of all thread(s) of particular Java virtual machine, if the Thread Name argument is blank.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Thread Name String The thread name. Empty argument string provides information on all running Java Virtual Machine threads.

Java Virtual Machine String The Java Virtual Machine process Process Name name. Empty argument string provides information on all Java Virtual Machine processes.

Thread State String The Thread State. Empty argument string provides information on all Thread State Possible threads irrespective of the state. Values: •Blank •NEW • RUNNABLE •BLOCKED •WAITING • TIME_WAITING • TERMINATED

Returns Name Type Description Virtual Machine Process String Process Id of Java Virtual Machine Id process.

Virtual Machine Process String The name of representing the running Name Java Virtual Machine.

TIBCO Hawk Methods Reference getThreadInfo | 101

Name Type Description Thread Id String The ID of the thread.

Thread Name String The name of the thread.

Thread State String The state of the thread.

Suspended String Denotes whether the thread is suspended. isInNative String Denotes whether it is executing native code via the Java Native Interface (JNI).

Blocked Count String The total number of attempts that the thread is blocked to enter or re-enter a monitor.

Blocked Time String The approximate accumulated elapsed time (in milliseconds) that the thread has blocked to enter or re-enter a monitor since the enabling of thread contention monitoring.

Waited Count String The total count of the number of times the thread waited for notification.

Waited Time String The approximate accumulated elapsed time (in milliseconds) that the thread has waited for notification since the enabling of thread contention monitoring.

Thread User Time String CPU time executed by the thread in user mode in nanoseconds.

Lock Name String The string representation of the monitor lock that the thread is blocked to enter or waiting to be notified through the Object.wait method.

Lock Owner Id String The thread ID which holds the monitor lock of an object on which the thread is blocked.

TIBCO Hawk Methods Reference 102 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description Lock Owner Name String The thread name which holds the monitor lock of an object on which the thread is blocked.

TIBCO Hawk Methods Reference com.tibco.hawk.amx.AMXHost | 103 com.tibco.hawk.amx.AMXHost Microagent

Purpose Allows monitoring and managing of TIBCO ActiveMatrix Host Instance running in the local machine.

Methods ForMethod TIBCO ActiveMatrix 3.0/3.0.1 Description Page isHostRunning Pings the ActiveMatrix Host and 106 returns "true" or "false".

getHostInfo Returns the details of 107 ActiveMatrix Host instance running in the local machine.

getNodeInfo Returns the details of a particular 110 node/all nodes associated with the ActiveMatrix Host instance.

onHostEvent Provides notification on the 114 runtime state of a TIBCO Host is changed.

onNodeEvent Provides notification on the 117 runtime state of node which is changed for a particular node or all nodes associated with TIBCO Host If the Node Name argument is empty, then the method provides notification for all nodes associated with the Host.

startNode Start ActiveMatrix Node. 119

stopNode Stop ActiveMatrix Node. 120

AMXHost Microagent Configuration File

File name : AMXHostPluginConfig.xml Content

TIBCO Hawk Methods Reference 104 | Chapter 2 Platform-Independent Microagents and Methods

xsi:noNamespaceSchemaLocation="AMXHostPluginConfig.xsd">

%TIBCO_HAWK_HOME_ESC%/plugin/amx/hpaclien tconfig.properties 10 tibcohost* tibamx_*

XSD Configuration file : AMXHostPluginConfig.xsd Content :

TIBCO Hawk Methods Reference com.tibco.hawk.amx.AMXHost | 105

AMX Host Microagent Configuration

For configuration of AMX Host Microagent, refer to the readme.txt available in plugin/amx.

TIBCO Hawk Methods Reference 106 | Chapter 2 Platform-Independent Microagents and Methods

isHostRunning Method

Purpose This method pings the TIBCO ActiveMatrix Host and returns the value as "true" or "false".

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Running: true/false Boolean Pings the TIBCO ActiveMatrix Host and returns true if host is running, or else false.

TIBCO Hawk Methods Reference getHostInfo | 107 getHostInfo Method

Purpose This method returns the details of TIBCO ActiveMatrix Host instance running in the local machine.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Process ID String The Process ID of the TIBCO Host Instance (OS Process ID). Note: ProcessID return "-1", if Host is not running.

Name String The name of the ActiveMatrix host (SystemHost).

Type String Type of the TIBCO ActiveMatrix host: (TIBCO Host).

TIBCO Hawk Methods Reference 108 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description Runtime State String The state of ActiveMatrix host. • UNKNOWN • NOT_RUNNING • INITIALIZING • INITIALIZING_FAILED •INITIALIZED • STARTING - Starting of the host. The starting state should move to the running state BEFORE the nodes are started. In other words, Host state is independent of Node State. Nodes cannot start unless the Host starts successfully. • STARTING_FAILED - The process of starting failed, the reason on the status will be set. •STOPPING • STOPPED • RUNNING - The host is running successfully. • UNBOUND - The host is not bound to the enterprise. • LOOSING_CONTACT • LOST_CONTACT - Lost contact with a host. Reasons being the host was killed unexpectedly, heartbeats are lost in a flood of traffic, or the network is no logger operational.

Version String Version of the TIBCO ActiveMatrix Host.

TIBCO Hawk Methods Reference getHostInfo | 109

Name Type Description Time Stamp String The time stamp (date and time) of the state changed (For example, from the NOT_RUNNING state to the RUNNING State, the time stamp of the host started and running successfully). Time Stamp returns long value, which is available in Hawk in a readable format of date and time.

Binding Status String The binding status of TIBCO Host (for example, bound).

Host Platform Version String Platform version of the Host.

Internet Host Name String Name of the Internet Host.

OS Name String The Operating System name of the machine running the host.

OS Version String The Operating System version of the machine running the host.

System Arch String System Architecture of the machine running the host.

Stop Reason String The reason of the state host is in. It may be null during the normal operation.

TIBCO Hawk Methods Reference 110 | Chapter 2 Platform-Independent Microagents and Methods

getNodeInfo Method

Purpose This method returns the Node information by the Node Name. If the Node Name argument is blank, then all ActiveMatrix nodes are returned. On providing the Node Name argument, it serves as a regular expression used to filter the nodes returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Node Name String The node name.

Returns Name Type Description Process ID String The Process ID of the ActiveMatrix Node (OS Process ID.) Note: Process ID return "-1", if Node is not running.

Name String The name of the Node.

Host String The name of the host associated with the node.

TIBCO Hawk Methods Reference getNodeInfo | 111

Name Type Description Runtime State String The actual state of the node as reported by the host. • NOT_RUNNING • INITIALIZING •INITIALIZED • INITIALIZATION_FAILED •STARTING •RUNNING •START_FAILED •STOPPING •STOPPED •LOST_CONTACT •UNKNOWN

TIBCO Hawk Methods Reference 112 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description Stop Mode String In which mode the node is stopped. Node can be stopped in abort, immediate or normal mode through the ActiveMatrix Admin UI or end the process from the OS or using the API to the Stop Node. • abort - The node is killed immediately. This mode is however not supported on all the HPAs. If you attempt to abort a node on a HPA that does not support node abort, the status block for that node shows an "operation-not-supported" error. • immediate - It implies that the node's infrastructure and applications may not have been able to shut down in a clean manner. This will potentially leave the node in an inconsistent state that will have to be recovered prior to the subsequent successful startup. • normal - Implies that all infrastructure and applications running on the node would have completed all or any task/s normally associated with their shutdown

Stop Reason String Stop reason text message. If the end process is from the OS, then reason returned is "OSGI Framework is stopping".

Stop Reason Code String Stop reason error code. Note: Most of the time it is Reason null and reason code -1.

TIBCO Hawk Methods Reference getNodeInfo | 113

Name Type Description Time Stamp String The time stamp (date and time) of the state changed (For example, from the NOT_RUNNING state to the RUNNING State, the time stamp of the node started and running successfully). Time Stamp returns long value, which is available in Hawk in a readable format of date and time. Note: If an ActiveMatrix node was stopped while starting the Hawk agent, then getNodeInfo() would return 0 in the timestamp column for that particular node.

During the microagent startup, if the node state appears as Starting in ActiveMatrix Administrator UI, the getNodeInfo() method does not return the correct node state unless the node is restarted.

When the node is restarted (that is, when the microagent receives a Start notification from ActiveMatrix Administrator), the microagent returns the correct state of the node.

On Windows, when a node is stopped using "Terminate Node Process" option in the TIBCO ActiveMatrix Administrator, then the last state reported is LOST_CONTACT instead of NOT_RUNNING.

TIBCO Hawk Methods Reference 114 | Chapter 2 Platform-Independent Microagents and Methods

onHostEvent Method

Purpose This method provides notification on the changed run-time state of a TIBCO Host. This method supports only the subscribe mode.

Type Asynchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Process ID String The Process ID of the TIBCO Host (OS Process Id)

Name String The name of the ActiveMatrix host (AMXAdminHost).

Type String The type of the ActiveMatrix host (AMXAdminHost).

TIBCO Hawk Methods Reference onHostEvent | 115

Name Type Description Runtime State String The state of the ActiveMatrix host. •UNKNOWN • NOT_RUNNING • INITIALIZING • INITIALIZING_FAILED •INITIALIZED • STARTING: The starting of the host. The starting state should move to the running state BEFORE starting the nodes. In other words, Host state is independent of Node State. Nodes can start unless the Host starts successfully. • STARTING_FAILED: The starting process failed and the reason on the status will be set. •STOPPING •STOPPED • RUNNING: The host is running normally. • UNBOUND: The host is not bound to an enterprise. •LOSING_CONTACT • LOST_CONTACT: Lost contact with a host. Reason being the host was killed unexpectedly, heartbeats are lost in a flood of traffic, or the network is no logger operational.

Version String Version of the ActiveMatrix Host.

TIBCO Hawk Methods Reference 116 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Description Time Stamp String The time stamp (date and time) of the state changed (For example, from the NOT_RUNNING state to the RUNNING State, the time stamp of the Host started and running successfully). Time Stamp returns long value, which is available in Hawk in a readable format of date and time.

Binding Status String Status of Host binding.

Host Platform Version String Version of Host Platform.

Internet Host Name String Internet Host name.

OS Name String Operating System name of the host.

OS Version String Operating System version of the host.

System Arc String System Architecture of the Host.

Stop Reason String The reason of the state the host is in. It may be null during the normal operation.

TIBCO Hawk Methods Reference onNodeEvent | 117 onNodeEvent Method

Purpose This method provides notification on therun-time state of the node when changed of a particular node or all nodes associated with the TIBCO Host. If the Node Name argument is blank then it provides notification for all nodes associated with the TIBCO Host. This method supports only subscribe mode.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Node Name String The node name.

Returns Name Type Name String The name of the node.

Runtime State String The state of the node.

Host Name String The name of the host associated with the node.

Stop Mode String In which mode the node is stopped. Node can be stopped in abort, immediate or normal mode through the ActiveMatrix Admin UI or end the process from the OS or using the API to the Stop Node.

Stop Reason String Stop reason text message.

Stop Reason Code String Stop reason error code.

TIBCO Hawk Methods Reference 118 | Chapter 2 Platform-Independent Microagents and Methods

Name Type Time Stamp String The time stamp (date and time) of the state changed (For example, from the NOT_RUNNING state to the RUNNING State, the time stamp of the node started and running successfully). Time Stamp returns long value, which is available in TIBCO Hawk in a readable format of date and time.

TIBCO Hawk Methods Reference startNode | 119 startNode Method

Purpose This method starts the TIBCO ActiveMatrix node, if not running.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Node Name String The node name.

Exceptions Condition Result

If node does not exist. Throws a MicroAgentException with Message “TIBCO-AMX-HPA-012106: node TestNode does not exist".

If node is already Throws a MicroAgentException with started/running. Message “Provided node name ' already started for host '.

Returns None.

TIBCO Hawk Methods Reference 120 | Chapter 2 Platform-Independent Microagents and Methods

stopNode Method

Purpose This method stops the TIBCO ActiveMatrix node.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Node Name String The node name.

Reason String The stop reason text message.

Reason Code String The stop reason error code.

Exceptions Condition Result

If node does not exist. Throws a MicroAgentException with Message “Provided node name ' not found for host '".

If node is already Throws a MicroAgentException with started/running. Message “Provided node name ' already stopped for host '.

Returns None.

TIBCO Hawk Methods Reference com.tibco.hawk.commonlogging.event.CLEventPublisher | 121 com.tibco.hawk.commonlogging.event.CLEventPublisher Microagent

Purpose Publishes events from TIBCO Hawk using the TIBCO Common Logging in the Base Event Format (BEF)/Common Base Event (CBE). Create the Event Definition configuration file with the following definitions: • What events have to be published (Event Output). • Event Data Source (from where to get and collect the events). • Where to publish events (Common Logging Configuration) • How to publish (Event Subscribe). Sample event definition is available in the folder /plugin/commonlogging.

Methods Method Description Page startPublisher Start event publisher to publish 122 events from Hawk.

stopPublisher Stop event publisher to publish 123 events from Hawk.

startAllPublishers Start all event publishers that are 124 not started.

stopAllPublishers Stop all event publishers that are 125 started.

getEventPublisherInfo Returns the registered event 126 publisher’s information.

getEventDataSourceDetails Returns Event Data Source details. 127

reloadEventDefinitions Reloads event definitions. 128

CLEvent Publisher Microagent Configuration

For configuration of CLEventPublsiher Microagent, refer readme.txt available in plugin/commonlogging.

TIBCO Hawk Methods Reference 122 | Chapter 2 Platform-Independent Microagents and Methods

startPublisher Method

Purpose This method starts the event publisher to start publishing events from the TIBCO Hawk based on the Event Publisher Description defined in the Event Definitions file.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Event Publisher Name String The Event Publisher Name.

Returns None.

TIBCO Hawk Methods Reference stopPublisher | 123 stopPublisher Method

Purpose This method stops the Event Publisher.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Event PublisherName String The Event Publisher Name.

Returns None.

TIBCO Hawk Methods Reference 124 | Chapter 2 Platform-Independent Microagents and Methods

startAllPublishers Method

Purpose This method starts all valid and not started Event Publishers.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

TIBCO Hawk Methods Reference stopAllPublishers | 125 stopAllPublishers Method

Purpose This method stops all started Event Publishers.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

TIBCO Hawk Methods Reference 126 | Chapter 2 Platform-Independent Microagents and Methods

getEventPublisherInfo Method

Purpose This method returns the Event Publisher information by Event Publisher name. If the event publisher name argument is blank then all event publishers are returned. On specifying the event publisher name argument, it serves as a regular expression used to filter the event publisher returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Event Publisher Name String The Event Publisher Name.

Returns Name Type Description Name String Name of the Event Publisher.

Status String The current status of the event publisher (started/stop).

Auto Start String The flag to indicate event publisher is auto start configured.

Interval Time String The interval time to publish events.

Subscribe On Event String The name of the Event Source on the Source Name Event Publisher Subscribe.

CL Logger Name String The TIBCO Common Logging logger name.

CL Extended Model String The TIBCO Common Logging Name Extended Model name.

CL Extended Model String The TIBCO Common Logging Package Name Extended Model package name.

TIBCO Hawk Methods Reference getEventDataSourceDetails | 127 getEventDataSourceDetails Method

Purpose This method returns the event data source details.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description EventSourceId String ID of the Event Source.

Microagent String The name of the TIBCO Hawk microagent.

Method String The name of the microagent method.

Status String The status of the event source. • Valid - Whether the microagent available method name is valid. • Invalid - Whether the microagent is available and/or not available and/or method is not valid.

Description/Help String Description/Help of the microagent method or reason for its invalid status.

TIBCO Hawk Methods Reference 128 | Chapter 2 Platform-Independent Microagents and Methods

reloadEventDefinitions Method

Purpose This method stops all started event publishers, reloads event definitions from the configuration file and starts all valid event publishers with an auto start. You can make changes in the configuration file and reflect changes without restarting the TIBCO Hawk Agent.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

Event Definitions (plugin/commonlogging/ eventdefs.xsd) XSD details

Provide details of Event Publisher

TIBCO Hawk Methods Reference reloadEventDefinitions | 129

Common Logging details.

TIBCO Hawk Methods Reference 130 | Chapter 2 Platform-Independent Microagents and Methods

TIBCO Hawk Methods Reference reloadEventDefinitions | 131

TIBCO Hawk Methods Reference 132 | Chapter 2 Platform-Independent Microagents and Methods

TIBCO Hawk Methods Reference reloadEventDefinitions | 133

To correlate with other Event Data Source Return Element of Hawk MicroAgent Method

TIBCO Hawk Methods Reference 134 | Chapter 2 Platform-Independent Microagents and Methods

Sample Event Definitions Configuration to CLEvents from Hawk Following is the sample Event Definitions configuration to publish JVM Info Event of AMX 3 TIBCO Host Instance and Process Info Event of AMX 3 TIBCO Host instance and all nodes associated with this Host Instance. (plugin\commonlogging\ JVMAndProcessInfoEventdefs.xml)

${AMXHost.Process Id}

TIBCO Hawk Methods Reference reloadEventDefinitions | 135

10000

TIBCO Hawk Methods Reference 136 | Chapter 2 Platform-Independent Microagents and Methods

${AMXHost.Process Id}

10000

TIBCO Hawk Methods Reference reloadEventDefinitions | 137

${AMXNodeInfo.Process Id}

10000

TIBCO Hawk Methods Reference 138 | Chapter 2 Platform-Independent Microagents and Methods

name="com.tibco.governance.cl.extension.model.process.impl.Process InfoEventImpl" />

name="com.tibco.governance.jvminfo.model.jvminfoevent.impl.JVMInfo EventImpl">

%TIBCO_COMPONENT_STORE_PLUGINS%/com.tibco.governance.jvm info.model_1.0.0.004.jar

%TIBCO_COMPONENT_STORE_PLUGINS%/com.tibco.governance.com monlogging.extension.jvminfo.client_1.0.0.004.jar

TIBCO Hawk Methods Reference reloadEventDefinitions | 139

Sample Common Logging Configuration file (plugin/commonlogging/sample_log4j.xml)

Refer to plugin/commonlogging folder for configuration details.

TIBCO Hawk Methods Reference 140 | Chapter 2 Platform-Independent Microagents and Methods

TIBCO Hawk Methods Reference | 141

Chapter 3 Microsoft Windows Microagents and Methods

The TIBCO Hawk microagents described in this chapter run on the Microsoft Windows platform in the TIBCO Hawk microagent (HMA) process. They use the diagnostic and information-management tools of the Microsoft Windows platform (the Performance Monitor, Event Log, and Registry) to link to the Microsoft Windows system. For more specific information on monitoring under Microsoft Windows, see the TIBCO Hawk Administrator’s Guide.

Topics

• Summary of Microsoft Windows Microagents, page 142 • Common Methods on Microsoft Windows, page 146 • COM.TIBCO.hawk.hma.Performance, page 153 • COM.TIBCO.hawk.hma.Eventlog, page 190 • COM.TIBCO.hawk.hma.Registry, page 204 • COM.TIBCO.hawk.hma.Services, page 215 • COM.TIBCO.hawk.hma.Process, page 227

TIBCO Hawk Methods Reference 142 | Chapter 3 Microsoft Windows Microagents and Methods

Summary of Microsoft Windows Microagents

The Microsoft Windows microagents are described as follows.

Table 3 Microsoft Windows Microagents (Sheet 1 of 4) Method Description Common Methods: Provide release and trace-related functions common to several microagents. Methods are: These methods are common to the getReleaseVersion following Microsoft getTraceLevel Windows Microagents: setTraceLevel Performance getTraceParameters Eventlog setTraceParameters Registry setTraceParameters Process _onUnsolicitedMsg

TIBCO Hawk Methods Reference Summary of Microsoft Windows Microagents | 143

Table 3 Microsoft Windows Microagents (Sheet 2 of 4) Method Description Performance Returns information from the Microsoft Windows Performance monitor. Methods are: (Methods listed here represent a typical Performance:System installation. Performance:Processor Depending on the implementation, Performance:Memory more or fewer Performance:Cache Performance methods may be Performance:PhysicalDisk available. Performance:LogicalDisk Abbreviated guidelines for use are Performance:Process given in this manual; Performance:ProcessCount more complete help is available via the Performance:Thread TIBCO Hawk Performance:Objects Display.) Performance:Redirector Performance:Server *For those methods common to several Performance:Server Work Queues Microsoft Windows Performance:Paging File microagents, see "Common Methods" Performance:Browser Performance:Telephony Performance:NBT Connection Performance:Network Interface Performance:IP Performance:ICMP Performance:TCP Performance:UDP Performance:(*common methods)

TIBCO Hawk Methods Reference 144 | Chapter 3 Microsoft Windows Microagents and Methods

Table 3 Microsoft Windows Microagents (Sheet 3 of 4) Method Description Eventlog Interfaces with the Microsoft Windows event log service to detect system events, security events and *For those methods application events. Methods are: common to several Microsoft Windows Eventlog:getRecentApplicationEvents microagents, see Eventlog:getRecentSystemEvents "Common Methods" Eventlog:getRecentSecurityEvents Eventlog:onApplicationEvent Eventlog:onSecurityEvent Eventlog:onSecurityEvent Eventlog:logEvent Eventlog: (*common methods)

Registry Allows you to retrieve and edit Microsoft Windows Registry entries. Methods are: *For those methods common to several Registry:setDWORD Microsoft Windows Registry:setString microagents, see "Common Methods" Registry:getDWORD Registry:getString Registry:getMultiString Registry:setExpandString Registry:EnumerateKey Registry:CreateKey Registry:(*common methods)

TIBCO Hawk Methods Reference Summary of Microsoft Windows Microagents | 145

Table 3 Microsoft Windows Microagents (Sheet 4 of 4) Method Description Service Allows the monitoring and management of Microsoft Windows services and device drivers. Methods are: Services:getServiceConfiguration Services:getServiceStatus Services:setServiceStartType Services:startService Services:stopService Services:pauseService Services:continueService Services:controlService

Process Process:getInstanceCount *For those methods Process:getProcess common to several Process:(*common methods) Microsoft Windows microagents, see "Common Methods"

TIBCO Hawk Methods Reference 146 | Chapter 3 Microsoft Windows Microagents and Methods

Common Methods on Microsoft Windows

The following methods are uniform across the Performance, Eventlog, Registry, FileSystem, and Process microagents. Method Description Page getReleaseVersion Returns version information. 12

getTraceLevel Gets trace level. 13

setTraceLevel Sets tracing bits. 14

getTraceParameters Gets the tracing parameters 15 information.

setTraceParameters Sets the tracing parameters. 16

_onUnsolicitedMsg Returns unsolicited notifications. 17

TIBCO Hawk Methods Reference getReleaseVersion | 147 getReleaseVersion Method

Purpose This method (on Microsoft Windows) returns current release version information for this microagent.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Name String The release name.

Version String Version number of the release.

Date String Version date of the release.

Major Number String Major number of release.

Minor Number String Minor number of release.

Update String Release version update number.

TIBCO Hawk Methods Reference 148 | Chapter 3 Microsoft Windows Microagents and Methods

getTraceLevel Method

Purpose This method (on Microsoft Windows) returns the trace level settings.

Remarks Invocation will return a table, with the setting for each trace level (Information, Warning, Error, Debug, or AMI) listed as being either on or off.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Information String Information trace setting, on or off value.

Warning String Warning trace setting, on or off value.

Error String Error trace setting, on or off value.

Debug String Debug trace setting, on or off value.

AMI String AMI debug trace setting, on or off value.

TIBCO Hawk Methods Reference setTraceLevel | 149 setTraceLevel Method

Purpose This method (on Microsoft Windows) sets the trace level bits.

Remarks Use string current to keep the current setting for string parameters. Use integer value 0 to keep the current setting for integer parameters.

Type Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description Information String Information trace setting, on or off value.

Warning String Warning trace setting, on or off value.

Error String Error trace setting, on or off value.

Debug String Debug trace setting, on or off value.

AMI String AMI debug trace setting, on or off value.

Returns None.

TIBCO Hawk Methods Reference 150 | Chapter 3 Microsoft Windows Microagents and Methods

getTraceParameters Method

Purpose This method (on Microsoft Windows) returns tracing parameter information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Directory String Trace file directory.

File Name String Trace file name.

Max File Size String Maximum size of trace file before rollover (kilobytes).

Max Trace File Integer Maximum number of trace files to keep in trace directory.

TIBCO Hawk Methods Reference setTraceParameters | 151 setTraceParameters Method

Purpose This method (on Microsoft Windows) sets tracing parameters.

Remarks Use string current to keep the current setting for string parameters. Use integer value 0 to keep the current setting for integer parameters.

Type Synchronous, IMPACT_ACTION_INFO.

Arguments Name Type Description Directory String Trace file directory.

File Name String Trace file name.

Max File Size String Maximum size (in kilobytes) of trace file before rollover.

Max Trace File Integer Maximum trace files to keep in trace directory.

Returns None.

TIBCO Hawk Methods Reference 152 | Chapter 3 Microsoft Windows Microagents and Methods

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on Microsoft Windows) returns any unsolicited notifications that are sent from the managed application corresponding to this microagent. Invoking this method returns the last such message that was received (if any).

Remarks An unsolicited message is an information, warning, or error message that is sent directly to the manager.

Type Asynchronous IMPACT_INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

INBOX String An inbox address used to send the message.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Performance | 153

COM.TIBCO.hawk.hma.Performance Microagent

The Performance microagent (on Microsoft Windows) retrieves information from the Microsoft Windows using Performance Data Helper (PDH) library. Each Performance microagent method corresponds to a Performance Monitor Object, and each method result field corresponds to a Performance Monitor Counter in a one-to-one mapping. Methods listed here represent a typical installation. Abbreviated guidelines for use are given in this manual; more complete help is available via TIBCO Hawk Display.

The actual number of methods in the Performance microagent varies depending on how your machine is configured. Depending on the implementation, more or fewer Performance methods may be available. For example, if you are using SQL server, Microsoft Exchange, or Microsoft Windows Server software, additional methods may be available.

Information on the result fields of a Performance microagent method is available in the test builder screen while building a rulebase. The result fields of the methods given here are representative of the objects discovered by the microagent, and do not necessarily represent a full set of discovered objects. Information on the result fields of a Performance microagent method if also available from the Microsoft Windows Performance Monitor.

The default value for TimeInterval is 30 seconds. The minimum value for TimeInterval is 5 seconds. If the specified value is less than 5 seconds, TimeInterval defaults to 5 seconds.

Methods Method Returns Page Performance:System Information on all the activities on a 155 computer, combining all of its processors.

Performance:Processor Information on each processor 157 separately.

Performance:Memory Information on the use of physical 158 and virtual memory and paging.

Performance:Cache Information on the Microsoft 160 Windows file cache.

TIBCO Hawk Methods Reference 154 | Chapter 3 Microsoft Windows Microagents and Methods

Method Returns Page Performance:PhysicalDisk Information on hard drive partitions. 162

Performance:LogicalDisk Information on each logical disk 164 instance.

Performance:Process Information on one process. 166

Performance:ProcessCount The process count. 168

Performance:Thread Information on one thread. 169

Performance:Objects Summary information on all objects. 170

Performance:Redirector Information on network 171 communications.

Performance:Server Information on use of computer as 173 server.

Performance:Server Work Information on client queues. 175 Queues

Performance:Paging File Information on page file use. 177

Performance:Browser Information on browser requests. 178

Performance:Telephony Information on telephony services. 180

Performance:NBT Connection Information on NBT connection. 181

Performance:Network Information on the network 182 Interface interface.

Performance:IP Information on the IP connection. 184

Performance:ICMP Information on ICMP messages. 185

Performance:TCP Information on TCP connection. 187

Performance:UDP Information on UDP datagrams. 188

TIBCO Hawk Methods Reference Performance:System | 155

Performance:System Method

Purpose This method (on Microsoft Windows) returns general system information.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type System String

File Read Operations/sec Double

File Write Operations/sec Double

File Control Operations/sec Double

File Read Bytes/sec Double

File Write Bytes/sec Double

File Control Bytes/sec Double

Context Switches/sec Double

System Calls/sec Double

File Data Operations Double

System Up Time Double

Processor Queue Length Double

Processes Double

Threads Double

Alignment Fixups/sec Double

Exception Dispatches/sec Double

TIBCO Hawk Methods Reference 156 | Chapter 3 Microsoft Windows Microagents and Methods

Name (Cont’d) Type Floating Emulations/sec Double

% Registry Quota In Use Double

TIBCO Hawk Methods Reference Performance:Processor | 157

Performance:Processor Method

Purpose This method (on Microsoft Windows) returns information on the operation of each processor in the computer.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Processor String Processor instances are usually numbers, such as 0, 1, 2, etc. Empty argument returns all processors.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

% Processor Time Double

% User Time Double

% Privileged Time Double

Interrupts/sec Double

% DPC Time Double

% Interrupt Time Double

DPCs Queued/sec Double

DPC Rate Double

DPC Bypasses/sec Double

APC Bypasses/sec Double

TIBCO Hawk Methods Reference 158 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:Memory Method

Purpose This method (on Microsoft Windows), returns info on the use of physical (real) and virtual memory.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data is returned.

Returns Name Type Instance String. Table is indexed on the Instance

Available Bytes Double

Committed Bytes Double

Commit Limit Double

Page Faults/sec Double

Write Copies/sec Double

Transition Faults/sec Double

Cache Faults Double

Demand Zero Faults Double

Pages/sec Double

Pages Input/sec Double

Page Reads/sec Double

System Code Resident Bytes Double

System Driver Total Bytes Double

System Driver Resident Bytes Double

System Cache Resident Bytes Double

TIBCO Hawk Methods Reference Performance:Memory | 159

Name Type % Committed Bytes In Use Double

TIBCO Hawk Methods Reference 160 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:Cache Method

Purpose This method (on Microsoft Windows) returns information on the Microsoft Windows file cache.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed the on Instance.

Data Maps/sec Double

Sync Data Maps/sec Double

Async Data Maps/sec Double

Data Map Hits % Double

Data Map Pins/sec Double

Pin Reads/sec Double

Sync Pin Reads/sec Double

Async Pin Reads/sec Double

Pin Read Hits % Double

Copy Reads/sec Double

Sync Copy Reads/sec Double

Async Copy Reads/sec Double

Copy Read Hits % Double

MDL Reads/sec Double

TIBCO Hawk Methods Reference Performance:Cache | 161

Name (Cont’d) Type (Cont’d) Sync MDL Reads/sec Double

Async MDL Reads/sec Double

MDL Read Hits % Double

Read Aheads/sec Double

Fast Reads/sec Double

Sync Fast Reads/sec Double

Async Fast Reads/sec Double

Fast Read Resource Misses/sec Double

Fast Read Not Possibles/sec Double

Lazy Write Flushes/sec Double

Lazy Write Pages/sec Double

Data Flushes/sec Double

Data Flush Pages/sec Double

TIBCO Hawk Methods Reference 162 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:PhysicalDisk Method

Purpose This method (on Microsoft Windows) returns information on each hard drive instance connected to the computer.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Physical Disk String Physical disks are usually denoted using numbers: 0, 1, 2, and so on. Empty argument returns all physical disks.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

Current Disk Queue Length Double

% Disk Time Double

Avg Disk Queue Length Double

% Disk Read Time Double

Avg. Disk Read Queue Length Double

% Disk Write Time Double

Avg. Disk Write Queue Length Double

Avg. Disk sec/Transfer Double

Avg. Disk sec/Read Double

Avg. Disk sec/Write Double

Disk Transfers/sec Double

Disk Reads/sec Double

Disk Writes/sec Double

TIBCO Hawk Methods Reference Performance:PhysicalDisk | 163

Name Type Disk Bytes/sec Double

Avg. Disk Bytes/Transfer Double

Avg. Disk Bytes/Read Double

Avg. Disk Bytes/Write Double

TIBCO Hawk Methods Reference 164 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:LogicalDisk Method

Purpose This method (on Microsoft Windows) returns information on each logical disk instance connected to the computer.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Logical Disk String Logical Disk. A list of available disk selections is provided. Empty argument returns all logical disks.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance.

% Free Space Double

Free Megabytes Double

Current Disk Queue Length Double

% Disk Time Double

Avg. Disk Queue Length Double

% Disk Read Time Double

Avg. Disk Read Queue Length Double

% Disk Write Time Double

Avg. Disk Write Queue Length Double

Avg. Disk sec/Transfer Double

Avg. Disk sec/Read Double

Avg. Disk sec/Write Double

Disk Transfers/sec Double

TIBCO Hawk Methods Reference Performance:LogicalDisk | 165

Name Type Disk Reads/sec Double

Disk Writes/sec Double

Disk Bytes/sec Double

Avg. Disk Bytes/Transfer Double

Avg Disk Bytes/Read Double

Avg. Disk Bytes/Write Double

TIBCO Hawk Methods Reference 166 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:Process Method

Purpose This method (on Microsoft Windows) returns information on a process (a program or group of threads).

Remarks The methods Performance:Process and Process:getProcess can seem similar, but return different data. Performance:Process returns all Instances of Process Object from the Performance Data Helper (PDH) library.

Invoking Performance:process without any arguments retrieves all Process instances in effect at that point in time. In contrast, invoking Process:getProcess without any arguments returns all currently running processes from the PSAPI.lib. This method only lists processes that have the right to access this library. Do not confuse these methods. For a full description of this method and accompanying help text, refer to the help text provided by method invocation.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Process String The exact process name or a regular expression using the Perl5PatternMatch syntax. Empty argument string returns all processes.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

% Processor Time Double

% User Time Double

% Privileged Time Double

Virtual Bytes Peak Double

Virtual Bytes Double

Page Faults/sec Double

TIBCO Hawk Methods Reference Performance:Process | 167

Name Type Working Set Peak Double

Page File Bytes Peak Double

Page File Bytes Double

Private Bytes Double

Thread Count Double

Priority Base Double

Elapsed Time Double

ID Process Double

Pool Paged Bytes Double

Pool Nonpaged Bytes Double

Handle Count Double

TIBCO Hawk Methods Reference 168 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:ProcessCount Method

Purpose This method (on Microsoft Windows) returns the process count.

Remarks This method does not derive from the Microsoft Windows performance monitor.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String The exact process name or a regular expression using the Perl5PatternMatch syntax. Empty argument returns all processes currently running.

Returns Name Type Process Name String

Instance Count Integer

TIBCO Hawk Methods Reference Performance:Thread | 169

Performance:Thread Method

Purpose This method (on Microsoft Windows) returns information for a specified thread. If a thread is not specified, information on all threads is returned.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Thread String The exact name of the thread or a regular expression using the Perl5PatternMatch syntax. Empty argument string returns all threads.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

% Processor Time Double

% User Time Double

% Privileged Time Double

Context Switches/sec Double

Elapsed Time Double

Priority Base Double

Start Address Double

Thread State Double

Thread Wait Reason Double

ID Process Double

ID Thread Double

TIBCO Hawk Methods Reference 170 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:Objects Method

Purpose This method (on Microsoft Windows) returns summary information on all objects currently in existence on the computer, including processes and threads.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

Process Double

Threads Double

Events Double

Semaphores Double

Mutexes Double

Sections Double

TIBCO Hawk Methods Reference Performance:Redirector | 171

Performance:Redirector Method

Purpose The Redirector manages network connections that originate from a computer. This method (on Microsoft Windows) returns information on operations of the redirector.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

Bytes Total/sec Double

File Data Operations/sec Double

Packets/sec Double

Bytes Received/sec Double

Packets Received/sec Double

Read Bytes Paging/sec Double

Read Bytes Non-Paging/sec Double

Read Bytes Cache/sec Double

Read Bytes Network/sec Double

Bytes Transmitted/sec Double

Packets Transmitted/sec Double

Write Bytes Paging/sec Double

Write Bytes Non-Paging/sec Double

Write Bytes Cache/sec Double

TIBCO Hawk Methods Reference 172 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Write Bytes Network/sec Double

File Read Operations/sec Double

Read Packets/sec Double

Reads Large/sec Double

Read Packets Small/sec Double

File Write Operations/sec Double

Write Operations Random/sec Double

Write Packets/sec Double

Writes Large/sec Double

Write Packets Small/sec Double

Writes Denied/sec Double

Network Errors/sec Double

Server Sessions Double

Server Reconnects Double

Connects Core Double

Connects Lan Manager 2.0 Double

Connects Lan Manager 2.1 Double

Connects Windows NT Double

Server Disconnects Double

Server Sessions Hung Double

Current Commands Double

TIBCO Hawk Methods Reference Performance:Server | 173

Performance:Server Method

Purpose This method (on Microsoft Windows) returns information on the process that interfaces services from a computer to network servers.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

Bytes Total/sec Double

Bytes Received/sec Double

Bytes Transmitted/sec Double

Sessions Timed Out Double

Sessions Errored Out Double

Sessions Logged Off Double

Sessions Forced Off Double

Errors Logon Double

Errors Access Permissions Double

Errors Granted Access Double

Errors System Double

Blocking Requests Rejected Double

Work Item Shortages Double

Files Opened Total Double

TIBCO Hawk Methods Reference 174 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Files Open Double

Server Sessions Double

File Directory Searches Double

Pool Nonpaged Bytes Double

Pool Nonpaged Failures Double

Pool Nonpaged Peak Double

Pool Paged Bytes Double

Pool Paged Failures Double

Pool Paged Peak Double

Content Blocks Queued/sec Double

Logon/sec Double

Logon Total Double

TIBCO Hawk Methods Reference Performance:Server Work Queues | 175

Performance:Server Work Queues Method

Purpose This method (on Microsoft Windows) returns information on queues that form when client computers are interacting with this computer as a server.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Server Work Queues String Server Work Queues. Empty argument returns all queues.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

Queue Length Double

Available Threads Double

Available Work Items Double

Borrowed Work Items Double

Work Item Shortages Double

Current Clients Double

Bytes Received/sec Double

Bytes Sent/sec Double

Bytes Transferred/sec Double

Read Operations/sec Double

Read Bytes/sec Double

Write Operations/sec Double

Write Bytes/sec Double

TIBCO Hawk Methods Reference 176 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Total Bytes/sec Double

Total Operations/sec Double

Context Blocks Queued/sec Double

TIBCO Hawk Methods Reference Performance:Paging File | 177

Performance:Paging File Method

Purpose This method (on Microsoft Windows) returns information on the use of Microsoft Windows paging files to provide virtual memory.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Paging File String Page file name. Exact match. Empty argument string returns information on all paging files.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns el Name Type Instance String. Table is indexed on the Instance field.

% Usage Double

% Usage Peak Double

TIBCO Hawk Methods Reference 178 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:Browser Method

Purpose This method (on Microsoft Windows) returns information on the use of a computer as a server for browser requests.

Type Asynchronous, IMPACT_INFO.

Arguments . Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

Announcements Server/sec Double

Announcements Domain/sec Double

Announcements Total/sec Double

Election Packets/sec Double

Mailslot Writes/sec Double

Server List Requests/sec Double

Enumerations Server/sec Double

Enumerations Domain/sec Double

Enumerations Other/sec Double

Enumerations Total/sec Double

Missed Server Announcements Double

Missed Mailslot Datagrams Double

Missed Server List Requests Double

Server Announce Allocations Failed/sec Double

TIBCO Hawk Methods Reference Performance:Browser | 179

Name Type Mailslot Allocations Failed Double

Mailslot Receives Failed Double

Mailslot Writes Failed Double

Mailslot Opens Failed/sec Double

Duplicate Master Announcements Double

Illegal Datagrams/sec Double

TIBCO Hawk Methods Reference 180 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:Telephony Method

Purpose This method (on Microsoft Windows) returns information on the use of this computer for interacting with telephone devices and maintaining telephone services such as answering services and automated calling services.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Description Instance String Instance. Table is indexed on the Instance field.

Lines Double Lines

Telephone Devices Double Telephone Devices

Active Lines Double Active Lines

Active Telephones Double Active Telephones

Outgoing Calls/sec Double Outgoing calls per second

Incoming Calls/sec Double Incoming calls per second

Client Apps Double Client Applications

Current Outgoing Double Current outgoing calls Calls

TIBCO Hawk Methods Reference Performance:NBT Connection | 181

Performance:NBT Connection Method

Purpose This method (on Microsoft Windows) returns information for data sent over an NBT (NetBIOS over TCP/IP) connection.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description NBT String NBT Connection. The name of the remote Connection computer that is connected to the NBT connection connects.

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on the Instance field.

Bytes Received/sec Double

Bytes Sent/sec Double

Total Bytes/sec Double

TIBCO Hawk Methods Reference 182 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:Network Interface Method

Purpose This method (on Microsoft Windows) returns statistics regarding the specified network interface. If a network interface is not specified, statistics for all network interfaces are returned.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description Network String Network Interface. Interface

TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on Instance.

Bytes Total/sec Double

Packets/sec Double

Packets Received/sec Double

Packets Sent/sec Double

Current Bandwidth Double

Bytes Received/sec Double

Packets Received Unicast/sec Double

Packets Received Non-Unicast/sec Double

Packets Received Discarded Double

Packets Received Errors Double

Packets Received Unknown Double

Bytes Sent/sec Double

Packets Sent Unicast/sec Double

TIBCO Hawk Methods Reference Performance:Network Interface | 183

Name Type Packets Sent Non-Unicast/sec Double

Packets Outbound Discarded Double

Packets Outbound Errors Double

Output Queue Length Double

TIBCO Hawk Methods Reference 184 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:IP Method

Purpose This method (on Microsoft Windows) returns statistics for all IP processes.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data is returned.

Returns Name Type Instance String. Table is indexed on Instance.

Datagrams/sec Double

Datagrams Received/sec Double

Datagrams Received Header Errors Double

Datagrams Received Address Errors Double

Datagrams Received Unknown Double

Datagrams Received Discarded Double

Datagrams Received Delivered/sec Double

Datagrams Sent/sec Double

Datagrams Outbound Discarded Double

Datagrams Outbound No Route Double

Fragments Received/sec Double

Fragments Re-assembled/sec Double

Fragment Re-assembly Failures Double

Fragmented Datagrams/sec Double

Fragmentation Failures Double

Fragments Created/sec Double

TIBCO Hawk Methods Reference Performance:ICMP | 185

Performance:ICMP Method

Purpose This method (on Microsoft Windows) returns statistics for the ICMP processes.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on Instance.

Messages/sec Double

Messages Received/sec Double

Messages Received Errors Double

Received Destination Unreachable Double

Received Time Exceeded Double

Received Parameter Problem Double

Received Source Quench Double

Received Redirect/sec Double

Received Echo/sec Double

Received Timestamp/sec Double

Received Timestamp Reply/sec Double

Received Address Mask Double

Received Address Mask Reply Double

Messages Sent/sec Double

Messages Outbound Errors Double

TIBCO Hawk Methods Reference 186 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Sent Destination Unreachable Double

Sent Time Exceeded Double

Sent Parameter Problem Double

Sent Source Quench Double

Sent Redirect/sec Double

Sent Echo/sec Double

Sent Echo Reply/sec Double

Sent Timestamp/sec Double

Sent Timestamp Reply/sec Double

Sent Address Mask Double

Sent Address Mask Reply Double

TIBCO Hawk Methods Reference Performance:TCP | 187

Performance:TCP Method

Purpose This method (on Microsoft Windows) returns statistics for the TCP processes.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns * Name Type Instance String. Table is indexed on Instance.

Segments/sec Double

Connections Established Double

Connections Active Double

Connections Passive Double

Connection Failures Double

Connections Reset Double

Segments Received/sec Double

Segments Sent/sec Double

Segments Retransmitted/sec Double

TIBCO Hawk Methods Reference 188 | Chapter 3 Microsoft Windows Microagents and Methods

Performance:UDP Method

Purpose This method (on Microsoft Windows) returns statistics for the UDP processes.

Type Asynchronous, IMPACT_INFO.

Arguments Name Type Description TimeInterval Integer Time interval in seconds after which data will be returned.

Returns Name Type Instance String. Table is indexed on Instance.

Datagrams/sec Double

Datagrams Received/sec Double

Datagrams No Port/sec Double

Datagrams Received Errors Double

Datagrams Sent/sec Double

TIBCO Hawk Methods Reference Performance:restart | 189

Performance:restart Method

Purpose This method causes the Performance microagent to restart in order to pick up Windows performance objects that where added after the Performance microagent was originally started. The Performance microagent snap-shots the Windows performance objects at startup and announces methods for each object to the Hawk agent. Performance objects dynamically added to the system after the Performance microagent has announced are not included. Certain applications, such as Microsoft SQL Server, dynamically add performance objects when they are running and remove them when they are not running. Hawk rulebases can now be created that start applications, such as Microsoft SQL Server, restart the Performance microagent to pick up the new performance objects, and then load rulebases designed to monitor these new performance objects.

Type Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

Remarks The restart method only restarts the Performance microagent. All other HMA microagents and the HMA itself are unaffected.

TIBCO Hawk Methods Reference 190 | Chapter 3 Microsoft Windows Microagents and Methods

COM.TIBCO.hawk.hma.Eventlog Microagent

Purpose The Eventlog microagent (on Microsoft Windows) interfaces with the Microsoft Windows event log service, which records three types of events: system events, security events and application events. You can use this microagent’s methods to respond to events as they happen or to retrieve events in any of the three event logs.

Methods Method Description Page Eventlog:getRecentApplicationEvents Returns most recent events in 191 the application event log.

Eventlog:getRecentSystemEvents Returns most recent events in 193 the system event log.

Eventlog:getRecentSecurityEvents Returns most recent events in 195 the security event log.

Eventlog:onApplicationEvent Returns event just added to 197 the application event log.

Eventlog:onSecurityEvent Returns event just added to 199 the security event log.

Eventlog:onSystemEvent Reports events posted to the 201 Microsoft Windows event log.

Eventlog:logEvent Adds the event to the event 203 log.

TIBCO Hawk Methods Reference Eventlog:getRecentApplicationEvents | 191

Eventlog:getRecentApplicationEvents Method

Purpose This method (on Microsoft Windows) provides the 30 most recent events in the Microsoft Windows application event log.

Remarks This method should not be used as a data source for a rule, because subsequent invocation returns the same data. Use onApplicationEvent instead. Composite event identifiers are represented in the result descriptions by the use of double colons between event parameters (source::event).

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Date String Date the event was generated.

Time String Time the event was generated.

Record Integer Record number of the event. Table is indexed on Record.

Event Integer Source-specific ID of the event.

Event Category Integer Source-specific category of the event. The category may be any value between zero and 65535 where zero represents "no category."

Type String Event type. Can be one of the following: • Information • Warning •Error • Audit-Success •Audit-Failure

Source String Event source.

TIBCO Hawk Methods Reference 192 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Strings String Message template merge strings. These strings are merged into the associated message template to form the complete textual description of the event. These strings are always returned even when the associated message template cannot be found.

Text String Complete textual description of the event.

TIBCO Hawk Methods Reference Eventlog:getRecentSystemEvents | 193

Eventlog:getRecentSystemEvents Method

Purpose This method (on Microsoft Windows) provides the 30 most recent in the Microsoft Windows system event log.

Remarks This method should not be used as a data source for a rule, because subsequent invocation returns the same data. For data sources for rules, use Eventlog:onSecurityEvent. Composite event identifiers are represented in the result descriptions by the use of double colons between event parameters (source::event).

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Date String Date the event was generated.

Time String Time the event was generated.

Record Integer Record number of the event. Table is indexed on Record.

Event Integer Source-specific ID of the event.

Event Category Integer Source-specific category of the event. The category may be any value between zero and 65535 where zero represents "no category."

Type String Event type. Can be one of the following: • Information • Warning •Error • Audit-Success •Audit-Failure

Source String Event source.

TIBCO Hawk Methods Reference 194 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Strings String Message template merge strings. These strings are merged into the associated message template to form the complete textual description of the event. These strings are always returned even when the associated message template cannot be found.

Text String Complete textual description of the event.

TIBCO Hawk Methods Reference Eventlog:getRecentSecurityEvents | 195

Eventlog:getRecentSecurityEvents Method

Purpose This method (on Microsoft Windows) provides the 30 most recent events in the Microsoft Windows security event log.

Remarks This method should not be used as a data source for a rule, because subsequent invocation returns the same data. For data sources for rules, use Eventlog:onSecurityEvent instead. Composite event identifiers are represented in the result descriptions by the use of double colons between event parameters (source::event).

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Date String Date the event was generated.

Time String Time the event was generated.

Record Integer Record number of the event. Table is indexed on Record.

Event Integer Source-specific ID of the event.

Event Category Integer Source-specific category of the event. The category may be any value between zero and 65535 where zero represents "no category."

Type String Event type. Can be one of the following: • Information • Warning •Error • Audit-Success •Audit-Failure

Source String Event source.

TIBCO Hawk Methods Reference 196 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Strings String Message template merge strings. These strings are merged into the associated message template to form the complete textual description of the event. These strings are always returned even when the associated message template cannot be found.

Text String Complete textual description of the event.

TIBCO Hawk Methods Reference Eventlog:onApplicationEvent | 197

Eventlog:onApplicationEvent Method

Purpose This method (on Microsoft Windows) reports events as they are asynchronously posted to the Microsoft Windows application event log.

Remarks Composite event identifiers are represented in the result descriptions by the use of double colons between event parameters (source::event).

Type Asynchronous IMPACT_INFO.

Arguments Name Type Description source String Event source

Returns Name Type Description Date String Date the event was generated.

Time String Time the event was generated.

Record Integer Record number of the event. Table is indexed on Record.

Event Integer Source-specific ID of the event.

Event Category Integer Source-specific category of the event. The category may be any value between zero and 65535 where zero represents "no category."

Type String Event type. Can be one of the following: • Information • Warning •Error • Audit-Success •Audit-Failure

Source String Event source.

TIBCO Hawk Methods Reference 198 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Strings String Message template merge strings. These strings are merged into the associated message template to form the complete textual description of the event. These strings are always returned even when the associated message template cannot be found.

Text String Complete textual description of the event.

TIBCO Hawk Methods Reference Eventlog:onSecurityEvent | 199

Eventlog:onSecurityEvent Method

Purpose This method (on Microsoft Windows) reports events as they are asynchronously posted to the Microsoft Windows security event log.

Remarks Use this method as a data source for rules. Composite event identifiers are represented in the result descriptions by the use of double colons between event parameters (source::event).

Type Asynchronous IMPACT_INFO.

Arguments Name Type Description source String Event source.

Returns Name Type Description Date String Date the event was generated.

Time String Time the event was generated.

Record Integer Record number of the event. Table is indexed on Record.

Event Integer Source-specific ID of the event.

Event Category Integer Source-specific category of the event. The category may be any value between zero and 65535 where zero represents "no category."

Type String Event type. Can be one of the following: • Information • Warning •Error • Audit-Success •Audit-Failure

Source String Event source.

TIBCO Hawk Methods Reference 200 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Strings String Message template merge strings. These strings are merged into the associated message template to form the complete textual description of the event. These strings are always returned even when the associated message template cannot be found.

Text String Complete textual description of the event.

TIBCO Hawk Methods Reference Eventlog:onSystemEvent | 201

Eventlog:onSystemEvent Method

Purpose This method (on Microsoft Windows) reports events as they are being asynchronously posted to the Microsoft Windows system event log.

Remarks Composite event identifiers are represented in the result descriptions by the use of double colons between event parameters (source::event).

Type Asynchronous IMPACT_INFO.

Arguments Name Type Description source String Event source.

Returns Name Type Description Date String Date the event was generated.

Time String Time the event was generated.

Record Integer Record number of the event. Table is indexed on Record.

Event Integer Source-specific ID of the event.

Event Category Integer Source-specific category of the event. The category may be any value between zero and 65535 where zero represents "no category."

Type String Event type. Can be one of the following: • Information • Warning •Error • Audit-Success •Audit-Failure

Source String Event source.

TIBCO Hawk Methods Reference 202 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Strings String Message template merge strings. These strings are merged into the associated message template to form the complete textual description of the event. These strings are always returned even when the associated message template cannot be found.

Text String Complete textual description of the event.

TIBCO Hawk Methods Reference Eventlog:logEvent | 203

Eventlog:logEvent Method

Purpose This method adds Event to the Microsoft Windows Application Event Log, using source name TIBHawk.

Remarks The event type is indicated by its event ID in the Microsoft Windows Event Log.

Type Synchronous, IMPACT_ACTION

Arguments Name Type Description Event Type String The type of event, indicated by the event ID in the Microsoft Windows Event Log:

• Information (event ID is 16)

• Error (event ID is 17)

• Warning (event ID is 18)

Event Integer Specifies the source-specific category of this Category event. The category may be any value between zero and 65535 where zero represents "no category."

Description String Complete textual description of this event.

Returns None.

TIBCO Hawk Methods Reference 204 | Chapter 3 Microsoft Windows Microagents and Methods

COM.TIBCO.hawk.hma.Registry Microagent

The Registry microagent (on Microsoft Windows) allows you to interact with the Microsoft Windows Registry.

Methods Method Description Page Registry:setDWORD Creates or overwrites a DWORD 205 entry in the Registry.

Registry:setString Creates or overwrites a string entry in 206 the Registry.

Registry:getDWORD Returns a DWORD value for a key 207 and entry name in the Registry.

Registry:getString Returns a string value for a key and 208 entry name in the Registry.

Registry:getMultiString Returns a multi-line string value for a 209 key and entry name in the Registry.

Registry:setExpandString Creates or overwrites an expandable 210 string entry in the Registry.

Registry:EnumerateKey Enumerates specified key. 211

Registry:CreateKey Adds key to Registry. 212

Registry:setQWORD Creates or overwrites a QWORD 213 entry in the Registry.

Registry:getQWORD Returns a QWORD value for a key 214 and entry name in the Registry.

TIBCO Hawk Methods Reference Registry:setDWORD | 205

Registry:setDWORD Method

Purpose This method (on Microsoft Windows) writes a DWORD entry to the Registry, given a key and value.

Remarks This method works exactly as if you were using the Microsoft Windows Registry editor and chose Add Value, selecting the data type REG_DWORD. The Entry argument of the method corresponds to the Value Name you enter, and the Value argument corresponds to what you type in the DWORD editor.

The Key must exist in the Registry. If the Entry argument is not already in the Registry, a new entry is created and its value set to Value. If the Entry argument exists in the Registry for the specified key, the value of the entry is set to the new value.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Key String Specifies key to change.

Entry String Specifies entry to add or change.

Value Integer Value to set for a specified entry.

Returns None.

TIBCO Hawk Methods Reference 206 | Chapter 3 Microsoft Windows Microagents and Methods

Registry:setString Method

Purpose This method (on Microsoft Windows) writes a string entry to the Registry.

Remarks This method works exactly as if you were using the Microsoft Windows Registry editor and chose Add Value, selecting the data type REG_SZ. The Entry argument of the method corresponds to the Value Name you enter, and the Value argument corresponds to what you type in the String editor.

The Key must exist in the Registry. If the Entry argument is not already in the Registry, a new entry is created and its value set to Value. If the Entry argument exist in the Registry for the specified key, the value of the entry is set to the new value.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Key String Specifies key to change.

Entry String Specifies entry to add or change.

Value Integer Value to set for a specified entry.

Returns None.

TIBCO Hawk Methods Reference Registry:getDWORD | 207

Registry:getDWORD Method

Purpose This method (on Microsoft Windows) returns a DWORD from the Microsoft Windows Registry (of the type REG_DWORD), given a key and entry.

Remarks If no entry is found for the key and entry name, an error is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Key String Specifies key name to look up.

Entry String Specifies name of entry to look up.

Returns Name Type Description Value Integer Specifies value of entry.

TIBCO Hawk Methods Reference 208 | Chapter 3 Microsoft Windows Microagents and Methods

Registry:getString Method

Purpose This method (on Microsoft Windows) returns a string (of the type REG_SZ) from the Microsoft Windows Registry by looking up the key and entry names you supply.

Remarks The method processes REG_EXPAND_SZ strings by expanding any environment variable substitutions. If no entry is found for the key and entry name, an error is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Key String Key to look up.

Entry String Entry to look up.

Returns Name Type Description Value String Value found.

TIBCO Hawk Methods Reference Registry:getMultiString | 209

Registry:getMultiString Method

Purpose This method (on Microsoft Windows) returns a multi string entry from the Registry (of the type REG_MULTI_SZ) by looking up key and entry names you supply.

Remarks The result is a column table of values, each row being a line of the multi string entry. If no entry is found for the key and entry name, an error is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Key String Key to look up.

Entry String Entry to look up.

Returns Name Type Description Value String Value found. (Returns values as a table.) Table is indexed on Value.

Index String The ordinal position of the individual strings in the multistring(1-n). Guarantees unique indexes in cases where the string values of the multistring are not unique.

TIBCO Hawk Methods Reference 210 | Chapter 3 Microsoft Windows Microagents and Methods

Registry:setExpandString Method

Purpose This method (on Microsoft Windows) writes a string with embedded environment variables (of the type REG_EXPAND_SZ) to the Microsoft Windows Registry. Embedded variables are in the form %VARIABLE% and are expanded by Microsoft Windows to fill out the string when it is needed.

Remarks The Key entry must exist in the Registry. If the Entry argument is not already in the Registry, a new entry is created and its value set. If the Entry argument exists in the Registry for the Key specified, the value of the entry is set to the new value.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Key String Key to change.

Entry String Entry to change.

Value String Value to set.

Returns None.

TIBCO Hawk Methods Reference Registry:EnumerateKey | 211

Registry:EnumerateKey Method

Purpose Enumerate specified key. This method returns a table of the top-level key entries, with one row per entry.

Remarks The method processes REG_EXPAND_SZ strings by expanding any environment variable substitutions.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Key String Specifies key name.

Returns Name Type Description Entry String Specifies name of returned entries.

Type String Specifies type of entry. Entry can be of type key, REG_DWORD, REG_SZ, REG_MULTI_SZ, or REG_EXPAND_SZ.

Value String Specifies value of entry.

TIBCO Hawk Methods Reference 212 | Chapter 3 Microsoft Windows Microagents and Methods

Registry:CreateKey Method

Purpose Adds a key to the Registry. This function adds a subkey to the Registry under a specified key.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description RootKey String Parent key. Should be chosen from the following options: HKEY_CLASSES_ROOT HKEY_CURRRENT_CONFIG

HKEY_CURRENT_USER

HKEY_LOCAL_MACHINE HKEY_USERS

Subkey String Subkey to be created.

Returns None.

TIBCO Hawk Methods Reference Registry:setQWORD | 213

Registry:setQWORD Method

Purpose This method (on Microsoft Windows) writes a QWORD entry to the Registry, given a key and value.

Remarks This method works exactly as if you were using the Microsoft Windows Registry editor and chose Add Value, selecting the data type REG_QWORD. The Entry argument of the method corresponds to the Value Name you enter, and the Value argument corresponds to what you type in the QWORD editor.

The Key must exist in the Registry. If the Entry argument is not already in the Registry, a new entry is created and its value set to Value. If the Entry argument exists in the Registry for the specified key, the value of the entry is set to the new value.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Key String Specifies key to change.

Entry String Specifies entry to add or change.

Value Integer Value to set for a specified entry.

Returns None.

TIBCO Hawk Methods Reference 214 | Chapter 3 Microsoft Windows Microagents and Methods

Registry:getQWORD Method

Purpose This method (on Microsoft Windows) returns a QWORD from the Microsoft Windows Registry (of the type REG_QWORD), given a key and entry.

Remarks If no entry is found for the key and entry name, an error is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Key String Specifies key name to look up.

Entry String Specifies name of entry to look up.

Returns Name Type Description Value Integer Specifies value of entry.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Services | 215

COM.TIBCO.hawk.hma.Services Microagent

Purpose This microagent provides for the monitoring and management of Microsoft Windows services and device drivers.

Methods Method Description Page Services:getServiceConfiguration This method gets the current 216 configuration of the specified Microsoft Windows service(s).

Services:getServiceStatus This method gets the current 219 status of the specified Microsoft Windows service(s).

Services:setServiceStartType This method sets the current 221 start type of the specified Microsoft Windows service.

Services:startService This method starts the specified 222 Microsoft Windows service.

Services:stopService This method stops the specified 223 Microsoft Windows service.

Services:pauseService This method pauses the 224 specified Microsoft Windows service.

Services:continueService This method continues the 225 specified Microsoft Windows service.

Services:controlService This method invokes the 226 specified user-defined service control command for the specified Microsoft Windows service.

TIBCO Hawk Methods Reference 216 | Chapter 3 Microsoft Windows Microagents and Methods

Services:getServiceConfiguration Method

Purpose This method gets the current configuration of the specified Microsoft Windows service(s).

Remarks If the Service parameter is blank or set to ALL then all installed Microsoft Windows services are returned. If a specific service is specified, only that Microsoft Windowsservice is returned

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Service String Initial name of Microsoft Windows service.

Returns Name Type Description Service String Microsoft Windows service internal name. *Table is indexed on Service.

Display String Microsoft Windows external display name. Name

Service Type String The type of the Microsoft Windows service. The service types are:

OWN_PROCESS: Indicates a Win32 service that runs in its own process.

INTERACTIVE_OWN_PROCESS: Indicates a Win32 service that runs in its own process and that can interact with the desktop.

SHARE_PROCESS: Indicates a Win32 service that shares a process with other services.

INTERACTIVE_SHARE_PROCESS: Indicates a Win32 service that shares a process with other services and that can interact with the desktop.

KERNEL_DRIVER: Indicates a device driver.

FILE_SYSTEM_DRIVER: Indicates a file system driver.

TIBCO Hawk Methods Reference Services:getServiceConfiguration | 217

Name Type Description Service Start String The start type of the Microsoft Windows service. Type The service types are:

DEMAND_START: Specifies a device driver or Win32 service started by the service control manager when a process calls the StartService function (e.g. Services Control Panel Applet).

AUTO_START: Specifies a device driver or Win32 service started by the service control manager automatically during system startup.

DISABLED: Specifies a device driver or Win32 service that can no longer be started.

BOOT_START: Specifies a device driver started by the system loader.

SYSTEM_START: Specifies a device driver started by the IoInitSystem function.

Service Error String Specifies the severity of the error if this Microsoft Control Windows service fails to start during startup, and determines the action taken by the startup program if failure occurs. The error controls are:

IGNORE: The startup (boot) program logs the error but continues the startup operation.

NORMAL: The startup program logs the error and displays a message box pop-up but continues the startup operation.

SEVERE: The startup program logs the error. If the last-known good configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last known good configuration.

CRITICAL: The startup program logs the error, if possible. If the last-known good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration.

Binary Path String The fully qualified path to the Microsoft Windows service binary file.

TIBCO Hawk Methods Reference 218 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Load Order String The names of the load ordering group of which this Group Microsoft Windows service is a member. If the field is blank the service does not belong to a group.

Tag ID Integer Specifies a unique tag value for this Microsoft Windows service in the group specified by the Load Order Group value. A value of zero indicates that the service has not been assigned a tag.

Account String The account name, in the form of DomainName\Username, which the log-on name of the service process when it is run.

TIBCO Hawk Methods Reference Services:getServiceStatus | 219

Services:getServiceStatus Method

Purpose This method gets the current status of the specified Microsoft Windows service(s). If the Service parameter is blank or set to ALL then all installed Microsoft Windows services are returned. If a specific service is specified then only that Microsoft Windows service is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Service String Internal name of Microsoft Windows service.

Returns Name Type Description Service String Microsoft Windows service internal name. *Table is indexed on Service.

Display String Microsoft Windows external display name. Name

Service Type String The type of the Microsoft Windows service. The service types are:

OWN_PROCESS: Indicates a Win32 service that runs in its own process.

INTERACTIVE_OWN_PROCESS: Indicates a Win32 service that runs in its own process and that can interact with the desktop.

SHARE_PROCESS: Indicates a Win32 service that shares a process with other services.

INTERACTIVE_SHARE_PROCESS: Indicates a Win32 service that shares a process with other services and that can interact with the desktop.

KERNEL_DRIVER: Indicates a device driver.

FILE_SYSTEM_DRIVER: Indicates a file system driver.

TIBCO Hawk Methods Reference 220 | Chapter 3 Microsoft Windows Microagents and Methods

Name Type Description Current String The current state of the Microsoft Windows State service. The service states are:

STOPPED: The service is not running.

START_PENDING: The service is starting.

STOP_PENDING: The service is stopping.

RUNNING: The service is running.

CONTINUE_PENDING: The service continue is pending.

PAUSE_PENDING: The service pause is pending.

PAUSED: The service is paused.

Win32 Exit Integer The error code of the last error returned by the Code Microsoft Windows service.

Exit Code String The description of the last error returned by the Description Microsoft Windows service.

Service Exit Integer The service specific return code from the Code Microsoft Windows service.

Controls String The control commands accepted by the Microsoft Accepted Windows service. If more than one control is specified they are listed in blank-delimited format. The controls accepted may be any combination of the following:

STOP: The service can be stopped.

PAUSE_CONTINUE: The service can be paused and continued.

SHUTDOWN: The service is notified when system shutdown occurs allowing the system to shut down this service.

Check Point Integer The last check point of the Microsoft Windows service.

Wait Hint Integer The last wait hint suggested by the Microsoft Windows service.

TIBCO Hawk Methods Reference Services:setServiceStartType | 221

Services:setServiceStartType Method

Purpose This method sets the current start type of the specified Microsoft Windows service.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Service String Microsoft Windows service internal name.

Service Start String The start type of the Microsoft Windows service. Type Specifies when to start the service. System furnishes a popup window with the following options: DEMAND_START AUTO_START DISABLED BOOT_START SYSTEM_START

Returns None.

TIBCO Hawk Methods Reference 222 | Chapter 3 Microsoft Windows Microagents and Methods

Services:startService Method

Purpose This method starts the specified type of Microsoft Windows service.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Service String Microsoft Windows service internal name.

Returns None.

TIBCO Hawk Methods Reference Services:stopService | 223

Services:stopService Method

Purpose This method stops the specified type of Microsoft Windows service.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Service String Microsoft Windows service internal name.

Returns None.

TIBCO Hawk Methods Reference 224 | Chapter 3 Microsoft Windows Microagents and Methods

Services:pauseService Method

Purpose This method pauses the specified type of Microsoft Windows service.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Service String Microsoft Windows service internal name.

Returns None.

TIBCO Hawk Methods Reference Services:continueService | 225

Services:continueService Method

Purpose This method continues the specified type of Microsoft Windows service.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Service String Microsoft Windows service internal name.

Returns None.

TIBCO Hawk Methods Reference 226 | Chapter 3 Microsoft Windows Microagents and Methods

Services:controlService Method

Purpose This method invokes the specified user-defined service control command for the specified Microsoft Windows service.

Remarks User-defined control command codes must be in the range 128-255.

Type Synchronous, IMPACT_ACTION.

Arguments Name Type Description Service String Microsoft Windows service internal name.

User Control Integer The Microsoft Windows service user-defined control command code.

Returns None.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Process | 227

COM.TIBCO.hawk.hma.Process Microagent

Purpose The process microagent (on Microsoft Windows) returns information about processes running on the system.

Methods Method Description Page Process:getInstanceCount Returns process count for a specified 228 process.

Process:getInstanceCountBy Returns process count filtered by 229 Command command argument.

Process:getProcess Returns information on a process. 230

TIBCO Hawk Methods Reference 228 | Chapter 3 Microsoft Windows Microagents and Methods

Process:getInstanceCount Method

Purpose This method (on Microsoft Windows) returns an instance count for a specified process. If the Instance field is empty, the total process count of the system is returned.

Remarks Test any regular expressions you plan to use in rulebases by first using them interactively to insure they return the desired results.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Name of process instance.

Returns Name Type Description Process Name String Name of process instance. Table is indexed on Process Name.

Process Count Integer Process count for specified process.

TIBCO Hawk Methods Reference Process:getInstanceCountByCommand | 229

Process:getInstanceCountByCommand Method

Purpose This method (on Microsoft Windows) returns a count of processes, filtered by command argument.

Remarks Regular expressions can be used to query status of a group of processes.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Command String Command-line argument.

Returns Name Type Description Command String Command-line argument.

Process Count Integer Process count for specified command.

TIBCO Hawk Methods Reference 230 | Chapter 3 Microsoft Windows Microagents and Methods

Process:getProcess Method

Purpose This method (on Microsoft Windows) returns information about a specified process.

Remarks If the argument field is empty, data is returned for all processes running on the system. Test any regular expressions you plan to use in rulebases. Use them interactively first, to ensure they return the desired results.

The methods Performance:Process and Process:getProcess can seem similar, but return different data. Performance:Process returns all Instances of Process Object from the Performance Data Helper (PDH) library. Invoking Performance:process without any arguments retrieves all Process instances in effect at that point in time. Invoking Process:getProcess without any arguments returns all currently running processes from the PSAPI.lib. This method only lists processes that have the right to access this library. Do not confuse these methods.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Name of process instance. Empty argument returns information for all processes.

Returns Name Type Description Process Name String Name of process instance.

ID Process Integer Process ID for current process. Table is indexed on ID Process.

Parent Process ID Integer Parent process ID of the current process.

Command String Command line arguments.

CPU Time Integer Total amount of time the process has spent in User Mode plus Kernel Mode (in milliseconds).

Class String Process priority class.

TIBCO Hawk Methods Reference Process:getProcess | 231

Name Type Description User Name String Account name for the process.

Mem Usage Integer Memory usage in kilobytes (working set size).

Peak Working Integer Peak working set size in kilobytes. SetSize

Page File Usage Integer Page File usage in kilobytes.

Page Fault Count Integer Page Fault count.

Start Time Integer The number of seconds since the process started.

TIBCO Hawk Methods Reference 232 | Chapter 3 Microsoft Windows Microagents and Methods

TIBCO Hawk Methods Reference | 233

Chapter 4 Solaris Microagents and Methods

The TIBCO Hawk microagents described in this chapter run on the Solaris platform in the HMA process. For more specific information on monitoring on Solaris, see the TIBCO Hawk Administrator’s Guide.

Topics

• Summary of Solaris Microagents, page 234 • Common Methods on Solaris, page 236 • COM.TIBCO.hawk.hma.System, page 243 • COM.TIBCO.hawk.hma.Process, page 249 • COM.TIBCO.hawk.hma.FileSystem, page 253 • COM.TIBCO.hawk.hma.Network, page 258

TIBCO Hawk Methods Reference 234 | Chapter 4 Solaris Microagents and Methods

Summary of Solaris Microagents

The Solaris microagents are described as follows.

Table 4 Solaris Microagents (Sheet 1 of 2) Microagent Description Common Methods These methods are common to several Solaris Microagents. These methods are: These methods are common to the getReleaseVersion following Solaris getTraceLevel Microagents: setTraceLevel System getTraceParameters Process setTraceParameters FileSystem _onUnsolicitedMsg Network

System Used to collect information on system-wide usage of the CPU and memory. Methods are: System:getCpuInfo System:getSwapInfo System:getTunableInfo System:getSystemInfo

Process Used to obtain information about processes running on the system. Methods are: Process:getProcess Process:getInstanceCount Process:getInstanceCountByCommand

FileSystem Used to obtain information about file systems connected to the computer. Methods are: FileSystem:getByPartition FileSystem:getByMountPoint FileSystem:getByFileSystem

TIBCO Hawk Methods Reference Summary of Solaris Microagents | 235

Table 4 Solaris Microagents (Sheet 2 of 2) Microagent Description Network Used to obtain information about network identification, communications and errors. Methods are: Network:getStatistics Network:getConfig

TIBCO Hawk Methods Reference 236 | Chapter 4 Solaris Microagents and Methods

Common Methods on Solaris

The following methods are uniform across the System, Process, FileSystem, and Network microagents.

Method Description Page getReleaseVersion Returns version information. 237

getTraceLevel Gets trace level. 238

setTraceLevel Sets tracing bits. 239

getTraceParameters Gets the tracing parameters 240 information.

setTraceParameters Sets the tracing parameters. 241

_onUnsolicitedMsg Returns unsolicited notifications. 242

TIBCO Hawk Methods Reference getReleaseVersion | 237 getReleaseVersion Method

Purpose This method (on Solaris) returns current release version information for this microagent.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Name String The release name.

Version String Version number of the release.

Date String Version date of the release.

Major Number String Major number of release.

Minor Number String Minor number of release.

Update String Release version update number.

TIBCO Hawk Methods Reference 238 | Chapter 4 Solaris Microagents and Methods

getTraceLevel Method

Purpose This method (on Solaris) returns the trace level settings.

Type Synchronous, IMPACT_INFO.

Arguments None.

Result s Name Type Description Information String Information trace setting, on or off value.

Warning String Warning trace setting, on or off value.

Error String Error trace setting, on or off value.

Debug String Debug trace setting, on or off value.

AMI String AMI debug trace setting, on or off value.

Stamp String File/line stamp trace output, on or off value.

TIBCO Hawk Methods Reference setTraceLevel | 239 setTraceLevel Method

Purpose This method (on Solaris) sets the trace level bits.

Type Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description Information String Information trace setting, on or off value.

Warning String Warning trace setting, on or off value.

Error String Error trace setting, on or off value.

Debug String Debug trace setting, on or off value.

AMI String AMI debug trace setting, on or off value.

Stamp String NEED DESCRIPTION

Returns None.

TIBCO Hawk Methods Reference 240 | Chapter 4 Solaris Microagents and Methods

getTraceParameters Method

Purpose This method (on Solaris) returns tracing parameter information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Directory String Trace file directory.

File Name String Trace file name.

Max File Size String Maximum size of trace file before rollover (kilobytes).

Max Trace File Integer Maximum number of trace files to keep in trace directory.

TIBCO Hawk Methods Reference setTraceParameters | 241 setTraceParameters Method

Purpose This method (on Solaris) sets tracing parameters.

Remarks: Use string current for keeping the current setting for string parameters and use integer value 0 for keeping the current setting for integer parameters.

Type Synchronous, IMPACT_ACTION_INFO.

Arguments Name Type Description Directory String Trace file directory.

File Name String Trace file name.

Max File Size String Maximum size of trace file before rollover (in kilobytes).

Max Trace File Integer Maximum trace files to keep in trace directory.

Returns None.

TIBCO Hawk Methods Reference 242 | Chapter 4 Solaris Microagents and Methods

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on Solaris) returns any unsolicited information, warning, or error messages that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

Type Asynchronous IMPACT_INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.System | 243

COM.TIBCO.hawk.hma.System Microagent

Purpose The System microagent (on Solaris) collects information on system-wide usage of the CPU and memory, summarizing all processes on the computer.

Methods Method Description Page System:getSystemInfo Returns information on process 244 management.

System:getCpuInfo Returns information on CPU utilization. 246

System:getSwapInfo Returns information on system swap 247 space.

System:getTunableInfo Returns tunable system information. 248

TIBCO Hawk Methods Reference 244 | Chapter 4 Solaris Microagents and Methods

System:getSystemInfo Method

Purpose This method (on Solaris) returns process management information, including process swapping and run queuing.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Run Queue Size Integer Average size of run queue multiplied by 100.

Avg Running Double One minute average number of running processes.

CPU Utilization Integer Percentage of time there is at least one runnable process.

Avg Swapped Out Integer Average number of processes swapped out multiplied by 100.

% Time Swapped Integer Percentage of time there is at least one Out process swapped out.

Avg Wait I/O Integer Average number of processes waiting for I/O multiplied by 100.

% User Time Integer Percentage of the time spent in user mode, averaged among all processors.

% System Time Integer Percentage of time spent in system mode, averaged among all processors.

% Time Idle Integer Percentage of time spent in idle mode, averaged among all processors.

% Time wait Integer Percentage of time spent in wait mode, averaged among all processors.

Up Time Integer The system up time in seconds (Time since last reboot).

Real Memory Long Total physical memory in KBytes.

TIBCO Hawk Methods Reference System:getSystemInfo | 245

Name Type Description Free Memory Long Total free memory in KBytes.

% Free Real Memory Long Percentage of free real memory.

TIBCO Hawk Methods Reference 246 | Chapter 4 Solaris Microagents and Methods

System:getCpuInfo Method

Purpose This method (on Solaris) returns information on system CPU utilization.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Processor Integer Processor (slot) number. Table is indexed on Processor.

% User Time Integer Time spent when in the user mode.

% System Time Integer Time spent when in the system.

% Time Idle Integer Time spent in idle mode.

% Time Wait Integer Time spent in wait mode.

% Time Wait I/O Integer Time spent in wait I/O state.

% Time Wait Swap Integer Time spent in wait swap state.

% Time Wait Physical I/O Integer Time spent in wait physical I/O state.

Physical Reads Integer Physical block reads.

Physical Writes Integer Physical block writes.

Logical Reads Integer Logical block reads.

Logical Writes Integer Logical block writes.

Raw Reads Integer Raw I/O reads

Raw Writes Integer Raw I/O writes

Context Switches Integer Context switches

Device Interrupts Integer Device interrupts

TIBCO Hawk Methods Reference System:getSwapInfo | 247

System:getSwapInfo Method

Purpose This method (on Solaris) returns information on the utilization of system swap space.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Descriptions Avg KBytes Free Double Average free memory (kilobytes).

Avg KBytes Double Average reserved swap space (kilobytes). Reserved

Avg KBytes Double Average allocated swap space (kilobytes). Allocated

Avg KBytes Double Average unreserved swap space (kilobytes). Unreserved

Avg KBytes Double Average unallocated swap space (kilobytes). Unallocated

% Avg Reserved Double Average reserved swap space (%).

% Avg Available Double Average available swap space (%).

Swap Used Long Used swap space (Kilobytes).

Swap Free Long Free swap space (Kilobytes).

Swap Total Long Total swap space (Kilobytes).

TIBCO Hawk Methods Reference 248 | Chapter 4 Solaris Microagents and Methods

System:getTunableInfo Method

Purpose This method (on Solaris) returns tunable system information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description I/O Buffers Integer Number of I/O buffers.

Max Processes Integer Max number of processes system wide. System

Max User Processes Integer Max user processes system wide. System

Max Processes User Integer Max number of processes per user.

Hash Buffers Integer Number of hash buffers to allocate.

Hash mask Integer Hash mask for buffers.

Physical Memory Integer Maximum physical memory to use. If zero, use all available memory.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Process | 249

COM.TIBCO.hawk.hma.Process Microagent

Purpose The Process microagent (on Solaris) furnishes information about processes running on the system.

Methods Method Description Page Process:getProcess Returns information on a process. 250

Process:getInstanceCount Returns the instance count. 251

Process:getInstanceCount Returns the number of instances of a 252 ByCommand specific process.

TIBCO Hawk Methods Reference 250 | Chapter 4 Solaris Microagents and Methods

Process:getProcess Method

Purpose This method (on Solaris) returns a process table filtered by the Process Name argument.

Remarks The process name argument is a pattern match using regular expressions. Test any regular expressions you plan to use in rulebases by first using them interactively to insure they return the desired results.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Empty argument string returns information for all processes.

Returns Name Type Description Process Name String Process name. Table is indexed on ID Process.

ID Process Integer Process ID.

Parent Process Integer Parent process ID of the current process. ID

User Name String User name.

Virtual KBytes Integer The size of virtual address space, in kilobytes.

Stack KBytes Integer Stack size, in kilobytes.

Heap KBytes Integer Heap size, in kilobytes.

CPU Time Integer CPU usage (user plus system, in milliseconds).

% CPU Integer CPU usage in percent.

% Memory Integer Memory usage in percent.

Class String Scheduling class ID.

Command String Full command line as given by UNIX ps -ef command. Truncated to 80 characters.

Start Time Integer The number of seconds since the process started.

TIBCO Hawk Methods Reference Process:getInstanceCount | 251

Process:getInstanceCount Method

Purpose This method (on Solaris) returns an instance count for the process denoted by the Process Name argument.

Remarks Test any regular expressions you plan to use in rulebases by first using them interactively, to insure they return the desired results.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process String Process name. Pattern match with regular Name expressions. Empty argument string returns combined instance count for all processes.

Returns Name Type Description Process Name String Process name. Table is indexed on Process Name.

Process Count Integer Number of instances.

TIBCO Hawk Methods Reference 252 | Chapter 4 Solaris Microagents and Methods

Process:getInstanceCountByCommand Method

Purpose This method (on Solaris) returns a count of processes, filtered by command argument.

Remarks Regular expressions can be used to query status of a group of processes.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Command String Command-line arguments.

Returns Name Type Description Command String Command-line argument.

Process Count Integer Process count for specified command.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.FileSystem | 253

COM.TIBCO.hawk.hma.FileSystem Microagent

Purpose The FileSystem microagent (on Solaris) furnishes information about file systems connected to the computer.

Methods Method Description Page FileSystem:getByPartition Returns information on a file system 254 for its partition name.

FileSystem:getByMountPoint Returns information on a file system 255 for its mount point.

FileSystem:getByFileSystem Returns utilization statistics for the 256 currently mounted filesystems.

TIBCO Hawk Methods Reference 254 | Chapter 4 Solaris Microagents and Methods

FileSystem:getByPartition Method

Purpose This method (on Solaris) provides utilization statistics for currently mounted file systems, filtered by the device given as the Partition argument. Information will be listed for only local partitions with non-zero data blocks.

Remarks NFS mounted file systems are ignored and should be monitored by agents running on the file servers themselves. Invoke interactively with no argument to obtain valid arguments.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Partition String Device name (hard disk partition). Pattern match with regular expressions. Empty argument string returns information for all partitions.

Returns Name Type Description Partition String Device name of a hard disk partition. Table is indexed on Partition.

Mount Point String Mount point for device.

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Long Amount of disk space on the mounted file system Used currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

% Minimum Integer Minimum Percentage free

TIBCO Hawk Methods Reference FileSystem:getByMountPoint | 255

FileSystem:getByMountPoint Method

Purpose This method (on Solaris) provides utilization statistics for currently mounted file systems filtered by the mount point given as the argument Mount Point. Information will be listed for only local partitions with non-zero data blocks .

Remarks NFS mounted file systems are ignored and should be monitored by agents running on the file servers themselves. Invoke interactively with an empty string, to obtain valid arguments.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Mount String Name of directory where file system is mounted. Point Pattern match with regular expressions. Empty argument returns information for all mount points.

Returns Name Type Description Partition String Device name of a hard disk partition.

Mount Point String Mount point of device. Table is indexed on Mount Point.

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

% Minimum Integer Minimum Percentage free

TIBCO Hawk Methods Reference 256 | Chapter 4 Solaris Microagents and Methods

FileSystem:getByFileSystem Method

Purpose This method (on Solaris) provides utilization statistics for the currently mounted filesystems filtered by device name and file system type. The argument is treated as a pattern to match. If no argument is specified, the entire mount table is reported.

For any filesystem that does not respond within five seconds, the data values for % Free and % Used are considered stale and their values are set to -1.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description File System String Name of the file system type. Type

Returns Name Type Description Partition String Device name of a hard disk partition.

Mount Point String Mount point of device. Table is indexed on Mount Point.

File System String Name of the file system type. Type

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

TIBCO Hawk Methods Reference FileSystem:getByFileSystem | 257

Name Type Description % Minimum Integer Minimum Percentage free.

TIBCO Hawk Methods Reference 258 | Chapter 4 Solaris Microagents and Methods

COM.TIBCO.hawk.hma.Network Microagent

Purpose The Network microagent (on Solaris) furnishes information about network utilization statistics, identification, communications, and errors.

Methods Method Description Page Network:getStatistics Returns network performance 259 information.

Network:getConfig Returns information on network 260 addresses and masks.

TIBCO Hawk Methods Reference Network:getStatistics | 259

Network:getStatistics Method

Purpose This method (on Solaris) returns network performance information similar to that returned by netstat.

Remarks All statistics are for the lifetime of the system (since system boot time).

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Input Packets Integer Packets received on the interface, lifetime total.

Input Packet Errors Integer Input errors on the interface, lifetime total.

Output Packets Integer Packets sent on the interface, lifetime total.

Output Packet Errors Integer Output errors on the interface, lifetime total.

Network Collisions Integer Collisions, lifetime total.

Framing Errors Integer Framing errors, lifetime total.

CRC Errors Integer Checksum errors, lifetime total.

Input Packets Missed Integer Receive missed, lifetime total.

Collision Retry Errors Integer Collision retry errors, lifetime total.

No Carrier Errors Integer No carrier, lifetime total.

% Network Double Rate (percentage) of collisions against total Collisions number of output packets (lifetime totals).

TIBCO Hawk Methods Reference 260 | Chapter 4 Solaris Microagents and Methods

Network:getConfig Method

Purpose This method (on Solaris) returns network configuration information in a manner similar to that returned by the ifconfig command.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface.

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Network Address String Network address.

Broadcast Address String Broadcast address for the interface.

Network Mask String Network mask for the interface.

TIBCO Hawk Methods Reference | 261

Chapter 5 HP-UX Microagents and Methods

The TIBCO Hawk microagents described in this chapter run on the HP-UX platform in the HMA process. For more specific information on monitoring on HP-UX, see the TIBCO Hawk Administrator’s Guide

Topics

• Summary of HP-UX Microagents, page 262 • Common Methods on HP-UX, page 264 • COM.TIBCO.hawk.hma.System, page 268 • COM.TIBCO.hawk.hma.Process, page 276 • COM.TIBCO.hawk.hma.FileSystem, page 280 • COM.TIBCO.hawk.hma.Network, page 286

TIBCO Hawk Methods Reference 262 | Chapter 5 HP-UX Microagents and Methods

Summary of HP-UX Microagents

The HP-UX microagents are described as follows.

Table 5 HP-UX Microagents (Sheet 1 of 2) Microagent Description Common Methods These methods are common to several HP-UX Microagents. These methods are: These methods are common to the getTraceLevel following HP-UX setTraceLevel Microagents: _onUnsolicitedMsg System Network

System Used to collect information on system-wide usage of the CPU and memory. Methods are: System:getSystemInfo System:getCpuInfo System:getSwapInfo System:getTunableInfo

Process Used to obtain information about processes running on the system. Methods are: Process:getProcess Process:getInstanceCount Process:getInstanceCountByCommand

FileSystem Used to obtain information about file systems connected to the computer. Methods are: FileSystem:getByPartition FileSystem:getByMountPoint FileSystem:getByFileSystem

TIBCO Hawk Methods Reference Summary of HP-UX Microagents | 263

Table 5 HP-UX Microagents (Sheet 2 of 2) Microagent Description Network Used to obtain information about network identification, communications, and errors. Methods are: Network:getConfig Network:getStatistics

TIBCO Hawk Methods Reference 264 | Chapter 5 HP-UX Microagents and Methods

Common Methods on HP-UX

The following methods are uniform across the System and Network microagents.

Method Description Page getTraceLevel Gets trace level. 265

setTraceLevel Sets tracing bits. 266

System:getSystemInfo Returns unsolicited notifications. 267

TIBCO Hawk Methods Reference getTraceLevel | 265 getTraceLevel Method

Purpose This method (on HP-UX) returns the trace level settings.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Information String Information trace setting, on or off value

Warning String Warning trace setting, on or off value

Error String Error trace setting, on or off value

Debug String Debug trace setting, on or off value

AMI Debug String AMI debug trace setting, on or off value

TIBCO Hawk Methods Reference 266 | Chapter 5 HP-UX Microagents and Methods

setTraceLevel Method

Purpose This method (on HP-UX) sets the trace level bits.

Type Synchronous, IMPACT_ACTION_INFO

Arguments None.

Returns Name Type Description Information String Information trace setting, on or off value

Warning String Warning trace setting, on or off value

Error String Error trace setting, on or off value

Debug String Debug trace setting, on or off value

AMI Debug String AMI debug trace setting, on or off value

TIBCO Hawk Methods Reference _onUnsolicitedMsg | 267

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on HP-UX) returns any unsolicited information, warning, or error messages that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

Type Asynchronous IMPACT_INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

INBOX String An inbox address used to send the message.

TIBCO Hawk Methods Reference 268 | Chapter 5 HP-UX Microagents and Methods

COM.TIBCO.hawk.hma.System Microagent

Purpose The System microagent (on HP-UX) is used to collect information on system-wide usage of the CPU and memory, summarizing all processes on the computer.

Methods Method Description Page System:getSystemInfo Returns information on process 269 managing.

System:getCpuInfo Returns information on processor 271 activity.

System:getSwapInfo Returns information on system swap 272 space.

System:getTunableInfo Returns tunable system information. 273

System:getTraceParameters Returns trace level information. 274

System:setTraceParameters Returns trace parameter information. 275

TIBCO Hawk Methods Reference System:getSystemInfo | 269

System:getSystemInfo Method

Purpose This method (on HP-UX) returns information that pertains to multi-tasking process management by the system, including process swapping and run queuing. It also returns information on memory use (real and virtual).

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Processors Integer Number of active processors.

Run Queue Size Integer Length of run queue.

Disk Wait Integer Jobs in disk wait.

Page Wait Integer Jobs in page wait.

Sleeping Integer Jobs sleeping in core.

Swapped Out Integer Swapped out runnable jobs.

Avg Running Double Avg Running (1 min).

Avg Running (5 min) Double Avg Running (5 min).

Avg Running 15 min) Double Avg Running (15 min).

% User Time Integer Percent of the time currently run processes execute in user mode.

% System Time Integer Percent of the time currently run processes execute in kernel mode.

% Time Idle Integer Percent of the time wait process is the currently- running process.

% Time Wait Integer Percent of the time currently-running processes wait for block I/O to complete.

Context Switches Integer Number of context switches.

Device Interrupts Integer Number of device interrupts.

TIBCO Hawk Methods Reference 270 | Chapter 5 HP-UX Microagents and Methods

Name Type Description Up Time Integer System up time in seconds.

Real Memory Long Total physical memory in KBytes.

Free Memory Long Total free memory in KBytes.

% Free Real Memory Integer Percent of the Free Real Memory.

TIBCO Hawk Methods Reference System:getCpuInfo | 271

System:getCpuInfo Method

Purpose This method (on HP-UX) returns information on processor activity for all processors on the computer.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Processor Integer Processor (slot) number.

Logical Reads Integer Logical Reads.

Logical Writes Integer Logical Writes.

NFS Reads Integer NFS Reads.

NFS Writes Integer NFS Writes.

Raw Reads Integer Raw Reads.

Raw Writes Integer Raw Writes.

% User Time Integer Percent of the time currently run processes execute in user mode.

% System Time Integer Percent of the time currently run processes execute in kernel mode.

% Time Idle Integer Percent of the time wait process is the currently- running process.

% Time Wait Integer Percent of the time currently-running processes wait for block I/O to complete.

TIBCO Hawk Methods Reference 272 | Chapter 5 HP-UX Microagents and Methods

System:getSwapInfo Method

Purpose This method (on HP-UX) returns information on the utilization of system swap space.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Avg KBytes Free Integer Average free memory, in KB.

Avg KBytes Integer Average unallocated swap space, in KB. Unallocated

KBytes Used Integer Kilobytes used.

KBytes Total Integer Kilobytes total.

% Free Double Percentage free.

% Used Double Percentage used.

TIBCO Hawk Methods Reference System:getTunableInfo | 273

System:getTunableInfo Method

Purpose This method (on HP-UX) returns tunable system information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Maximum Processes Integer Maximum Processes.

Boot Time Integer Boot Time.

Physical Memory Integer Physical Memory.

Page Size Integer Page Size.

Maximum Memory Integer Maximum Memory.

Maximum Inodes Integer Maximum Inodes.

Maximum Files Integer Maximum Files.

TIBCO Hawk Methods Reference 274 | Chapter 5 HP-UX Microagents and Methods

System:getTraceParameters Method

Purpose This method (on HP-UX) returns tracing parameter information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Directory String Trace file directory.

File Name String Trace file name.

Max File Size String Maximum size of trace file before rollover (kilobytes).

Max Trace File Integer Maximum number of trace files to keep in trace directory.

TIBCO Hawk Methods Reference System:setTraceParameters | 275

System:setTraceParameters Method

Purpose This method (on HP-UX) sets tracing parameters.

Remarks: Use string current for keeping the current setting for string parameters and use integer value 0 for keeping the current setting for integer parameters.

Type Synchronous, IMPACT_ACTION_INFO.

Arguments Name Type Description Directory String Trace file directory.

File Name String Trace file name.

Max File Size String Maximum size of trace file before rollover (in kilobytes).

Max Trace File Integer Maximum trace files to keep in trace directory.

Returns None.

TIBCO Hawk Methods Reference 276 | Chapter 5 HP-UX Microagents and Methods

COM.TIBCO.hawk.hma.Process Microagent

Purpose The Process microagent (on HP-UX) furnishes information about processes running on the system.

Methods Method Description Page Process:getProcess Returns information on a process. 277

Process:getInstanceCount Returns the number of instances of a 278 process.

Process:getInstanceCountBy Returns a count of processes, filtered 279 Command by command argument.

TIBCO Hawk Methods Reference Process:getProcess | 277

Process:getProcess Method

Purpose This method (on HP-UX) returns a process table filtered by the Process Name argument.

Remarks Test any regular expressions you plan to use in rulebases by first using them interactively to insure they return the desired results.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Pattern match with regular expressions. Empty argument returns information for all processes.

Returns Name Type Description Process Name String Process name. Table is indexed on ID Process.

ID Process Integer The process ID of the process (this datum required in order to kill the process).

Parent Process ID Integer Parent process ID of the current process.

User Name String Effective user name of the process.

Virtual KBytes Integer The size of virtual address space (kilobytes).

Stack KBytes Integer The size of the process’s stack (kilobytes).

% CPU Integer The ratio of CPU time used recently to CPU time available in the same period (the meaning of “recently” in this context is unspecified; the CPU time available is determined in an unspecified manner).

Command String The command with all its arguments as a string, as with ps -ef. Truncated to 58 characters.

CPU Time Integer CPU usage (user time + system time) in milliseconds.

TIBCO Hawk Methods Reference 278 | Chapter 5 HP-UX Microagents and Methods

Process:getInstanceCount Method

Purpose This method (on HP-UX) returns an instance count for the process denoted by the Process Name argument.

Remarks Test any regular expressions you plan to use in rulebases by first using them interactively to insure they return the desired results.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Pattern match with regular expressions. Empty argument string returns combined instance count for all processes.

Returns Name Type Description Process Name String Process name.

Process Count Integer Instance count for a currently running process.

TIBCO Hawk Methods Reference Process:getInstanceCountByCommand | 279

Process:getInstanceCountByCommand Method

Purpose This method (on HP-UX) returns a count of processes, filtered by command argument.

Remarks Regular expressions can be used to query status of a group of processes.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Command String Command-line argument.

Returns Name Type Description Command String Command-line argument.

Process Count Integer Process count for specified command.

TIBCO Hawk Methods Reference 280 | Chapter 5 HP-UX Microagents and Methods

COM.TIBCO.hawk.hma.FileSystem Microagent

Purpose The FileSystem microagent (on HP-UX) furnishes information about file systems connected to the computer.

Methods Method Description Page FileSystem:getByPartition Returns information on a file system 281 for its partition name.

FileSystem:getByMountPoint Returns information on a file system 283 for its mount point.

FileSystem:getByFileSystem Returns utilization statistics for the 285 currently mounted filesystems.

TIBCO Hawk Methods Reference FileSystem:getByPartition | 281

FileSystem:getByPartition Method

Purpose This method (on HP-UX) provides utilization statistics for currently mounted file systems filtered by the device given as the Partition argument. Information will be listed for only local partitions with non-zero data blocks.

Remarks NFS mounted file systems are ignored and should be monitored by agents running on the file servers themselves. Invoke interactively with no argument to obtain valid arguments.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Partition String Device name (hard disk partition). Pattern match with regular expressions. Empty argument string returns information for all partitions.

Returns Name Type Description Partition String Device name of a hard disk partition. Table is indexed on Partition.

Mount String Mount Point Point

% Free Integer Amount of disk space currently free on the mounted file system, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (KB).

KBytes Long Amount of disk space on the mounted file system Used currently in use, expressed as absolute value (KB).

KBytes Long Total amount of disk space on mounted file system Total (KB).

TIBCO Hawk Methods Reference 282 | Chapter 5 HP-UX Microagents and Methods

Name Type Description % Integer Minimum percentage free. Minimum

TIBCO Hawk Methods Reference FileSystem:getByMountPoint | 283

FileSystem:getByMountPoint Method

Purpose This method (on HP-UX) provides utilization statistics for currently mounted file systems filtered by the mount point given as the argument Mount Point. Information will be listed for only local partitions with non-zero data blocks.

Remarks NFS mounted file systems are ignored and should be monitored by agents running on the file servers themselves. Invoke interactively with no argument to obtain valid arguments.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Mount String Name of the directory where file system is mounted. Point Pattern match with regular expressions. Empty argument string returns information for all mount points.

Returns Name Type Description Partition String “Device” name of a hard disk partition.

Mount Point String Mount Point. Table is indexed on Mount Point.

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

TIBCO Hawk Methods Reference 284 | Chapter 5 HP-UX Microagents and Methods

Name Type Description % Minimum Integer Minimum percentage free.

TIBCO Hawk Methods Reference FileSystem:getByFileSystem | 285

FileSystem:getByFileSystem Method

Purpose This method (on HP-UX) provides utilization statistics for the currently mounted filesystems filtered by device name and file system type. The argument is treated as a pattern to match. If no argument is specified, the entire mount table is reported.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description File System String Name of the file system type. Type

Returns Name Type Description Partition String Device name of a hard disk partition.

Mount Point String Mount point of device. Table is indexed on Mount Point.

File System String Name of the file system type. Type

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

% Minimum Integer Minimum Percentage free.

TIBCO Hawk Methods Reference 286 | Chapter 5 HP-UX Microagents and Methods

COM.TIBCO.hawk.hma.Network Microagent

Purpose The Network microagent (on HP-UX) furnishes information about network identification.

Methods Method Description Page Network:getConfig Returns information on network 287 addresses and masks.

Network:getStatistics Returns network performance 288 information.

TIBCO Hawk Methods Reference Network:getConfig | 287

Network:getConfig Method

Purpose This method (on HP-UX) returns network configuration information similar to that returned by ifconfig.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Network Address String Network address

Broadcast Address String Broadcast address for the interface

Network Mask String Network mask for the interface

TIBCO Hawk Methods Reference 288 | Chapter 5 HP-UX Microagents and Methods

Network:getStatistics Method

Purpose This method returns network performance information similar to that returned by netstat.

Remarks All statistics are for the lifetime of the system (since it was booted).

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface

Returns Name Type Description % Network Collisions Double Rate (percentage) of collisions against total number of output packets, lifetime totals.

Abort Trans Errors Long IEEE 802.5 Abort Trans Errors

AC Errors Long IEEE 802.5 AC Errors

Burst Errors Long IEEE 802.5 Burst Errors

Carrier Sense Errors Long IEEE 802.3 Carrier Sense Errors

Control Field Errors Long IEEE 802.3 Control Field Errors

CRC Errors Long Checksum errors, lifetime total

Deferred Long IEEE 802.3 Deferred Transmissions Transmissions

Discards Integer Discards, lifetime total

Excessive Collisions Long IEEE 802.3 Excessive Collisions

FCS Errors Long IEEE 802.3 FCS Errors

Frame Copied Errors Long IEEE 802.5 Frame Copied Errors

Frame Too Longs Long IEEE 802.3 Frame Too Longs

Framing Errors Long Framing errors, lifetime total

TIBCO Hawk Methods Reference Network:getStatistics | 289

Name Type Description Hard Errors Long IEEE 802.5 Hard Errors

Input Packet Errors Integer Input errors on the interface, lifetime total

Input Packets Integer Packets received on the interface, lifetime total

Interface Name String Name of the network interface

Internal Errors Long IEEE 802.5 Internal Errors

Internal Mac Receive Long IEEE 802.3 Internal Mac Receive Errors Errors

Internal Mac Transmit Long IEEE 802.3 Internal Mac Transmit Errors Errors

Late Collisions Long IEEE 802.3 Late Collisions

Line Errors Long IEEE 802.5 Line Errors

Lost Frame Errors Long IEEE 802.5 Lost Frame Errors

Multicasts Accepted Long IEEE 802.3 Multicasts Accepted

Multiple Collision Long IEEE 802.3 Multiple Collision Frames Frames

Network Collisions Integer Collisions, lifetime total

Output Packet Errors Integer Output errors on the interface, lifetime total

Output Packets Integer Packets sent on the interface, lifetime total

Receive Congestions Long IEEE 802.5 Receive Congestions

Signal Loss Long IEEE 802.5 Signal Loss

Single Collision Long IEEE 802.3 Single Collision Frames Frames

Soft Errors Long IEEE 802.5 Soft Errors

SQE Test Errors Long IEEE 802.3 SQE Test Errors

Stats Alignment Errors Long IEEE 802.3 Stats Alignment Errors

TIBCO Hawk Methods Reference 290 | Chapter 5 HP-UX Microagents and Methods

Name Type Description Token Errors Long IEEE 802.5 Token Errors

Unknown Protos Integer Unknown Protocol frames, lifetime total

TIBCO Hawk Methods Reference | 291

Chapter 6 AIX Microagents and Methods

The TIBCO Hawk microagents described in this chapter run on the IBM AIX platform in the HMA process. For more specific information on monitoring on AIX, see the TIBCO Hawk Administrator’s Guide.

Topics

• Summary of AIX Microagents, page 292 • COM.TIBCO.hawk.hma.System, page 294 • COM.TIBCO.hawk.hma.Process, page 299 • COM.TIBCO.hawk.hma.FileSystem, page 303 • COM.TIBCO.hawk.hma.Network, page 307

TIBCO Hawk Methods Reference 292 | Chapter 6 AIX Microagents and Methods

Summary of AIX Microagents

The AIX-specific microagents are described as follows.

Table 6 AIX Microagents Microagent Description Common Methods, Provides unsolicited message processing common to This method is several microagents. Methods are: common to the _onUnsolicitedMsg following Linux microagents: System Filesystem Network Process

System Used to collect information on system-wide usage of the CPU. Methods are: System:getCpuInfo System:getSwapInfo System:getSystemInfo

Process Used to obtain information about processes running on the system. Methods are: Process:getProcess Process:getInstanceCount Process:getInstanceCountByCommand

FileSystem Used to obtain information about file systems connected to the computer. Methods are: FileSystem:getByPartition FileSystem:getByMountPoint FileSystem:getByFileSystem

TIBCO Hawk Methods Reference _onUnsolicitedMsg | 293

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on AIX) returns any unsolicited information, warning, or error messages that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

Remarks This method is common to the System, Filesystem, Network, and Process microagents.

Type Asynchronous IMPACT_INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

INBOX String An inbox address used to send the message.

TIBCO Hawk Methods Reference 294 | Chapter 6 AIX Microagents and Methods

COM.TIBCO.hawk.hma.System Microagent

Purpose The System microagent (on AIX) is used to collect information on system-wide usage of the CPU.

Methods Method Description Page System:getCpuInfo Returns information on CPU utilization. 295

System:getSwapInfo Gets system Swap utilization 297 information

System:getSystemInfo Returns operating system information 298

TIBCO Hawk Methods Reference System:getCpuInfo | 295

System:getCpuInfo Method

Purpose This method (on AIX) returns information on system CPU utilization.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description % User Time Double Percent of the time currently run processes execute in user mode.

% System Time Double Percent of the time currently run processes execute in kernel mode.

% Time Idle Double Percent of the time wait process is the current running process.

% Time Wait Double Percent of the time currently run processes wait for block I/O to complete.

Physical Reads Integer Total count of physical reads performed by the system, lifetime total.

Physical Writes Integer Total count of physical writes performed by the system, lifetime total.

Logical Reads Integer Total count of logical reads performed by the system, lifetime total.

Logical Writes Integer Total count of logical writes performed by the system, lifetime total.

Raw Reads Integer Total count of block (raw) reads performed by the system, lifetime total.

Raw Writes Integer Total count of block (raw) writes performed by the system, lifetime total.

Remote Reads Integer Total count of remote read requests, lifetime total.

Remote Writes Integer Total count of remote writes performed by the system, lifetime total.

TIBCO Hawk Methods Reference 296 | Chapter 6 AIX Microagents and Methods

Name Type Description

Exec Total Integer Total count of exec calls performed by the system, lifetime total.

Fork Total Integer Total count of fork calls performed by the system, lifetime total.

Context Switches Integer Total count of the system changing to a different current running process, lifetime total (this counter may wrap).

Device Interrupts Integer Total count of device interrupts, lifetime total.

Software Integer Total count of software interrupts, lifetime total. Interrupts

Avg Running Double Average number of processes in the run queue.

Avg Swapped Double Average number of processes that are inactive Out because they are waiting to be paged in.

TIBCO Hawk Methods Reference System:getSwapInfo | 297

System:getSwapInfo Method

Purpose This method (on AIX) gets system Swap utilization information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Avg KBytes Free Long Average free memory (kilobytes).

Avg KBytes Long Average unallocated swap space (kilobytes). Unallocated

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

% Free Double Amount of disk space that is currently free, expressed as percentage of total size.

% Used Double Amount of disk space that is currently used, expressed as percentage of total size.

TIBCO Hawk Methods Reference 298 | Chapter 6 AIX Microagents and Methods

System:getSystemInfo Method

Purpose This method (on AIX) returns operating system information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Up Time Integer The system up time in seconds. (Time since last reboot.)

Real Memory Integer The total real memory (in kilobytes).

% Free Real Memory Integer The total percentage of free real memory.

Total Processes Integer The total processes currently on the system.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Process | 299

COM.TIBCO.hawk.hma.Process Microagent

Purpose The Process microagent (on AIX) furnishes information about processes running on the system.

Methods Method Description Page Process:getProcess Returns information on a process. 300

Process:getInstanceCount Returns the number of instances of a 301 process.

TIBCO Hawk Methods Reference 300 | Chapter 6 AIX Microagents and Methods

Process:getProcess Method

Purpose This method (on AIX) returns a process table filtered by the Process Name argument.

Remarks Test any regular expressions you plan to use in rulebases by first using them interactively to insure they return the desired results. If no arguments are given, the entire table is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process String Process name. Pattern match with regular Name expressions. Empty argument string returns information for all processes.

Returns Name Type Description Process Name String Process name.

ID Process Integer The process ID of the process (this datum required in order to kill the process). Table is indexed on ID Process.

Parent Process ID Integer Parent process ID of the current process.

User Name String Effective user name of the process.

Virtual KBytes Integer The size of virtual address space (kilobytes).

CPU Time Integer CPU usage (user time + system time, milliseconds).

% CPU Integer The ratio of CPU time used to CPU time available computed for the lifetime of the process.

% Memory Integer The ratio of process’s resident set size to the physical memory on the machine.

Command String The actual command, along with its argument.

TIBCO Hawk Methods Reference Process:getInstanceCount | 301

Process:getInstanceCount Method

Purpose This method (on AIX) returns an instance count for the process denoted by the Process Name argument.

Remarks Test any regular expressions you plan to use in rulebases by first using them interactively to insure they return the desired results. If no arguments are given, the total count of all running processes is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Pattern match with regular expressions. Empty argument string returns combined instance count for all processes.

Returns Name Type Description

Process Name String Process name. Table is indexed on Process Name.

Process Count Integer Instance count for a currently running process.

TIBCO Hawk Methods Reference 302 | Chapter 6 AIX Microagents and Methods

Process:getInstanceCountByCommand Method

Purpose This method (on AIX) returns a count of processes, filtered by command.

Remarks Regular expressions can be used to query status of a group of processes.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Command String Command-line argument.

Returns Name Type Description Command String Command-line argument.

Process Count Integer Process count for specified command.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.FileSystem | 303

COM.TIBCO.hawk.hma.FileSystem Microagent

Purpose The FileSystem microagent (on AIX) furnishes information about file systems connected to the computer.

Methods Method Description Page FileSystem:getByPartition Returns information on a file system 304 for its partition name.

FileSystem:getByMountPoint Returns information on a file system 305 for its mount point.

FileSystem:getByFileSystem Returns utilization statistics for the 306 currently mounted filesystems.

TIBCO Hawk Methods Reference 304 | Chapter 6 AIX Microagents and Methods

FileSystem:getByPartition Method

Purpose This method (on AIX) provides utilization statistics for currently mounted file systems filtered by the device given as the Partition argument. Information will be listed for only local partitions with non-zero data blocks.

Remarks NFS mounted file systems are ignored and should be monitored by agents running on the file servers themselves. If no argument is specified, the entire table is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Partition String Device name (hard disk partition). Pattern match with regular expressions. Empty argument string returns information for all partitions.

Returns Name Type Description Partition String Device name of a hard disk partition. Table is indexed on Partition.

Mount String Mount Point Point

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Long Amount of disk space on the mounted file system Free that is currently free, expressed as absolute value (kilobytes).

KBytes Long Amount of disk space on the mounted file system Used currently in use, expressed as absolute value (kilobytes).

KBytes Long Total amount of disk space on mounted file system Total (kilobytes).

TIBCO Hawk Methods Reference FileSystem:getByMountPoint | 305

FileSystem:getByMountPoint Method

Purpose This method (on AIX) provides utilization statistics for currently mounted file systems filtered by the mount point given as the argument Mount Point. Information will be listed for only local partitions with non-zero data blocks.

Remarks NFS mounted file systems are ignored and should be monitored by agents running on the file servers themselves. If no argument is specified, the entire table is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Mount String Name of the directory where file system is mounted. Point Pattern match with regular expressions. Empty argument string returns information for all mount points.

Returns Name Type Description Partition String Device name of a hard disk partition.

Mount String Mount point. Table is indexed on Mount Point. Point

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Long Amount of disk space on the mounted file system Free that is currently free, expressed as absolute value (kilobytes).

KBytes Long Amount of disk space on the mounted file system Used currently in use, expressed as absolute value (kilobytes).

KBytes Long Total amount of disk space on mounted file system Total (kilobytes).

TIBCO Hawk Methods Reference 306 | Chapter 6 AIX Microagents and Methods

FileSystem:getByFileSystem Method

Purpose This method (on AIX) provides utilization statistics for the currently mounted filesystems filtered by device name and file system type. The argument is treated as a pattern to match. If no argument is specified, the entire mount table is reported.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description File System String Name of the file system type. Type

Returns Name Type Description Partition String Device name of a hard disk partition.

Mount Point String Mount point of device. Table is indexed on Mount Point.

File System String Name of the file system type. Type

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

% Minimum Integer Minimum Percentage free.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Network | 307

COM.TIBCO.hawk.hma.Network Microagent

Purpose The Network microagent (on AIX) furnishes information about network utilization statistics, identification, communications, and errors.

Methods Method Description Page Network:getStatistics Returns network performance 308 information.

Network:getConfig Returns information on network 309 addresses and masks.

Network:_onUnsolicitedMsg Returns unsolicited notifications 293 sent by this microagent.

TIBCO Hawk Methods Reference 308 | Chapter 6 AIX Microagents and Methods

Network:getStatistics Method

Purpose This method (on AIX) returns network performance information in a manner similar to using the netstat command. This method returns statistics only for the following device types • Ethernet (IEEE 802.3) • Ethernet (Standard, Version2).

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface.

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Input Packets Integer Packets received on the interface, lifetime total.

Input Packet Errors Integer Packet errors received on the interface, lifetime total.

Output Packets Integer Packets sent on the interface, lifetime total.

Output Packet Errors Integer Packet errors sent on the interface, lifetime total.

Network Collisions Integer Collisions, lifetime total.

% Network Collisions Double Rate (percentage) of collisions against total number of output packets, lifetime total.

Framing Errors Integer Framing errors, lifetime total.

No Carrier Errors Integer No carrier errors, lifetime total.

TIBCO Hawk Methods Reference Network:getConfig | 309

Network:getConfig Method

Purpose This method (on AIX) returns network configuration information in a manner similar to using the ifconfig command.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface.

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Network Address String Network address.

Broadcast Address String Broadcast address for the interface.

Network Mask String Network mask for the interface.

TIBCO Hawk Methods Reference 310 | Chapter 6 AIX Microagents and Methods

TIBCO Hawk Methods Reference | 311

Chapter 7 Linux Microagents and Methods

The TIBCO Hawk microagents described in this chapter run on the Linux platform in the HMA process. For more specific information on monitoring, see the TIBCO Hawk Administrator’s Guide.

Topics

• Summary of Linux Microagents, page 312 • COM.TIBCO.hawk.hma.System, page 315 • COM.TIBCO.hawk.hma.FileSystem, page 320 • COM.TIBCO.hawk.hma.Network, page 325 • COM.TIBCO.hawk.hma.Process, page 328

TIBCO Hawk Methods Reference 312 | Chapter 7 Linux Microagents and Methods

Summary of Linux Microagents

The Linux microagents are described as follows..

Table 7 Linux Microagents (Sheet 1 of 2) Microagent Description Common Methods, Provides unsolicited message processing common to This method is several microagents. Methods are: common to the _onUnsolicitedMsg following Linux microagents: System Filesystem Network Process

System Collects information on system-wide usage of the CPU and memory. Methods are: System:getSwapInfo System:getSystemInfo System:getCpuInfo System:getTunableInfo

FileSystem Collects information about file systems associated with the computer. Methods are: FileSystem:getByPartition FileSystem:getByMountPoint FileSystem:getByFileSystem

Network Collects information about network identification communications and errors. Methods are: Network:getStatistics Network:getConfig

TIBCO Hawk Methods Reference Summary of Linux Microagents | 313

Table 7 Linux Microagents (Sheet 2 of 2) Microagent Description Process Used to obtain information about processes running on the system. Methods are: Process:getProcess Process:getInstanceCount Process:getInstanceCountByCommand

TIBCO Hawk Methods Reference 314 | Chapter 7 Linux Microagents and Methods

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on Linux) returns any unsolicited information, warning, or error messages that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

Remarks This method is common to the System, Filesystem, Network, and Process microagents.

Type Asynchronous IMPACT_INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

INBOX String An inbox address used to send the message.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.System | 315

COM.TIBCO.hawk.hma.System Microagent

Purpose The System microagent (on Linux) is used to collect information on system-wide usage of the CPU and memory, summarizing all processes on the computer.

Methods Method Description Page System:getSwapInfo Returns information on system swap 316 space

System:getSystemInfo Returns information on various operating 317 system parameters.

System:getCpuInfo Returns system CPU utilization 318 information.

System:getTunableInfo Returns information on system tunable 319 parameters.

TIBCO Hawk Methods Reference 316 | Chapter 7 Linux Microagents and Methods

System:getSwapInfo Method

Purpose This method (on Linux) returns operating system swap space utilization information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Avg KBytes Free Integer The average free memory, in KB.

Avg KBytes Integer Average unallocated swap space, in KB. Unallocated

KBytes Used Integer The number of kilobytes of swap space used.

KBytes Total Integer The number of kilobytes total swap space.

% Free Double The amount free swap space, expressed as a percentage.

% Used Double The amount of swap space used, expressed as a percentage.

TIBCO Hawk Methods Reference System:getSystemInfo | 317

System:getSystemInfo Method

Purpose This method (on Linux) returns operating system information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Up Time Integer The system up time in seconds. (Time since last reboot.)

Run Queue Length Integer The length of the run queue (number of processes).

Real Memory Integer The total real memory (in kilobytes).

Free Memory Integer The total free memory (in kilobytes).

% Free Real Memory Integer The total percentage of free real memory.

% Buffers Memory Integer The total percentage of memory used to cache file or disk blocks.

% Cached Memory Integer The total percentage of memory used to cache page files.

Avg Running Double Average number of processes running over 1 minute.

Avg Running (5 min) Double Average number of processes running over 5 minutes.

Avg Running (15 min) Double Average number of processes running over 15 minutes.

Total Processes Integer The total processes currently on the system.

Context Switches Long The total number of context switches of the CPU from one process to another.

Device Interrupts Long The total number of device interrupts currently on the computer system.

TIBCO Hawk Methods Reference 318 | Chapter 7 Linux Microagents and Methods

System:getCpuInfo Method

Purpose This method (on Linux) returns operating system CPU utilization information. On multi-processor machines, CPU utilization for individual processors are returned.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Processor Integer Processor (slot) number

% User Time Integer The percent of time spent in user mode for the processor.

% System Time Integer The percent of time spent in system mode for the processor.

% Time Idle Integer The percent of time spent in idle state for the processor.

IO Waits Long IO Waits

Hardware IRQ Long Hardware interrupts (IRQ)

Software IRQ Long Software interrupts (IRQ)

TIBCO Hawk Methods Reference System:getTunableInfo | 319

System:getTunableInfo Method

Purpose This method (on Linux) returns operating system tunable parameter information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Page Size Integer Page size (in bytes).

Inodes Allocated Long Denotes the number of inodes the system has allocated. This number will grow and shrink dynamically.

Inodes Free Long Represents the number of free inodes.

Maximum Files Integer The maximum number of files a process can have open simultaneously.

TIBCO Hawk Methods Reference 320 | Chapter 7 Linux Microagents and Methods

COM.TIBCO.hawk.hma.FileSystem Microagent

Purpose The FileSystem microagent (on Linux) is used to collect information on file systems connected to this computer.

Methods Method Description Page FileSystem:getByPartition Returns utilization statistics for 321 currently mounted file systems filtered by device name.

FileSystem:getByMountPoint Returns utilization statistics for 322 currently mounted file systems filtered by mount directory.

FileSystem:getByFileSystem Returns utilization statistics for the 323 currently mounted filesystems.

FileSystem: _onUnsolicitedMsg Returns unsolicited notifications 314 sent from the managed application corresponding to this microagent.

TIBCO Hawk Methods Reference FileSystem:getByPartition | 321

FileSystem:getByPartition Method

Purpose This method (on Linux) returns utilization statistics for currently mounted file systems, filtered by device name. Information will be listed for only local partitions with non-zero data blocks.

Remarks The argument is being treated as a pattern to match. If no argument string is given the whole mount table is reported.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Partition String Device name (hard disk partition).

Returns Name Type Description Partition String Device name of a hard disk partition. Table is indexed by Partition.

Mount Point String Mount point.

% Free Integer The amount of disk space on the mounted file system that is currently free, expressed as a percentage of total size.

% Used Integer The amount of disk space on the mounted file system that is currently in use, expressed as a percentage of total size.

KBytes Free Long The amount of disk space on the mounted file system that is currently free, expressed as an absolute value in kilobytes.

KBytes Used Long The amount of disk space on the mounted file system that is currently in use, expressed as an absolute value in kilobytes.

KBytes Total Long The amount of disk space on the mounted file system, expressed in kilobytes.

% Minimum Integer The minimum % free (for super user only)

TIBCO Hawk Methods Reference 322 | Chapter 7 Linux Microagents and Methods

FileSystem:getByMountPoint Method

Purpose This method (on Linux) returns utilization statistics for currently mounted file systems filtered by the mount directory. Information will be listed for only local partitions with non-zero data blocks.

Remarks The argument is being treated as a pattern to match. If no argument is given, the entire mount table is reported.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Mount Point String Name of the directory where the file system is mounted.

Returns Name Type Description Mount Point String Mount point. Table is indexed by Mount Point.

Partition String Device name of a hard disk partition.

% Free Integer The amount of disk space on the mounted file system that is currently free, expressed as a percentage of total size.

% Used Integer The amount of disk space on the mounted file system that is currently in use, expressed as a percentage of total size.

KBytes Free Long The amount of disk space on the mounted file system that is currently free, expressed as an absolute value in kilobytes.

KBytes Used Long The amount of disk space on the mounted file system that is currently in use, expressed as an absolute value in kilobytes.

KBytes Total Long The amount of disk space on the mounted file system, expressed in kilobytes.

% Minimum Integer The minimum % free (for super user only)

TIBCO Hawk Methods Reference FileSystem:getByFileSystem | 323

FileSystem:getByFileSystem Method

Purpose This method (on Linux) provides utilization statistics for the currently mounted filesystems filtered by device name and file system type. The argument is treated as a pattern to match. If no argument is specified, the entire mount table is reported.

For any filesystem that does not respond within five seconds, the data values for % Free and % Used are considered stale and their values are set to -1.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description File System String Name of the file system type. Type

Returns Name Type Description Partition String Device name of a hard disk partition.

Mount Point String Mount point of device. Table is indexed on Mount Point.

File System String Name of the file system type. Type

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

TIBCO Hawk Methods Reference 324 | Chapter 7 Linux Microagents and Methods

Name Type Description % Minimum Integer Minimum Percentage free.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Network | 325

COM.TIBCO.hawk.hma.Network Microagent

Purpose The Network microagent (on Linux) furnishes information about network utilization statistics, identification, communications, and errors.

Methods Method Description Page Network:getStatistics Returns network performance 326 information.

Network:getConfig Returns information on network 327 addresses and masks.

Network: _onUnsolicitedMsg Returns unsolicited notifications 314 sent by this microagent.

TIBCO Hawk Methods Reference 326 | Chapter 7 Linux Microagents and Methods

Network:getStatistics Method

Purpose This method (on Linux) returns network performance information in a manner similar to using the netstat command.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface.

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Input Packets Integer Packets received on the interface, lifetime total.

Input Packet Errors Integer Packet errors received on the interface, lifetime total.

Output Packets Integer Packets sent on the interface, lifetime total.

Output Packet Errors Integer Packet errors sent on the interface, lifetime total.

Network Collisions Integer Collisions, lifetime total.

Framing Errors Integer Framing errors, lifetime total.

No Carrier Errors Integer No carrier errors, lifetime total.

% Network Collisions Double Rate (percentage) of collisions against total number of output packets, lifetime total.

TIBCO Hawk Methods Reference Network:getConfig | 327

Network:getConfig Method

Purpose This method (on Linux) returns network configuration information in a manner similar to using the ifconfig command.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface.

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Network Address String Network address.

Broadcast Address String Broadcast address for the interface.

Network Mask String Network mask for the interface.

TIBCO Hawk Methods Reference 328 | Chapter 7 Linux Microagents and Methods

COM.TIBCO.hawk.hma.Process Microagent

Purpose The Process microagent (on Linux) furnishes information about processes running on the system.

Methods Method Description Page Process:getProcess Returns information on a process. 329

Process:getInstance Returns the number of instances of a process. 331 Count

Process:getInstance This method returns a count of processes, 332 CountByCommand filtered by argument.

Process: Returns unsolicited notifications sent by this 314 _onUnsolicitedMsg microagent.

TIBCO Hawk Methods Reference Process:getProcess | 329

Process:getProcess Method

Purpose On Linux, returns a process table filtered by the Process Name argument.

Remarks The argument is treated as a pattern to match. If no argument string is given, all processes are returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Empty argument returns information for all processes.

Returns Name Type Description ID Process Integer Process ID of the process. Table is indexed on ID process.

Parent Process ID Integer Parent process ID of the current process.

Process Name String Name of the process being executed.

User Name String Effective user name of the proces.s

Virtual KBytes Integer The size of virtual address space, in kilobytes.

Stack KBytes Integer The size of stack space, in kilobytes.

Heap KBytes Integer The size of heap space, in kilobytes.

CPU Time Integer CPU usage: the user time plus system time, in milliseconds.

% CPU Integer Percent of CPU used

% Memory Integer Percent of memory used.

Major Page Faults Integer Major page faults since process start.

Minor Page Faults Integer Minor page faults since process start.

Command String Full command line with all arguments.

TIBCO Hawk Methods Reference 330 | Chapter 7 Linux Microagents and Methods

Name Type Description Start Time Integer The number of seconds since the process started.

TIBCO Hawk Methods Reference Process:getInstanceCount | 331

Process:getInstanceCount Method

Purpose This method (on Linux) returns an instance count for the process denoted by the Process Name argument.

Remarks The argument is treated as a pattern to match. If no argument string is given, the count of all processes is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Empty string returns combined instance count for all processes.

Returns Name Type Description Process Name String Process name. Table is indexed on Process Name.

Process Count Integer Number of instances.

TIBCO Hawk Methods Reference 332 | Chapter 7 Linux Microagents and Methods

Process:getInstanceCountByCommand Method

Purpose This method (on Linux) returns a count of processes, filtered by argument.

Remarks Regular expressions can be used to query status of a group of processes.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Command String Command-line argument.

Returns Name Type Description Command String Command-line argument.

Process Count Integer Process count for specified command.

TIBCO Hawk Methods Reference | 333

Chapter 8 Mac OS X Methods

The TIBCO Hawk microagents described in this chapter run on the Mac OS X platform in the HMA process. For more specific information on monitoring, see the TIBCO Hawk Administrator’s Guide.

Topics

• Summary of Mac OS X Microagents, page 334 • COM.TIBCO.hawk.hma.System, page 337 • COM.TIBCO.hawk.hma.Network, page 347 • COM.TIBCO.hawk.hma.Process, page 350

TIBCO Hawk Methods Reference 334 | Chapter 8 Mac OS X Methods

Summary of Mac OS X Microagents

The Mac OS X microagents are described as follows.

Table 8 Mac OS X Microagents (Sheet 1 of 2) Microagent Description Common Methods, Provides unsolicited message processing common to This method is several microagents. Methods are: common to the _onUnsolicitedMsg following Mac OS X microagents: System Filesystem Network Process

System Used to collect information on system-wide usage of the CPU and memory. Methods are: System:getSystemInfo System:getCpuInfo System:getProcessorSetInfo System:getSwapInfo System:getTunableInfo

FileStat Used to obtain information about file systems connected to the computer. Methods are: FileSystem:getByPartition FileSystem:getByMountPoint FileSystem:getByFileSystem

Network Used to obtain information about network identification communications and errors. Methods are: Network:getStatistics Network:getConfig

TIBCO Hawk Methods Reference Summary of Mac OS X Microagents | 335

Table 8 Mac OS X Microagents (Sheet 2 of 2) Microagent Description Process Used to obtain information about processes running on the system. Methods are: Process:getProcess Process:getInstanceCount Process:getInstanceCountByCommand

TIBCO Hawk Methods Reference 336 | Chapter 8 Mac OS X Methods

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on Mac OS X) returns any unsolicited information, warning, or error messages that are sent from this microagent. Invoking this method returns the last such message that was received (if any).

Type Asynchronous IMPACT_INFO.

Arguments None.

Returns Name Type Description

TYPE String One of INFO, WARNING, or ERROR.

TEXT String The text of the message.

ID Integer A number used by the application to identify the message.

INBOX String An inbox address used to send the message.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.System | 337

COM.TIBCO.hawk.hma.System Microagent

Purpose The System microagent (on Mac OS X) is used to collect information on system-wide usage of the CPU and memory, summarizing all processes on the computer.

Methods Method Description Page System:getSystemInfo Returns information on system 338 resource utilization.

System:getCpuInfo Returns information on CPU 339 utilization.

System:getProcessorSetInfo Returns information on processor set 340 utilization.

System:getSwapInfo Returns information on the utilization 341 of system swap space.

System:getTunableInfo Returns information on system 342 tunable variables.

TIBCO Hawk Methods Reference 338 | Chapter 8 Mac OS X Methods

System:getSystemInfo Method

Purpose This method (on Mac OS X) returns information that pertains to multi-tasking process management by the system, including process swapping and run queuing. It also returns information on the memory usage.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Up Time Long System up time in seconds.

% User Time Double Percent of the time currently run processes execute in user mode.

% System Time Double Percent of the time currently run processes execute in kernel mode.

% Time Idle Double Percent of the time wait process is the currently- running process.

Avg Running Double One minute average number of how much CPU is being used.

Avg Running (5 min) Double Five minute average number of how much CPU is being used.

Avg Running (15 Double Fifteen minute average number of how min) much CPU is being used.

Real Memory Long Total real memory in kilobytes.

Free Memory Long Free Memory in kilobytes.

% Free Real Memory Double % Free Real Memory

TIBCO Hawk Methods Reference System:getCpuInfo | 339

System:getCpuInfo Method

Purpose This method (on Mac OS X) returns information on processor activity for all processors on the computer.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Processor Integer Processor (slot) number.

Running Integer Value of one (1) indicates the processor is running.

Master Integer Value of one (1) indicates that the processor is the master processor.

% User Time Double Percent of the time currently run processes execute in user mode.

% System Time Double Percent of the time currently run processes execute in kernel mode.

% Time Idle Double Percent of the time when the CPU is in idle state.

TIBCO Hawk Methods Reference 340 | Chapter 8 Mac OS X Methods

System:getProcessorSetInfo Method

Purpose This method (on Mac OS X) returns information on processor set utilization.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Processor Set Integer Processor (slot) number.

CPU Count Integer Number of CPUs in the processor set.

Load Average Double Load average of the processor set is a measure of how much processing resources is being utilized.

Mach Factor Double A variant of the Load Average which indicates how much processing resources is available.

Total Processes Integer Total processes in the processor set.

Total Threads Integer Total threads in the processor set.

TIBCO Hawk Methods Reference System:getSwapInfo | 341

System:getSwapInfo Method

Purpose This method (on Mac OS X) returns information on the utilization of system swap space.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Page Size Long The size of a page in bytes.

Page Free Long The total number of free pages in the system.

Page Active Long The total number of pages currently in use and pageable.

Page Inactive Long The total number of pages on the inactive list.

Page Wired Down Long The total number of pages that cannot be paged out.

Page Copy-On-Write Long The number of faults that caused a page to be copied.

Page Reactivated Long The total number of pages that have been moved from the inactive list to the active list.

Pageins Long The number of requests for pages from a pager.

Pageouts Long The number of pages that have been paged out.

Hit Rate Double The percentage of page hits over page lookup.

TIBCO Hawk Methods Reference 342 | Chapter 8 Mac OS X Methods

System:getTunableInfo Method

Purpose This method (on Mac OS X) returns tunable system information.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Max. Vnodes Integer Maximum number of Vnodes.

Max. Processes Integer Maximum number of processes.

Maximum Files Integer Maximum Files.

Maximum Integer Maximum number of open files per process Files/Process

Maximum Integer Maximum number of processes per user Process/User

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.FileSystem | 343

COM.TIBCO.hawk.hma.FileSystem Microagent

Purpose The FileSystem microagent (on Mac OS X) is used to collect information on file systems connected to this computer.

Methods Method Description Page FileSystem:getByPartition Returns utilization statistics for 344 currently mounted file systems filtered by device name.

FileSystem:getByMountPoint Returns utilization statistics for 345 currently mounted file systems filtered by mount directory.

FileSystem:getByFileSystem Returns utilization statistics for the 346 currently mounted filesystems.

TIBCO Hawk Methods Reference 344 | Chapter 8 Mac OS X Methods

FileSystem:getByPartition Method

Purpose This method (on Mac OS X) returns utilization statistics for currently mounted file systems, filtered by device name. Information will be listed for only local partitions with non-zero data blocks.

Remarks The argument is being treated as a pattern to match. If no argument string is given the whole mount table is reported.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Partition String Device name (hard disk partition).

Returns Name Type Description Partition String Device name of a hard disk partition. Table is indexed by Partition.

Mount Point String Mount point.

% Free Integer The amount of disk space on the mounted file system that is currently free, expressed as a percentage of total size.

% Used Integer The amount of disk space on the mounted file system that is currently in use, expressed as a percentage of total size.

KBytes Free Long The amount of disk space on the mounted file system that is currently free, expressed as an absolute value in kilobytes.

KBytes Used Long The amount of disk space on the mounted file system that is currently in use, expressed as an absolute value in kilobytes.

KBytes Total Long The amount of disk space on the mounted file system, expressed in kilobytes.

% Minimum Integer The minimum % free (for super user only)

TIBCO Hawk Methods Reference FileSystem:getByMountPoint | 345

FileSystem:getByMountPoint Method

Purpose This method (on Mac OS X) returns utilization statistics for currently mounted file systems filtered by the mount directory. Information will be listed for only local partitions with non-zero data blocks.

Remarks The argument is being treated as a pattern to match. If no argument is given, the entire mount table is reported.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Mount Point String Name of the directory where the file system is mounted.

Returns Name Type Description Mount Point String Mount point. Table is indexed by Mount Point.

Partition String Device name of a hard disk partition.

% Free Integer The amount of disk space on the mounted file system that is currently free, expressed as a percentage of total size.

% Used Integer The amount of disk space on the mounted file system that is currently in use, expressed as a percentage of total size.

KBytes Free Long The amount of disk space on the mounted file system that is currently free, expressed as an absolute value in kilobytes.

KBytes Used Long The amount of disk space on the mounted file system that is currently in use, expressed as an absolute value in kilobytes.

KBytes Total Long The amount of disk space on the mounted file system, expressed in kilobytes.

% Minimum Integer The minimum % free (for super user only)

TIBCO Hawk Methods Reference 346 | Chapter 8 Mac OS X Methods

FileSystem:getByFileSystem Method

Purpose This method (on Mac OS X) provides utilization statistics for the currently mounted filesystems filtered by device name and file system type. The argument is treated as a pattern to match. If no argument is specified, the entire mount table is reported.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description File System String Name of the file system type. Type

Returns Name Type Description Partition String Device name of a hard disk partition.

Mount Point String Mount point of device. Table is indexed on Mount Point.

File System String Name of the file system type. Type

% Free Integer Amount of disk space on the mounted file system that is currently free, expressed as percentage of total size.

% Used Integer Amount of disk space on the mounted file system currently in use, expressed as percentage of total size.

KBytes Free Long Amount of disk space on the mounted file system that is currently free, expressed as absolute value (kilobytes).

KBytes Used Long Amount of disk space on the mounted file system currently in use, expressed as absolute value (kilobytes).

KBytes Total Long Total amount of disk space on mounted file system (kilobytes).

% Minimum Integer Minimum Percentage free.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.Network | 347

COM.TIBCO.hawk.hma.Network Microagent

Purpose The Network microagent (on Mac OS X) furnishes information about network utilization statistics, identification, communications, and errors.

Methods Method Description Page Network:getStatistics Returns network performance 348 information.

Network:getConfig Returns information on network 349 addresses and masks.

Network: _onUnsolicitedMsg Returns unsolicited notifications 336 sent by this microagent.

TIBCO Hawk Methods Reference 348 | Chapter 8 Mac OS X Methods

Network:getStatistics Method

Purpose This method (on Mac OS X) returns network performance information in a manner similar to using the netstat command. All statistics are for the lifetime of the system since it was last booted.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface.

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Input Packets Integer Packets received on the interface, lifetime total.

Input Packet Errors Integer Packet errors received on the interface, lifetime total.

Output Packets Integer Packets sent on the interface, lifetime total.

Output Packet Errors Integer Packet errors sent on the interface, lifetime total.

Network Collisions Integer Collisions, lifetime total.

Framing Errors Integer Framing errors, lifetime total.

No Carrier Errors Integer No carrier errors, lifetime total.

% Network Collisions Double Rate (percentage) of collisions against total number of output packets, lifetime total.

TIBCO Hawk Methods Reference Network:getConfig | 349

Network:getConfig Method

Purpose This method (on Mac OS X) returns network configuration information in a manner similar to using the ifconfig command.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Interface Name String Name of the network interface.

Returns Name Type Description Interface Name String Name of the network interface. Table is indexed on Interface Name.

Network Address String Network address.

Broadcast Address String Broadcast address for the interface.

Network Mask String Network mask for the interface.

TIBCO Hawk Methods Reference 350 | Chapter 8 Mac OS X Methods

COM.TIBCO.hawk.hma.Process Microagent

Purpose The Process microagent (on Mac OS X) furnishes information about processes running on the system.

Methods Method Description Page Process:getProcess Returns information on a process. 351

Process:getInstance Returns the number of instances of a process. 353 Count

Process:getInstance This method returns a count of processes, 354 CountByCommand filtered by argument.

Process: Returns unsolicited notifications sent by this 336 _onUnsolicitedMsg microagent.

TIBCO Hawk Methods Reference Process:getProcess | 351

Process:getProcess Method

Purpose This method (on Mac OS X) returns a process table filtered by the Process Name argument.

Remarks The argument is treated as a pattern to match. If no argument string is given, all processes are returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Empty argument returns information for all processes.

Returns Name Type Description Process Name String Name of the process being executed.

ID Process Integer Process ID of the process. Table is indexed on ID process.

Parent Process ID Integer Parent process ID of the current process.

User Name String Effective user name of the process.

Virtual KBytes Integer The size of virtual address space, in kilobytes.

Real KBytes Integer The size of the real address space, in kilobytes.

Threads Integer The number of threads in the process.

CPU Time Double CPU usage: the user time plus system time, in milliseconds.

% CPU Double Percent of CPU used.

% Memory Double Percent of memory used.

State String Process status.

Start Time Integer The number of seconds since the process started.

Page Faults Integer The number of page faults.

TIBCO Hawk Methods Reference 352 | Chapter 8 Mac OS X Methods

Name Type Description COW faults Integer The number of copy-on-write faults.

Pageins Integer The number of actual pageins.

System Calls Long The number of system calls made.

Command String Command line used to start process.

TIBCO Hawk Methods Reference Process:getInstanceCount | 353

Process:getInstanceCount Method

Purpose This method (on Mac OS X) returns an instance count for the process denoted by the Process Name argument.

Remarks The argument is treated as a pattern to match. If no argument string is given, the count of all processes is returned.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Process Name String Process name. Empty string returns combined instance count for all processes.

Returns Name Type Description Process Name String Process name. Table is indexed on Process Name.

Process Count Integer Number of instances.

TIBCO Hawk Methods Reference 354 | Chapter 8 Mac OS X Methods

Process:getInstanceCountByCommand Method

Purpose This method (on Mac OS X) returns a count of processes, filtered by argument.

Remarks Regular expressions can be used to query status of a group of processes.

Type Synchronous, IMPACT_INFO.

Arguments Name Type Description Command String Command-line argument.

Returns Name Type Description Command String Command-line argument.

Process Count Integer Process count for specified command.

TIBCO Hawk Methods Reference | 355

Chapter 9 i5/OS Microagents and Methods

The TIBCO Hawk microagents described in this chapter run on the i5/OS platform in the HMA process. For more specific information on monitoring, see the TIBCO Hawk Administrator’s Guide.

Topics

• Accessing Microagents and Microagent methods on i5/OS, page 356 • Summary of i5/OS Microagents, page 357 • COM.TIBCO.hawk.hma.GetJobInfo, page 365 • COM.TIBCO.hawk.hma.GetNetworkOS400, page 381 • COM.TIBCO.hawk.hma.MessageHandler, page 387 • COM.TIBCO.hawk.hma.ListObjects, page 391 • COM.TIBCO.hawk.hma.OS400Custom, page 394 • COM.TIBCO.hawk.hma.SystemInfo, page 396

TIBCO Hawk Methods Reference 356 | Chapter 9 i5/OS Microagents and Methods

Accessing Microagents and Microagent methods on i5/OS

To access microagents and microagent methods on i5/OS, follow these steps: 1. Start the TIBCO Hawk Agent on your i5/OS system. 2. Start the TIBCO Hawk Configuration Utility on a platforms that supports the GUI, such as Windows or UNIX. 3. Set the TIBCO Rendezvous service, network and daemon parameters to refer to the TIBCO Hawk Agent running on your i5/OS system. 4. Start the TIBCO Hawk Display on the platform on which you are running the TIBCO Hawk Configuration Utility. 5. Verify that TIBCO Hawk Display discovers the TIBCO Hawk agent running on your i5/OS machine. 6. Choose Get Microagents from the menu in the TIBCO Hawk Display. You can now invoke the associated microagent methods.

TIBCO Hawk Methods Reference Summary of i5/OS Microagents | 357

Summary of i5/OS Microagents

The i5/OS microagents are described as follows.

Table 9 i5/OS Microagents (Sheet 1 of 2) Microagent Description Common Methods, Provides unsolicited message processing common to This method is several microagents. Methods are: common to the _onUnsolicitedMsg following i5/OS microagents: getReleaseVersion GetWork getTraceLevel GetNetworkOS400 getTraceParameters TibRendezvous setTraceLevel GetMessage setTraceParameters GetObjects OS400Custom

GetJobInfo Methods are: GetJobInfo:GetDataArea GetJobInfo:SubmitJob GetJobInfo:getJobDescriptionInfo GetJobInfo:getJobList GetJobInfo:getJobQueueInfo GetJobInfo:getSubSystemInfo

GetNetworkOS400 Collects information about file systems associated with the computer. Methods are: GetNetworkOS400:getNetworkAttribute GetNetworkOS400:getNetworkConnection GetNetworkOS400:getNetworkInterface GetNetworkOS400:getNetworkRoute

TIBCO Hawk Methods Reference 358 | Chapter 9 i5/OS Microagents and Methods

Table 9 i5/OS Microagents (Sheet 2 of 2) Microagent Description GetMessage Methods are: MessageHandler:getMessageInfo

GetObjects Methods are: ListObjects:getObjects

OS400Custom OS400Custom:ExecuteCLCommand

TibRendezvous Collects information about network identification communications and errors. Methods are: TibRendezvous:onRvDaemonStatus TibRendezvous:onRvDataLoss TibRendezvous:onRvLicenseExpire TibRendezvous:onRvDisconnectOrConnect For details on these methods, see COM.TIBCO.hawk.hma.TibRendezvous, page 76

TIBCO Hawk Methods Reference _onUnsolicitedMsg | 359

_onUnsolicitedMsg Method

Purpose Subscribing to this method (on i5/OS) returns any unsolicited notifications that are sent from the managed application corresponding to this microagent. Invoking this method returns the last such message that was received (if any).

Type Open, Asynchronous, IMPACT_INFO

Arguments None

Returns Name Type Description TYPE String The type of unsolicited message

TEXT String The unsolicited message text

ID Integer The unsolicited message id

TIBCO Hawk Methods Reference 360 | Chapter 9 i5/OS Microagents and Methods

getReleaseVersion Method

Purpose This method (on i5/OS) returns the current release version information for this microagent.

Type Open, Synchronous, IMPACT_INFO

Arguments None

Returns Name Type Description Name String The name of the binary which implements this microagent.

Version String Version number of the release.

Date String Version date of the release.

Major Integer Major number of release.

Minor Integer Minor number of release.

Update Integer Release version update number.

TIBCO Hawk Methods Reference getTraceLevel | 361 getTraceLevel Method

Purpose This method (on i5/OS) returns the current trace level settings.

Remarks A return value of On indicates that the trace level is enabled. A return value of Off indicates that the trace level is disabled. Trace levels other than INFO, WARNING, and ERROR, are for problem diagnostic purposes and, for performance reasons, should normally not be enabled in a production environment.

Type Open, Synchronous, IMPACT_INFO

Arguments None

Returns Name Type Description Information String Information trace level.

Warning String Warning trace level.

Error String Error trace level.

Debug String Debug trace level.

AMI String AMI trace level.

Stamp String File/line stamp trace output.

TIBCO Hawk Methods Reference 362 | Chapter 9 i5/OS Microagents and Methods

getTraceParameters Method

Purpose This method on (i5/OS) returns the current trace configuration.

Remarks Trace files are maintained in the configured directory. Trace output is directed to a file with the configured file name (for example, MY_FILE). Whenever the trace file size grows to the configured maximum the file is renamed by appending a sequence number to the name (for example, MY_FILE_001) and tracing continues to a newly created MY_FILE (A process known as rolling-over). The count of rolled-over files is maintained at the configured maximum by deleting the oldest rolled-over file. A value of stdout or stderr for the file name configuration indicates tracing is directed to standard out or error, respectivly.

Type Open, Synchronous, IMPACT_INFO

Arguments None

Returns Name Type Description Directory String Directory path where trace files should be maintained.

File Name String File name of trace files.

Max File Size Integer Trace file maximum size in kilobytes.

Max Trace File Integer Maximum number of rolling trace files.

TIBCO Hawk Methods Reference setTraceLevel | 363 setTraceLevel Method

Purpose This method (on i5/OS) sets the trace level bits.

Remarks A value of On will enable the trace level. A value of Off will disable the trace level. A value of Current will leave the trace setting unmodified (that is, it will retain its current setting). Trace levels other than INFO, WARNING, and ERROR, are for problem diagnostic purposes and, for performance reasons, should normally not be enabled in a production environment.

Type Open, Synchronous, IMPACT_ACTION

Arguments Name Type Description Information String Information trace level.

Warning String Warning trace level.

Error String Error trace level.

Debug String Debug trace level.

AMI String AMI trace level.

Stamp String File/line stamp trace output.

Returns None

TIBCO Hawk Methods Reference 364 | Chapter 9 i5/OS Microagents and Methods

setTraceParameters Method

Purpose This method (on i5/OS) set trace configuration.

Remarks Trace files are maintained in the configured directory. Trace output is directed to a file with the configured file name (for example, MY_FILE). Whenever the trace file size grows to the configured maximum the file is renamed by appending a sequence number to the name (for example, MY_FILE_001) and tracing continues to a newly created MY_FILE (A process known as rolling-over). The count of rolled-over files is maintained at the configured maximum by deleting the oldest rolled-over file. A value of Current may be specified for the Directory and File Name method arguments to indicate that they should retain their current configuration. A value of "0 (zero)" may be specified for the Max File Size and Max Trace File method arguments to indicate that they should retain their current configuration. A value of stdout or stderr may be specified for the File Name method argument to direct tracing to standard out or error, respectivly. When stdout or stderr is set the other trace configuration values do not apply.

Type Open, Synchronous, IMPACT_ACTION

Arguments Name Type Description Directory String Directory path where trace files should be maintained.

File Name String File name of trace files.

Max File Size Integer Trace file maximum size in kilobytes.

Max Trace Integer Maximum number of rolling trace files. File

Returns None

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.GetJobInfo | 365

COM.TIBCO.hawk.hma.GetJobInfo Microagent

Purpose TIBCO Hawk WorkManagement Microagent

Methods Method Description Page GetJobInfo:GetDataA This method returns Data Area Value. 366 rea

GetJobInfo: This method returns the job performance 368 onJobPerformanceSta statistics. tistics

GetJobInfo:SubmitJo This method submits a job. 371 b

GetJobInfo:getJobDes This method returns the job description 372 criptionInfo information.

GetJobInfo:getJobList This method returns the job list. 375

GetJobInfo:getJobQu This method returns the job queue list. 378 eueInfo

GetJobInfo:getSubSys This method returns the subsystem 380 temInfo information.

TIBCO Hawk Methods Reference 366 | Chapter 9 i5/OS Microagents and Methods

GetJobInfo:GetDataArea Method

Purpose This method (on i5/OS) returns Data Area Value.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description Data Area Name String Name of the DataArea. When one of the special values is specified, the library name must be blank. The special values that can be used for data area are:

*LDA Local data area

*GDA Group data area

*PDA Program initialization parameter data area

Data Area Library String Name of the Data Area Library. The special values supported for the library name are:

*LIBL The library list.

*CURLIB The job's current library.

Starting Position Integer The first byte of the data area to be retrieved. The maximum value allowed for the starting position is 2000. A value of -1 will return all the characters in the data area.

TIBCO Hawk Methods Reference GetJobInfo:GetDataArea | 367

Name Type Description Length Integer The length of the data area substring to be retrieved. The length of data parameter must be greater than 0. If the length of data parameter is greater than the size of the data area, the receiver variable is padded with blanks.

Returns Name Type Description DataAreaName String Name of the DataArea

DataAreaLibrary String Data Area Library

StartingPostion Integer Starting Position

DataAreaLength Integer Length of Data Area

Value String Value of the Data Area

Type String Type of Data Area Value. The special values used are:

*CHAR A character data area.

*DEC A decimal data area. The value returned will be a packed decimal value.

*LGL A logical data area.

Decimal Integer Number of decimal positions Positions

TIBCO Hawk Methods Reference 368 | Chapter 9 i5/OS Microagents and Methods

GetJobInfo: onJobPerformanceStatistics Method

Purpose This method (on i5/OS) returns Job Performance Statistics.

Type Open, Asynchronous, IMPACT_INFO

Arguments Name Type Description Performance Integer Performance interval Interval

Returns Name Type Description Interval Integer The number of seconds since the initial data was collected. This value is used in calculations of utilization, counts per second, and other time-based calculations.

Elapsed Time Integer Elapsed Time

Samples Integer The number of samples taken at approximately two per second.

JobName String The name of the job or task. For an interactive job, the system assigns the job the name of the work station where the job started. For a batch job, the name is specified in the command when the job is submitted. For a task name, this field will contain the first 10 characters of the 16-character task name.

TIBCO Hawk Methods Reference GetJobInfo: onJobPerformanceStatistics | 369

Name Type Description JobNumber String The number of the job (in decimal) or task (in hexadecimal). The numbering system for jobs and tasks is different such that a job and a task could have the same number. Table is indexed on JobNumber.

JobType String The type of the job or task. The possible values for this file are:

A Autostart job

B Batch job

I Interactive job

M Subsystem monitor job

R Spooled reader job

S System job

S Vertical Licensed Internal Code (VLIC) (tasks only)

W Spooled writer job

X Start-control-program-function (SCPF) system job

TIBCO Hawk Methods Reference 370 | Chapter 9 i5/OS Microagents and Methods

Name Type Description Job Sub Type String The subtype of the job. The possible values for this file are: blank The job has no special subtype

D Immediate

E Evoke job (communications batch)

J Prestart job

P Print driver job

T Multiple requester terminal (MRT) job (System/36 environment only)

U Alternate spool user

CPU Integer CPU The processing unit time (in milliseconds) used by this job.

ThreadCount Integer The count of the number of threads initiated within the job.

TIBCO Hawk Methods Reference GetJobInfo:SubmitJob | 371

GetJobInfo:SubmitJob Method

Purpose This method (on i5/OS) submits a job.

Arguments Name Type Description Command String Command to Submit the Job

SubmitJobName String Jobname (up to 10 characters) to be submitted

JobDescription String JobDescription

JobDescriptionLibrary String Library of Job Description

JobQueue String JobQueue

JobQueueLibrary String JobQueueLibrary

AllowMultiThreads String Allow Multi Threads

Returns Name Type Description Submitted Job Name String Submitted Job Name

User Name String User Name

Job Number String Job Number

Job Message String Job Message

TIBCO Hawk Methods Reference 372 | Chapter 9 i5/OS Microagents and Methods

GetJobInfo:getJobDescriptionInfo Method

Purpose This method (on i5/OS) returns the job description information. The tabular data that is returned is indexed on JobDescription and JobDescriptionLibrary.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description Job Description String Library that has the Job Description Library You can use the following special values:

*CURLIB: The job’s current library

*LIBL: The library list.

Job Description String (Optional) Name Name of the job description. If the Job Description Name is not specified, the method returns all jobs.

The wildcard character* can be used as a suffix when specifying this argument.

Returns Name Type Description JobDescription String The name of the job description about which information is being returned

JobDescriptionLibrary String The name of the library in which the job description resides

UserName String The name of the user profile associated with this job description

Date String The date that will be assigned to jobs using this job description when they are started

TIBCO Hawk Methods Reference GetJobInfo:getJobDescriptionInfo | 373

Name Type Description Switches String The initial settings for a group of eight job switches used by jobs that use this job description These switches can be set or reset in a program and used to control a program's flow. The possible values are '0' (off) and '1' (on).

QueueName String The name of the job queue into which batch jobs using this job description are placed

QueueLibrary String The library of the job queue into which batch jobs using this job description are placed

QueuePriority String The scheduling priority of each job that uses this job description.The highest priority is 1 and the lowest priority is 9.

OutputQueue Name String The name of the output queue for this job description.

*USRPRF The output queue name for jobs using this job description is obtained from the user profile of the job at the time the job is started.

*DEV The output queue with the same name as the printer device for this job description is used.

*WRKSTN The output queue name is obtained from the device description from which this job is started.

output-queue-name The name of the output queue for this job description.

OutputQueue Library String Library name in which the output queue resides.

TIBCO Hawk Methods Reference 374 | Chapter 9 i5/OS Microagents and Methods

Name Type Description Output Queue Priority String The output priority for spooled files that are produced by jobs using this job description. The highest priority is 1, and the lowest priority is 9.

TextDescription String The user text, if any, used to briefly describe the job description

AllowMultiThreading String Whether or not the job is allowed to run with multiple user threads

TIBCO Hawk Methods Reference GetJobInfo:getJobList | 375

GetJobInfo:getJobList Method

Purpose This method (on i5/OS) returns the job(s) information.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description JobName String Name of the Job. The following special values can be used:

*CURRENT All jobs with the current job's name.

*ALL All jobs. This is the default value.

The wildcard character* can be used as a suffix when specifying this argument.

UserName String User who submitted the job. The following special values can be used:

*CURRENT Jobs with the current job's user profile. This is the default value.

*ALL Jobs with the specified job name, regardless of the user name.

The wildcard character* can be used as a suffix when specifying this argument.

JobNumber String JobNumber. The following special values can be used:

*ALL Jobs with the specified job name and user name, regardless of the job number. This is the default value.

TIBCO Hawk Methods Reference 376 | Chapter 9 i5/OS Microagents and Methods

Name Type Description JobStatus String JobStatus. The following special values can be used:

*ACTIVE Active jobs. This includes group jobs, system request jobs, and disconnected jobs.

*JOBQ Jobs currently on job queues.

*OUTQ Jobs that have completed running but still have output on an output queue.

*ALL All jobs, regardless of status. This is the default value.

JobType String Type of the Job Batch, Interactive or ALL

Returns Name Type Description JobName String Name of the Job

UserName String The user profile under which the job is run. The user name is the same as the user profile name and can come from several different sources depending on the type of job.

JobNumber String The system-assigned job number. Table is indexed on JobNumber.

TIBCO Hawk Methods Reference GetJobInfo:getJobList | 377

Name Type Description JobStatus String The status of the job. The values are:

*ACTIVE The job has started, and it can use system resources (processing unit, main storage, and so on). This does not guarantee that the job is currently running, however.

*JOBQ The job is currently on a job queue. The job possibly was previously active and was placed back on the job queue because of the Transfer Job (TFRJOB) or Transfer Batch Job (TFRBCHJOB) command, or the job was never active because it was just submitted.

*OUTQ The job has completed running and has spooled output that has not yet printed.

JobType String Type of the Job, Batch, Interactive or ALL The possible values for this field are:

A The job is an autostart job.

B The job is a batch job.

I The job is an interactive job.

M The job is a subsystem monitor job.

R The job is a spooled reader job.

S The job is a system job.

W The job is a spooled writer job.

X The job is the SCPF system job.

Subsystem Name String Subsystem Name

Subsystem Type String Subsystem Type

RunPriority Integer Run Priority

CPU used Integer CPU used

Function Name String Name of the function

Function Type String Function Type

Active Status String Active Status

TIBCO Hawk Methods Reference 378 | Chapter 9 i5/OS Microagents and Methods

GetJobInfo:getJobQueueInfo Method

Purpose This method (on i5/OS) returns the job queue information. The tabular data that is returned is indexed on Job Queue Name and Job Queue Name Library Name.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description JobQueue Library Name String Name of the Library in which Job Queue is present. The following special values are supported for the library name:

*LIBL The library list used to locate the job queue.

*CURLIB The current library for the job is used to locate the job queue.

JobQueue Name String Name of the Job Queue

Returns Name Type Description Job Queue Name String The name of the job queue

Job Queue Library Name String The name of the library that contains the job queue

Number of Jobs Integer The number of jobs in the queue

Job Queue Status String Status of Job Queue. The status may be one of the following values:

RELEASED The queue is released.

HELD The queue is held.

Description String Job Queue Description

TIBCO Hawk Methods Reference GetJobInfo:getJobQueueInfo | 379

Name Type Description Sequence No Integer The job queue entry sequence number. The subsystem uses this number to determine the order in which job queues are processed.

Max Active Jobs Integer The maximum number of jobs that can be active at the same time.

A -1 in this field indicates that the value is *NOMAX.

Current Active Jobs Integer Jobs that are currently active in this Job Queue

Sub system Name String The name of the subsystem that can receive jobs from this job queue. If there is no name, then this queue is not associated with an active subsystem, and no job can be processed.

Subsystem Library String The library in which the subsystem description resides

TIBCO Hawk Methods Reference 380 | Chapter 9 i5/OS Microagents and Methods

GetJobInfo:getSubSystemInfo Method

Purpose This method (on i5/OS) returns the subsystem information. The tabular data that is returned is indexed on SubSystem Name and SubSystem Library.

Type Open, Synchronous, IMPACT_INFO

Arguments None

Returns Name Type Description Subsystem Name String Subsystem Name

SubSystem String SubSystem Library Library

Status String Status Possible values that can be returned for subsystem status are:

*ACTIVE The subsystem is running.

*INACTIVE The subsystem is not running.

MaxActiveJobs Integer The maximum number of jobs that can run or use resources in the subsystem at one time.

CurrentActiveJobs Integer The number of jobs currently active in the subsystem

MonitorJob String The name for the subsystem monitor job as identified to the system. The field is blank if the subsystem extended status field is *INACTIVE.

MonitorUser String The name of the user profile under which the subsystem monitor job is running. The field is blank if the subsystem extended status field is *INACTIVE.

Description String The text of the subsystem description

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.GetNetworkOS400 | 381

COM.TIBCO.hawk.hma.GetNetworkOS400 Microagent

Purpose TIBCO Hawk Network Microagent

Methods Method Description Page GetNetworkOS400: Subscribing to this method returns any 382 getNetworkAttribu unsolicited notifications that are sent from the te managed application corresponding to this Microagent. Invoking this method returns the last such message that was received (if any).

GetNetworkOS400: Gets network attributes. 382 getNetworkAttribu te

GetNetworkOS400: Gets the network connection status. 383 getNetworkConnec tion

GetNetworkOS400: Gets the network interface. 385 getNetworkInterfac e

GetNetworkOS400: Gets a detailed list of all routes. 386 getNetworkRoute

TIBCO Hawk Methods Reference 382 | Chapter 9 i5/OS Microagents and Methods

GetNetworkOS400:getNetworkAttribute Method

Purpose This method (on i5/OS) returns the network attributes.

Type Open, Synchronous, IMPACT_INFO

Arguments Name Type Description Network String List of network attributes, separated by ’,’ Attributes

Returns Name Type Description Attribute Name String Name of the network attribute. Table is indexed on Attribute Name.

Attribute Data String Value of the network attribute

TIBCO Hawk Methods Reference GetNetworkOS400:getNetworkConnection | 383

GetNetworkOS400:getNetworkConnection Method

Purpose This method (on i5/OS) returns the network connection status. The tabular data that is returned is indexed onRemote Address, Local Address, Remote Port, and Local Port.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments None

Returns Name Type Description Remote Address String The internet address, in dotted decimal format, of the remote host. Zero is shown if the list entry is for a UDP socket.

Local Address String The local system internet address, in dotted decimal format, of the connection.

Remote Port Integer The remote host port number. Zero is shown if the list entry is for a UDP socket.

Local Port Integer The local system port number.

TCP State Integer A typical connection goes through the states:

0 Listen. Waiting for a connection request from any remote host.

1 SYN-sent. Waiting for a matching connection request after having sent connection request.

2 SYN-received. Waiting for a confirming connection request acknowledgement.

3 Established. The normal state in which data is transferred.

4 FIN-wait-1. Waiting for the remote host to acknowledge the local system request to end the connection.

5 FIN-wait-2. Waiting for the remote host request to end the connection.

TIBCO Hawk Methods Reference 384 | Chapter 9 i5/OS Microagents and Methods

Name Type Description

TCP State Cont’d Integer 6 Close-wait. Waiting for an end connection request from the local user.

7 Closing. Waiting for an end connection request acknowledgement from the remote host.

8 Last-ACK. Waiting for the remote host to acknowledge an end connection request.

9 Time-wait. Waiting to allow the remote host enough time to receive the local system's acknowledgement to end the connection.

10 Closed. The connection has ended.

11 State value not supported by protocol.

Bytes In Long Number of bytes received from the remote host

Bytes Out Long Number of bytes sent to the remote host

Connection Open Integer Active or Passive Connection Type

Net Connection Type String Type of connection or socket

TIBCO Hawk Methods Reference GetNetworkOS400:getNetworkInterface | 385

GetNetworkOS400:getNetworkInterface Method

Purpose This method (on i5/OS) returns the network interface.

Type Open, Synchronous, IMPACT_INFO

Arguments None

Returns Name Type Description InternetAddr String The internet address, in dotted decimal notation, of ess an interface. Table is indexed on InternetAddr.

Network String Internet address, in dotted decimal notation of the Address IP network or subnetwork to which the interface is attached

Network String Name of the network Name

Line String Name of the communications line description that Description identifies the physical network associated with an interface

Interface String Name of the interface Name

Interface String Current status of this logical interface Status

TIBCO Hawk Methods Reference 386 | Chapter 9 i5/OS Microagents and Methods

GetNetworkOS400:getNetworkRoute Method

Purpose This method (on i5/OS) returns a detailed list of all routes.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments None

Returns Name Type Description Index Integer Index

RouteDestina String The Internet Protocol (IP) address, in dotted tion decimal notation, of the ultimate destination reached by this route

SubnetMask String The actual value of the subnet mask in dotted decimal notation

NextHop String The internet address of the first system on the path from your system to the route destination

RouteType String Type of the route.

Route Source String Specifies how this route was added to the IP routing tables.

Route Status String Indicated whether this route is available.

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.MessageHandler | 387

COM.TIBCO.hawk.hma.MessageHandler Microagent

Purpose TIBCO Hawk File Status Microagent

Methods Method Description Page MessageHandler:ge Returns the message information from a 388 tMessageInfo message queue.

TIBCO Hawk Methods Reference 388 | Chapter 9 i5/OS Microagents and Methods

MessageHandler:getMessageInfo Method

Purpose This method (on i5/OS) returns the message information from a message queue.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description MessageQue String Name of the Message Queue ueName

MessageQue String Name of the message queue library. ueLibrary *CURLIB The job's current library

*LIBL The library list

MessageType String The type of the message being received.The message type and message key parameters work together. Depending on the message type, the key can be required, optional, or disallowed.

MessageKey String The key to the message being received

MessageWait I n t e g e r T h e l e n g t h o f t i m e t o w a i t f o r t h e m e s s a g e Time to arrive in the queue so it can be received 0 No wait, -1 Wait until message arrives, n any other positive value

TIBCO Hawk Methods Reference MessageHandler:getMessageInfo | 389

Name Type Description Message String The action to take after the message is Action received. Valid values follow:

*OLD Keep the message in the message queue and mark it as an old message. You can receive the message again only by using the message key or by specifying the message type *NEXT, *PRV (previous), *FIRST, or *LAST.

*REMOVE Remove the message from the message queue. The message key is no longer valid, so you cannot receive the message again.

*SAME Keep the message in the message queue without changing its new or old designation. *SAME lets you receive the message again later without using the message key.

Returns Name Type Description MessageId String The identifying code of the message received

Message String The message type of the message received Type

Message Key String The key to the message received

Message String The severity of the message received Severity

Sending job String The name of the job in which the message being received was sent

Sending User String The name of the user profile that sent the Profile message being received

Sending String Program name that contains the procedure program sending the message. The original program model (OPM) program name or ILE bound program name that contains the procedure sending the message.

TIBCO Hawk Methods Reference 390 | Chapter 9 i5/OS Microagents and Methods

Name Type Description Message String Message Text

Message String Message help Help

Time String The time at which the message being received Sent(HHMM was sent, in HHMMSS SS)

Date String The Date at which the message being received Sent(CYYM was sent, in CYYMMDD MDD)

TIBCO Hawk Methods Reference COM.TIBCO.hawk.hma.ListObjects | 391

COM.TIBCO.hawk.hma.ListObjects Microagent

Purpose TIBCO Hawk GetObjects Microagent.

Methods Method Description Page ListObjects:getObje Gets the list of objects in a given library and 392 cts type.

TIBCO Hawk Methods Reference 392 | Chapter 9 i5/OS Microagents and Methods

ListObjects:getObjects Method

Purpose This method (on i5/OS) returns the list of objects in a given library and type. The tabular data that is returned is indexed on ObjectName and ObjectType.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description LibraryName String Name of the Library form where to get the list of objects. The special values that can be used are:

*ALL All libraries

*ALLUSR All user-defined libraries, plus libraries containing user data and having names starting with Q

*CURLIB The job's current library

*LIBL The library list

*USRLIBL The user portion of the job's library list

Object Prefix String Prefix of the object name. The name could be a simple name, a generic name or could have a special value of:

*ALL, *ALLUSR, or *IBM

Object Type String Type of the object. The following special values can be used:

*ALL, *PGM, or *FILEMODULE

Returns Name Type Description ObjectName String Name of the Object

TIBCO Hawk Methods Reference ListObjects:getObjects | 393

Name Type Description ObjectLib String Name of the Object’s Library

ObjectType String Type of the Object

TIBCO Hawk Methods Reference 394 | Chapter 9 i5/OS Microagents and Methods

COM.TIBCO.hawk.hma.OS400Custom Microagent

Purpose TIBCO Hawk WorkManagement Microagent

Methods Method Description Page OS400Custom:ExecuteCLCommand Executes a CL command 395

TIBCO Hawk Methods Reference OS400Custom:ExecuteCLCommand | 395

OS400Custom:ExecuteCLCommand Method

Purpose This method (on i5/OS) executes a CL command.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description CL String CL Command to execute Command

Returns Name Type Description CL Command Status String Execute CL Command Status

TIBCO Hawk Methods Reference 396 | Chapter 9 i5/OS Microagents and Methods

COM.TIBCO.hawk.hma.SystemInfo Microagent

Purpose TIBCO Hawk SystemInfo Microagent

Methods Method Description Page SystemInfo:getSysInfo Returns the system 397 information.

SystemInfo:getSysStorageInfo Returns the system storage 399 information.

SystemInfo:getSystemValue Returns as tabular data the 401 system values for a given System Value Name.

TIBCO Hawk Methods Reference SystemInfo:getSysInfo | 397

SystemInfo:getSysInfo Method

Purpose This method (on i5/OS) returns the system information.

Type Open, Synchronous, IMPACT_INFO

Arguments None

Returns Name Type Description System Name String The name of the system where the statistics were collected.

Signed On Users Integer The number of users currently signed on the system. System request jobs and group jobs are not included in this number.

Users SignOff Integer The number of users currently signed off.

System suspended users Integer The number of user jobs that have been temporarily suspended by system request jobs so that another job may be run.

Job suspended users Integer The number of user jobs that have been temporarily suspended by group jobs so that another job may be run.

Print Wait Jobs Integer The number of batch jobs on the system that are currently waiting to run, including those that were submitted to run at a future date and time. Jobs on the job schedule that have not been submitted are not included.

TIBCO Hawk Methods Reference 398 | Chapter 9 i5/OS Microagents and Methods

Name Type Description Active Jobs Integer The number of batch jobs currently running on the system.

Jobs Scheduled Integer The number of batch jobs on the system that are currently waiting to run, including those that were submitted to run at a future date and time. Jobs on the job schedule that have not been submitted are not included.

Jobs Held Integer The number of batch jobs that had started running, but are now held.

Jobs on HoldQ Integer The number of batch jobs on job queues that have been assigned to a subsystem, but are being held.

TIBCO Hawk Methods Reference SystemInfo:getSysStorageInfo | 399

SystemInfo:getSysStorageInfo Method

Purpose This method (on i5/OS) returns the system storage information.

Type Open, Synchronous, IMPACT_INFO

Arguments None

Returns Name Type Description System Name String System Name

ElapseTime(HHMMSS) String Elapsed Time:The time that has elapsed between the measurement start time and the current system time

RestrictedState String Whether the system is in restricted state

Jobs in System Integer The total number of user jobs and system jobs that are currently in the system

Main storage(KB) Integer The amount of main storage, in kilobytes, in the system

Processing Unit Used% Integer The average of the elapsed time during which the processing units were in use

Active Jobs Integer The number of batch jobs currently running on the system.

Permanent Address% Double The percentage of the maximum possible addresses for permanent objects that have been used

Temporary Address% Double The percentage of the maximum possible addresses for temporary objects that have been used

TIBCO Hawk Methods Reference 400 | Chapter 9 i5/OS Microagents and Methods

Name Type Description System ASP(MB) Integer The storage capacity of the system auxiliary storage pool (ASP1)

ASP Used% Double The percentage of the system storage pool currently in use

Auxiliary Storage(MB) Integer The total auxiliary storage on the system

Unprotected Integer The current amount of Storage(MB) storage in use for temporary objects

Max Unprotected Integer The largest amount of storage Storage(MB) for temporary objects used at any one time since the last IPL

DB capability% Double The percentage of processor capability (in tenths) that was used during the elapsed time. Database capability is the maximum CPU utilization available for database processing on this server. -1 is returned if this server does not report the amount of CPU used for database processing. For example, a value of 411 in binary would be 41.1 percent.

Current Date String The date and time when the status was gathered. This is in system timestamp format

TIBCO Hawk Methods Reference SystemInfo:getSystemValue | 401

SystemInfo:getSystemValue Method

Purpose This method (on i5/OS) returns as tabular data the system values for a given System Value Name.

Type Open, Synchronous, IMPACT_ACTION_INFO

Arguments Name Type Description System Value String Names for System Values. Name More than one value can be entered separated by commas.

Returns Name Type Description System Value Name String Signed On Users. Table is indexed on System Value Name.

System Value String Users Currently signed off

TIBCO Hawk Methods Reference 402 | Chapter 9 i5/OS Microagents and Methods

TIBCO Hawk Methods Reference | 403

Chapter 10 Methods Available for TIBCO Runtime Agent

This chapter describes the methods provided by the microagent TIBCORuntimeAgent. This microagent is available only when using TIBCO Hawk in the TIBCO Runtime Agent environment.

Topics

• COM.TIBCO.hawk.TIBCORuntimeAgent, page 404

TIBCO Hawk Methods Reference 404 | Chapter 10 Methods Available for TIBCO Runtime Agent

COM.TIBCO.hawk.TIBCORuntimeAgent Microagent

Purpose TIBCO Hawk RuntimeAgent Microagent.

Methods Method Description Page TIBCORuntimeAgent:getComp Returns the status of the specified 405 onentInstanceStatus component instance.

TIBCORuntimeAgent:getReleas Returns current release version 406 eVersion information for this microagent.

TIBCORuntimeAgent:getTIBC Returns the TIBCO home directory. 407 OHome

TIBCORuntimeAgent:getTraceF Returns a list of trace files names 408 ileNames corresponding to the specific deployment and component.

TIBCORuntimeAgent:startCom Starts a component instance for a 409 ponentInstanceFromUAC particular deployment.

TIBCORuntimeAgent:stopCom Stops a component instance for a 410 ponentInstance particular deployment.

TIBCO Hawk Methods Reference TIBCORuntimeAgent:getComponentInstanceStatus | 405

TIBCORuntimeAgent:getComponentInstanceStatus Method

Purpose This method returns the status of the specified component instance.

Type Open, Synchronous, IMPACT_INFO

Arguments Name Type Description Deployment String The specific deployment of the component instance.

Component String The name of the component instance. Instance

Returns Name Type Description State String The state of the component instance.

Count Integer The error count of the startup failure.

TIBCO Hawk Methods Reference 406 | Chapter 10 Methods Available for TIBCO Runtime Agent

TIBCORuntimeAgent:getReleaseVersion Method

Purpose This method returns current release version information for this microagent.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description Name String The release name.

Version String Version number of the release.

Date String Version date of the release.

Version Major String Major number of release. Number

Version Minor String Minor number of release. Number

Version Patch String Release version update number. Number

Build Number String Build number of the release.

Internal Version String Version number for internal use.

TIBCO Hawk Methods Reference TIBCORuntimeAgent:getTIBCOHome | 407

TIBCORuntimeAgent:getTIBCOHome Method

Purpose This method returns the TIBCO home directory.

Type Synchronous, IMPACT_INFO.

Arguments None.

Returns Name Type Description TIBCO Home String The TIBCO home directory.

TIBCO Hawk Methods Reference 408 | Chapter 10 Methods Available for TIBCO Runtime Agent

TIBCORuntimeAgent:getTraceFileNames Method

Purpose This method returns a list of trace files names corresponding to the specific deployment and component.

Type Open, Synchronous, IMPACT_INFO

Arguments Name Type Description Deployment String The deployment name.

Component String The component instance name. Instance

Returns Name Type Description File Name String The trace file name for the specified deployment and component instance.

TIBCO Hawk Methods Reference TIBCORuntimeAgent:startComponentInstanceFromUAC | 409

TIBCORuntimeAgent:startComponentInstanceFromUAC Method

Purpose This method starts a component instance for a particular deployment. This method should only be used in a TIBCO Hawk rulebase.

Type Open, Synchronous, IMPACT_ACTION

Arguments Name Type Description Deployment String The deployment name.

Component String The component instance name. Instance

Home Path String This field is for internal used only and should be blank.

Returns None.

TIBCO Hawk Methods Reference 410 | Chapter 10 Methods Available for TIBCO Runtime Agent

TIBCORuntimeAgent:stopComponentInstance Method

Purpose This method stops a component instance for a particular deployment. This method should only be used in a TIBCO Hawk rulebase

Type Open, Synchronous, IMPACT_ACTION

Arguments Name Type Description Deployment String The deployment name.

Component String The component instance name. Instance

EnableKill Boolean A flag to indicate whether a forceful kill will be issued to stop the specified component instance besides the graceful shutdown.

KillDelay Integer The delay time (in seconds) to do the forceful kill if the EnableKill flag is set to true.

MaxDelay Integer The time (in seconds) passed to the application to indicate the maximum time that the application will wait for jobs (or business processes) to complete before terminating itself.

Applicable only to the bwengine component instance.

WaitForChec Boolean The flag passed to the application to kPoints indicate whether the application should wait for checkpoints.

Applicable only to the bwengine component instance.

Returns None.

TIBCO Hawk Methods Reference | 411

Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples

The rulebases and scripts provided in this sample demonstrate the use of the TIBCO ActiveMatrix Host microagent (introduced in TIBCO Hawk4.9) to monitor and manage TIBCO ActiveMatrix 3.0 hosts and nodes.

Topics

• Overview, page 412 • SETUP Instructions, page 418

TIBCO Hawk Methods Reference 412 | Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples

Overview

The sample provides the following functionality related to the AMX Host microagent and the TIBCO EMS microagent: 1. Detect when the connected AMX Host (TibcoHost) is abnormally shutdown and restart it. Restart is only attempted if the connected EMS server is running. 2. Detect when the Administrator Node (SystemNode) was abnormally shutdown and restart it. (Assumes that the SystemNode is also managed by the connected AMX Host). Restart is only attempted when the Admin database (if external) is running, and the connected EMS server is running. A sample DBping microagent is included to support this scenario. Note that the rulebases to support this scenario B are only setup when the ActiveMatrix Administrator instance is created via TCT. 3. Auto-detect runtime nodes managed by the connected AMX Host (TibcoHost), and provide/generate rulebases for each node that restart the node when abnormally shutdown. Restart is only attempted when the connected EMS server is running. The rulebases and scripts are auto-configured from the output of a TIBCO Configuration Tool (TCT) run. When TCT is run on a machine to setup either an ActiveMatrix Administrator instance or a TIBCO Host instance, its output directory can be used to configure the TIBCO Hawk rulebases and scripts to manage the installed TIBCO ActiveMatrix Administrator and/or TIBCO Host and nodes. The SETUP Instructions section of this document describes how to configure the rulebases and scripts.

Follow the steps mentioned in the readme.txt under HAWK_HOME\samples\rulebases\amx3.

Expected behavior 1. Do not start tibcohost and start hawk agent. The following two alerts should be seen: — TibcoHost stopped — ActiveMatrix Host (Tibcohost) is not running... going to restart it (EMS server is running: 1) Tibcohost and nodes should be start automatically and clear the two alerts after tibcohost and nodes are started by the rulebase.

TIBCO Hawk Methods Reference Overview | 413

The following rulebases should be seen:

— AMXNodeManagerRB-Admin-amxadmin-instanceOne

— DevNodeRB-Admin-amxadmin-instanceOne

— SystemNodeRB-Admin-amxadmin-instanceOne

— TibcoHostRB-Admin-amxadmin-instanceOne 2. Kill the node process for example, SystemNode process.

— An alert "Lost Contact with SystemNode" should be seen.

Automatically start the SystemNode and the Lost Contact with SystemNode alert should be cleared.

3. Create a new node (DemoNode) and install the new node.

— A new rulebase by the name DemoNodeRB-Admin-amxadmin-instanceOne should be created automatically. — Start the above node and kill its process.

— An alert "Lost Contact with DemoNode" should be seen.

DemoNode should be started automatically and the Lost Contact with DemoNode alert should be cleared.

Scenario A Detect when connected tibcohost is abnormally shutdown, and restart only if EMS server is running.

Rulebase Name Microagents Used

SystemNodeRB-${tibcohost.inst • com.tibco.hawk.amx.AMXHost ance.name} • com.tibco.hawk.tibjms.HawkLis tener

• COM.TIBCO.hawk.hma.Process

Implementation

•Use AMXHost.isHostRunning() to determine if the tibcohost is running

if Running is False,

then post 'th_not_running' condition and send Medium level alert: "TibcoHost stopped".

TIBCO Hawk Methods Reference 414 | Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples

•Use AMXHost.getHostInfo to determine runtime state of the tibcohost.

if Runtime State = 'LOST_CONTACT' or Runtime State='NOT_RUNNING'

then post 'th_lost_contact' condition and send Medium alert: "Lost Contact with Tibco Host, Host is in a NOT_RUNNING state".

•Use HawkListener.isRunning() to determine the state of the EMS server connected to tibcohost.

if running is True

then post ems.server..isrunning condition

if running is False

then send High alert: "Tibcohost Qin EMS Server is down: Rules will NOT restart TH".

•Use Process.getInstanceCount(ProcessName='tibcohost') to determine whether there is a running OS process for the tibcohost.

if Process Count < 1 and the following posted conditions exist:

ems.server..isrunning and th_not_running

then execute start_tibcohost script, and send High alert: "ActiveMatrix Host is not running, going to restart it."

Scenario B Detect when the Administrator Node (SystemNode) was abnormally shutdown and restart it, only if the external database (if used) is alive, and if the connected EMS server is running.

Rulebase Name Microagents Used

TibcoHostRB-${tibcohost.insta • com.tibco.hawk.amx.AMXHost nce.name} • com.tibco.hawk.tibjms.HawkLis tener

• COM.TIBCO.hawk.hma.Process

• com.tibco.hawk.samples.DBPing MicroAgent

TIBCO Hawk Methods Reference Overview | 415

Implementation During auto-configuration of the rulebases, determine whether an external database is used.

External Database IS Used If external database IS used, then the following rules are setup:

•Use AMXHost.onNodeEvent to determine runtime state of the SystemNode.

if Runtime State = 'LOST_CONTACT' or Runtime State='NOT_RUNNING'

then post 'th_lost_contact_systemnode' condition and send High Alert: "Lost Contact with SystemNode".

•Use HawkListener.isRunning() to determine the state of the EMS server connected to tibcohost.

if running is True

then post ems.server..isrunning condition.

•Use DBPingMicroAgent.ping() to determine the state of the external Database.

if ping is True

then post systemnode.db.isRunning condition.

•Use Process.getInstanceCount(ProcessName='SystemNode') to determine whether there is a running OS process for the SystemNode.

if Process Count < 1 and the following posted conditions exist: ems.server..isrunning and th_lost_contact_systemnode and systemnode.db.isRunning

then execute AMXHost.startNode('SystemNode').

External Database is NOT Used If external database is NOT used, then the following rules are setup:

•Use AMXHost.onNodeEvent to determine runtime state of the SystemNode.

if Runtime State = 'LOST_CONTACT' or Runtime State='NOT_RUNNING'

then post 'th_lost_contact_systemnode' condition and send High Alert: "Lost Contact with SystemNode".

•Use HawkListener.isRunning() to determine the state of the EMS server connected to tibcohost.

if running is True

TIBCO Hawk Methods Reference 416 | Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples

then post ems.server..isrunning condition.

•Use Process.getInstanceCount(ProcessName='SystemNode') to determine whether there is a running OS process for the SystemNode.

if Process Count < 1 AND the following posted conditions exist:

ems.server..isrunning AND th_lost_contact_systemnode

then execute AMXHost.startNode('SystemNode')

Scenario C Auto-detect runtime nodes managed by the connected AMX Host (TibcoHost), and provide/generate rulebases for each node that restart the node when abnormally shutdown. Restart is only attempted when the connected EMS server is running.

Rulebase Name Microagents Used

AMXNodeManagerRB • com.tibco.hawk.amx.AMXHost

• COM.TIBCO.hawk.microagent.Rul eBaseEngine

Use AMXHost.getNodeInfo to determine the names of all nodes (every 30 seconds)

if Node Name != 'SystemNode'

then execute the ANT project : 'scripts/antrunner generate-noderb.xml' with argument amx.node.name= Node Name and then execute the method RuleBaseEngine.loadRuleBaseFromFile(${Node Name}RB-${tibcohost.instance.name}.hrb)

The ANT project 'generate-noderb.xml' will generate a rulebase file in the Hawk autoconfig folder called '${Node Name}RB-${tibcohost.instance.name}.hrb. This rulebase is based on a template that has the following behavior.

TIBCO Hawk Methods Reference Overview | 417

Rulebase Name Microagents Used

AMXNodeRB • com.tibco.hawk.amx.AMXHost

• com.tibco.hawk.tibjms.HawkLis tener

• COM.TIBCO.hawk.hma.Process

•Use AMXHost.onNodeEvent to determine runtime state of the AMXNode.

if Runtime State = 'LOST_CONTACT' or Runtime State='NOT_RUNNING'

then post 'th_lost_contact_node' condition and send High Alert: "Lost Contact with ${Node Name}"

•Use HawkListener.isRunning() to determine the state of the EMS server connected to the tibcohost.

if running is True

then post ems.server..isrunning condition.

•Use Process.getInstanceCount(ProcessName=${Node Name}) to determine whether there is a running OS process for the AMXNode.

if Process Count < 1 AND the following posted conditions exist:

ems.server..isrunning AND th_lost_contact_node

then execute AMXHost.startNode('${Node Name}').

TIBCO Hawk Methods Reference 418 | Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples

SETUP Instructions

Use the following three steps to get the TIBCO ActiveMatrix 3.0 sample rulebases configured for use with TIBCO Hawk 4.9.

Step 1 Edit

•the 'autoconfigure-amx-hrb.properties' to specify the following variables:

— tibco.amx.home - TIBCO_HOME used for TIBCO ActiveMatrix 3.0 installation

for example, c:\amx301ga

— tibco.hawk.home - TIBCO_HOME used for TIBCO Hawk 4.9 installation

for example, c:\hawk49ga

— tibco.config.mgmt.home - same as specified using TCT

for example, c:\amx301ga\data

— hawk.config.mgmt.home - configuration home for TIBCO Hawk 4.9 (different from TIBCO ActiveMatrix 3.0 config home)

for example, c:\hk49data\tibco\cfgmgmt\hawk • the extract.properties to specify the following TIBCO ActiveMatrix 3.0 installation variables:

— tct.instance.install.dir - the TCT Admin Server configuration run to be used to configure the AMX properties. for example, tct.instance.install.dir=${tibco.config.mgmt.home}/tct/admin /2010-09-16-13-06-04/scripts

— hawk.property.file - the output property file which will be used in hawkagent.cfg (as external variables). Note that you don't have to edit this property if you want to keep the default value. for example, hawk.property.file=${staging.dir}/data/Hawk-amx_variables.pr operties

Step 2 Run the ANT project 'autoconfigure-amx-hrb.xml' using the antrunner script in the scripts directory, for example: Windows: .\scripts\antrunner.bat autoconfigure-amx-hrb.xml auto=true

TIBCO Hawk Methods Reference SETUP Instructions | 419

UNIX: .\scripts\antrunner autoconfigure-amx-hrb.xml auto=true

Step 3 On UNIX:

Edit the hawkagent.cfg to configure the following properties:

• hma_plugin_dir "${hawk.config.mgmt.home}/staging/plugin". • variables "${hawk.config.mgmt.home}/staging/data/Hawk_variables.propertie s".

• auto_config_dir "${hawk.config.mgmt.home}/staging/rulebases". On Windows:

• Launch tibhawkconfig.exe. Under Agent tab configure:

• Plugins as "${hawk.config.mgmt.home}/staging/plugin" • Variables Files as "${hawk.config.mgmt.home}/staging/data/Hawk_variables.propertie s" • Autoconfiguration Directory as "${hawk.config.mgmt.home}/staging/rulebases".

Step 4 Start HawkAgent, Hawk HMA, Hawk Display and so on, as appropriate for your platform.

TIBCO Hawk Methods Reference 420 | Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples

TIBCO Hawk Methods Reference | 421

TIBCO Hawk Methods Reference 422 | Appendix A TIBCO ActiveMatrix 3 Hawk Rulebase Samples

TIBCO Hawk Methods Reference | 423 Index

A COM.TIBCO.hawk.Repository 86, 92 COM.TIBCO.hawk.RuleBaseEngine 38 agent diagnostics, disabling 25 COM.TIBCO.hawk.Self 18 agent diagnostics, enabling 24 COM.TIBCO.hawk.Service 215 auto-configuration information 18 COM.TIBCO.hawk.SysInfo 65 configuration requests, responding to 86 Custom execute() 58 C executeForNumber() 57 executeForString() 56 changes from the previous release xvi customer support xxii com 121, 121 COM.TIBCO.hawk.commonlogging.event.CLEventPu blisher 121 COM.TIBCO.hawk.Custom 55 D COM.TIBCO.hawk.Eventlog 190 COM.TIBCO.hawk.jvm.JavaVirtualMachine 97 diagnostic tools, starting and stopping 18 COM.TIBCO.hawk.Logfile 59 COM.TIBCO.hawk.microagent.Custom 55 COM.TIBCO.hawk.microagent.Eventlog 190 COM.TIBCO.hawk.microagent.FileStat 70 E COM.TIBCO.hawk.microagent.FileSystem 253, 280, 303, 320 Eventlog COM.TIBCO.hawk.microagent.Logfile 59 getRecentApplicationEvents 191 COM.TIBCO.hawk.microagent.Network 258, 286, getRecentSecurityEvents 195 307, 325, 347 getRecentSystemEvents 193 COM.TIBCO.hawk.microagent.Performance 153 logEvent() 203 COM.TIBCO.hawk.microagent.Process 227, 249, 276, onApplicationEvent() 197 299, 328 onSecurityEvent() 199 COM.TIBCO.hawk.microagent.Registry 204 onSystemEvent() 201 COM.TIBCO.hawk.microagent.RuleBaseEngine 38 COM.TIBCO.hawk.microagent.Service 215 COM.TIBCO.hawk.microagent.SysInfo 65 COM.TIBCO.hawk.microagent.System 243, 268, 294, F 315, 337 COM.TIBCO.hawk.microagent.TibRendezvous 76 FileStat COM.TIBCO.hawk.Performance 153 getFileCount() 75 COM.TIBCO.hawk.Process 227 getFileStatus() 71 COM.TIBCO.hawk.Registry 204

TIBCO Hawk Methods Reference 424 | Index

FileSystem network host, identifying 65 getByMountPoint 255, 283, 305, 322 getByPartition 254, 281, 304, 321, 344 functions of microagents 3 O

onUnsolicitedMsg 17, 152, 242, 267, 293, 314, 336 G operating statistics of files 70

getReleaseVersion 12, 147, 237 getTraceLevel 13, 148, 238, 265 getTraceParameters 15, 150, 240 P

Performance Browser 178 I Cache 160 ICMP 185 IMPACT_ACTION microagent type 3 IP 184 IMPACT_ACTION_INFO microagent type 3 LogicalDisk() 164 IMPACT_INFO microagent type 3 Memory 158 NBT Connection() 181 Network Interface() 182 Objects 170 L Paging File() 177 PhysicalDisk() 162 Linux Microagents 312 Process() 166 log files content, monitoring 59 ProcessCount() 168 Logfile onNewLine() 60 Processor() 157 Logfile onXMLElement 61 Redirector 171 Server 173 Server Work Queues() 175 System 155 M TCP 187 Telephony 180 microagent functions 3 Thread() 169 microagent information 2 UDP 188 microagent types 3 Process getInstanceCount 228, 251, 278, 301, 331, 353, 366 getInstanceCountByCommand 252, 279, 302, 332 getInstanceCountByCommand() 229 N getProcess 230, 250, 277, 300, 329

Network getConfig 260, 287, 309, 327, 349 getStatistics 259, 288, 308, 326, 348

TIBCO Hawk Methods Reference Index | 425

R Self doAMIDiscovery 27 Registry getComponentInfo() 23 CreateKey() 212 getMicroAgentInfo() 21 EnumerateKey() 211 getReleaseVersion 20 getDWORD() 207, 214 getSecurityInfo 22 getMultiString() 209 getUptime 25, 26 getString() 208 onMicroAgentEvent 28 setDWORD() 205 turnDiagnosticsOff 25 setExpandString() 210 turnDiagnosticsOn 24 setQWORD() 213 Services setString() 206 continueService 225 release version information 18 controlService() 226 Repository getServiceConfiguration() 216 getName 88 getServiceStatus() 219 getRuleBaseName 90 pauseService() 224 getScheduleNames 89 setServiceStartType() 221 onRepositoryEvent() 91 startService() 222 retrieving information from a script or program 55 stopService() 223 rulebase functions 38 setTraceLevel 14, 239, 266 RuleBaseEngine setTraceLevel() 149 deleteRuleBase 41 setTraceParameters 16, 241 getConfigInfo 48 setTraceParameters() 151 getRuleBaseNames 43 Summary of AIX Microagents 292 getScheduleNames 44 Summary of HP-UX Microagents 262 loadRuleBase 45 Summary of Microsoft Windows Microagents 142 loadRuleBaseFromFile() 46 Summary of Platform-Independent Microagents 8 ResumeSuspendedAlerts 53 Summary of Solaris Microagents 234 sendMail() 49 support, contacting xxii unloadRuleBase 47 SysInfo rulebases information 38 getArchitecture 67 running time record 26 getHostName 68 getNetworkAddress 69 getOperatingSystem 66 System S getCpuInfo 246, 271, 295, 297, 318, 339 getSwapInfo 247, 272, 316, 341 security policy information 22 getSystemInfo 244, 269, 298, 317 getTraceParameters 274 getTunableInfo 248, 273, 319, 342 setTraceParameters 275

TIBCO Hawk Methods Reference 426 | Index

T

technical support xxii TIBCO Rendezvous daemon, monitoring 76 TIBCO_HOME xx TibRendezvous onRvDaemonStatus() 78 onRvDataLoss() 82 onRvdDisconnectOrConnect() 83 onRvLicenseExpire() 84 trace level bits, setting 14 trace level settings 13 tracing parameter information 15 tracing parameters, setting 16

U

unsolicited message defined 17, 30 unsolicited notifications 17, 30

V

version information 23

W

writing custom rules 55

TIBCO Hawk Methods Reference