👤
Home Man
Search
Today's Posts
Register

Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

How to Monitor Tomcat App Server?

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 01-25-2017
Computer How to Monitor Tomcat App Server?

Tomcat stops logging intermittently for brief intervals of time like for 5 or 6 secs

I wish to monitor if my Tomcat process gets stuck, hung or even shutdown or remains healthy at the time i see the problem of no logging.

Can you please let me know how can i monitor Tomcat Application Server v 8.0

I am not sure if this is the right forum for my query. Please move it to the appropriate forum incase you feel so.
# 2  
Old 01-25-2017
Quote:
I am not sure if this is the right forum for my query. Please move it to the appropriate forum incase you feel so.
No problem. I have transferred you over to the applications forum.

You can use ps to monitor the tomcat processes, but this will not tell you if a process hangs "for a few seconds", as you say it does.

Have you made sure that tomcat really stops logging? Might it be that it simply had nothing to log for these few seconds?

bakunin
# 3  
Old 01-25-2017
Quote:
Originally Posted by bakunin
No problem. I have transferred you over to the applications forum.

You can use ps to monitor the tomcat processes, but this will not tell you if a process hangs "for a few seconds", as you say it does.

Have you made sure that tomcat really stops logging? Might it be that it simply had nothing to log for these few seconds?

bakunin
It certainly stops logging. This may be because of the requests not reaching Tomcat so its obvious it does not have to log anything or the Tomcat is Hung or Restarts due to which we see the missing logging.

Can you please suggest how can we monitor the server health to understand if the missing logging is desired or problematic ?
# 4  
Old 01-25-2017
I recommend these options:
  • Keep track at the Tomcat memory usage. E. g. with the nagios or any other plugin:

    check_tomcat.pl - Nagios Exchange
  • Check the web-site the tomcat is providing(if it is a website) or use simple application requests to your tomcat whatever that maybe. If the tomcat does not respond it's obviously dead.
  • Check for a running java-process meeting the criteria of you tomcat process
Maybe one want not only to know when an application is dead, but also how healthy that application is(memory usage, response time,...)
# 5  
Old 01-25-2017
Quote:
Originally Posted by mohtashims
It certainly stops logging. This may be because of the requests not reaching Tomcat so its obvious it does not have to log anything or the Tomcat is Hung or Restarts due to which we see the missing logging.
Can you please suggest how can we monitor the server health to understand if the missing logging is desired or problematic ?
Hello mohtashims,

You could take following as a starting point to try to solve this problem.
  1. First do a ps -ef | grep tomcat and see if process is running or not.
  2. If process is running then you could try to STOP tomcat service then, if it is not running then try to kill it only tomcat process.
  3. Now make sure nothing is running for tomcat process. Then navigate to path of your tomcat logs and check for .pid file there, check if .pid file is empty or not if it is not then do it empty(so what it will hold is the pid of current running tomcat process).
  4. Try to start tomcat process again now and monitor the logs.
  5. If nothing works then let's think like a troubleshooter and try to put logging(DEBUG) to your tomcat logs by putting DEBUG in logging.properties of tomcat 6/7.

NOTE: These steps shouldn't be taken in a LIVE environment, without doing analysis(as it is one of the scenario).

Thanks,
R. Singh

Last edited by rbatte1; 01-25-2017 at 08:56 AM.. Reason: Converted textual list to formatted roman numeral list
# 6  
Old 01-25-2017
I wish to monitor if my Tomcat process if Running, Hung, or Shutdown.

I cannot use any third party monitoring tools so i decided to use one of these to test if the tomcat server is responding or not .

Code:
1. nslookup
2. telnet
3. ps

The reason I do not use wget / curl is because it will make the Tomcat log information in its log files which will disturb the purpose of our testing.

Which of these three is better, safer and convenient to use.

Also, let me know if you have any other suggestions.
# 7  
Old 01-25-2017
Have you made sure it is the application (and, for instance, NOT the system itself) that hangs for a few seconds? If, i.e., the system would be in a state of heavy swapping it might look like the application hangs but in fact it is the system that blocks the application because it has to get missing memory pages from swap to memory.

I hope this helps.

bakunin
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script monitor website wth default tomcat script charli1 UNIX for Advanced & Expert Users 0 06-26-2018 01:37 PM
Configure app server to view server files shrshah64 Red Hat 1 05-24-2012 01:57 PM
Need a little help in running jsp pages(Tomcat server). pinga123 Programming 3 05-06-2010 08:07 AM
difference weblogic server/webserver/app server tostay2003 UNIX for Dummies Questions & Answers 1 10-14-2009 01:44 PM
Trouble getting consistent PID of tomcat server from ps dkaplowitz Shell Programming and Scripting 1 07-16-2009 11:14 AM
what is the difference between http & Tomcat web server jayaprakash Solaris 2 03-12-2009 03:15 AM
can I use tomcat server for my chatting application? nsharath IP Networking 3 02-11-2009 10:18 AM
How to restart the tomcat server sankar reddy Shell Programming and Scripting 2 10-08-2008 05:26 AM
TomCat access in an Remote Linux Server gothama UNIX for Dummies Questions & Answers 1 03-13-2008 09:17 AM
jsp not working on linux running tomcat server mile1982 Linux 1 10-14-2004 06:18 AM


All times are GMT -4. The time now is 11:12 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password