here is a quick and dirty little script to see how many open files tomcat is using up.

#!/bin/bash
USER=tomcat
LSOF=`lsof -u $USER | wc -l`
OPEN_F=`ulimit -a | egrep "open files" | awk '{print $4}'`
#PERCDONE=$(( $LSOF / $OPENF * 100 ))
PERCDONE_PRE=$(echo "scale=2;(($LSOF/$OPEN_F) * 100)" |bc)
PERCDONE=`echo $PERCDONE_PRE | cut -d. -f1`

if [ $PERCDONE -lt 84 ]; then
  printf "OK  -- $PERCDONE %% with $LSOF files open\n"
  exit 0
else
  if [ $PERCDONE -ge 85 ] && [ $PERCDONE -le 94 ]; then
    printf "WARN -- $PERCDONE %% with $LSOF files open\n"
    exit 1
  elif [ $PERCDONE -ge 95 ]; then
    printf "CRIT -- $PERCDONE %% with $LSOF files open\n"
    exit 2
  fi
fi