3 Replies Latest reply: Mar 5, 2013 10:13 PM by 995017 RSS

    Count how many open files in a solaris project ?

    CyrilleNdata
      Hello all,
      please can someone help me with a script or command to count current open files in a solaris project ?
      I have already this :
      ----------------------------------------------------
      *#!/bin/ksh*
      let "TOTAL_OPENED=0"
      for A_PID in `ls /proc`; do
      FILES_OPENED=`/usr/proc/bin/pfiles $A_PID 2>/dev/null| grep "ino:" | wc -l`
      let "TOTAL_OPENED = TOTAL_OPENED + $FILES_OPENED"
      done
      * echo "Opened files = $TOTAL_OPENED"*
      --------------------------------------------------------------------------------------------------------
      but the number are for the whole system . any help will be appreciated..... thanks in advance