This script belongs to the MaxDB start/stop service script, hope it helps:

    status)
        if [ ! -z "$X_PATH" ]; then
            if [ -x $FUSER ]; then
                _o=`$FUSER $IND_PROG_DBROOT/pgm/vserver`
                if [ $? -eq 0 ]; then
                    echo "communication server is running"
                        _o=`$DBMCLI -d $SID -u dbm,dbm db_state`
                        _test=`echo $_o | grep OK`
                        if [ "$_test" = "" ]; then
                                echo "cannot get state of database: $_o" >&2
                        else
                                _state=`echo $_o | sed s/OK// | sed s/State//`
                                echo "database $SID is $_state"
                        fi
                        RETVAL=0
                    else
                        echo "communication server is not running"
                        RETVAL=0
                fi
           else
                echo "status unkown  - fuser not found" >&2
           fi   
        else
            echo "status unkown - x_server not found" >&2
        fi
        ;;


The complete version can be downloaded from:
http://www.martincordova.com/download/maxdb.zip

Regards,
Martin Cordova
--
Dinamica - RADical J2EE framework
open source, easy and powerful
http://www.martincordova.com


On 1/12/06, dbsupport <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i want to check the x_servers state. x_server -h says:
> Syntax: x_server [{<option>}] [ start | stop | update ] [{<option>}]
> missing the comand "state"!
>
> is there a pid-file from the x_server, which could be monitored? (a pid-file 
> for the kernel exists ...)
>
> while testing the options for x_server i saw this:
>
> x_server -h
>
> ...
> alive check interval                          :: -c <interval in seconds>
> ...
>
> but
>
> x_server start -c 20
>
> Invalid argument 4 unknown option 'c'
> Syntax: x_server [{<option>}] [ start | stop | update ] [{<option>}]
> Usage: start or stop the communication server for SAPDB. Use -h for option 
> description
>
>
>
> --
> Ingo Trapphagen
> Datenbankadministration
> IOn Aktiengesellschaft
>
>
> --
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to