Sponsored Content
Full Discussion: Check DB Status using expect
Top Forums Shell Programming and Scripting Check DB Status using expect Post 302475008 by pludi on Friday 26th of November 2010 07:21:01 AM
Old 11-26-2010
What DB in which version on what OS?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check the status and send an email with status

Hi, We have a text file which has the following data. ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183 7~U~00200~000011258~0~P~< GS~FA~EE05J~U1CAD~051227~1831~000011258~X~002002 ST~997~0001 AK1~SH~247 AK2~856~2470001 AK5~A AK2~856~2470002 AK5~A... (3 Replies)
Discussion started by: isingh786
3 Replies

2. Shell Programming and Scripting

check exit status - Expect Script

from my main script, i am calling an expect script. there are a lot of conditions in the Expect script and it can have any exit value based on success or failure of the Expect Script. how can i check the exit status of Expect scritp in the main script. (1 Reply)
Discussion started by: iamcool
1 Replies

3. AIX

check the status of ypbind

hello , How do i to check the status of ypbind on AIX(5.3) platform ? Thanks AVK Linux (1 Reply)
Discussion started by: avklinux
1 Replies

4. Shell Programming and Scripting

How to Check the process Status and do something

Hi we have weblogic deployed under Linux Enterprise 5 . Now i want to write a script that checks if weblogic is running or not I have found that weblogic uses Java as process . Can i do this way : my Script File : Echo Checking Status if then echo Server Running else echo... (2 Replies)
Discussion started by: Ravi Pavanv
2 Replies

5. Shell Programming and Scripting

Check for exit status

Hi I have following code I want If whole code executes successfully then return true If found any error then print the error I tried if ; then But this checks only for the just upper line execution #!/bin/bash PATH1=/var/log/mysql PATH2=/home/ankur/log FILE1=mysql-bin.index... (4 Replies)
Discussion started by: kaushik02018
4 Replies

6. Shell Programming and Scripting

Need help to check the jobs status

Hello All, I'm new in shell scripting and would like to write an automated script that will check few jobs for the completion, and restart the process based on the jobs status. I am not quite sure how do I check the job status... Can someone please help? Any help will be appreciated. Thanks in... (1 Reply)
Discussion started by: mohullah
1 Replies

7. Shell Programming and Scripting

Check HD status

I have some server ( IBM , Dell ) , our data center is not in the same location with office , therefore , I do not know if the HD lamp is flash when the HD is fault , can advise if I can write a script to check if the HD is normal running or not ? thanks (1 Reply)
Discussion started by: ust
1 Replies

8. UNIX for Advanced & Expert Users

Check for DB status and startup DB

EXPERTS, I need a shell script to check the DBs status (Running/Shutdown) in the server.If its Running then no issue but if it is in shutdown state ,it should prompt like " DB is shut down you want to startup??" if i enter YES it should startup. ORACLE_SID are present in /var/opt/oracle/oratab ... (0 Replies)
Discussion started by: navsan420
0 Replies

9. Shell Programming and Scripting

Check for DB status and startup DB

EXPERTS, I need a UNIX shell script to check the DBs status (Running/Shutdown) in the server.If its Running then no issue but if it is in shutdown state ,it should prompt like " DB is shut down you want to startup??" if i enter YES it should startup. ORACLE_SID are present in... (18 Replies)
Discussion started by: navsan420
18 Replies

10. UNIX for Beginners Questions & Answers

Check status of process

Hi All, Have a query How to check for a process and if down start it , try if for 2 times and its not starting don't do it My code is working to some extent but while starting try starting both times. Please advise , whats wrong here ? if you have any other approach please do share. My... (1 Reply)
Discussion started by: abhaydas
1 Replies
apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::APR:UsertContributed Perl Doapache_mod_perl-108~358::mod_perl-2.0.7::docs::api::APR::Status(3)

NAME
APR::Status - Perl Interface to the APR_STATUS_IS_* macros Synopsis use APR::Status (); eval { $obj->mp_method() }; if ($@ && $ref $@ eq 'APR::Error' && APR::Status::is_EAGAIN($@)) { # APR_STATUS_IS_EAGAIN(s) of apr_errno.h is satisfied } Description An interface to apr_errno.h composite error codes. As discussed in the "APR::Error" manpage, it is possible to handle APR/Apache/mod_perl exceptions in the following way: eval { $obj->mp_method() }; if ($@ && $ref $@ eq 'APR::Error' && $@ == $some_code) warn "handled exception: $@"; } However, in cases where $some_code is an APR::Const constant, there may be more than one condition satisfying the intent of this exception. For this purpose the APR C library provides in apr_errno.h a series of macros, "APR_STATUS_IS_*", which are the recommended way to check for such conditions. For example, the "APR_STATUS_IS_EAGAIN" macro is defined as #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION) The purpose of "APR::Status" is to provide functions corresponding to these macros. Functions "is_EACCES" Check if the error is matching "EACCES" and its variants (corresponds to the "APR_STATUS_IS_EACCES" macro). $status = APR::Status::is_EACCES($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 An example of using "is_EACCES" is when reading the contents of a file where access may be forbidden: eval { $obj->slurp_filename(0) }; if ($@) { return Apache2::Const::FORBIDDEN if ref $@ eq 'APR::Error' && APR::Status::is_EACCES($@); die $@; } Due to possible variants in conditions matching "EACCES", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::EACCES" directly. "is_EAGAIN" Check if the error is matching "EAGAIN" and its variants (corresponds to the "APR_STATUS_IS_EAGAIN" macro). $status = APR::Status::is_EAGAIN($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 For example, here is how you may want to handle socket read exceptions and do retries: use APR::Status (); # .... my $tries = 0; my $buffer; RETRY: my $rlen = eval { $socket->recv($buffer, SIZE) }; if ($@ && ref($@) && APR::Status::is_EAGAIN($@)) { if ($tries++ < 3) { goto RETRY; } else { # do something else } } else { die "eval block has failed: $@"; } Notice that just checking against "APR::Const::EAGAIN" may work on some Unices, but then it will certainly break on win32. Thefore make sure to use this macro and not "APR::Const::EAGAIN" unless you know what you are doing. "is_ENOENT" Check if the error is matching "ENOENT" and its variants (corresponds to the "APR_STATUS_IS_ENOENT" macro). $status = APR::Status::is_ENOENT($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 An example of using "is_ENOENT" is when reading the contents of a file which may not exist: eval { $obj->slurp_filename(0) }; if ($@) { return Apache2::Const::NOT_FOUND if ref $@ eq 'APR::Error' && APR::Status::is_ENOENT($@); die $@; } Due to possible variants in conditions matching "ENOENT", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::ENOENT" directly. "is_EOF" Check if the error is matching "EOF" and its variants (corresponds to the "APR_STATUS_IS_EOF" macro). $status = APR::Status::is_EOF($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "EOF", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::EOF" directly. "is_ECONNABORTED" Check if the error is matching "ECONNABORTED" and its variants (corresponds to the "APR_STATUS_IS_ECONNABORTED" macro). $status = APR::Status::is_ECONNABORTED($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "ECONNABORTED", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::ECONNABORTED" directly. "is_ECONNRESET" Check if the error is matching "ECONNRESET" and its variants (corresponds to the "APR_STATUS_IS_ECONNRESET" macro). $status = APR::Status::is_ECONNRESET($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "ECONNRESET", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::ECONNRESET" directly. "is_TIMEUP" Check if the error is matching "TIMEUP" and its variants (corresponds to the "APR_STATUS_IS_TIMEUP" macro). $status = APR::Status::is_TIMEUP($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "TIMEUP", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::TIMEUP" directly. See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.16.2 2011-02-07 apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::APR::Status(3)
All times are GMT -4. The time now is 08:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy