Re: getServerScriptJobOutput from a job on multiple managed servers (122 Views)
Reply
C_M
Occasional Contributor
C_M
Posts: 7
Registered: ‎08-13-2013
Message 1 of 3 (153 Views)

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?

Trusted Contributor
DBR
Posts: 214
Registered: ‎07-29-2010
Message 2 of 3 (130 Views)

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

 

C_M
Occasional Contributor
C_M
Posts: 7
Registered: ‎08-13-2013
Message 3 of 3 (122 Views)

Re: getServerScriptJobOutput from a job on multiple managed servers

Thanks Don. As suspected.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.