Automic Workload Automation

 View Only
  • 1.  ServiceManager version

    Posted Jul 22, 2019 02:59 PM
    Does anyone know of a way (database query?) to check the version of the ServiceManager that is installed on the agent servers without having to log onto each server? 

    I ran into an issue when using the CAU that the agent was transferred to the server and upgraded, but didn't come back up and sat in a 'Waiting on upgrade' status after being shutdown.  When starting them through the Administration tab they did get upgraded.  I found that somehow some servers didn't get the v12 ServiceManager and are still on v10.  I would like to find those servers that need to be remediated before attempting to push agent upgrades in production.

    It appears the ServiceManager CLI doesn't have a response for the version, and running a prep_process_file against the 00 temp file for the versions isn't necessarily going to work due to the possible path differences or access to those servers.

    Any ideas?


  • 2.  RE: ServiceManager version

    Posted Jul 22, 2019 03:21 PM
    Hey Jared,

    I do not have a database query for this. I can think of another way to accomplish this.

    Leverage the Agent variables to determine the location of the installation:

    :SET &jobreport# = GET_VAR('UC_EX_PATH_JOBREPORT','AGENTNAME')
    :SET &agentbin# = GET_VAR('UC_EX_PATH_BIN','AGENTNAME')

    So you could drive this script with a hostgroup of all the agents in question and at least get the Agent Install locations. With that you could do the prep_process granted that the servicemanger is always installed the same relative to the Agent files.

    Additionally, you could also use each agent to run './ucybsmgr -v' granted the servicemanager path is always relative to the Agent installation.



  • 3.  RE: ServiceManager version

    Posted Jul 23, 2019 03:59 AM
    Are your Service Managers ​Linux or Windows?

    For the former, I have used a "for" loop over my list of hostnames to SSH to them (key auth ftw), then ran "strings" on the smgr binary ...


  • 4.  RE: ServiceManager version
    Best Answer

    Posted Jul 23, 2019 08:17 AM
    Thanks for the ideas.  They at least pushed me to think about the script a little differently and I figured out something that works for 99% of the agents as we have some older systems with the ServiceManager installed in a different directory.  One of the other issues that I had was in this system I am running it on, these agents have at least two agents on them and some of those would have a differently named temp files.

    Here is the script I used.  The output isn't pretty, but for my needs it works.

    :SET &HND#=PREP_PROCESS_VAR(JCK.VARA0001.HOST.LIST)
    :PROCESS &HND#
    :  SET &AGENT# = GET_PROCESS_LINE(&HND#,1)
    :    SET &HND2# = PREP_PROCESS_FILENAME("&AGENT#","c:\uc4g5\SMgr\Temp\*_00.TXT","Y")
    :    PROCESS &HND2#
    :      SET &PATH# = GET_PROCESS_LINE(&HND2#)
    :      SET &HND3#=PREP_PROCESS_FILE(&AGENT#,"&PATH#","*Version*")
    :      PROCESS &HND3#
    :        SET &LINE#=GET_PROCESS_LINE(&HND3#)
    :        PRINT "&AGENT#, &LINE#"
    :      ENDPROCESS
    :      CLOSE_PROCESS &HND3#
    :    ENDPROCESS
    :    CLOSE_PROCESS &HND2#
    :ENDPROCESS​