Hi Sharon:
It could works. Thanks.
BRs
William
On 02/09/2011 11:24 PM, Sharon Lucas wrote:
The STAF QUEUE service can send and receive messages to/from a STAF
handle's queue. So, if you have a "process" that you want to receive
messages on its STAF handle's queue then that "process" will have to
register with STAF to create a STAF handle (so that it has a queue)
and then the process can get messages off its queue by submitting GET
requests to the QUEUE service (and/or send messages to another STAF
handle's queue on the same or a remote machine). So, that means that
the "process" must be aware of STAF so its source code would have to
be changed to use the STAF APIs provided to submit requests to STAF
(STAF provides APIs for Java, C/C++, Perl, Python, and Tcl).
Or, you can use both STAF and Expect. For example, you could use the
STAF PROCESS service to run an expect script on a remote machine and
have the expect script handle the interactive commands..
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: "William.Bai" <william....@tekelec.com>
To: <staf-users@lists.sourceforge.net>
Date: 02/09/2011 06:18 AM
Subject: [staf-users] how to send commands in interactive commands
using STAF
------------------------------------------------------------------------
Hi:
I am a newbie to STAF. But I encounter a problem, I don't know
how to deal with the interactive commands on remote host using STAF.
Of course, if I just need to send the sub commands to remote host to
execute, I could just use a.out < inputcmd to achieve this. But If I want
it to work like expect, I send a cmd to the process on remote host, then
get a response(in stdout/stderr) and check that. I want to use queue to
send the interactive commands to that process, but I don't know how to
make that process receive the commands and execute without changing the
source code of the process itself.
Do you have some experience to share with me? I appreciate any
help of you.
Thanks
William
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users