Monday, August 25, 2014

PatrolCli - Part 1: Introduction

PatrolCli is a command-line program based on PATROL API and it runs on all PATROL agent platforms to provide access to the functions of a PATROL agent.

Unlike ProactiveNet Cli that you use to manage ProactiveNet every day, PatrolCli is not used in a standard PATROL/BPPM operation environment.  That is why many people are not even aware of its existence.  However PatrolCli is a powerful utility.  Understanding when and how to use it can save you time, lower your operations cost, and make your life a lot easier.

You can use PatrolCli to:

1. Access PATROL agents on all platforms.
2. Read PATROL objects from a PATROL agent.
3. Operate on PATROL events.
4. Execute PSL scripts.

In the next few posts, we will go through some examples on how to take advantage of PatrolCli.

PatrolCli is an executable program located at $PATROL_HOME/bin/ directory.  It is installed automatically with PATROL agent installation. You can use PatrolCli to access another PATROL agent in your network without a PATROL console.

Before you start PatrolCli, you need to set up your environment.  On Windows, you need to set up environment variable %PATROL_HOME%.  On UNIX, run '. ./patrolrc.sh' for korn shell or 'source .patrolrc' for C shell.

Here is an example on how to run PatrolCli interactively:

Myserver> PatrolCli
PCli% open RemoteServer 3181
Username: patrol
Password:
PCli% help

Here 'RemoteServer' is the host name of another server with PATROL agent running on port 3181.  When you type 'help' in PatrolCli, it will display all valid commands you can use in PatrolCli.  They include user, connect, open, list, listvars, get, getvar, event, echo, execpsl, help, source, ping, patrol, !!, exit, quit. '!!' command allows you to repeat the last command.  'exit' command will exit PatrolCli.  For each command, you can get more information by typing help followed by that command.  For example, 'help get' will give you more information on get command.

Here is an example on how you can use 'get' command in PatrolCli to display a parameter value (99.904922) and state (OK) without a PATROL console:

PCli% get /NT_CACHE/NT_CACHE/CACcachCopyReadHitsPercent
Mon Aug 25 23:42:58 2014
-1
0
99.904922
OK
3
0
0
100


No comments:

Post a Comment