Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a shell script as following

#!/bin/sh
screen -d -m -S script1 /usr/bin/ruby script1.rb; true
screen -d -m -S script2 /usr/bin/ruby script2.rb; true
screen -d -m -S script3 /usr/bin/ruby script3.rb; true
screen -d -m -S script4 /usr/bin/ruby script4.rb; true
screen -d -m -S script5 /usr/bin/ruby script5.rb; true
screen -d -m -S script6 /usr/bin/ruby script6.rb; true
screen -d -m -S script7 /usr/bin/ruby script7.rb; true
screen -d -m -S script8 /usr/bin/ruby script8.rb; true
screen -d -m -S script9 /usr/bin/ruby script9.rb; true

No matter of which script run first, only the first eight scripts will get run. How can I solve this problem?

share|improve this question

2 Answers 2

You're probably running out of pseudo-tty's. What does it say if you run the first 8 scripts, and then just type "screen" (so that you can see any errors)?

What OS is this? Pseudo-tty allocation is a little different for each, but if you google for "linux (whatever) pseudo tty allocation", it will probably come up.

share|improve this answer

maybe it would be easier to use something like the following template in .screenrc

    # define a bigger scrollback, default is 100 lines
defscrollback 10240

nethack on
startup_message off

hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

altscreen on


screen bash
title "receiver"

screen bash
title "serv1"

screen bash
title "serv2 "

you can save this screenrc template somewhere and run it as screen -c your_path

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.