2

Whenever I start my Ubuntu, there will be a java process by user tomcat7 which eats up almost 200 MB of memory.

I think a few months ago I was fiddling around with apache tomcat for some spring/hibernate projects. But honestly I do not remember how did I install it.

How can I find out where this process/service/application is located and how to properly stop it from starting on startup without breaking anything?

3
  • 2
    Whats the output of locate --regex '/etc/init(\.d)?/tomcat'?
    – heemayl
    Jan 24, 2016 at 1:07
  • @heemayl it says /etc/init.d/tomcat7
    – Dumbo
    Jan 24, 2016 at 1:10
  • So you could move that file or rename Jan 24, 2016 at 1:17

1 Answer 1

1

As seen from the output of

locate --regex '/etc/init(\.d)?/tomcat'

tomcat7 is using the legacy SysV style init and hence the start/stop script is in /etc/init.d/.

You can run the following command to remove all the symbolic links of /etc/init.d/tomcat7 in /etc/rc[0-6].d (or /etc/rcS.d) directories so that tomcat7 does not start automatically from next time you boot up the computer:

sudo update-rc.d -f tomcat7 remove
2
  • Thanks...before I execute this...I see in the man page of update-rc.d there is also disable/enable options. arent they safer if I ever want to enable it again?
    – Dumbo
    Jan 24, 2016 at 1:32
  • 1
    @Saeid87 As per man page enable/disable is broken.. If you know the exact runlevels, you can use start/stop..also remove is not destructive, you can get back to original state just doing sudo update-rc.d tomcat7 defaults afterwards..
    – heemayl
    Jan 24, 2016 at 1:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .