Is there a way to count how many processes a script has started, count how many of these have finished, and make the script wait if their difference goes over a given threshold?
I am using a script to repeatedly execute a code (~100x) which converts 2 data files into one .plt which is in the format for Tecplot. These files are large, 300-1000MB.
The code reads an input file which is altered before each instance of the code is executed. I've done this by hand (never again), and could get about 5-6 instances going at a time (ie the 1st process would finish before I could start the 7th). (The input is read at the very beginning so I can alter it while code is running.)
My problem is once I scripted this process, MANY instances can get going at once, and the computer gets bogged down. I inserted a 'sleep' command, but this isn't robust enough, and depending on other loads on the computer the same problem can happen.
I am pretty new to unix, and I have a project to do.
Part of the project asks me to determine the number of processes running and assign it to a variable. I know how to every part of the project but determine the number of processes running.
How can I get just the number of processes... (4 Replies)
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)
I'm doing a script with the Shell. I need that it only show the number of running processes.
Ex:
echo "There are `command` running processes"
Thnx!
Pd: Sorry the idiom. I'm spanish. (2 Replies)
I have a script something like this:
#!/usr/bin/ksh
CLASSPATH=/apps/opt/db2udb/admin/db2bdt/sqllib/java/db2java.zip:/apps/opt/db2udb/admin/db2bdt/sqllib/java/db2jcc.jar:/apps/opt/db2udb/admin/db2bdt/sqllib/function:$CLASSPATH
export CLASSPATH
... (7 Replies)
Ok, so I know there's a way to do this, but I've been trying to find out all afternoon with no luck. I think it should print out something like this:
1 bin
2 daemon
6 duo
Where the numbers on the left are the number of processes being run by the user whose name is listed on the right. Is... (4 Replies)
Hi can anybody help me regarding this..
i want know the output of ps -ef with explanation.
how can we know the running processess.
this is the output of ps -elf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
19 T root 0 0 0 0 SY ... (1 Reply)
Is there a certain man command I'm missing here? I searched in ps but I couldn't find something that would give me the number of processes running on root.
I only want to see the number of processes, not the processes itself. (2 Replies)
Hello everybody ,
I launched cron to execute a task every hour but the job takes more than hour that's why I'm getting more than 1000 cron processes running at the same time !!!
My question is how to tell cron not to execute unless the job terminated in order to have only one process running .... (14 Replies)