-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add service details #108
Add service details #108
Conversation
Detect the service details and populate that into etcd. tendrl-bug-id:Tendrl/specifications#73 Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
@r0h4n , @nthomas-redhat , @shtripat , Please review |
@@ -1,6 +1,7 @@ | |||
from command import Command | |||
import platform | |||
import socket | |||
from service_deduction import Service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deduction??
config = TendrlConfig() | ||
LOG = logging.getLogger(__name__) | ||
|
||
NAMES=["httpd", "glusterd", "sshd", "tendrl-node-agent"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%s/NAMES/VALID_SERVICES/g
"command": "Execution Script", | ||
"exe_path": "Execution Path", | ||
"status": "Service Status", | ||
"cpu_usage_per": "Cpu Usage Percentage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%s/cpu_usage_per/cpu_usage_percent/g
try: | ||
pDet = [psutil.Process(p) for p in psutil.get_pid_list() \ | ||
if psutil.Process(p).name() in self.names] | ||
except psutil.NoSuchProcess as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log at least
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve merge conflicts
@TimothyAsir let me know if this is to be re-opened |
Detect the service details and populate that into etcd.
tendrl-bug-id:Tendrl/specifications#73
Signed-off-by: Timothy Asir J tjeyasin@redhat.com