0 Replies Latest reply on Aug 31, 2010 1:19 PM by Nathan Boyce

    ajp session request remote address

    Nathan Boyce Newbie

      I'm looking for a way to pull the ajp session request remote address's without using the web console. Anyone know of a better way to pull ajp session request address? I dont want to run this on a  server with over 1000 active sessions because its going to run ("active session" + "1")  twiddle request and take minutes to finish.

       

       

      #!/bin/bash

      HOST=localhost

      #script start
      res1=$(date +%s.%N)

      AJPCOUNT=$(/usr/local/jboss/bin/twiddle.sh -s $HOST  get  "jboss.web:name=ajp-0.0.0.0-8009,type=ThreadPool"  currentThreadCount   |awk -F\= '{print $2}')

      for X in $(seq 1 $AJPCOUNT); do /usr/local/jboss/bin/twiddle.sh -s  $HOST  get  "jboss.web:name=AjpRequest$X,type=RequestProcessor,worker=ajp-0.0.0.0-8009"  remoteAddr|awk -F\= '{print $2}';done |sort -n |uniq -c

      #script end
      res2=$(date +%s.%N)
      echo "Elapsed Time:  $(echo "$res2 - $res1"|bc )"