top
lsof
/proc/*/fd
#!/bin/bash
time=`date +%Y%m%d%H%M%S`
file1=$1.$time
file2=$2.$time
if [[ -f $file1 ]]
then
head="boom boom boom"
else
touch $file1
fi
if [[ -f $file2 ]]
then
head="boom boom boom"
else
touch $file2
fi
top -b -n 1 >> $file1
pids=`ps ax | grep resin | grep java | awk -F' ' '{print $1}'`
for i in $pids
do
ls -all /proc/$i/fd/ >> $file2
done
exit 0