|
hi
I have a sybase server. I want to check if the server is up using ps -aef | grep dataserver
What is the exit status to be checked? that of ps or grep?
If I should check ps exit status, the server can be down and ps exit code will be as if the server is up. right?
So I should check the exit status of grep.
how to do that in a shell script?
thx
|