Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Count how many open files in a solaris project ?

CyrilleNdataJan 23 2013 — edited Mar 5 2013
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
This post has been answered by 995017 on Mar 5 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2013
Added on Jan 23 2013
3 comments
1,312 views