jps很简单,用于显示当前运行的Java进程,也可以连接到远程服务器去查看
[hadoop@hadoop bin]$ jps -help usage: jps [-help] jps [-q] [-mlvV] [<hostid>] Definitions: <hostid>: <hostname>[:<port>]
用法举例:
1. jps
[hadoop@hadoop bin]$ jps 3489 Jps 1819 Master 1988 Worker
2. jps -v
忽略了jps本身这个Java进程
[hadoop@hadoop bin]$ jps -v 3524 Jps -Dapplication.home=/home/hadoop/software/jdk1.7.0_67 -Xms8m 1819 Master -XX:MaxPermSize=128m -Dspark.akka.logLifecycleEvents=true -Xms512m -Xmx512m 1988 Worker -XX:MaxPermSize=128m -Dspark.akka.logLifecycleEvents=true -Xms512m -Xmx512m
3. jps -m
[hadoop@hadoop bin]$ jps -m 1819 Master --ip hadoop.master --port 7077 --webui-port 8080 1988 Worker spark://hadoop.master:7077 3549 Jps -m
4. jps -l
可以显示详细的类名,而jps默认显示的是simple class name
[hadoop@hadoop bin]$ jps -l 1819 org.apache.spark.deploy.master.Master 1988 org.apache.spark.deploy.worker.Worker 3563 sun.tools.jps.Jps
5. jps -lmv
[hadoop@hadoop bin]$ jps -lmv 3575 sun.tools.jps.Jps -lmv -Dapplication.home=/home/hadoop/software/jdk1.7.0_67 -Xms8m 1819 org.apache.spark.deploy.master.Master --ip hadoop.master --port 7077 --webui-port 8080 -XX:MaxPermSize=128m -Dspark.akka.logLifecycleEvents=true -Xms512m -Xmx512m 1988 org.apache.spark.deploy.worker.Worker spark://hadoop.master:7077 -XX:MaxPermSize=128m -Dspark.akka.logLifecycleEvents=true -Xms512m -Xmx512m