Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
UNIX script

 
Post new topic   Reply to topic Printable version
 View previous topic  java dynamic load/unload/run Post :: Post general programming  View next topic  
Author Message
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Thu Jan 31, 2008 9:16 pm    Post subject: UNIX script Reply to topic Reply with quote

Does anyone know the best way of having CentOS parse the current process list for a specific process name and determine if the CPU usage has been above a specific threshold for X amount of time? If it does, kill it and re-execute the process?

Thoughts would be appreciated.
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Fri Feb 01, 2008 8:33 am    Post subject: Reply to topic Reply with quote

I seem to recall an /etc/limits or limit.conf that does that as part of the OS. You can set various thresholds and it'll kill processes if they exceed them.

I had to do that to prevent my friend from hacking in and fork bombing to crash my server. You'd be surprised how much better your security gets when you've got someone telling you how they exploited it.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
phong
Seasoned Helper


Gender:Gender:Male
Joined: Jul 19 2005
Posts: 154
Offline

PostPosted: Sat Feb 16, 2008 7:57 pm    Post subject: Reply to topic Reply with quote

/etc/security/limits.conf
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 625 page(s) served in previous 5 minutes.

phpBB Created this page in 0.468235 seconds : 28 queries executed (81.7%): GZIP compression disabled