sh script to check process stats