467,920 Members | 1,303 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,920 developers. It's quick & easy.

Kill process when memory usage reaches upto 80%

Hi,

Is it possible that you can monitor your memory usage and kill some
process when memory usage reaches 80% or so?

I have an application which uses lot of memory and then system hangs,
but it takes about 5 hours before it gets to that point.

I want to write a monitor app which kills this process and restarts
when memory is 80% used up.

Thanks

Dec 7 '05 #1
  • viewed: 1995
Share:
3 Replies
Sehboo wrote:
I want to write a monitor app which kills this process and restarts
when memory is 80% used up.


Why not just fix the problem that is causing the memory to be used up
instead?

Dec 7 '05 #2
We don't have code for that process

Chris Dunaway wrote:
Sehboo wrote:
I want to write a monitor app which kills this process and restarts
when memory is 80% used up.


Why not just fix the problem that is causing the memory to be used up
instead?


Dec 8 '05 #3
Bummer. Well, you can use the System.Diagnostics.Process class and
call its Kill method to kill a running process. You'd have to use
GetProcesses or GetProcessByName methods to get the Process and then
call the Kill method.

Dec 8 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mike Peretz | last post: by
reply views Thread by Ronen | last post: by
2 posts views Thread by opt_inf_env | last post: by
2 posts views Thread by Aravind | last post: by
1 post views Thread by Ashish | last post: by
1 post views Thread by Michael Tkachev | last post: by
22 posts views Thread by Zen | last post: by
2 posts views Thread by Macca | last post: by
18 posts views Thread by =?Utf-8?B?VGhlU2lsdmVySGFtbWVy?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.