Server Automation Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

getServerScriptJobOutput from a job on multiple managed servers

C_M
Occasional Contributor

getServerScriptJobOutput from a job on multiple managed servers

Can this be done?

 

From the twister documentation, I can see I need to specify two arguments - jobId and server ID:

 

/opsw/api/com/opsware/script/ServerScriptService/method/./getServerScriptJobOutput job:i=369330001 server:i=360001

 

But the job was actually run against multiple managed servers so how do I get the output for all?

 

If I run the command without the serverID I get error:

 

RemoteException occurred in server thread; nested exception is:
        java.rmi.RemoteException: EJB Exception: ; nested exception is:
        java.lang.NullPointerException

 

So I'm guessing this is not possible. Is there an alternative?

2 REPLIES
Trusted Contributor

Re: getServerScriptJobOutput from a job on multiple managed servers

You will need to run JobService.getJobInfoVO() to get the list of servers IDs and then loop over them using the ./getServerScriptJobOutput.

 

I don't believe there is any other way.

 

Don

 

Highlighted
C_M
Occasional Contributor

Re: getServerScriptJobOutput from a job on multiple managed servers

Thanks Don. As suspected.