1 of 1 people found this helpful
No expert myself, but Server getServerName will only work if you have a Server object in memory from a previous command. The performance commands (blcli_execute) work on what's in memory, and from what you posted above you havent retrieved a Server object, so there's nothing for it to work on, hence the "cannot store a failed command" error. You might want to use getServerIdByName or something similar which takes a server name as an argument and returns the server ID, and places the object in memory. Hope that helps...
Thanks Rog, see what you mean now
Managed to get the hostname via another method (cmd: hostname ) and now the script is working.
thanks for the help, Dan