The script above gives the following error
$113> sh tryt.sh 1
tryt.sh: line 6: 04:29:39 - System health check failed: syntax error in expression (error token is ":29:39 - System health check failed")
It also fails when I try to compare in if condition. How to compare a$i to a value in if condition. My purpose is to display the statement.
Can someone explain?
hi there
i write one awk script file in shell programing
the code is related to dd/mm/yy to month, day year format
but i get an error
please can anybody help me out in this problem ??????
i give my code here including error
awk `
# date-month -- convert mm/dd/yy to month day,... (2 Replies)
--------------------------------------------------------------------------------
Hello, help me please.
I am trying to create a mksysb bakup using nim. I am geting this error, how to correct it ? :
Command : failed stdout: yes stderr: no... (9 Replies)
HI again, still working on the assignment, which is really hard given we just started unix 4 weeks ago. This script should change the permission for the user depending if its x, w or r, to the opposite. When i try to run it, I am getting expression error. Can you spot where the problem is? I really... (3 Replies)
Hi
what's the correct way of writing if
1)if "$time_diff" -gt 5
then
echo "killing hung process \n"
fi
2)if test $time_diff -gt 5
then
echo "killing hung process \n"
fi
where -time_diff=$(($Sam - $current_min))
and current_min=`date +%M`
infact both are giving Syntax... (1 Reply)
#! /bin/csh
set umr=UMR
foreach i ( `ls`)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`
if($bh_nm !=$umr) then
{
set bh_ext=`echo $file_nm | cut -d"_" -f4`
set bh_num_nm="$bh_nm $bh_ext a .txt"
mv $file_nm $bh_num_nm
}
... (1 Reply)
I'm pretty new to shell scripting, but I am catching on quick. I did see one of the stickied threads about the csh, and I think this is relevant, but I don't understand enough to make a decision based on it. So as you'll see below, I use the |csh pipe, and if that is not correct, I'm certainly... (2 Replies)
I've found this script which seems very promising to solve my issue:
To search and replace many different database passwords in many different (.php, .pl, .cgi, etc.) files across my filesystem.
The passwords may or may not be contained within quotes, single quotes, etc.
#!/bin/bash... (4 Replies)
I'm using tcl scripts in ns2 ( network simulator) through cygwin. It works fine , however, I downloaded an example when i run it , I got the following syntax error:
syntax error in expression with " *2" : unexpected operator *
while executing :
"expr $bw *2"
invoked from within:
"$ns... (1 Reply)
Hello,
I have another problem with my script. Please accept my apologies, but I am really nooby in sh scripts. I am writing it for first time.
My script:
returned=`tail -50 SapLogs.log | grep -i "Error"`
echo $returned
if ; then
echo "There is no errors in the logs"
fi
And after... (10 Replies)
Discussion started by: jedzio
10 Replies
LEARN ABOUT DEBIAN
sam_register
SAM_REGISTER(3) Corosync Cluster Engine Programmer's Manual SAM_REGISTER(3)NAME
sam_rehister - Register component for health checking
SYNOPSIS
#include <corosync/sam.h>
cs_error_t sam_register (unsigned int *instance_id);
DESCRIPTION
The sam_register function is used to register a process for healthchecking. If recovery policy is set to SAM_RECOVERY_POLICY_RESTART and
recovery action will be taken, the new process instance will begin execution at the next code line after this function is called.
This function can be called only once and SAM must be initialized by sam_initialize(3) function.
The instance_id argument is a pointer to a value storing the current iteration instance. If this parameter is NULL, no instance_id is
returned. and then, no instance_id will be returned. This value starts at 0 for the first iteration instance, and increases by 1 each time
a recovery restart is executed. After reaching MAX_INT, the instance_id will reset to 0.
The placement of this function is important because after it is called, the process id will change.
After registration, event driven health checking is not running.
RETURN VALUE
This call return CS_OK value if successful, otherwise and error is returned.
ERRORS
CS_ERR_BAD_HANDLE
health checking was not started by calling sam_start(3) function.
CS_ERR_LIBRARY
internal library call failed. This can be one of pipe creation or fork. It's possible to get more information from errno.
SEE ALSO sam_start(3), sam_initialize(3), sam_hc_callback_register(3)corosync Man Page 12/01/2009 SAM_REGISTER(3)