本文共 1707 字,大约阅读时间需要 5 分钟。
PID全称是Process Identification。
PID是进程的代号,每个进程有唯一的PID编号。它是进程运行时系统随机分配的,并不代表专门的进程。在运行时PID是不会改变标识符的,但是你终止程序后再运行PID标识符就会被系统回收,就可能会被继续分配给新运行的程序。[hadoop@hadoop000 ~]$ mkdir -p /opt/software/hadoop-2.8.1/pids[hadoop@hadoop000 ~]$ jps10512 ResourceManager8018 Jps10004 SecondaryNameNode9655 NameNode9806 DataNode10623 NodeManager[hadoop@hadoop000 ~]$ cd /opt/software/hadoop-2.8.1/sbin/[hadoop@hadoop000 sbin]$ ./stop-dfs.sh[hadoop@hadoop000 sbin]$ ./stop-yarn.sh[hadoop@hadoop000 sbin]$ vi hadoop-daemon.shHADOOP_PID_DIR=/opt/software/hadoop-2.8.1/pids[hadoop@hadoop000 sbin]$ vi yarn-daemon.shYARN_PID_DIR=/opt/software/hadoop-2.8.1/pids[hadoop@hadoop000 sbin]$ ./start-dfs.sh[hadoop@hadoop000 sbin]$ ./start-yarn.sh[hadoop@hadoop000 sbin]$ jps9201 SecondaryNameNode9425 ResourceManager9540 NodeManager9828 Jps8852 NameNode8973 DataNode#发现pid存储在新的位置[hadoop@hadoop000 sbin]$ cd /opt/software/hadoop-2.8.1/pids/[hadoop@hadoop000 pids]$ lltotal 20-rw-rw-r-- 1 hadoop hadoop 5 May 22 20:14 hadoop-hadoop-datanode.pid-rw-rw-r-- 1 hadoop hadoop 5 May 22 20:14 hadoop-hadoop-namenode.pid-rw-rw-r-- 1 hadoop hadoop 5 May 22 20:14 hadoop-hadoop-secondarynamenode.pid-rw-rw-r-- 1 hadoop hadoop 5 May 22 20:15 yarn-hadoop-nodemanager.pid-rw-rw-r-- 1 hadoop hadoop 5 May 22 20:15 yarn-hadoop-resourcemanager.pid
转载于:https://blog.51cto.com/10814168/2119228