![[ Informix Logo ]](/_borders/inflogo1.gif) |
Архив интересных статей по Informix |
Any one know this?
>
>Jonathan Leffler wrote:
>>
>> cheng wrote:
>> > Is there a script that can check informix on-line dynamic server
>> > is up and running or not? If not it will e-mail a note to D.B.A.
>> > groups
>>
>> If you can assume the environment is OK, then you can use
>> a minor variant on:
>>
>> x=`onstat -`
>> case $? in
>> 0) msg="";;
>> 1) msg="Server is quiescent";;
>> # I' not sure that 1 is quiescent, but...
>> 2) msg="Server is ...";;
>> ...
>> *) msg="Server is in an unknown state: $x";;
>> esac
>>
>> if [ -n "$msg" ]
>> then
>> echo $msg | mail -s "$x" dba-group
>> fi
>
>Quiescent does indeed return 1. The other values AFAIK are:
>
> -1 Off-line
> 0 Initialization
> 1 Quiescent
> 2 Recovery
> 3 Backup
> 4 Shutdown
> 5 Online
> 6 Abort
>
>Cheers,
>--
>Mark.
>
>+----------------------------------------------------------+-----------+
>|Mark D. Stock - Informix SA http://www.informix.com |//////// /|
>|mailto:mdstock@informix.com http://www.informix.com/idn |///// / //|
>|http://www.iiug.org +-----------------------------------+//// / ///|
>| Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////|
>| Fax: +27 838250 2325 |If it's fast, the users keep quiet.|// / /////|
>|Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////|
>+----------------------+-----------------------------------+-----------+
| [ Home ] |
Сайт создан при поддержке Украинского
представительства Informix Software Inc. |
Hosted by ANTEC |