How to monitor JBOSS server user information and tomcat user
Posted: Tue Jun 26, 2018 6:09 am
I have read this document on "How to monitor JBOSS Server user and thread https://support.nagios.com/forum/viewto ... =6&t=34169". I want to know if there is a browser plugin or any other way where we can monitor the number of users using JBOSS and apache tomcat on a CentOS server. I have a script which does something like this. Please let me know if there is a plugin or script which can be used which can extract the details and send an email.
#!/bin/bash
COUNT=0
COUNT1=0
COUNT2=0
COUNT3=0
IFS=$'\n'
#LIST=`pgrep httpd`
#LIST1=`pgrep java`
#LIST=`ps -aef | grep httpd | grep -v grep`
#LIST1=`ps -aef | grep java | grep -v grep`
USERNAME=`cat /etc/passwd|cut -d':' -f1` # show all users
LIST=`pgrep -u root httpd`
LIST1=`pgrep -u root java`
LIST2=`pgrep -u seenu httpd`
LIST3=`pgrep -u seenu java`
for LINE in $LIST
do
COUNT=$((COUNT+1))
done
echo $COUNT
IFS=$'\n'
for LINE in $LIST1
do
COUNT1=$((COUNT1+1))
done
echo $COUNT1
IFS=$'\n'
for LINE in $LIST2
do
COUNT2=$((COUNT2+1))
done
echo $COUNT2
IFS=$'\n'
for LINE in $LIST3
do
COUNT3=$((COUNT3+1))
done
echo $COUNT3
#!/bin/bash
COUNT=0
COUNT1=0
COUNT2=0
COUNT3=0
IFS=$'\n'
#LIST=`pgrep httpd`
#LIST1=`pgrep java`
#LIST=`ps -aef | grep httpd | grep -v grep`
#LIST1=`ps -aef | grep java | grep -v grep`
USERNAME=`cat /etc/passwd|cut -d':' -f1` # show all users
LIST=`pgrep -u root httpd`
LIST1=`pgrep -u root java`
LIST2=`pgrep -u seenu httpd`
LIST3=`pgrep -u seenu java`
for LINE in $LIST
do
COUNT=$((COUNT+1))
done
echo $COUNT
IFS=$'\n'
for LINE in $LIST1
do
COUNT1=$((COUNT1+1))
done
echo $COUNT1
IFS=$'\n'
for LINE in $LIST2
do
COUNT2=$((COUNT2+1))
done
echo $COUNT2
IFS=$'\n'
for LINE in $LIST3
do
COUNT3=$((COUNT3+1))
done
echo $COUNT3