Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Query on Running Multiple processes in background Post 302456544 by gpta_varun on Friday 24th of September 2010 12:39:17 PM
Old 09-24-2010
Query on Running Multiple processes in background

HI All ,

Pardon me for asking some very basic questions,
I would be grateful if someone can help.

I am trying to execute a shell script which runs multiple processes in background. It includes various operations like copying , DB operations etc etc.

Now problem is that the complete script execution is taking a long long time, While we have optimized the DB part , I am on the lookout for other culprits.

Iam executing the script on T5K server . When executing multiple processes in background concurrently ....
1) Are all the processes allocated to a single CPU or multiple CPU ?
2) Can there be a possibility that a lot of time is wasted in scheduling the processes ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Background processes

How do you capture the return code from a background process? I am dumping data to a fifo and then processing it in a c program. I need to know that the sql finished successfully to ensure no missing data. Thanks. ex. sqlplus user/password < get_data.sql > data_fifo.txt & bin/process_data... (2 Replies)
Discussion started by: korndog
2 Replies

2. Shell Programming and Scripting

Running two processes in background

hi there, here's what i need in my korn-shell: ... begin korn-shell script ... nohup process_A.ksh ; nohup process_B.ksh & ... "other stuff" ... end lorn-shell script in plain english i want process A and process B to run in the background so that the script can continue doing... (6 Replies)
Discussion started by: jacob_gs
6 Replies

3. Shell Programming and Scripting

Multiple SQLPLUS background processes not working properly

Hi All, I am running 25 background process from a Unix shell script which calls a single Oracle procedure with different paramenters each time. These 25 process creates 25 different files. When i run these 25 Background SQLPLUS processes, few files are not created completly but if i run 25... (1 Reply)
Discussion started by: rawat_me01
1 Replies

4. UNIX for Dummies Questions & Answers

Running multiple processes in Linux

Hi guys, I want to run the multiple scripts at the same time using a ksh script. For example, I have three scripts to run: a.ksh, b.ksh and c.ksh How to start the above 3 scripts simultaneously and then on the completion of the above scripts I have other tasks to schedule. Thanks Gary (6 Replies)
Discussion started by: abcabc1103
6 Replies

5. Shell Programming and Scripting

Keep a certain number of background processes running

I've got a bit of code I'm trying to work on... What i want to happen is ... at all times have four parallel mysql dump and imports running. I found the follow code snippet on the forum and modified it to work by starting four concurrent processes but it waits until all four are done before... (7 Replies)
Discussion started by: dgob123
7 Replies

6. Solaris

About running processes in background

Hi, I need to establish a procedure that will start an application in background each time my remote Solaris server is (re)started. This would be a kind of daemon. I am no sysadmin expert, so I am looking for pointers. How should I proceed? What are the main steps? Thanks, JVerstry (9 Replies)
Discussion started by: JVerstry
9 Replies

7. Shell Programming and Scripting

Background Processes

Ok guys so I have my first dummy shell almost done except for one tiny part: I do not know how to run a process in the background, from the code! I already know how to do that in a normal shell: $ program & However, no clue when it comes to how to program that thing. :eek: A very... (2 Replies)
Discussion started by: Across
2 Replies

8. Shell Programming and Scripting

Need help on background processes

Hi, I have a schell script parent.ksh from which I am calling three background processes a.ksh,b.ksh and c.ksh. Once these three processes completes the next step in parent.ksh should execute. How to achieve this? Please help me.... Thanks... (1 Reply)
Discussion started by: ravinunna
1 Replies

9. UNIX for Advanced & Expert Users

List all background processes

How do I list the process in a Unix based system which are running in background? The following are options that I'm aware of, but they may not be appropiate. a. using ps -ef , and getting records of processes for which STATUS='S'(uninterruptible sleep) b. using jobs -l, and filtering... (5 Replies)
Discussion started by: kumarjt
5 Replies

10. Shell Programming and Scripting

Multi threading - running multiple processes at the same time

so i've been using this a lot in a lot of my scripts: ( columnA & columnAPID=$! & columnB & columnBPID=$! & columnC & columnCPID=$! &) & wait ${columnAPID} wait ${columnBPID} wait ${columnCPID} It seems to work as ive seen it dramatically reduce run time of my scripts. however, i'm... (5 Replies)
Discussion started by: SkySmart
5 Replies
class_admin(8)						      System Manager's Manual						    class_admin(8)

NAME
class_admin - Administer class scheduling and the database. SYNOPSIS
/usr/sbin/class_admin [subcommand] DESCRIPTION
The class_admin command is used to configure and control the class scheduler and to maintain its database /etc/class. The class_admin command can be run interactively or non-interactively. Non-interactive mode is useful when you would like to execute a single class_admin subcommand without user interaction. This allows class_admin to be run from within a script, which makes it easy to enable class scheduling at system startup through use of an init(8) script. To run class_admin non-interactively, specify a single class_admin subcommand as an argument when invoking class_admin. Interactive mode is useful when you would like to execute several class_admin subcommands. To run class_admin interactively, invoke class_admin without specifying a subcommand argument. Should the class scheduler database not exist, class_admin will automatically create one when it starts up. If the command is invoked non- interactively, a default database is created (using the following interactive defaults). The interactive process will require you to answer three questions: Shall processes that have not been explicitly assigned to a defined class be assigned to a "default" class? Enter (y/n) [n]: To be class scheduled, a process must be assigned to a class. If you answer <y> to this prompt, a special class called the "default" class will be created, and any process that has not been explicitly assigned to one of the defined classes will be assigned to this class. If you answer <n> to this prompt, then only those processes which have been explicitly assigned to a defined class will be class scheduled. Enforce class scheduling when the CPU is otherwise idle? (y/n) [n]: The administrator has the option of allowing classes to exceed their CPU percentage when the system is otherwise idle if yes is answered. Otherwise, classes are held to their allotted percentage even if the CPU has no other work. How often do you want the system to reset class usage? Enter number of seconds (2): Use a small number (several seconds) if there are interactive jobs subject to class scheduling to give them a quick response time. If only batch jobs are class scheduled, response time is not an issue and larger values may be used. If class scheduling is enabled, changes made take effect immediately. Subcommands Add a group or user to an existing class. If the group or user exists in another class, you will be asked if you want to move it or not. More than one group or user may be specified. Syntax: add <class name> <type> <id ... ...> <type> = 'gid' | 'uid' | 'session' | 'pgrp' | 'pid' Change the CPU percentage allotted to a class. The system will not allow the total of all classes to exceed 100%. Syntax: change <class name> <cpu %> Create a new class. The name must be unique. The newly created class will be empty. Use the add command to populate the class. Syntax: create <class name> <cpu %> Set up the basic class scheduling parameters. You will be prompted for each parameter. Syntax: configure Remove a group or user from an existing class. More than one group or user may be specified. Syntax: delete <class name> <type> <id ... ...> <type> = 'gid' | 'uid' | 'session' | 'pgrp' | 'pid' Destroy an existing class. If the class is not empty, you will be asked if it's OK to destroy it anyway. Syntax: destroy <class name> Turn off class scheduling for the system. Note that the kernel will terminate the class scheduler dae- mon. Syntax: disable Turn on class scheduling for the system. A daemon will be started that periodically examines class CPU usage and adjusts access of a class to the CPU depending on its percentage. Syntax: enable Return to the command shell. If any permanent changes were made to the database, You will be asked to save or dis- card them. (Same as `quit'). Syntax: exit On-line help. If a subcommand is specified, detailed information pertaining to that subcommand is displayed. Other- wise, a list of all subcommands and their arguments is displayed. Syntax: help [<subcommand>] Return to the command shell. If any permanent changes were made to the database, You will be asked to save or discard them. (Same as `exit'). Syntax: quit Change the name of an existing class. Syntax: rename <old name> <new name> Write permanent database changes to the disk and continue. Syntax: save List the configured classes, the CPU percentage allocated to each class, and members assigned to it. If no class name is specified, all classes will be shown. Syntax: show [<class name>] List the current CPU utilization of a class. If no class name is specified, all classes will be shown. Syntax: stats [<class name>] FILES
SEE ALSO
Commands: runclass(1), class_scheduling(4) class_admin(8)
All times are GMT -4. The time now is 11:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy