Start program depending on processor workload


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Start program depending on processor workload
# 1  
Old 02-27-2013
Start program depending on processor workload

Hi community,

I'm looking for a script/code which starts a shell script with a MPI process depending on:
a) the processor workload, i.e. if the workload falls below a certain limit
b) alternatively if the previous process finished, e.g. if a process ID disappears

I need this for computations on a linux cluster, and I would run more than one model in one night. I know, the runs need only a couple of hours and it would be nice to have subsequent computations (at least two).
It is ensured that the processor workload does not fall below about 80% within the run.

I'm rather beginner in linux shell programming, so it would be helpful to have a relatively clear description Smilie but please write your ideas, even if it's only a search advice or whatever...

Regards
Chris

ps.: OS Linux Centos 5.2

Last edited by heunigreenfreak; 02-27-2013 at 07:04 AM..
# 2  
Old 02-27-2013
Hi,

I am not sure about the MPI process etc,

(1) However, you can check the processor work load using either "top" or "mpstat" and see if it's fall below the benchmark.

(2) If so , start the script ( before starting , you can "grep" for the previous process like : ps -ef | grep "give the name of the script/process" to see if it's running.
# 3  
Old 02-27-2013
man at:
Quote:
batch executes commands when system load levels permit; in other words, when the load average drops below 1.5, or the value speci fied in the invocation of atd.
# 4  
Old 02-27-2013
Thank you!
If I understand the batch command in the right way,
I can pass the shell script name or everything behind the batch command will be executed if the load condition is satisfied?

The load average is the value which is given by the uptime command?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script to start program and answer prompts?

I'm trying to write a script the simplifies the execution of a program: After starting the program (sh ~/.mfix/model/make_mfix) I am prompted four times for options: Do you need SMP version? (y/n) Do you need DMP version? (y/n) Do you need debug version? (y/n) Force re-compilation of... (2 Replies)
Discussion started by: lanew
2 Replies

2. Fedora

[Solved] Unable to start Matlab program

hello everyone, I have Matlab installed on Fedora 16. I tried running it by simply typing on terminal: $ matlabBut it returned the follwoing error: --- can anyone suggest a solution? cheers, peter ---------- Post updated at 10:57 PM ---------- Previous update was at 10:54 PM ----------... (1 Reply)
Discussion started by: peter_071
1 Replies

3. OS X (Apple)

A program crashed my iMac so bad that it could not start up.

Hi, Solid as a rock or ... Is it possible for a program to damage an iMac (Snow Leopard) so bad that it cannot start up again, and need to be repaired? I am asking about this, because this seems to have occurred two days ago, when I was running a popular game program. When I closed the... (6 Replies)
Discussion started by: ASL123
6 Replies

4. Homework & Coursework Questions

little start c program

hello, i wil make the next mission: give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test I don't now how to start. I need an little example so i can make the mission thank you (10 Replies)
Discussion started by: wouter88
10 Replies

5. Shell Programming and Scripting

Start program in background (or start crontab ahead of time)

Hey! I'm working on a script that will add a user, create some configfiles, and add a crontab for the user. The crontab looks like the following: @reboot /home/user/program config.conf & I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies

6. Programming

How to start a process in linux using C program??

I have a set of attributes such as group id,group name,etc related to a linux process. Iwant to know how to start a process in linux using C program.Plz do help me. (3 Replies)
Discussion started by: vigneshinbox
3 Replies

7. Shell Programming and Scripting

start a program with other user's permission

I have some of programs in unix system which are to started with one_user say "xxxx". I have sudo permission if i start these programs with sudo it shows root permission. But i want these programs permession should be "xxxx". I tried "su user_name -c Program_name" but it is not... (3 Replies)
Discussion started by: srikanthus2002
3 Replies

8. Shell Programming and Scripting

How can I make a program start up automatically after the computer restart/startup?

hi all How can I make a program start up automatically after the computer restart/startup in fedora? something like: ... Establish a shell then run some of command code. Thanks for Help!! (1 Reply)
Discussion started by: munna_dude
1 Replies

9. AIX

LPAR processor/virtual processor settings

Question is on setting of Physical and Virtual processors for LPARs to make proper use of virtualization capabilities. Environment is a 8-way p570 with 4 LPARs. lparVIO1 and lparVIO2: AIX 5300-04-01 Mode/Type= Shared-SMT/Capped Minimum Processors= 0.10 Desired Processors= 0.50 Maximum... (1 Reply)
Discussion started by: guttew
1 Replies

10. UNIX for Dummies Questions & Answers

How do I start a program when I start my Computer?

I'm running MAC OS X and I'm wondering how I start 'nixey programs (not normal apps) on startup? Things like the dnet client and hxd Hotline Server. Anyone know? (1 Reply)
Discussion started by: l008com
1 Replies
Login or Register to Ask a Question