Automic Workload Automation

  • 1.  Help with PREP_PROCESS_REPORT syntax

    Posted May 14, 2018 07:21 AM

    Hi all,

    I'm trying to parse a report using the PREP_PROCESS_REPORT function but I'm struggling.

     

    This is the sample of the contents of my report.

     

    /wla/Automic/Automation.Platform/ServiceManager/bin/ucybsmcl -c GET_PROCESS_LIST -h xsj-dvapwla01:8871 -n UC4_DEV
    + /wla/Automic/Automation.Platform/ServiceManager/bin/ucybsmcl -c GET_PROCESS_LIST -h xsj-dvapwla01:8871 -n UC4_DEV
    "WP1" "R" "28409" "2018-04-08 08:24" "30/16:45" "0/03:43:11.00"
    "CP1" "R" "28430" "2018-04-08 08:24" "30/16:45" "0/01:05:45.00"
    "CP2" "R" "28429" "2018-04-08 08:24" "30/16:45" "0/01:56:05.00"
    "JWP" "R" "29675" "2018-04-08 08:29" "30/16:40" "0/04:31:28.00"

     

    I'm trying to extract only the first 2 columns of each line

    e.g.  WP1 R

            CP1 R

     

    Ultimately I'm trying to create a dashboard that will display the status of my Engine processes, just like the Service Manager Dialog does. IT will mean you don't have to have the SMD installed to check the status of Engine + Agents.

     

    If I can get these values in a VARA, I can then generate HTML to display on my Dashboard.

     

    Thanks,

    J0hn.



  • 2.  Re: Help with PREP_PROCESS_REPORT syntax

    Posted May 14, 2018 08:45 AM

    I would use STR_MATCH on the String "R" and "S" and then MID to cut this out.

     

    Another Idea (I am using curently) - I do this with a backend VARA with a unix command and printf.

     

    we have a shellscript - similar to your /wla/Automic/Automation.Platform/ServiceManager/bin/ucybsmcl -c GET_PROCESS_LIST -h xsj-dvapwla01:8871 -n UC4_DEV

     

    then |grep -v Servicemanager|cut -d' ' -f1-2|awk '{print $2,$1}'|sed "s/\"//g

     

    Advantage: this does return WP01 and R only without the need of any scripting jumps.

     

    cheers, Wolfgang



  • 3.  Re: Help with PREP_PROCESS_REPORT syntax

    Posted May 14, 2018 09:26 AM

    Thanks Wolfgang

    In the grep command above is "Servicemanager" a file you have populated with results of GET_PROCESS_LINE?



  • 4.  Re: Help with PREP_PROCESS_REPORT syntax

    Posted May 15, 2018 02:38 AM

    Hi John

     

    the grep -v Servicemanager prevents the Headers from showing up in the output od the command a.k.a. data sequence.

     

    cheers, Wolfgang



  • 5.  Re: Help with PREP_PROCESS_REPORT syntax

    Posted May 15, 2018 06:22 AM

    Thanks Wolfgang, I think I'm very close with the backend VARA.

    The column format is causing me some problems. Its expecting a "Start Position" for each column but my start position will vary depending on size of Service name....

     

    Any idea how to get around this?

     



  • 6.  Re: Help with PREP_PROCESS_REPORT syntax

    Posted May 15, 2018 06:46 AM

    Hehe - we struggled with this too :-)

     

    Our attempt: we switched the position of the colums - within OS command....

    so state is always the same length

     

    STATE      PROC

    R               UC4_WP2

    R               UC4_WP4

     

     

    cheers, Wolfgang



  • 7.  Re: Help with PREP_PROCESS_REPORT syntax

    Posted May 15, 2018 07:00 AM

    Nice one, should have thought of this myself :-)



  • 8.  Re: Help with PREP_PROCESS_REPORT syntax

    Posted May 16, 2018 04:01 AM

    That worked a treat. I now have the SMD available on my Dashboard.