Jump to content

Recommended Posts

Posted

I have a question. I am writing a process monitoring script. The problem that I don't know how to address is this. We have some programs that we run multiple instances of. For example there is a program with a binary name of card_col.exe. We run two instances, and each one uses a different config. I would like for my script to detect if one is stopped and restart the appropriate instance, however, since they both use the same image name when checking the task manager processes, I don't know how to have the script detect multiples. Does anyone have any suggestions? I would really appreciate it.

Posted

Ok, then how would I know which one to correlate.

For example:

-There are two instances of card_col

-One of them is started using coll11.bat and uses coll11.cfg as the config file

-One of them is started using coll12.bat and uses coll12.cfg as the config file

How would I be able to tell from the name and pid which .bat I would need to have executed to restart the proper process. Would I have to use the script to start them initially so it can keep track of the pids or is there another way.

Thanks again for any and all help!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...