FreeBSD auto-kill processes consuming high cpu?

  • sdfhsdfhj
  • Newbie
  • Newbie
  • sdfhsdfhj
  • Posts: 5

Post 3+ Months Ago

Is there a way or a script that can kill processes if they reach a certain CPU% usage over a period of time?

I.E. if process xyz is using 105% CPU for more than 2 minutes, then kill process.

I don't know how to script anything, but is something like this built into FreeBSD?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

The top command reads the processes & displays their time. You maybe able to write a script that sends the kill command based on it's output.

I just looked at my FreeBSD machine & nothing is even close to taking so much CPU time. What process is running that high on yours?
  • sdfhsdfhj
  • Newbie
  • Newbie
  • sdfhsdfhj
  • Posts: 5

Post 3+ Months Ago

It happens occasionally when someone tries to overload an irc process in order to freeze up the machine.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

Are you saying that it's an attempted denial of service? It sounds like you need to secure or patch the machine.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

I would look into running a pf firewall and configuring specifically with that type of traffic in mind... if what you say is true about people trying to overload you.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 79 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.