Not sure what exactly you need but I understand it as you want result 1 or 0 depending on if one or more servername are running or no one is running. If this is what you want use:
ps -aux| grep servername | wc -l | awk '{ if($1>0) print 1; else print 0 }'
or
ps -aux| grep servername | wc -l |...
I use this code to check for the list of disks that have >90% use:
df -m | awk '$1 ~ "/dev/.*" { use=substr($5, 1, length($5)-1); if(int(use)>90) print $1 "(" use "%)"; }'
Only disks from /dev/... are included (not tmpfs, etc.) but can be modified for any other disk name pattern. You can easily...