public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/1] MAZE: Mazed processes monitor
@ 2008-05-13 11:47 Hirofumi Nakagawa
  2008-05-13 15:41 ` Andrew Morton
  2008-05-13 21:07 ` Andi Kleen
  0 siblings, 2 replies; 6+ messages in thread
From: Hirofumi Nakagawa @ 2008-05-13 11:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

Hi all.

This patch provides the mazed process monitor,named MAZE.
MAZE's purpose is to notify or terminate registered processes when they are mazed.
The definition of mazed process is a process using excessive CPU cycles,
that is long time keeping TASK_RUNNING state.
MAZE detects mazed processes and sends specified signals to them.
This implements a CGL (Carrier Grade Linux) requirement (AVL.14.0).

Possible uses:
* High-Availability system
* system using many Real-Time processes such as embedded

Please any comments!

Hirofumi Nakagawa

--- Usage
Add monitoring process.

% echo "1234 10000 20000 24 9" > /proc/maze/entries

The numeric values are "pid","soft limit [msec]","hard limit [msec]",
"soft signal" and "hard signal".


Get monitoring process list.

% cat /proc/maze/entries

--- Example
As follows example express the feature of MAZE function.

--
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int state,i;
    char cmd[128];

    sprintf(cmd, "echo \"%d 10000 20000 24 9\" > /proc/maze/entries", getpid());
    system(cmd);

    if (!fork()) {
        printf("Mazed process start.\n");
        for(;;);
    }

    if (!fork()) {
        printf("Not mazed process start.\n");
        for(i = 0;i < 20; i++)
            sleep(1);
        printf("Not mazed process finish.\n");
        exit(0);
    }

    for (i = 0;i < 2; i++)
         wait(&state);

    return 0;
}
--
---






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-05-22  9:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 11:47 [RFC][PATCH 0/1] MAZE: Mazed processes monitor Hirofumi Nakagawa
2008-05-13 15:41 ` Andrew Morton
2008-05-22  9:31   ` Hirofumi Nakagawa
2008-05-13 21:07 ` Andi Kleen
2008-05-14 13:52   ` Hirofumi Nakagawa
2008-05-22  9:31   ` Hirofumi Nakagawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox