Main Display Script: UNIX Agent

From Sysgem Support
Jump to navigationJump to search

'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.


Input variables preset by the SEM framework & output expected for SEM Displays


SEM Display, Main 'UNIX Agent' Script

The script: "Main UNIX Agent" is a Korn Shell script that runs on the SEM Agents when connected by a SEM display window.

The purpose of the script is to gather information from the target server and display that data in the 'cells' of the SEM display window.

This section describes the variables that are automatically preset at the start of the script by the SEM framework, and how the gathered data is formatted for output.


Editing the Main 'UNIX Agent' Script

The Main UNIX Agent script is found in the following place in the SEM Development Interface:




Variables:

The details of the variables stored automatically by the SEM framework at the start of script are shown below.

  • Details of the Current SEM User:

Details of the SEM user that has invoked the display are stored in the following Korn Shell variables:

   ${CLIENT_COMPUTER}      "Windows NT computer name"
   ${CLIENT_USERNAME}      "SYSGEM username"
   ${CLIENT_BUILD}         "SEM Client Build (e.g. 2.3 4459)"
   ${CLIENT_DATE_TIME}     "Date / time set in the SEM user's workstation"


  • Details from the Startup Window:

Details of the Data Entered in the field in the Startup Window are shown in the following variables:

  ${INPUT_SV}   "The Agent(s) selected for connecting to this display"
  ${INPUT_XX}   "The values of the fields entered in the startup window - XX is the field code for each parameter field"


  • Details of the Authorization Server

Details of the Authorization Server are shown in the following variables:

  ${USE_AUTH_SVR_PROXY}   "Whether the Authorization Server may be used for DB access (either 0 or 1)"
  ${AUTH_SVR_ADDRESS}     "The address of the Authorization Server as used in the SEM Login window"
  ${AUTH_SVR_PORT}        "The port number of the Authorization Server as used in the SEM Login window"



'Output from the Main 'UNIX Agent' Script'

This section describes what output is expected from the Main 'Windows Agent' script for display in the GUI window.

   "AA : <Text>"     # information for cell (AA) for first row of data
   "AB : <Text>"     # information for cell (AB) for first row of data
   "AC : <Text>"     # information for cell (AC) for first row of data
   "@"               # terminates first row
   "AA : <Text>"     # information for cell (AA) for second row of data
   "AB : <Text>"     # information for cell (AB) for second row of data
   "AC : <Text>"     # information for cell (AC) for second row of data
   "@"               # terminates second row

Other printed output recognised by the SEM framework includes the display of a dialogue box. See Dialogue Boxes for more information.