Check no of processes running for a script

Post Reply
Texis User
Posts: 74
Joined: Thu Jul 13, 2006 8:47 am

Check no of processes running for a script

Post by Texis User »

We want to run our scripts in multiprocessing mode.

Is there any way to check number of instances running for a script
Texis User
Posts: 74
Joined: Thu Jul 13, 2006 8:47 am

Check no of processes running for a script

Post by Texis User »

Anything on this?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Check no of processes running for a script

Post by John »

There isn't anything built in, you would need to keep track yourself if it is important how many are running simultaneously.
John Turnbull
Thunderstone Software
Texis User
Posts: 74
Joined: Thu Jul 13, 2006 8:47 am

Check no of processes running for a script

Post by Texis User »

so every instance started I will have to write pid to file.

Also have a validation, that checks the process is still running (procexists).
If not then delete it else add to count.

rt? or there is better logic?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Check no of processes running for a script

Post by John »

Correct. That is essentially what the Webinator dispatch script does, although it keeps the pids in a ram table in memory.
John Turnbull
Thunderstone Software
Post Reply