Hi all,
I'm running a program which return 1 upon success.
But when encounters problem shell return 's '1' .
How to differentiate between them the shell return value and script return value.
Ex. function fn return '1' if executed successfully and '0' if failed. But when if shell encounters... (1 Reply)
In shell we can find the status of last executed command by $?
In perl what is the command to find the status of last executed command...
Can any one please say???????????????
Thanks,
Prabhu (1 Reply)
I have a shell script (#!/bin/sh) that interacts with Appworx and Banner Admin. In my script I want to check the exit status of awrun before continuing. awrun can run for 10 seconds or it can run for over a minute. So my question is, will it go through my if statement before awrun may even be... (2 Replies)
Hello;
I regularly run monitoring scripts over ssh to monitoring scripts
But whenever a server is hung or in maintenance mode, my script hangs..
Are there anyways to trap exit status and be on my way ??
Looked at the ssh manpage and all I can see is a "-q" option for quiet mode ..
Thank... (2 Replies)
Hi All,
I have a peculiar requirement as follows,
I have a some hosts on which i have to run a script, so i am using the following code piece
for i in $HOSTLIST
do
ssh ${i} "~/task.sh"
done
Now i want to run this same thing in parallel on all the hosts and then monitor the ssh process... (1 Reply)
Hi All,
I am trying to create a zip file with all the txt files(these are in large number) in the current directory. I am able to do this operation sucessfully.
After this i want to get the status of the tar command executed and do accordingly. When i am trying with the below code, the status... (3 Replies)
cmd()
{
results=`eval $* 2>&1`
val=$? #return the $* execution value
}
cmd "cd /home/tom || exit 0"
how to realize two point
it cd to "/home/tom"
not exit from the script after the ----> cmd cd /home/tom || exit 0 (4 Replies)
Hi All,
Using Wget I'm able to get the status of the server.....only when the server is completely down or up....
but problem here in script is Suppose if the server got hang I mean to say that if the server is taking long time to login, for example normally the server takes 3 seconds to login... (3 Replies)
Hi there,
I'm very used to use set -e to break my scripts if any command exits with a non-zero status.
As a policy, I'm willingly expecting echo hello | grep a to break the script.
The commands test 1 -eq $1 && echo hello exits with a non-zero status if $1 is not 1. BUT... It doesn't break... (2 Replies)
Discussion started by: chebarbudo
2 Replies
LEARN ABOUT CENTOS
crm_attribute
PACEMAKER(8) System Administration Utilities PACEMAKER(8)NAME
Pacemaker - Part of the Pacemaker cluster resource manager
SYNOPSIS
crm_attribute command -n attribute [options]
DESCRIPTION
crm_attribute - Manage node's attributes and cluster options.
Allows node attributes and cluster options to be queried, modified and deleted.
OPTIONS
-?, --help
This text
-$, --version
Version information
-V, --verbose
Increase debug output
-q, --quiet
Print only the value on stdout
-n, --name=value
Name of the attribute/option to operate on
Commands:
-G, --query
Query the current value of the attribute/option
-v, --update=value
Update the value of the attribute/option
-D, --delete
Delete the attribute/option
Additional Options:
-N, --node=value
Set an attribute for the named node (instead of a cluster option). See also: -l
-t, --type=value
Which part of the configuration to update/delete/query the option in. Valid values: crm_config, rsc_defaults, op_defaults, tickets
-l, --lifetime=value
Lifetime of the node attribute. Valid values: reboot, forever
-z, --utilization
Set an utilization attribute for the node.
-s, --set-name=value
(Advanced) The attribute set in which to place the value
-i, --id=value
(Advanced) The ID used to identify the attribute
-d, --default=value
(Advanced) The default value to display if none is found in the configuration
EXAMPLES
Add a new attribute called 'location' with the value of 'office' for host 'myhost':
# crm_attribute --node myhost --name location --update office
Query the value of the 'location' node attribute for host myhost:
# crm_attribute --node myhost --name location --query
Change the value of the 'location' node attribute for host myhost:
# crm_attribute --node myhost --name location --update backoffice
Delete the 'location' node attribute for the host myhost:
# crm_attribute --node myhost --name location --delete
Query the value of the cluster-delay cluster option:
# crm_attribute --type crm_config --name cluster-delay --query
Query the value of the cluster-delay cluster option. Only print the value:
# crm_attribute --type crm_config --name cluster-delay --query --quiet
AUTHOR
Written by Andrew Beekhof
REPORTING BUGS
Report bugs to pacemaker@oss.clusterlabs.org
Pacemaker 1.1.10-29.el7 June 2014 PACEMAKER(8)