1834196 Members
2531 Online
110065 Solutions
New Discussion

Custom Command

 
So Def
Frequent Advisor

Custom Command

I have trouble executing a custom command.
What I want is to have sim execute a batch file with a specific alert/event. The batch file is pretty simple and should generate a text file. The automatic event is set up properly, I am receiving the email alerts. only problem is that the batch file is not executed although the status is complete. If i manually execute the batch file from explorer the batch file works. For some reason it does not work triggering the batch file by an automatic event.
Any suggestions would be appreciated.
3 REPLIES 3
David Claypool
Honored Contributor

Re: Custom Command

Try writing the output of each command to a file with a redirection so you can examine if the batch file is executing at all or is failing at a particular point. Remeber you need to use absolute pathnames because you don't know the context the batch will execute with.

One thing I have seen with batch files is in assigning variables, CMD.EXE isn't always very good at maintaining persistent values. In those cases, I've solved the problem by replacing the batch file with a Perl script.
So Def
Frequent Advisor

Re: Custom Command

Sorry I was not looking correctly. The status of the custom command is fasiled.
It gives the following stderr

EXCEPTION CLASS: com.hp.mx.dtf.sshClient.MxSshFailedConnectionException
EXCEPTION: Unable to contact the SSH server on node "nldhw2k82.okioc.com".

I don't know much about SSH, anyone knows how to resolve this? How can I add an admin user to the SSH if it is SSH rights related?
So Def
Frequent Advisor

Re: Custom Command

Is there a way around the SSH problem? I don't need to loggin a remote computer. I simply want to execute a local batch file that's all.