Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6882343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:14:29+00:00 2026-05-27T05:14:29+00:00

I am trying to run an application on multiple (~20) Unix servers. Rather than

  • 0

I am trying to run an application on multiple (~20) Unix servers. Rather than SSH’ing into each one individually, I would like to log in to one and use a script to start them all up.

The application does not require any direct user interaction, so I essentially just need to run ‘./app arg1 arg2’ on each machine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:14:30+00:00Added an answer on May 27, 2026 at 5:14 am

    One improvement on straight SSH is to start SSH session in the background and then wait for all of them to finish. This way you can execute command on remote servers simultaneously.

    We use this technique in our production scripts.

    function start_server ( )
    {
      ssh $1 '/path/to/start_service_script'
    }
    
    echo "Starting servers"
    for serv_name in $( cat /path/to/server-list )
    do
        # I usually declare a function, because if SSH command
        # gets more elaborate ( especially if it has ampersands
        # as part of the command, the shell has trouble parsing 
        # the background push (& at the end of the command)
        #
        # In this particular case it would be no trouble to
        # inline ssh here
        start_server ${serv_name} &
    done
    
    echo
    # Very important to wait till all the spawned processes finish
    wait
    

    One thing to note, because all spawned processes are running simultaneously and using the same console, you may see some interleaved output on your screen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a simple multiple processes application in Python. The main
I am working on a UNIX box, and trying to run an application, which
I am trying to run an application that normally works when I install on
I was trying to run my application and check for some output on the
I am trying to a run an application with Hibernate annotation. I am getting
I am trying to run a simple SQLITE application on Windows Mobile developed with
We are trying to run shark on our iphone application. However, in the analyzed
I am trying to run an action when the application starts. The action checkAtStart
I'm trying to run an ASP.NET 2.0 application on an XP machine. As far
I am trying to run some unit tests in a C# Windows Forms application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.