Method and system for a process manager
Abstract
A method and system is provided for monitoring the health of processes running on a router. A behavior of a process is monitored and the process is killed if the behavior is abnormal. The behavior may be abnormal if the process is non-responsive, cannot start, or repeatedly crashes. The system may include a timer to measure a predetermined time interval for the process to perform a desired action, a counter to count a number of times the process fails to perform the desired action before the timer expires, and a controller to kill the process when the counter exceeds a maximum number of failures. Alternatively, the timer could measure an amount of uptime, the counter could count the number of times the process crashes, and the controller could kill the process when a crash rate calculated from the number of times the process crashes per the amount of uptime exceeds a maximum crash rate.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method comprising:
starting a process; monitoring a behavior of the process; and killing the process when the behavior is abnormal.
2 . The method of claim 1 , further comprising notifying an administrator about the abnormal behavior.
3 . The method of claim 1 , wherein the behavior is abnormal when the process cannot start, and wherein monitoring the behavior comprises:
setting a startup timer before starting the process; and incrementing a startup count when the process fails to register before the startup timer expires, and wherein killing the process comprises killing the process when the startup count exceeds a maximum number of attempts at starting the process.
4 . The method of claim 3 , further comprising attempting to restart the process when the startup count does not exceed the maximum number of attempts at starting the process.
5 . The method of claim 3 , further comprising cleaning up internal process control data and notifying an administrator about the inability to start the process when the startup count exceeds a maximum number of attempts at starting the process.
6 . The method of claim 1 , wherein the behavior is abnormal when the process repeatedly crashes, and wherein monitoring the behavior comprises:
accumulating an amount of uptime for the process; incrementing a crash count when the process crashes; and calculating a crash rate from the crash count per the amount of uptime, and wherein killing the process comprises killing the process when the calculated crash rate exceeds a maximum crash rate.
7 . The method of claim 6 , further comprising attempting to restart the process when the crash rate does not exceed the maximum crash rate.
8 . The method of claim 6 , further comprising cleaning up internal process control data and notifying an administrator about the inability to start the process when the crash rate exceeds a maximum crash rate.
9 . The method of claim 1 , wherein the behavior is abnormal when the process is non-responsive, and wherein monitoring the behavior comprises:
setting a process timer after starting the process; registering the process and incrementing a timeout count when the process fails to register before the process timer expires; and polling the process and incrementing the timeout count when the process fails to respond to polling before the process timer expires, and wherein killing the process comprises killing the process when the timeout count exceeds a maximum number of timeouts.
10 . The method of claim 9 , further comprising resetting the timeout count each time the process responds to polling.
11 . The method of claim 9 , wherein polling the process and incrementing the timeout count when the process fails to respond to polling before the process timer expires comprises sending a message to the process and incrementing the timeout count when the process fails to reply to the sent message before the process timer expires.
12 . The method of claim 10 , wherein resetting the timeout count each time the process responds to polling comprises resetting the timeout count to zero each time the process replies to the sent message.
13 . The method of claim 1 , wherein the behavior is abnormal when a thread of the process is non-responsive, and wherein monitoring the behavior comprises:
setting a thread timer for each thread after registering the process; waiting for each thread to provide an updated status; and incrementing a corresponding thread timeout count when any of the threads fails to provide an updated status before the corresponding thread timer expires, and wherein killing the process comprises killing the process when any of the thread timeout counts exceeds a maximum number of timeouts.
14 . The method of claim 13 , further comprising incrementing the timeout counts when the process fails to register before any of the thread timers expire.
15 . The method of claim 13 , further comprising incrementing the timeout counts when the process fails to send a message before any of the thread timers expire.
16 . The method of claim 13 , further comprising resetting the thread timeout count each time a corresponding thread provides an updated status.
17 . An apparatus comprising:
a process monitor to monitor a behavior of a process; and a controller to kill the process when the behavior is abnormal.
18 . The apparatus of claim 17 , further comprising a timer to measure a predetermined time interval for the process to perform a desired action and a counter to count a number of times the process fails to perform the desired action before the timer expires, and wherein a controller to kill the process comprises a controller to kill the process when the counter exceeds a maximum number of failures.
19 . The apparatus of claim 18 , wherein the desired action is to respond to polling and wherein the counter to increment each time the process does not respond to polling before the timer expires.
20 . The apparatus of claim 18 , wherein the desired action is to provide an update on the status of a thread of the process and wherein the counter to increment each time a thread of the process does not provide an updated status before the timer expires.
21 . The apparatus of claim 18 , wherein the desired action is to register and wherein the counter to increment each time the process does not register before the timer expires.
22 . The apparatus of claim 17 , further comprising a timer to measure an amount of uptime, a counter to count the number of times the process crashes, and a calculator to measure a crash rate from the number of times the process crashes per the amount of uptime, and wherein a controller to kill the process comprises a controller to kill the process when the calculated crash rate exceeds a predetermined maximum crash rate.
23 . An article of manufacture comprising:
a machine accessible medium comprising content that when accessed by a machine causes the machine to:
start a process;
monitor a behavior of the process; and
kill the process when the behavior is abnormal.
24 . The article of manufacture of claim 24 , further comprising a machine accessible medium comprising content that when accessed by a machine causes the machine to notify an administrator about the abnormal behavior.
25 . The article of manufacture of claim 24 , wherein the behavior is abnormal when the process cannot start, and wherein monitoring the behavior comprises:
setting a startup timer before starting the process; and incrementing a startup count when the process fails to register before the startup timer expires, and wherein killing the process comprises killing the process when the startup count exceeds a maximum number of attempts at starting the process.
26 . The article of manufacture of claim 24 , wherein the behavior is abnormal when the process repeatedly crashes, and wherein monitoring the behavior comprises:
accumulating an amount of uptime for the process; incrementing a crash count when the process crashes; and calculating a crash rate from the crash count per the amount of uptime, and wherein killing the process comprises killing the process when the crash rate exceeds a maximum crash rate.
27 . The article of manufacture of claim 24 , wherein the behavior is abnormal when the process is non-responsive, and wherein monitoring the behavior comprises:
setting a process timer after starting the process; registering the process and incrementing a timeout count when the process fails to register before the process timer expires; and polling the process and incrementing the timeout count when the process fails to respond to polling before the process timer expires, and wherein killing the process comprises killing the process when the timeout count exceeds a maximum number of timeouts.
28 . The article of manufacture of claim 24 , wherein the behavior is abnormal when a thread of the process is non-responsive, and wherein monitoring the behavior comprises:
setting a thread timer for each thread after registering the process; and waiting for each thread to provide an updated status and incrementing a timeout count when any of the threads fail to provide an updated status before the corresponding thread timer expires, and killing the process comprises killing the process when the timeout count exceeds a maximum number of timeouts.Join the waitlist — get patent alerts
Track US2003226056A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.