Created 06-30-2017 02:05 PM
For CDH 5.7.0 what is the full path to an HDFS datanode's PID file?
Created 07-05-2017 10:13 AM
Oops, that was overkill... forgot that supervisorctl status output has the PID column already... So, you can run:
/usr/lib64/cmf/agent/build/env/bin/supervisorctl -c /var/run/cloudera-scm-agent/supervisor/supervisord.conf status
The PID will be the 4th column.
-Ben
Created 06-30-2017 07:48 PM
Could you check your /tmp .
Created 07-05-2017 06:32 AM
Created on 07-05-2017 07:52 AM - edited 07-05-2017 07:58 AM
check the status of datanode dameon in that host
meantime the pfile should be in
/var/run/hadoop-hdfs/hadoop-hdfs-datanode.pid
Created 07-05-2017 08:43 AM
Created 07-05-2017 09:28 AM
Check the below location for datanode pid file
/var/run/hadoop-hdfs/
Created 07-05-2017 09:41 AM
Since the supervisor starts CM managed processes, there is no PID file for the processes it starts.
Short answer: there is no PID file.
-Ben
Created 07-05-2017 10:00 AM
Created 07-05-2017 10:10 AM
While there are a number of ways to get the PID (like ps aux |grep ....), this is one I just thought up:
/usr/lib64/cmf/agent/build/env/bin/supervisorctl -c /var/run/cloudera-scm-agent/supervisor/supervisord.conf pid `ls -lrt /var/run/cloudera-scm-agent/process/ | awk '{print $9}' |grep DATANODE| tail -1`
What it does is run supervisor's client using the Cloudera Manager sueprvisord.conf file to retrieve a pid file. The backticks execute a command to get the most recent process directory to pass into the "pid" command of supervisorctl. You can see the process names and statuses using the following:
/usr/lib64/cmf/agent/build/env/bin/supervisorctl -c /var/run/cloudera-scm-agent/supervisor/supervisord.conf status
-Ben
Created 07-05-2017 10:13 AM
Oops, that was overkill... forgot that supervisorctl status output has the PID column already... So, you can run:
/usr/lib64/cmf/agent/build/env/bin/supervisorctl -c /var/run/cloudera-scm-agent/supervisor/supervisord.conf status
The PID will be the 4th column.
-Ben