Okay.. getting close now..
I found some bash code that might do the trick for me..
Only problem.. I'm getting a syntax error: unexpected end of file (on line 16)
The code will dump the 'ps auxww' output for 'convert' in a file named 'rmp-grep'
Than it will read and 'grep' the file. If $2 is greater than (in this example) 20 it should show BAD Process found
Some one here (falko) who can have a look and let me know why it's giving the 'unexpected end of file' error?
When it does find the process and when it's above 20% it will give this error:
./test: line 10: [: 0.0: integer expression expected
(I've named the script as 'test' for now)
ps auxww | grep "cfmx7" | grep -v grep | cut -c10-14,15-20,61- > tmp-grep
while [ -n "$LINE" ]
if [ $2 -gt 20 ]; then
echo "BAD Process found";