Hello there Bharath,
You can use the return for sapcontrol web methods:
---------------------------
sapcontrol -nr <instance number> -function GetSystemInstanceList
---------------------------
OR
---------------------------
sapcontrol -nr <instance number> -function GetProcessList
---------------------------
And check whether "GREEN" is part of the response. The first one will return one line per instance while the latter will return the status of all services for the local instance.
If they all are green then the instance is up and running.
Cheers,
Ian Segóbio.