Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

​How does ambari display service state

How does ambari display service state STARTED/STOPPED , which is the check that is applied for doing it , is it PID check or in background ps is done for the service.

can some one explain, what happens in background to determine the state of the service?

1 ACCEPTED SOLUTION

@deepak sharma

It could be as simple as checking the pid file and the corresponding process in the system. For example, for hiveserver2 the file on hiveserver2 node it would be /var/run/hive/hive_server.pid. If the process number in the file is not matching with the running hiveserver2 process, it would show the process as stopped.

View solution in original post

2 REPLIES 2

@deepak sharma

It could be as simple as checking the pid file and the corresponding process in the system. For example, for hiveserver2 the file on hiveserver2 node it would be /var/run/hive/hive_server.pid. If the process number in the file is not matching with the running hiveserver2 process, it would show the process as stopped.