Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining which applications are running

Status
Not open for further replies.

DBinatti

Programmer
Sep 26, 2000
6
0
0
BR
Hi all,

There are some applications on my server which must be running 24 hours a day.
I've been getting some problems with them. Sometimes they stop responding and I have to end the process through the "Windows NT Task Manager" and then start them again.

However, when it happens during the night or on Sundays, for instance, they keep stopped too much time till somebody comes and start them.

That's why I'm trying to develop an application which read the processes that are running and, in case they stop responding, they are stopped and started again automatically.

I've never developed any application using windows API. Any suggestion about how to read the processes running and "restart" them would be apreciated.

Thanks in advance,

Daniela.
 
I am having the same problem using Win98. The APIs examples regarding memory as described in Daniel Applemans book throw some light on it but I am still trying to sort it out. I get a problem with applications using comms ports freezing when the swap file starts being used as depicted in the system monitor
I am looking for a routine that will, each hour, return available physical memory to what is really available (like opening and closing a copy of IE5 does)
 
Hi I am having the same problem I would like to know if ypu have the solution to your problem, if yes can you please provide me with the source code or nay reference that assisted you in getting the answer
 
There is a FAQ on how to list all applications running on a system ( faq222-61 ). I am not familiar with the restarting portion of your question, but I am sure that someone else in these forums can help.
 
Daniela,

There is a registry key where you can automatically close tasks that stop responding under NT and Win2k:

Key: HKEY_USERS\.DEFAULT\Control Panel\Desktop
Name: AutoEndTasks
Set the value to "1" to enable the feature

Also, under the same key, set the "WaitToKillAppTimeout" value to "10000" or lower. The default is 20000 (20 seconds).

This change will affect all users but you can do it on a user-by-user basis by changing it in HKEY_CURRENT_USER\Control Panel\Desktop.

Once NT has closed the errant app it should be a fairly easy job to restart it with the task-monitoring app you mentioned you were writing.

Hope this helps....
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top