lsof >/tmp/a.txt
awk ‘$3 == “oracle” {print $0}’ /tmp/a.txt |awk ‘{print $2}’|sort|uniq |while read AA
do
echo “$(date) Process ID – $AA — Number of Open File = $(awk -v aa=”$AA” ‘$2 == aa {print $9}’ /tmp/a.txt|sort|uniq|wc -l)”
done
#while :
#> do
#> echo “$(date) $(lsof -p 3745 |awk ‘{print $9}’|sort|uniq|wc -l)”
#> sleep 60
#> done