ASAP 3.2 Server Manual
HP NonStop ASAP Server Manual Page 323 of 381
Appendix A: Querying the ASAP
Database
The ASAP database is a set of key-sequenced files that you can query using Enform
or user-written programs. This section shows a sample standard Enform query and a
sample ASAPCOL as an Enform server. The ENFALL file contains a complete set of
sample queries.
Standard Enform Query
This example shows a standard Enform query:
?section cpu
!----------!
! Display cpu statistics by \node and cpu for each hour of the day.
! Note: this query must read all records in the database (no enform server)
!-------------------------------------------------------------------------!
close net, net-srv, cpu-srv;
open cpu;
declare
x,cpubusy,cpuq,cpudisp,discrate,chitrate,swaprate,memq,pcbmax,lcbmax;
set @target-records 0 @stats on;
title ""; subtitle "";
list by sysno noprint
by cpuno noprint
by ihour noprint
x := ( (event.ts - 211024440000000000) /10000 * 65536 ) noprint
cpubusy := avg (busy over ihour) noprint
cpuq := avg (qlen over ihour) noprint
cpudisp := avg (disps over ihour) noprint
discrate := avg (discs over ihour) noprint
chitrate := avg (chits over ihour) noprint
swaprate := avg (swaps over ihour) noprint
memq := avg (mqlen over ihour) noprint
pcbmax := max (pcb-use over ihour) noprint
lcbmax := max (lcb-use over ihour) noprint
after change on cpuno print skip 1 sysname space