CA Client Automation

 View Only
  • 1.  Execute Asset JOb on the fly

    Posted Jul 14, 2011 06:56 AM
    Hi,
    Just wondering if anyone knows how to execute an asset job on the fly at an arbitary machine. I have run the 'active job check' right click option from DSM explorer but the job just sits there with status 'waiting'


  • 2.  RE: Execute Asset JOb on the fly

    Broadcom Employee
    Posted Jul 14, 2011 08:31 PM
    You can try running "caf start amagent" from the agent machine that you want the job to run on.

    I find it handy to have Microsoft Process Explorer installed when troubleshooting asset jobs, when you run the above command you will see "amagentsvc.exe" kick off as a child process to "CAF.exe".
    You will also see all the child processes for "amagentsvc.exe" that gets kicked off such as the "amsignscan.exe" which is for the software scan. Once the software scan runs you will usually see the Asset Job you created trying to run. Usually you can identify if there is a hung process that is preventing the asset job from running. Only one asset job can run at a time, if one is hung, it can hang up the rest that are waiting on this one to complete. Also the asset job requires some user interaction and never completes until the user interacts with it. I have also seen in some cases, too many Asset Job checks were kicked off by continuing to request an Asset Job check over and over and then multiple amagentsvc.exe processes get started and hang. You also want to check the scheduling on the asset job to make sure its not set to only run once, or only run at certain times.

    http://technet.microsoft.com/en-us/sysinternals/bb896653

    Hope this helps!

    -Chris


  • 3.  RE: Execute Asset JOb on the fly

    Broadcom Employee
    Posted Jul 14, 2011 08:36 PM
    You can also run the "caf start amagent" command remotely by using the "host" argument as shown below...
    caf stop sdagent host <hostname of agent>

    I would still recommend doing it from the agent if its not running so you can see what is going on.


  • 4.  RE: Execute Asset JOb on the fly

    Posted Jul 15, 2011 12:14 AM
    Hi,
    Firstly, thank you for the reply. Yes, in fact, i have been using [color][color]procexp/procmon to track the process 'C:\Program Files (x86)\CA\DSM\Bin\amagentsvc.exe'. My asset management job is a simple External Utility job that runs a VBScript so I assume I should be seeing an instance of cmd.exe spawned by that process and subsequently an instance of cscript.exe (as that is what I point my external utility job at). Problem is, I don't see it and the job has been sitting there in the wait state for 24 hrs. The scheduling of the job is 'Always Run' and the 'Run Unattended' flag is set.
    I suppose firstly, I should as this question:

    Q: When you right click an Asset in DSM Explorer and select ‘Asset Jobs-> Activate Job Check’ will the agent run any Asset jobs linked to it (assuming the schedule is not set to ‘once or the like)?

    Q: Is there a log on the client to indicate exactly what the agent is running?


  • 5.  RE: Execute Asset JOb on the fly

    Posted Jul 20, 2011 01:53 PM
    Hi,

    Q: When you right click an Asset in DSM Explorer and select ‘Asset Jobs-> Activate Job Check’ will the agent run any Asset jobs linked to it (assuming the schedule is not set to ‘once or the like)?
    -> Yes, make sure all checkboxes are selected.

    Q: Is there a log on the client to indicate exactly what the agent is running?
    -> trc_amagent*.log and trc_uam*.log

    Regards,
    James.


  • 6.  RE: Execute Asset JOb on the fly

    Broadcom Employee
    Posted Jul 28, 2011 09:05 PM
    Those are the logs on the agent to look for and yes that should trigger the asset job, so long as the scheduling for the job allows it.

    You can enable detail tracing by running
    cftrace -c set -l detail -s 50000 -ln 4

    You may want to set tracing, then run "caf start amagent" on the agent and wait for the amagentsvc.exe process to complete and then review those two logs to see if you see any trace of the asset job name.

    Also you may want to test with some other jobs, such as a basic command job, that runs a simple command, just to see if you see that job kick off when amagent is started, it just may be the way this job is configured.

    Also try checking the box to allow this job to run unattended and/or uncheck it and see if it runs one way or another.

    Regards,
    Chris