I created an ESP Proc to get this information for our Linux environment.
The Linux servers in our environment are running either version R7 or r11.3
The ESP Proc was called for each Linux Agent, Job GETVERLX would issue the cybAgent -v command and check for the string R7.
If the string was found it would exit with 0, if not found it would exit with 1.
I added 2 TASKs to display a message for each condition code.
If you view all the jobs in CSF with Presentation set to display completion code you can determine what agents are at a given level.
Job Name Agent Name Gen# ApplName CCode Jobno System Status
___ R7AGENT 1 GETVER - TASK BYPASSED
___ GETVERLX LJ_GALPCLU00014 1 GETVER 1 4271 COMPLETED AT 12.35
___ R11AGENT 1 GETVER 0 1657 COMPLETED AT 12.35
EXITCODE 0-1 SUCCESS is used so all Jobs complete "successfully".
If you have more than 2 agent versions you would need to have additional jobs to for other versions.
This would also work for UNIX and AIX.
For Windows you should be able to replace 'grep' with 'findstr'
APPL GETVER
LINUX_JOB GETVERLX
AGENT %USER1
CMDNAME /bin/bash
USER <valid User>
ARGS -c 'cd $ESPAGENTDIR; ./cybAgent -v| grep R7'
RELEASE ADD(R7AGENT) COND(RC(0))
RELEASE ADD(R11AGENT) COND(RC(1))
EXITCODE 0-1 SUCCESS
RUN ANYDAY
ENDJOB
JOB R7AGENT TASK SELFCOMPLETING
SEND 'Agent %USER1 is running ESP R7 agent.' USER(*)
RUN ANYDAY
ENDJOB
JOB R11AGENT TASK SELFCOMPLETING
SEND 'Agent %USER1 is running ESP r11.3 agent.' USER(*)
RUN ANYDAY
ENDJOB