Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-26-2010, 11:07 AM   #1
LQ Newbie
Registered: Jul 2010
Posts: 3

Rep: Reputation: 0
Question Running Multiple Jobs on Linux Servers

I would appreciate any advice on how to submit multiple jobs onto a Linux server.
The only way I know to submit and run a job on a server is using qsub, and verifying the status of the job using qstat. I usually run my scripts using qsub -cwd so that I can run it on my own directory (instead of having the results sent to a scratch folder).

1. However, assuming qsub/msub are not available, is there another way to do it? What commands can I use instead?
2. I know that some jobs can run in the background, is that an alternative? How do I do it? And would I still be able to check the status of the job or delete it?

Apologies if these questions have been posted elsewhere. Searching for them usually leads to a long and open-ended search but doesn't amount to any exact answers. I am hoping your experience and feedback will give me more direct solutions! Thank you in advance for your advice!
Old 07-26-2010, 11:22 AM   #2
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
There's a series of standard utilities, see man batch, or you can roll-your-own with a shell program (or "script"). Either of those is straight-forward and relatively simple to accomplish.

You can execute any command (an executable program, be it binary or shell) in background by
progname &
If you want to execute something that will take a long time and you want to log off and go home or something, you can
nohup progname &
and it'll keep running after you log off (obvious: the other way won't).

You can check the status of anything you've launched by using the ps utility; e.g.,
ps -ef | grep progname                        < to see if something you've run is still running>
kill -9 PID                                   < the PID you got from the previous ps>
See man ps for an explanation of PID (it's the process identification number).

In all cases, running programs in background will be executed at a lower priority; i.e., they won't go as fast as they might if you simply enter the name and hit the return key.

The shell program way is better if you edit a file with appropriate commands in it if you're doing a string of jobs where job a must complete before job b starts and so on then execute that shell program. You can do that by
sh progname
chmod 755 progname                           < makes it executable >
progname &                                   < or nohup progname >
Hope this helps some.
1 members found this post helpful.
Old 07-28-2010, 09:17 PM   #3
LQ Newbie
Registered: Jul 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you for your suggestions, I will give them a try!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is so bad about running multiple identical DHCP servers? jjinno Linux - Networking 3 01-12-2010 04:49 PM
LXer: CLI Magic: Running multiple jobs with xjobs LXer Syndicated Linux News 0 10-09-2006 09:21 AM
Access for Multiple Linux servers from any cilent node running REDHAT LINUX 9 bv_uma Linux - Server 2 08-18-2006 12:17 AM
Running multiple x servers in RHEL 4.0 exitsfunnel Linux - General 2 05-12-2005 11:56 AM
Running Multiple X-Servers on the same Machine Chryzmo Linux - Newbie 1 08-31-2003 02:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration