Editing
VPS Management
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Watchdog script == On some of the older virts, we have a watchdog running that kills procs that are deemed bad per the following: /root/watchdog from quar1 <pre>if echo $line | awk '{print $(NF-3)}' | grep [5-9]... then # 50-90% if echo $line | awk '{print $(NF-1)}' | grep "...:.." then # running for > 99min echo $line >> /root/wd.log /usr/sbin/vzpid $pid | tail -1 >> /root/wd.log kill -9 $pid fi if echo $line | awk '{print $(NF-1)}' | grep "....m" then # running for > 1000min echo $line >> /root/wd.log /usr/sbin/vzpid $pid | tail -1 >> /root/wd.log kill -9 $pid fi fi if echo $line | awk '{print $(NF-3)}' | grep [1-9]... then # running for 10-90 percent if echo $line | awk '{print $NF}' | egrep 'cfusion|counter|vchkpw' then if echo $line | awk '{print $(NF-1)}' | grep "[2-9]:.." then # between 2-9min echo $line >> /root/wd.log /usr/sbin/vzpid $pid | tail -1 >> /root/wd.log kill -9 $pid elif echo $line | awk '{print $(NF-1)}' | grep "[0-9][0-9]:.." then # up to 99min echo $line >> /root/wd.log /usr/sbin/vzpid $pid | tail -1 >> /root/wd.log kill -9 $pid fi fi fi</pre>
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information