Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #file contains the output of: pstree mysql -a -p |awk '{print $1;}' | sed 's/|-{mysqld},//' >> psadd
- filename='psadd'
- #total= '0'
- echo Start
- while read p; do
- memU=`ps -o rss= -p $p | awk '{print $1*4, "KiB"}'`
- echo "Process ID:"$p "Memory Usage:"$memU
- #total="$((total+memU))"
- #echo "This is the current running total:" $total
- done < $filename
- #echo "Total=" $total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement