hjann Absent Member.
Absent Member.
1747 views

gwia start script does not work

hallo all,
GW801 on linux:
our gwia is crashing multiple per day; therfore I use the following
script in cron to restart it:
--------------
#!/bin/bash
declare -i CNT=0
#Modify the name of the GroupWise GWIAagent startup file to match the
actual name.
CNT=`ps -aef | grep -v grep | grep -c 'gwia'`
if [ $CNT -eq 0 ]
then
echo "Restarting the GroupWise GWIA"
echo "Restarted the GroupWise GWIA" `! date` >>
/var/log/novell/groupwise/gwgwiachk.log
/etc/init.d/grpwise start gwia.dom1 &
fi
---------
but in case of a gwia-crash, it doesn't work.
where is the bug ?
thanks for answering !
--
Hermann
Labels (2)
0 Likes
4 Replies
Anonymous_User Absent Member.
Absent Member.

Re: gwia start script does not work

On 2/16/2010 2:46 AM, jann1 wrote:
> hallo all,
> GW801 on linux:
> our gwia is crashing multiple per day; therfore I use the following
> script in cron to restart it:
> --------------
> #!/bin/bash
> declare -i CNT=0
> #Modify the name of the GroupWise GWIAagent startup file to match the
> actual name.
> CNT=`ps -aef | grep -v grep | grep -c 'gwia'`
> if [ $CNT -eq 0 ]
> then
> echo "Restarting the GroupWise GWIA"
> echo "Restarted the GroupWise GWIA" `! date` >>
> /var/log/novell/groupwise/gwgwiachk.log
> /etc/init.d/grpwise start gwia.dom1 &
> fi
> ---------
> but in case of a gwia-crash, it doesn't work.
> where is the bug ?
> thanks for answering !

It actually looks fine to me. Of course you don't kill the process if it
is running, and maybe it is, and hence it skips the loop

I would start by glancing at gwgwiachk.log....is it actually trying to
restart at these times?
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: gwia start script does not work

Also double check the case for both the gwia.cfg file and the agent name,
ie, be sure that gwia.cfg is lower case (or matches the case in your script)
and that the agent name on the grpwise start gwia.dom1 is the same case as
in your /etc/opt/novell/groupwise/gwha.conf file.

Morris

>>> Michael Bell<mikebell90@no-mx.forums.novell.com> wrote:

> On 2/16/2010 2:46 AM, jann1 wrote:
>> hallo all,
>> GW801 on linux:
>> our gwia is crashing multiple per day; therfore I use the following
>> script in cron to restart it:
>> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>> #!/bin/bash
>> declare ‑i CNT=0
>> #Modify the name of the GroupWise GWIAagent startup file to match the
>> actual name.
>> CNT=`ps ‑aef | grep ‑v grep | grep ‑c 'gwia'`
>> if [ $CNT ‑eq 0 ]
>> then
>> echo "Restarting the GroupWise GWIA"
>> echo "Restarted the GroupWise GWIA" `! date` >>
>> /var/log/novell/groupwise/gwgwiachk.log
>> /etc/init.d/grpwise start gwia.dom1 &
>> fi
>> ‑‑‑‑‑‑‑‑‑
>> but in case of a gwia‑crash, it doesn't work.
>> where is the bug ?
>> thanks for answering !

> It actually looks fine to me. Of course you don't kill the process if it
> is running, and maybe it is, and hence it skips the loop
>
> I would start by glancing at gwgwiachk.log....is it actually trying to
> restart at these times?

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: gwia start script does not work

On 2/16/2010 9:05 AM, Morris Blackham wrote:
> Also double check the case for both the gwia.cfg file and the agent name,
> ie, be sure that gwia.cfg is lower case (or matches the case in your script)
> and that the agent name on the grpwise start gwia.dom1 is the same case as
> in your /etc/opt/novell/groupwise/gwha.conf file.


Well I assume they tried the script manually once, but yes 🙂

>
> Morris
>
>>>> Michael Bell<mikebell90@no-mx.forums.novell.com> wrote:

>> On 2/16/2010 2:46 AM, jann1 wrote:
>>> hallo all,
>>> GW801 on linux:
>>> our gwia is crashing multiple per day; therfore I use the following
>>> script in cron to restart it:
>>> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>>> #!/bin/bash
>>> declare ‑i CNT=0
>>> #Modify the name of the GroupWise GWIAagent startup file to match the
>>> actual name.
>>> CNT=`ps ‑aef | grep ‑v grep | grep ‑c 'gwia'`
>>> if [ $CNT ‑eq 0 ]
>>> then
>>> echo "Restarting the GroupWise GWIA"
>>> echo "Restarted the GroupWise GWIA" `! date`>>
>>> /var/log/novell/groupwise/gwgwiachk.log
>>> /etc/init.d/grpwise start gwia.dom1&
>>> fi
>>> ‑‑‑‑‑‑‑‑‑
>>> but in case of a gwia‑crash, it doesn't work.
>>> where is the bug ?
>>> thanks for answering !

>> It actually looks fine to me. Of course you don't kill the process if it
>> is running, and maybe it is, and hence it skips the loop
>>
>> I would start by glancing at gwgwiachk.log....is it actually trying to
>> restart at these times?

Wel
0 Likes
hjann Absent Member.
Absent Member.

Re: gwia start script does not work

jann1 schrieb:
> hallo all,
> GW801 on linux:
> our gwia is crashing multiple per day; therfore I use the following
> script in cron to restart it:
> --------------
> #!/bin/bash
> declare -i CNT=0
> #Modify the name of the GroupWise GWIAagent startup file to match the
> actual name.
> CNT=`ps -aef | grep -v grep | grep -c 'gwia'`
> if [ $CNT -eq 0 ]
> then
> echo "Restarting the GroupWise GWIA"
> echo "Restarted the GroupWise GWIA" `! date` >>
> /var/log/novell/groupwise/gwgwiachk.log
> /etc/init.d/grpwise start gwia.dom1 &
> fi
> ---------

hello,
thanks to all who answered. we've found a solution in the following script:
------------------------------------------
#!/bin/bash
po=/sbin/pidof
d=gwia
###
#Endlosschleife setzen
#
while true
do
tst="$po $d"
while ($tst > 0);do
sleep 1
done
/etc/init.d/grpwise start gwia.dom1 &
echo "Restarted the GroupWise GWIA" `! date` >>
/var/log/novell/groupwise/gwgwiachk.log
sleep 1m
done
----------------------------------
greetings
--
Hermann
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.