From 447b0c07df7eb1a3a6b5521ffba82a44ba28b761 Mon Sep 17 00:00:00 2001 From: steve Date: Thu, 22 Dec 2016 10:23:26 -0600 Subject: [PATCH] adding status to processes --- src/api/index.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/api/index.py b/src/api/index.py index 38f5a3e..77ef66c 100644 --- a/src/api/index.py +++ b/src/api/index.py @@ -45,6 +45,24 @@ for key in CONFIG : HANDLERS[key] = {"class":ref,"config":CONFIG[key]["config"]} f.close() +""" + This function determines the status of a given observation as follows + considering: + x memory used + y cpu used + z memory allocated + + x y z + 0 0 0 crash + 0 0 1 idle + 1 0 1 idle + 1 1 1 running + + This classification is known and we will not write a learner for this. The implementation will account for relationships such as assuming if memory is allocated and cpu is used chances the application is running because there will be memory used otherwise idle + +""" + + @app.route('/get/') def procs(id): if id in HANDLERS: