Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

prevent 100% cpu usage

  • 16-11-2006 05:45PM
    #1
    Closed Accounts Posts: 95 ✭✭


    Does anyone know of a program that can detect if a running process is using 100% cpu, and then close it?
    Something like the program 'process tamer' except this only alters the process priority rather than closing it.
    I've also tried 'watchdog-o-matic' but this catches first and second chance exception crashes but doesn't detect and kill a process using 100% cpu.


Comments

  • Registered Users, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    I've never heard of such a program, but it may indeed exist.

    A possibility is to write a small VB script that detects such processes and ends them. Then you can add a performance alert and set up a trigger to execute the script when a process goes over a certain CPU %.


  • Registered Users, Registered Users 2 Posts: 6,946 ✭✭✭SouperComputer


    what is the issue that you need this for?


  • Closed Accounts Posts: 95 ✭✭rowan


    its for a music program, with cpu-hungry vst plugin. I want to run a number of instances of the plugin. The more i add, the more cpu it eats, until at a certain point cpu hits 100% and stays there. So i'd like to have another program that detects when it gets to 100% and either closes it or somehow reduces its cpu usage. I'm on a 1.4Ghz laptop with 1gb ram. The obvious answer is get a new laptop.


  • Closed Accounts Posts: 95 ✭✭rowan


    .


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 95,992 Mod ✭✭✭✭Capt'n Midnight


    you could use the old sysinternals pstools - now owned by microsoft


    pslist app > processes to dump the tasks into a file
    sort processes /+40 > proc-s sort them by cpu ( check synthax and colum )
    you could then use pskill to nuke the one that takes up all the time

    [php]
    rem pseudocode - needs major debug

    for /F "tokens=1-9*" %%a in (proc-s) do call :nuke %%d %%k

    :nuke
    set /p t=%%d/50 'if more than 50% of cpu then kill'
    if %p%==0 pskill %2

    [/php]

    what would be nice is to set a threshold on a program
    if you have a dual processor/core you could restrict that app to one cpu
    set to run in background ?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 19,396 ✭✭✭✭Karoma


    ^ Would this possibly kill System Idle Process?:/ (It'd have to be set for 100% exactly...or can it be explicitly excluded?)


Advertisement