Sharon, thanks for the help, but this does not work for me. My STAFProc is 
starting during boot, but I restarted STAFProc via the pts terminal (I do not 
have physical access to the machines to use tty terminal) and the behavior is 
the same.

I am glad to here this works for you, because that means it is possible and it 
is some configuration issue.

Any other suggestions?

Thank you!

Plamen Nedkov  


-----Original Message-----
From: Sharon Lucas [mailto:[EMAIL PROTECTED]
Sent: Fri 10/17/2008 7:35 PM
To: Plamen Nedkov
Cc: staf-users@lists.sourceforge.net
Subject: Re: [staf-users] How can I start two (or more) scripts simultaneously 
on the remote machine using screen via STAF
 
I used STAF to run screen with your screenrc command file on a remote 
Linux machine using a PROCESS START request and it returned RC 0 and ran 
screen. 

C:\>STAF remotemachine PROCESS START SHELL COMMAND "screen -c 
/tmp/screenrc" WORKDIR "/tmp" RETURNSTDOUT STDERRTOSTDOUT WAIT
Response
--------
{
  Return Code: 0
  Key        : <None>
  Files      : [
    {
      Return Code: 0
      Data       :
    }
  ]
}

The error you're getting is from the screen command's stdout/stderr and it 
says "Must be connected to a terminal.".  I believe the error message is 
because "screen" requires a tty.

How did you start STAFProc on machine1?  Try shutting down STAF and 
restarting STAFProc from a terminal.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   [EMAIL PROTECTED]
(512) 838-8347 or Tieline 678-8347




"Plamen Nedkov" <[EMAIL PROTECTED]> 
10/17/2008 09:31 AM
Please respond to
[EMAIL PROTECTED]


To
staf-users@lists.sourceforge.net
cc
David Bender/Austin/[EMAIL PROTECTED]
Subject
[staf-users] How can I start two (or more) scripts simultaneously on the 
remote machine using screen via STAF






Hello.

Here is my problem:
- Presume you have two simple bash scripts in ~ on machine1:

[EMAIL PROTECTED] ~]$ cat s1.sh
#!/bin/bash

for ((i=1; i<=60; i++)); do
    echo "$0: line $i"
    sleep 1
done
[EMAIL PROTECTED] ~]$
[EMAIL PROTECTED] ~]$ cat s2.sh
#!/bin/bash

for ((i=1; i<=30; i++)); do
    echo "$0: line $i"
    sleep 1
done
[EMAIL PROTECTED] ~]$

- Now presume you have "screenrc" file in ~ with the following content:

[EMAIL PROTECTED] ~]$ cat screenrc
caption always "%{= kc}%H [%t] (system load: %l)%-23=%{= .m}%c:%s %D 
%d.%m.%Y"
screen ./s1.sh
title "S1 script"
screen ./s2.sh
title "S2 script"
[EMAIL PROTECTED] ~]$


You can start both scripts simultaneously using "screen":

[EMAIL PROTECTED] ~]$ screen -c screenrc

But here is the problem:

I need to execute the "screen -c screenrc" command in background on the 
machine1, but from a different machine - machine2. STAF command (on 
machine2) should just start the "screen -c screenrc" on the remote machine 
(machine1) and should exit right after that. And both scripts (s1.sh and 
s2.sh) should be running in the background on machine1 and I should be 
able to reattach this screen (on machine1 with "screen -r -d" command) for 
monitoring purposes.

Apparently this does not work:

[EMAIL PROTECTED] ~]# staf machine1 PROCESS START SHELL COMMAND "screen -c 
/home.local/auto/screenrc" WORKDIR "/home.local/auto" NEWCONSOLE 
RETURNSTDOUT STDERRTOSTDOUT WAIT
Response
--------
{
  Return Code: 1
  Key        : <None>
  Files      : [
    {
      Return Code: 0
      Data       : Must be connected to a terminal.

    }
  ]
}
[EMAIL PROTECTED] ~]#


Any suggestions?

Thank you!

Plamen Nedkov

"Tumbleweed Communications <tumbleweed.com>" made the following
 annotations on 10/17/08, 07:31:07
------------------------------------------------------------------------------

=== Tumbleweed Communications Disclaimer === 
This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately. 

Tumbleweed Communications Corp., an industry leader in managed file 
transfer and content security, provides enterprise-class solutions to 
organizations of all sizes. Tumbleweed's innovative products enable 
organizations to effectively manage and protect business-critical Internet 
communications, with capabilities that span secure file transfer, 
encryption, data loss prevention, and email security.
============================================================================== 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's 
challenge
Build the coolest Linux based applications with Moblin SDK & win great 
prizes
Grand prize is a trip for two to an Open Source event anywhere in the 
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to