Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Running scripts in parallel Post 302737181 by hicksd8 on Wednesday 28th of November 2012 12:29:34 PM
Old 11-28-2012
What I am about to say assumes that table temp1 is a file.

If it is then:

1. At the end of script B ensure that temp1 is either deleted or renamed so that it doesn't exist anymore.

2. At the start of script B, "test" (see man pages) to see if the file temp1 exists and if it doesn't then "sleep" (see man pages) for, say, 600 seconds to sleep the script. Only when temp1 exists will script B continue processing.

The above also assumes that temp1 is created fairly instantly so will either exist or not exist. If temp1 is created slowly, then get script A "touch" (see man pages) a file to use as a flag to script B which can then "test" for the existance of the flag file instead. Script B should delete the flag file before it finishes.

Hope that helps (and I have succeeded in making that clear enough).

Post any further questions.

Last edited by hicksd8; 12-01-2012 at 11:35 AM..
This User Gave Thanks to hicksd8 For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

running a parallel program

hi , i need to run a parallel program . for example; program1 { array=" the second program should called here : program 2" the execution should continue } the 2nd program should recieve an array of information as argument and it should... (4 Replies)
Discussion started by: bankpro
4 Replies

2. Shell Programming and Scripting

Running scripts in parallel

Hi, Iam having the scripts as follows. i jus want to run those in parallel. main aim is to minimise the time for overall execution of the script. now out.txt is having 1 lac records. script1(split.sh) split -1000 out.txt splitout ls -A splitout* > filelist.txt cat filelist.txt... (6 Replies)
Discussion started by: nivas
6 Replies

3. IP Networking

running servers parallel

I'm going to undertake a hardware refresh soon and I was wondering if it is possible to run two machines (X and Y) with the same hostname (but different IP addresses) on the same network? Server X is the original server and has an entry in DNS. Server Y is the new server and won't have an entry... (1 Reply)
Discussion started by: soliberus
1 Replies

4. Shell Programming and Scripting

Executing scripts in Parallel

Hi All, I have 3 shell scripts, Script1,Script2 and Script3. Now I want to run Script1 and Script2 in parallel and Script3 should depend on successful completion of both Script1 and Script2. Could you please suggest an approach of acheiving this... Thanks in advance (2 Replies)
Discussion started by: itsme_maverick
2 Replies

5. Shell Programming and Scripting

Running jobs in parallel

I need to process 50 sqlplus scripts which are listed in a text file. I need to develop a shell script that'll read this file and run these sqlplus scripts. At any point of time, the number of sqlplus scripts running shouldn't exceed 6. If any of the sqlplus scripts completes successfully then... (17 Replies)
Discussion started by: gctex
17 Replies

6. Shell Programming and Scripting

Execute scripts in Parallel

Hi I want to execute few scripts in Parallel. There is a Master Script (MS.ksh) which will call internally all the scripts we need to run in Parallel. Say there are three set of scripts : ABC_1.ksh --> ABC_2.ksh --> ABC_3.ksh (execute ABC_2 when ABC_1 is successful ; Execute ABC_3 only when... (6 Replies)
Discussion started by: dashing201
6 Replies

7. UNIX for Dummies Questions & Answers

Running parallel process

i am having 4 process,have to run parallel and not after one by one. sample1.sh sample2.sh sample3.sh sample4.sh Thanks in advance. i (11 Replies)
Discussion started by: sagar_1986
11 Replies

8. Shell Programming and Scripting

[Solved] Running scripts in parallel that issue prompt

Hi all - I am totally stuck here :wall I have been asked to write a shell script that does a few little things and then reads from a config file and kicks off an instance of another script, say scriptB.ksh for each line in the config file. These should all be run in parallel. This is all fine but... (2 Replies)
Discussion started by: sjmolloy
2 Replies

9. Shell Programming and Scripting

Running script in Parallel

Hi Folks I have a doubt. I have a script which is running with 2 input parameters ./GetDSLnkCount.sh <jobnumber> Parmfile.txt I need to run the script in parallel for different jobnumbers. The commands are ./GetDSLnkCount.sh jnhuc14500 Parmfile.txt ./GetDSLnkCount.sh jnhuc14501... (3 Replies)
Discussion started by: morbid_angel
3 Replies

10. Shell Programming and Scripting

Parallel bash scripts

Need some help to replace bash script with parallel to speed up job on multiple files (400files.list is the file contains the absolute path to those 400 files). The bash script is to run the same program over the files repetitively. My bash_script.sh is: for sample in `cat 400files.list`; do... (3 Replies)
Discussion started by: yifangt
3 Replies
PSENSOR-SERVER(1)						   User Commands						 PSENSOR-SERVER(1)

NAME
psensor-server - Temperature and system monitoring Web server SYNOPSIS
psensor-server [OPTION]... DESCRIPTION
psensor-server is an HTTP server for monitoring hardware sensors remotely. It provides a JSON Web service which can be used by psensor(1) to monitor remotely the hardware sensors of a computer. It can provide information about: * the temperature of the motherboard and CPU sensors (using lm-sensors). * the temperature of the Hard Disk Drives (using hddtemp). * the rotation speed of the fans (using lm-sensors). It is also possible to connect to the psensor-server with a browser, a simple Web page is displaying the sensors information and the CPU usage. The URL http://hostname:3131/api/1.0/sensors/[id] returns a JSON object containing all information about a sensor. [id] is the uniq identi- fier of the sensor. Here is an example of the JSON object of type 'sensor': { "id": "lmsensor acpitz-virtual-0 temp1", "name": "temp1", "type": 257, "min": 47.800000, "max": 60.800000, "measures": [ { "value": 47.800000, "time": 1311374873 }, { "value": 49.800000, "time": 1311374878 }, { "value": 49.800000, "time": 1311374883 } ], "last_measure": { "value": 49.800000, "time": 1311374883 } } Fields of the type 'sensor': * id: the uniq identifier of the sensor. * name: a humean readable name of the sensor (might not be uniq). * type: the type of sensor. Look at src/lib/psensor.h for the different types. * min: the minimal value of the sensor. * max: the maximal value of the sensor. * measures: all measures of the sensor. * last_measure: the last value of the sensor. * time: the time of a measure as the number of seconds since 1970/01/01. The URL http://hostname:3131/api/1.0/sensors returns a JSON array containing all JSON objects of type 'sensor'. If run in debug mode, psensor-server can be stopped by sending an HTTP request with the URL 'http://hostname:port/api/1.0/server/stop'. OPTIONS
-h, --help display this help and exit -v, --version display version information and exit -d,--debug run in debug mode -p,--port=PORT webserver port -w,--wdir=DIR directory containing webserver pages WARNING
psensor-server does not provide any way to restrict the connection to the HTTP server, worst, no effort has been made against malicious HTTP attacks. You should make the psensor-server port available only to a network or computer you trust by using the usual network secu- rity tools of the system (for example, iptables(8) ). REPORTING BUGS
Report bugs to: jeanfi@gmail.com psensor home page: <http://wpitchoune.net/psensor> COPYRIGHT
Copyright (C) 2010-2012 jeanfi@gmail.com License GPLv2: GNU GPL version 2 or later <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
psensor(1), sensors(1), sensors-detect(8) psensor-server 0.6.2.17 March 2012 PSENSOR-SERVER(1)
All times are GMT -4. The time now is 09:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy