The results from an execution task can be in the form of an exit code with optional stdout and stderr data files from the execution task’s command.
Exit codes of execution tasks are stored in log files on the compute hosts where the execution tasks run.
There are various ways to retrieve the exit code:
Log files can be retrieved through the Symphony Platform Management Console; refer to PMC help for more information. The logDirectory attribute in the application profile can be configured for log retrieval.
If you run the execution application from the DE PMC, you can only retrieve the exit code by redirecting it to a file; refer to the next section on stdout and stderr for details.
If you run the execution application using the Symphony client SDK, you can retrieve the exit code from ExecutionStatus.
If you run the execution application using the symexec CLI, then the exit code will be printed out by symexec as the result for fetch and run options. You also can retrieve the exit code by looking at the execution session's log file.
Here is an example of an exit code entry in a log file:
2007-11-19 12:55:14.414905 hostname 3016 Session #3, Task #1 execution command: execution finished with exit code <0>.
To retrieve the stdout and stderr data from a completed execution task, you must change its command to run under a shell so the command can redirect the stdout and stderr data to file(s). The file(s) can then be retrieved by either copying the file from the remote host (for example, with an FTP command) or by using a shared file system location. The following examples demonstrate how to retrieve the stdout and stderr data from Windows and Linux hosts.
In this example, the command will take the output of the "dir c:\" command and place it in the dir_content.txt file. The command can be entered in the textbox. The cmd /c opens a command shell and closes it after processing the string.
cmd /c dir c:\ > c:\temp\dir_content.txt
In this example, the command will take the output of the "ls /" command and place it in the root_content.txt file. The sh -c opens a command shell, which reads the commands from the string.