Wolfgang_Brueckler_75

get Agent Info via Script „HOST_MaxWaiting" and „HOST_JobCnt" in V10

Discussion created by Wolfgang_Brueckler_75 on Oct 21, 2014
Recently we hat a question how to get „HOST_MaxWaiting" and „HOST_JobCnt" Info via script.

With Help from DEV we got following script:

:SET &JOBCNT# = SYS_ACTIVE_COUNT("ANY_ALIVE", "*", "*",,"VWGSUP16_WS10_LX6_07_SYS")
:SET &MAXLOAD# = GET_UC_SETTING(WORKLOAD_MAX_JOB, "VWGSUP16_WS10_LX6_07_SYS")
:SET &ACTLOAD# = GET_UC_SETTING(WORKLOAD_ACTUAL_JOB, "VWGSUP16_WS10_LX6_07_SYS")

:IF &JOBCNT# <= &MAXLOAD#
: SET &MAXWAITING# = 0
:ELSE
: SET &MAXWAITING# = 1
:ENDIF

:PRINT "All active jobs for agent: &JOBCNT#"
:PRINT "WORKLOAD_MAX_JOB: &MAXLOAD#"

:PRINT "HOST_JobCnt: &ACTLOAD#"
:PRINT "HOST_MaxWaiting: &MAXWAITING#"

Info:
The property HOST_MaxWaiting is simply a comparison between the number of all active jobs for the agent (which you get with SYS_ACTIVE_COUNT) and the WORKLOAD_MAX_JOB value (which you get with GET_UC_SETTING). If the number of jobs is higher than WORKLOAD_MAX_JOB value HOST_MaxWaiting is 1 otherwise it is 0.

And the WORKLOAD_ACTUAL_JOB value shows the HOST_JobCnt info.


Outcomes