Skip to content
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

Conversation

TimothyAsirJeyasing
Copy link
Contributor

Detect the service details and populate that into etcd.

tendrl-bug-id:Tendrl/specifications#73
Signed-off-by: Timothy Asir J tjeyasin@redhat.com

Detect the service details and populate that into etcd.

tendrl-bug-id:Tendrl/specifications#73
Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
@TimothyAsir
Copy link

@r0h4n , @nthomas-redhat , @shtripat , Please review

@@ -1,6 +1,7 @@
from command import Command
import platform
import socket
from service_deduction import Service
Copy link
Member

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"]
Copy link
Member

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",
Copy link
Member

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log at least

Copy link
Contributor

@r0h4n r0h4n left a 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

@r0h4n
Copy link
Contributor

r0h4n commented Feb 27, 2017

@TimothyAsir let me know if this is to be re-opened

@r0h4n r0h4n closed this Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants