Monitoring system resource usage by using the amqsrua command

You can use the amqsrua command to query metadata that is related to the system resource usage of a queue manager.

About this task

The amqsrua command reports metadata that is published by queue managers. This data can include information about the CPU, memory, and disk usage. You can also see data equivalent to the STATMQI PCF statistics data. The data is published every 10 seconds and is reported while the command runs.

Procedure

  1. Enter the IBM® MQ administration mode by entering the following command:

    mqcli

  2. Query the meta data by entering the following command:

    amqsrua -n MaxPubs -m QMgrName [-s model_queue]

    Where:
    MaxPubs
    Specifies how many reports are returned before the command ends. The command publishes data every ten seconds, so if you enter a value of 50, the command returns 50 reports over 500 seconds.
    If you do not specify this parameter, the command runs until either an error occurs, or the queue manager shuts down.
    QMgrName
    Specifies the name of the queue manager that you want to query. The queue manager must be running.
    If you do not specify a queue manager name, the default queue manager is used.
    model_queue
    By default amqsrua uses the SYSTEM.DEFAULT.MODEL.QUEUE. You can use the -s option to specify a different model queue.
  3. From the list of options, enter the class of data you want returned. The class is case-sensitive. The following options are available:
    CPU
    Returns information about CPU usage.
    DISK
    Returns information about disk usage.
    STATMQI
    Returns information about MQI usage.
    STATQ
    Returns information about per-queue MQI usage.
    STATAPP
    Returns information about per-application usage
  4. From the list of options, enter the type of data you want returned. The type is case-sensitive.
    • For the CPU class:
      SystemSummary (CPU performance - platform wide)
      User CPU time percentage X%
      System CPU time percentage X%
      CPU load - one minute average X
      CPU load - five minute average X
      CPU load - fifteen minute average X
      RAM free percentage X%
      RAM total bytes XMB
      QMgrSummary (CPU performance - running queue manager)
      User CPU time - percentage estimate for queue manager X%
      System CPU time - percentage estimate for queue manager X%
      RAM total bytes - estimate for queue manager XMB
    • For the DISK class:
      SystemSummary (disk usage - platform wide)
      MQ errors file system - bytes in use XMB
      MQ errors file system - free space X%
      MQ FDC file count X
      MQ trace file system - bytes in use XMB
      MQ trace file system - free space X%
      QMgrSummary (disk usage - running queue managers)
      Queue Manager file system - bytes in use XMB
      Queue Manager file system - free space X%
      Log (disk usage - queue manager recovery log)
      Log - bytes in use X
      Log - bytes max X
      Log file system - bytes in use X
      Log file system - bytes max X
      Log - physical bytes written X
      Log - logical bytes written X
      Log - write latency X uSec
      Log - write size X
      Log - bytes occupied by extents waiting to be archived X
      Log - bytes required for media recovery X
      Log - bytes occupied by reusable extents X
      Log - current primary space in use X%
      Log - workload primary space utilization X%
    • For the STATMQI class:
      CONNDISC (MQCONN and MQDISC)
      MQCONN/MQCONNX count X
      Failed MQCONN/MQCONNX count X
      Concurrent connections - high water mark X
      MQDISC count X
      OPENCLOSE (MQOPEN and MQCLOSE)
      MQOPEN count X Y/sec
      Failed MQOPEN count X
      MQCLOSE count X Y/sec
      Failed MQCLOSE count X
      INQSET (MQINQ and MQSET)
      MQINQ count X
      Failed MQINQ count X
      MQSET count X
      Failed MQSET count X
      PUT (MQPUT)
      Interval total MQPUT/MQPUT1 count X
      Interval total MQPUT/MQPUT1 byte count X Y/sec
      Non-persistent message MQPUT count X
      Persistent message MQPUT count X
      Failed MQPUT count X
      Non-persistent message MQPUT1 count X
      Persistent message MQPUT1 count X
      Failed MQPUT1 count X
      Put non-persistent messages - byte count X Y/sec
      Put persistent messages - byte count X
      MQSTAT count X
      GET (MQGET)
      Interval total destructive get- count X
      Interval total destructive get - byte count X Y/sec
      Non-persistent message destructive get - count X
      Persistent message destructive get - count X
      Failed MQGET - count X
      Got non-persistent messages - byte count X Y/sec
      Got persistent messages - byte count X
      Non-persistent message browse - count X
      Persistent message browse - count X
      Failed browse count X
      Non-persistent message browse - byte count X Y/sec
      Persistent message browse - byte count X
      Expired message count X
      Purged queue count X
      MQCB count X
      Failed MQCB count X
      MQCTL count X
      SYNCPOINT (commit and rollback)
      Commit count X
      Rollback count X
      SUBSCRIBE (subscribe)
      Create durable subscription count X
      Alter durable subscription count X
      Resume durable subscription count X
      Create non-durable subscription count X
      Failed create/alter/resume subscription count X
      Delete durable subscription count X
      Delete non-durable subscription count X
      Subscription delete failure count X
      MQSUBRQ count X
      Failed MQSUBRQ count X
      Durable subscriber - high water mark X
      Durable subscriber - low water mark X
      Non-durable subscriber - high water mark X
      Non-durable subscriber - low water mark X
      PUBLISH (publish)
      Topic MQPUT/MQPUT1 interval total X
      Interval total topic bytes put X Y/sec
      Published to subscribers - message count X
      Published to subscribers - byte count X
      Non-persistent - topic MQPUT/MQPUT1 count X
      Persistent - topic MQPUT/MQPUT1 count X
      Failed topic MQPUT/MQPUT1 count X
    • For the STATQ class:
      GENERAL (General)
      messages expired X (moved from GET for IBM MQ 9.3.0 and later CD versions)
      queue purged count X (moved from GET for IBM MQ 9.3.0 and later CD versions)
      average queue time X uSec (moved from GET for IBM MQ 9.3.0 and later CD versions)
      Queue depth X (moved from GET for IBM MQ 9.3.0 and later CD versions)
      OPENCLOSE (MQOPEN and MQCLOSE)
      MQOPEN count X
      MQCLOSE count X
      INQSET (MQINQ and MQSET)
      MQINQ count X
      MQSET count X
      PUT (MQPUT and MQPUT1)
      MQPUT/MQPUT1 count X
      MQPUT byte count X
      MQPUT non-persistent message count X
      MQPUT persistent message count X
      rolled back MQPUT count X
      MQPUT1 non-persistent message count X
      MQPUT1 persistent message count X
      non-persistent byte count X
      persistent byte count X
      lock contention X%
      queue avoided puts X%
      queue avoided bytes X%
      GET (MQGET)
      MQGET count X
      MQGET byte count X
      destructive MQGET non-persistent message count X
      destructive MQGET persistent message count X
      rolled back MQGET count X
      destructive MQGET non-persistent byte count X
      destructive MQGET persistent byte count X
      MQGET browse non-persistent message count X
      MQGET browse persistent message count X
      MQGET browse non-persistent byte count X
      MQGET browse persistent byte count X
      messages expired X (moved to GENERAL from IBM MQ 9.3.0)
      queue purged count X (moved to GENERAL from IBM MQ 9.3.0)
      average queue time X uSec (moved to GENERAL from IBM MQ 9.3.0)
      Queue depth X (moved to GENERAL from IBM MQ 9.3.0)
      destructive MQGET fails X
      destructive MQGET fails with MQRC_NO_MSG_AVAILABLE X
      destructive MQGET fails with MQRC_TRUNCATED_MSG_FAILED X
      MQGET browse fails X
      MQGET browse fails with MQRC_NO_MSG_AVAILABLE X
      MQGET browse fails with MQRC_TRUNCATED_MSG_FAILED X

      After you have specified an option for the STATQ class, the appliance requests an object name. Specify the name of the queue that you want information for.

    • For the STATAPP class:
      INSTANCE (instance statistics)
      Instance count X
      Movable instance count X
      Instance shortfall count X
      Instances started X
      Initiated outbound instance moves X
      Completed outbound instance moves X
      Instances ended during reconnect X
      Instances ended X
  5. Optional: When amqsrua finishes, exit the IBM MQ administration mode by entering the following command:

    exit

Example

The following example shows the result of using amqsrua to view CPU performance data for the running queue manager over a 20-second period:
mqa(mqcli)# amqsrua -n 2 -m ASH
CPU : Platform central processing units
DISK : Platform persistent data stores
STATMQI : API usage statistics
STATQ : API per-queue usage statistics
Enter Class selection
==> CPU
SystemSummary : CPU performance - platform wide
QMgrSummary : CPU performance - running queue manager
Enter Type selection
==> QMgrSummary
Publication received PutDate:20151014 PutTime:09175398
User CPU time - percentage estimate for queue manager 0.02%
System CPU time - percentage estimate for queue manager 0.04%
RAM total bytes - estimate for queue manager 200MB

Publication received PutDate:20151014 PutTime:09180405
User CPU time - percentage estimate for queue manager 0.00%
System CPU time - percentage estimate for queue manager 0.00%
RAM total bytes - estimate for queue manager 200MB

mqa(mqcli)#