Issue with linux Screen

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
phaiz
A semi-regular
A semi-regular
Posts: 28
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Jul 24, 2014 9:48 pm

Issue with linux Screen

Post by phaiz »

I've been screen for a couple of years without any issues however once I add a 5th screen I begin seeing a single server or multiple server startup scripts being skipped entirely.

This is my screen script

Code: Select all

    #!/bin/bash
    screen -dmAS SERVERS1 -t s1 /path/to/tf2-startup.sh
    screen -S SERVERS1 -X screen -t s2
    screen -S SERVERS1 -p s2 -X stuff "/path/to/tf2-startup.sh\n"
    screen -S SERVERS1 -X screen -t s3
    screen -S SERVERS1 -p s3 -X stuff "/path/to/tf2-startup.sh\n"
    screen -S SERVERS1 -X screen -t s4
    screen -S SERVERS1 -p s4 -X stuff "/path/to/tf2-startup.sh\n"
    screen -S SERVERS1 -X screen -t s5
    screen -S SERVERS1 -p s5 -X stuff "/path/to/tf2-startup.sh\n"
Everything works as intended until "s5" is added. Is this a limitation of Screen or am I doing something wrong?

I'm no expert with Linux and most of the stuff I know now has been learned over the past two years from running these servers, so I may ask a lot questions to any replies.

edit- For example today only the very top script was executed. There were no other screens even open.
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Issue with linux Screen

Post by Edge100x »

That is a very unusual way to run screen. You seem to be trying to do everything within a single screen, and send commands to it.

Did you intend to start these up as separate screen sessions? That is generally simplest and best. For instance,

screen -AmdS server1 /some/script/to/run
screen -AmdS server2 /some/other/script/to/run
screen -AmdS server3 /yet/some/other/script/to/run
phaiz
A semi-regular
A semi-regular
Posts: 28
Joined: Thu Jul 24, 2014 9:48 pm

Re: Issue with linux Screen

Post by phaiz »

Edge100x wrote:That is a very unusual way to run screen. You seem to be trying to do everything within a single screen, and send commands to it.

Did you intend to start these up as separate screen sessions? That is generally simplest and best. For instance,

screen -AmdS server1 /some/script/to/run
screen -AmdS server2 /some/other/script/to/run
screen -AmdS server3 /yet/some/other/script/to/run
When I first started running the servers a few years ago I had a friend helping and that's what he started me off with so I've just expanded on it as we've grown, but yes the idea was to run the servers from one session so you could just attach to one and swap between them quickly.

I've since made a second startup since this issue started, 3 servers on one and 2 on the second and so far I haven't really seen any issues.

I'll give your example a shot and see if I see better results, thanks.
Post Reply