星期四, 7月 11, 2013

[Shell script] Find Solaris OS opened files by processes

#!/bin/ksh

rm -f ino.lst

for A_PID in `ls /proc`

do

  /usr/proc/bin/pfiles -F $A_PID | grep "ino:" | wc -l >> ino.lst

done

cat ino.lst | awk '{printf("%f\n",tot); tot+=$1 }'

 

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...