ViewPoint Manual
Sample Custom Status Server
ViewPoint Manual—426801-001
D-2
Custom Server Code
!* decimal positions which are assumed in the count.  SCALE is a static
!* property of an item which can not be changed by configuration.
!*
!* The MAXIMUM-VALUE field is optionally set to contain the maximum value
!* a counter could attain.
!*
!* A timestamp is supplied with each sample.  This timestamp is the
!* four-word, Julian-date-based, microsecond resolution timestamp at the
!* time of the sample (or as soon as possible after the sample). This
!* timestamp value is returned by the JULIANTIMESTAMP system procedure
!* call.
!******************************************************************************
?PAGE "HOW TO ADD STATUS ITEMS TO THIS STATUS SERVER?"
!******************************************************************************
!*
!* ***** How to add Status Items to this status server ? *****
!*
!* 1- Modify the Defined^Items DEFINE in section STATUS COLLECTION SERVER
!*   GLOBAL VARIABLES AND DEFINITIONS ( Around line 231 )
!*
!*   Ex: Currently Defined^Items is = 6 so you should change the 6 for
!*    a 7.
!*
!* 2- Add the definition of your new status item in PROC Server^Initialize
!*   using the Allocate^Item DEFINE. ( Around line 385 ).
!*
!* Ex: Let say you want to add an object like File Extent Usage.
!*    i.e. The number of extent currently allocated !
!*
!*    Allocate^Item ( 7,      index
!*         "File Extent Usage", description
!*         "FILE-EXTENT-USAGE", ITEM TYPE
!*         "<Filename>", object name
!*           100F,    value for 100
!*           "Y",     use maximum ?
!*           "N",     reverse signify
!*           0,      scale
!*           0,      low threshold
!*         100,     high threshold
!*           "N", "N",   low/high threshold enabled
!*         "CV"     type (busy-timer or counter-value)
!*           );
!*
!* 3- You will have to enter a new CASE option in the procedure
!*   Check^Item. This CASE line will call a procedure to verify
!* the validity of the new status item being configured. ( Line 982 ).
!*
!* Ex: 7 -> Return^Error := Check^Valid^File^Name ( Request, Reply );
!*
!* 4- If the procedure does not exist like Check^Valid^File^Name ,
!*   you will have to write one.
!*
!* 5- You will have to enter a new CASE option in the procedure
!* Sample^Item. This CASE line will call a procedure to calculate
!* the information that will be displayed back on the Viewpoint
!* status screen. ( Line 1029 ).
!*
!*   Ex:  7 -> Return^Error := Sample^File^Extent^Usage ( Request, Reply );
!*
!* 6- Code the procedure Sample^File^Extent^Usage.
!*
!* 7- You are now ready to include your server into the Viewpoint
!* configuration file and see your new status item on the screen !
!*
!******************************************************************************
?PAGE "GENERAL DEFINES AND LITERALS"
-------------------------------------------------------------------------------
--
-- We will present here some useful DEFINES and LITERAL that will be used
-- in this program to increase the readability of this code. At least we hope !
--
-------------------------------------------------------------------------------
DEFINE Word    = INT#;
LITERAL True  = -1;










