Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8143999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:15:27+00:00 2026-06-06T13:15:27+00:00

by hand, here is the process: ps -ef | grep tomcat The results of

  • 0

by hand, here is the process:

ps -ef | grep tomcat

The results of this look like:

0 39107 1 0 5:40PM ttys004 5:22.34 /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java -Djava.util.logging.config.file=/opt/local/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -Xms384m -Xmx768m -XX:NewSize=256m -XX:NewRatio=2 -XX:PermSize=128m -XX:MaxPermSize=384m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=/opt/local/tomcat7/endorsed -classpath /opt/local/tomcat7/bin/bootstrap.jar:/opt/local/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/opt/local/tomcat7 -Dcatalina.home=/opt/local/tomcat7 -Djava.io.tmpdir=/opt/local/tomcat7/temp org.apache.catalina.startup.Bootstrap start

the second number is the pid.

Then I do

sudo kill tomcat_pid

How can I automate this?

ps. I know there is a shutdown.sh script. I’ve tried it but it never works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:15:29+00:00Added an answer on June 6, 2026 at 1:15 pm

    ps -ef | grep tomcat | awk '{ print $2 }' | xargs kill will extract that second number and pass it to kill. Actually, you’ll probably want ps -efww to make sure you get the whole command line.

    This really isn’t the nicest way to do this; ideally, you should store the PID when you create the process you’ll later want to kill, to make sure you don’t kill things that accidentally happen to match the string you’re searching for (amongst other potential problems).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hope someone will give me a hand with this problem I have. So here
If i hand code each array value like this: $paymentDetailsType->setPaymentDetailsItem( array ( 'PaymentDetailsItem00' =>
I am trying to implement free-hand sketching (it should look like a pencil). I
This feels like an extremely n00b question, but here goes... I have a series
Hey guys I'm in the process of making this website here: http://craigmarkdrums.com (bare in
Here's a starter list: if hbm is hand generated, is it an embedded resource?
I read here about std::auto_ptr<>::operator= Notice however that the left-hand side object is not
Many questions here on SO ask about custom classes. I, on the other hand,
What is the issue with this code? Here we have two files: classA.h and
How i can draw hand free graphic objects in windows 8, like paint can.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.