Previous Topic: pdm_userload--Add, Update, and Delete Database Records

Next Topic: report--Generate Reports

pdm_webstat--Return Web Usage Statistics

Use pdm_webstat to return CA SDM session and user statistics for one or more web engine processes. The pdm_webstat command shows cumulative sessions, most sessions at a time, and current active sessions. It can also provide information about the individual users.

Syntax

This command has the following format:

pdm_webstat [-r] [-d | -D] [-i] [-t timeout] [-p webengine process] [-n] [-h]

-r

Specifies raw text mode, without titles and other formatting. Within the output for a single web engine process there are no line breaks; however, the output for each web engine process always starts on a new line.

Raw text mode displays data in exactly the same order as when you use pdm_webstat without the -r option. Use raw text mode if you want to use the resulting data in a spreadsheet or other type of report. For example, the following syntax:

pdm_webstat -r

shows the following output:

10/11/2005 10:31:49 web:local:0 12 4 2
10/11/2005 10:31:49 web:local:1 9 2 2

-d

Specifies detailed output that displays user sessions. The -d option lists all current sessions in the form of userid@IPaddress. If a session is displayed without a user ID, it usually means that the session has not logged on yet. For example, the following syntax:

pdm_webstat -d

shows the following output:

PDM_Webstat: Invoked at 10/11/2005 10:27:31
=========================================
Report from Webengine: web:local:0
=========================================
Cumulative sessions so far = 12
Most sessions at a time    = 4
Currently active sessions  = 2
  @192.168.1.16
  usery@192.168.1.20
=========================================
Report from Webengine: web:local:1
=========================================
Cumulative sessions so far = 7
Most sessions at a time    = 2
Currently active sessions  = 2
  SrvcPlus@192.168.1.14
  userx@192.168.1.8

-D

Provides more detailed output for debugging purposes. This option should be specified only when specifically requested by CA support. It adds internal information about each session to the detailed output. For example, the following syntax:

pdm_webstat -D

shows the following output:

PDM_Webstat: Invoked at 10/11/2007 10:28:10
==========================================
Report from Webengine: web:local:0
==========================================
Cumulative sessions so far = 12
Most sessions at a time    = 4
Currently active sessions  = 2
  @192.168.1.16            SessionStat   1
  userx@192.168.1.20       SessionStat   5
==========================================
Report from Webengine: web:local:1
==========================================
Cumulative sessions so far = 7
Most sessions at a time    = 2
Currently active sessions  = 2
  SrvcPlus@192.168.1.14    SessionStat   7
  userx@192.168.1.8        SessionStat  13
-i

Specifies an interval in seconds between successive reports. When the -i argument is specified, pdm_webstat runs continuously. The pdm_webstat command outputs its report in the format requested by other arguments, waits for the interval specified, and outputs the report again. With –i, pdm_webstat terminates only when explicitly cancelled, normally with Ctrl+C. For example, the following syntax:

pdm_webstat -i 5 -p web:local -r

shows the following output:

09/21/2007 16:27:25 web:local 14 10 6
09/21/2007 16:27:30 web:local 17 10 9
09/21/2007 16:27:35 web:local 18 10 10
09/21/2007 16:27:41 web:local 21 13 13

-t timeout

Specifies a time-out value in seconds. This parameter causes pdm_webstat to wait for a number of seconds for a response before terminating. The default is 30 seconds.

-p webengine_process

Specifies the process name of the web engine for which you want to report. By default, all web engine processes are reported. The process name (also called slump-name) is the same name that would be viewed in an slstat output and always starts with "web:".

-n

Suppresses the normal log entry for each reported web engine. By default, a log entry summarizing each web engine is created.

Note: By default, if you do not specify any parameters, pdm_webstat displays summary data for all running processes.

pdm_webstat returns zero if the command completes successfully, and a nonzero value if errors occur (for example, a time-out or no active web engine processes).

Example: pdm_webstat Output When No Parameters Are Specified

The following example shows the output of pdm_webstat when it is executed with no parameters:

PDM_Webstat: Invoked at 10/11/2007 10:26:42
=========================================
Report from Webengine: web:local:0
=========================================
Cumulative sessions so far = 12
Most sessions at a time    = 4
Currently active sessions  = 2
=========================================
Report from Webengine: web:local:1
=========================================
Cumulative sessions so far = 7
Most sessions at a time    = 2
Currently active sessions  = 2

Important! On UNIX, the LIBPATH must be set before running several CA SDM utilities. Use pdm_task to set the LIBPATH before running a utility. For example, input "pdm_task pdm_clean_attachments ...".