Need help implementing a timout in my Shell Script for RHEL6
Hey Guys,
My problem:
I have a script that will be querying the database every minute to see if it gets a response, the response its querying for is "UP" in a table i made called dbup in the database.
Now, I am trying to add the component to implement a timeout if the script does not get a response from the server and skip to next line etc.
I would like to implement it either at the DB layer because of issues we have had with the product.
We want to skip the -->
I assign the variable query_select1, before I query DB to assign it to STRING "UP.
Any help would be appreciated. NOTE: we would like to avoid killing the script, but if necessary I might be ok with killing it and then sending message to myself that process got killed this is why.
But I really could use a solution to this because When the variable ="down" stays the same and doesn't get changed to "UP" from Database, then it gets passed onto the auto generated emails we have setup.
If there are other methods that I haven't thought of let me know as well.
RHEL6
Last edited by mo_VERTICASQL; 07-30-2014 at 12:37 PM..
I am led to understand that there when a port is bound for a tcp connection...once that connection is closed there is a timeout period before that port can be reused ... and the software I am using shows that. How long is this timeout - what affects it and is there anyway to reuce the timeout? (5 Replies)
ok here is a little bit on what I am trying to do. I am logged into a saolaris 9 server and telnet to another server to run an application that sits on the second unix / linux server. This application can sit idle for an hour to two and any given time. During this time the telnet session timesout... (4 Replies)
I'm implementing a shell in C that supports piping, output redirection, and background processing, and a few other commands. I was wondering how I'd go about implementing the output redirection. So, I'd open a file and I'd fork and execute the command. But how would I get stdout into the file? Any... (10 Replies)
hello all,
i hv attached herewith my program to implement a simple interactive shell in C. no matter hw hard I try, I keep getting some errors. i need help - urgently !!
proj1test7.c: In function `parseCommand':
proj1test7.c:102: warning: assignment makes pointer from integer without a cast... (2 Replies)
Hi,
I am implementing a shell in C, with the following problem...
Suppose the shell is invoked from the command line as
>> myshell < test.in > test.out 2>&1
I have to execute the commands in test.in and redirect them to test.out
How does one detect in the main function that the shell... (1 Reply)
1. The problem statement, all variables and given/known data:
need to implement mkdir, chdir, mv, pwd
given a shell.cpp directory.cpp and some other files
this shell missing these commands, and i need to implement them inside the shell
2. Relevant commands, code, scripts,... (0 Replies)
HI
I want to implement a control mechanism using Shell scripts .The intention is to have controlled number of jobs running in parallel
External process will kickstart 40 jobs in parallel .All the 40 jobs will call the same generic script with different parameter values .But at a... (4 Replies)
hi ,
i want write the script which automatically send an alert mail to my mail id when there is low memory available.
things which i am able to implement -:
i got the output of current memory status into one file . Than i break down the required coloumn and again send it in another file.
My... (1 Reply)
Hi,
Basically what I am trying to do is making multiple fields of the same type comma-separated.
i.e. for a data like this:
B00000 abc
B00001 abc,def
B00001 ghi
B00001 jkl
B00002 abc
B00002 def
B00003 xyz
Output should be like:
B00000 abc
B00001 abc,def,ghi,jkl... (20 Replies)
Hello Experts,
Is it possible to implement linked list in shell scripting? is yes then how can we do it? Any working example is highly appreciated.
Thanks in advance. (4 Replies)
Discussion started by: mukulverma2408
4 Replies
LEARN ABOUT DEBIAN
ocf_heartbeat_ids
OCF_HEARTBEAT_IDS(7) OCF resource agents OCF_HEARTBEAT_IDS(7)NAME
ocf_heartbeat_ids - Manages an Informix Dynamic Server (IDS) instance
SYNOPSIS
ids [start | stop | status | monitor | meta-data | validate-all]
DESCRIPTION
OCF resource agent to manage an IBM Informix Dynamic Server (IDS) instance as an High-Availability resource.
SUPPORTED PARAMETERS
informixdir
The value the environment variable INFORMIXDIR has after a typical installation of IDS. Or in other words: the path (without trailing
'/') where IDS was installed to. If this parameter is unspecified the script will try to get the value from the shell environment.
(optional, string, no default)
informixserver
The value the environment variable INFORMIXSERVER has after a typical installation of IDS. Or in other words: the name of the IDS
server instance to manage. If this parameter is unspecified the script will try to get the value from the shell environment.
(optional, string, no default)
onconfig
The value the environment variable ONCONFIG has after a typical installation of IDS. Or in other words: the name of the configuration
file for the IDS instance specified in INFORMIXSERVER. The specified configuration file will be searched at '/etc/'. If this parameter
is unspecified the script will try to get the value from the shell environment. (optional, string, no default)
dbname
This parameter defines which database to use in order to monitor the IDS instance. If this parameter is unspecified the script will use
the 'sysmaster' database as a default. (optional, string, default sysmaster)
sqltestquery
SQL test query to run on the database specified by the parameter 'dbname' in order to monitor the IDS instance and determine if it's
functional or not. If this parameter is unspecified the script will use 'SELECT COUNT(*) FROM systables;' as a default. (optional,
string, default SELECT COUNT(*) FROM systables;)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 120.
stop
Stops the resource. Suggested minimum timeout: 120.
status
Performs a status check. Suggested minimum timeout: 60.
monitor
Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 10.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 5.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.
methods
Suggested minimum timeout: 5.
usage
Suggested minimum timeout: 5.
EXAMPLE
The following is an example configuration for a ids resource using the crm(8) shell:
primitive p_ids ocf:heartbeat:ids
op monitor depth="0" timeout="30" interval="10"
SEE ALSO
http://www.linux-ha.org/wiki/ids_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents UNKNOWN 03/09/2014 OCF_HEARTBEAT_IDS(7)