I have a script which loads data files into Oracle and then moves each file into a 'processed' directory when each file has finished loading.
Last night I found that the script was failing on the mv statement (with a return code 2) and the following message,
mv: cannot access... (1 Reply)
Hi,
I am using /bin/sh. I want to display the stdout and stderr on the terminal as well as save it in a file, so I'm using this command.
gmake all 2>&1 | tee log
But even if gmake fails, it's always giving 0 as exit status, i suppose because of tee.
# false 2>&1 | tee Log
# echo $?
0... (2 Replies)
Hello friends,
Kindly help me in developing a script that asks user to enter a value and will wait for 5 seconds for the feedback. If there is no answer from the user the script will perform exit or it will continue doing something else
Ex: If yu have a multi OS system i believe while... (3 Replies)
Hi All,
I have developed below script for FTP a file from unix machine to another machine.
ftpToABC ()
{
USER='xyz'
PASSWD='abc'
echo "open xx.yy.zbx.aaa
user $USER $PASSWD
binary
echo "put $1 abc.txt" >> /home/tmp/ftp.$$
echo "quit" >> /home/tmp/ftp.$$
ftp -ivn <... (3 Replies)
Hello All
My req is to store the exit status of a command in shell variable
I want to check whether the file has header or not
The header will contain the string
DATA_ACQ_CYC_CNTL_ID
So I am running the command
head -1 $i | grep DATA_ACQ_CYC_CNTL_ID
Now I have to check if... (6 Replies)
Hi ,
I have following code in my shell script :
"$TS_BIN/tranfrmr" "${TS_SETTINGS}/tranfrmr_p1.stx" "${TS_LOGS}/tranfrmr_p1.err" | (
"$TS_BIN/cusparse" "${TS_SETTINGS}/cusparse_p2.stx" "${TS_LOGS}/cusparse_p2.err" | (
"$TS_BIN/tsqsort" "${TS_SETTINGS}/srtforpm_p3.stx"... (8 Replies)
Hi,
I am writing shell script to automate few use cases for CLI interface. We have CLI interface which has bunch of commands. I am trying to execute one of the commands 'exit' as part of automation to exit from CLI object (not from shell script) in my shell script.
My intension is to execute... (4 Replies)
Hi All,
I am using below snippet to search for a string (read from a file 'searchstring.out') in all locations (/) and then iterate over the files found to write the locations and the respective owner to an output file.
However, this doesn't work as I believe the find command doesn't exit's... (11 Replies)
Hi,
i am new here let me say HI for all.
now i have a question please:
i am sending one command to my machine to create 3 names.
if one of the names exists then the box return error message that already have the name but will continue to create the rests.
How i can break the command and... (7 Replies)
Discussion started by: Amiri
7 Replies
LEARN ABOUT SUSE
ocf_heartbeat_mysql-proxy
OCF_HEARTBEAT_MYSQL() OCF_HEARTBEAT_MYSQL()
NAME
ocf_heartbeat_mysql-proxy - Manages a MySQL Proxy daemon
SYNOPSIS
mysql-proxy [start | stop | reload | monitor | validate-all | meta-data]
DESCRIPTION
This script manages MySQL Proxy as an OCF resource in a high-availability setup. Tested with MySQL Proxy 0.7.0 on Debian 5.0.
SUPPORTED PARAMETERS
binary
Full path to the MySQL Proxy binary. For example, "/usr/sbin/mysql-proxy". (optional, string, default /usr/sbin/mysql-proxy)
defaults_file
Full path to a MySQL Proxy configuration file. For example, "/etc/mysql-proxy.conf". (optional, string, no default)
proxy_backend_addresses
Address:port of the remote backend-servers (default: 127.0.0.1:3306). (optional, string, default 127.0.0.1:3306)
proxy_read_only_backend_addresses
Address:port of the remote (read only) slave-server (default: ). (optional, string, default 127.0.0.1:3306)
proxy_address
Listening address:port of the proxy-server (default: :4040). You can also specify a socket like "/tmp/mysql-proxy.sock". (optional,
string, default :4040)
log_level
Log all messages of level (error|warning|info|message|debug|) or higher. An empty value disables logging. (optional, string, no
default)
keepalive
Try to restart the proxy if it crashed (default: ). Valid values: true or false. An empty value equals "false". (optional, string, no
default)
admin_address
Listening address:port of the admin-server (default: 127.0.0.1:4041). (optional, string, default 127.0.0.1:4041)
admin_username
Username to allow to log in (default: ). (optional, string, no default)
admin_password
Password to allow to log in (default: ). (optional, string, no default)
admin_lua_script
Script to execute by the admin plugin. (optional, string, no default)
parameters
The MySQL Proxy daemon may be called with additional parameters. Specify any of them here. (optional, string, no default)
pidfile
PID file (optional, string, default /var/run/resource-agents/mysql-proxy-default.pid)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 30s.
stop
Stops the resource. Suggested minimum timeout: 30s.
reload
Suggested minimum timeout: 30s.
monitor
Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 60s.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 30s.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.
EXAMPLE
The following is an example configuration for a mysql-proxy resource using the crm(8) shell:
primitive example_mysql-proxy ocf:heartbeat:mysql-proxy
op monitor depth="0" timeout="20s" interval="60s"
SEE ALSO
http://www.linux-ha.org/wiki/mysql-proxy_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
OCF_HEARTBEAT_MYSQL()