Not simply.  Note that the output to stdout/stderr from your perl script 
is written to a file on your test machine.  When the Perl script that you 
are running via a <process> element in a STAX job completes then STAF 
reads the contents of the Perl script's stdout/stderr file and returns 
this data in the STAF/Process/End message that is sent to the STAX service 
to let it know the Perl script completed.  So, while the Perl script is 
running, the contents of the Perl script's stdout/stderr file are not 
available. You could run another task in parallel with your Perl script 
(e.g. using the process-action element) that continuously loops and runs a 
<process> that runs the "tail" Unix command (or another command) to get 
the last contents of the stdout/stderr file that your Perl script is 
writing too and log it.

Or, if your Perl script is STAF enabled (e.g. if you submit STAF service 
requests within it) then you could submit LOG request to the STAF Monitor 
service to log messages about the status of the Perl script which will be 
displayed in the STAX Monitor.   This is described in the "Monitoring a 
Job" section in the STAX User's Guide at 
http://staf.sourceforge.net/current/STAX/staxug.html#Header_MonitorJob 
which says:

For each <process> element represented in the "Active Job Elements" view 
in the STAX Monitor, if the process generates STAF Monitor Service 
messages (see section 8.9 of the STAF User's Guide), the current monitor 
message is displayed to the right of the process name and elapsed time. 
The monitor information is periodically refreshed while the process is 
running. If the process has not written any STAF Monitor information, the 
text "No STAF Monitor information available" is displayed. 

You said that when you log the stdout/stderr data from the Perl process in 
the STAX Monitor that it shows up as one line.  This is probably because 
of it using different line ending characters.  Instead of logging the 
entire STAXResult output, you could read the data in STAXResult's 
stdout/stderr data line by line and log each line separately if desired, 
etc.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   "Raja Narayanan" <v_rajnara...@rediffmail.com>
To:     "staf-users " <staf-users@lists.sourceforge.net>
Date:   03/16/2011 11:11 AM
Subject:        [staf-users] How to print return message in parallel on 
STAX UI monitor during script execution



Hello Staf users,

Is there any possible way to display all the return messages from my test 
(perl) script on execute in parallel on STAX UI Monitor?

I'm using both <stafcmd> and <process> method to run the test (perl) 
script. 

If I use STAFResult to display all the result in STAX UI Monitor. It 
displays all return message in a single line which is also not in proper 
format to view.

Please help..

Thanks,
V Raja

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to