哪个用户在Amazon EC2上运行tomcat?

时间:2012-08-12 18:00:08

标签: linux tomcat ubuntu amazon-ec2

我在Amazon EC2(OS - Ubuntu 12 LTS)上运行了Tomcat 7服务器。如何在Amazon EC2上找出哪个用户正在运行Tomcat

1 个答案:

答案 0 :(得分:2)

尝试此命令:

ps auxwww | grep tomcat | grep -v grep

你会得到像这样的输出

    $ ps auxwww | grep tomcat | grep -v grep
root      1941  0.2  1.7 419224 35208 ?        Sl   Aug12   0:06 /usr/lib/jvm/java-6-sun/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start

您获得进程所有者名称和进程ID ..