Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: stats.pid erased  (Read 9807 times)

0 Members and 1 Guest are viewing this topic.

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 176
    • French Eggdrop community
stats.pid erased
« on: May 19, 2010, 09:21:49 AM »

Hello there,

I've noticed a trouble for months, I can't understand it.
When I launch denora (/home/ircd/stats/denorarc start or /home/ircd/stats/stats), it's all right. But sometimes, the stats.pid seems to be erased, and the denora.chk makes denora trying to restart, I can see its connections each minute.

Here is my crontab:
Code: [Select]
* * * * * /home/ircd/stats/denora.chk > /dev/null 2>&1
And denora.chk is the example.chk renamed, it works well.
So, what could erase the stats.pid ? Is there a way to log what happen ? I had this trouble with a previous server, I've changed it (with new install of OS, no particular process which can erase this file) a few days ago and the same thing happens yesterday.

Thanks

Hal9000

  • Team
  • *
  • Offline Offline
  • Posts: 103
Re: stats.pid erased
« Reply #1 on: May 25, 2010, 08:39:59 PM »

yeah i can vaguely remember having the same problem, happened rarely but sometimes happened. even with anope. might check with the anope team if they are aware of such an issue and if it was fixed for them.
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 176
    • French Eggdrop community
Re: stats.pid erased
« Reply #2 on: May 28, 2010, 09:26:44 AM »

I don't think it was fixed in anope : since a few days, I've the trouble with anope 1.8.4.

And it's really strange, I can't find any logic in the deletion, seems to be a random event.

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: stats.pid erased
« Reply #3 on: May 28, 2010, 04:15:53 PM »

I've not heard anyone mention this in anope for a long time....
Logged

Syloq

  • Anope User
  • Offline Offline
  • Posts: 5
Re: stats.pid erased
« Reply #4 on: May 28, 2010, 04:26:21 PM »

Actually we have this problem quite often and fairly recently as well with 1.9.1p1. I always attributed it to the cron script which doesn't seem to work sufficiently most of the time. Since we made our own generic cron script the problems seem to have resolved themselves.
« Last Edit: May 28, 2010, 04:34:21 PM by Syloq »
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: stats.pid erased
« Reply #5 on: May 28, 2010, 06:46:33 PM »

Worth using yours instead of ours? :)

(otherwise I'll look at ours later on)
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: stats.pid erased
« Reply #6 on: May 29, 2010, 06:11:44 PM »

Worth using yours instead of ours? :)

(otherwise I'll look at ours later on)

Actually "ours" has always done this. At least since 1.6. The script deletes the pid for some unknown to me reason. IIRC, the system will create/overwrite the .pid file to start with. I think back in about 07/08 I asked GD to explain why "our" script deletes the pid and while the explanation he gave me made sense, I cant exactly remember why or why it only happens sometimes. But this is an old issue and is/was in the bugtracker at one point. Personally I just used a modified version of Unreal's ircdchk script.
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: stats.pid erased
« Reply #7 on: May 30, 2010, 07:28:34 AM »

Quote
Actually "ours" has always done this.

Nobody said it didn't.

Logged

Taylor

  • Contributor
  • *
  • Offline Offline
  • Posts: 100
Re: stats.pid erased
« Reply #8 on: May 30, 2010, 09:23:40 AM »

In the cronscript packed with anope it seems the  $ANOPIDF   is used for the pid file, but later on in the if  where it greps  that  it uses $ANOPID   Missed a letter :p  I don't know anything about shell scripting really, but is this the problem perhaps?
Logged
Cronus
irc.cncirc.net
http://CnCIRC.net

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: stats.pid erased
« Reply #9 on: May 30, 2010, 03:09:22 PM »

Nobody said it didn't.

Just like no one claimed that you was saying it never happened before. I'm sorry, I assumed that you'd be able to understand what I was referring to as long as you have known me. I'll be more clear in the future.
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 176
    • French Eggdrop community
Re: stats.pid erased
« Reply #10 on: May 31, 2010, 11:04:30 AM »

In the cronscript packed with anope it seems the  $ANOPIDF   is used for the pid file, but later on in the if  where it greps  that  it uses $ANOPID   Missed a letter :p  I don't know anything about shell scripting really, but is this the problem perhaps?
No, the ANOPIDF is used to set the ANOPID variable (with a cat), and it's ANOPID (the PID) which must be used in the grep.
And if the .chk was faulty, I guess it may be always faulty, not only sometimes.

Taylor

  • Contributor
  • *
  • Offline Offline
  • Posts: 100
Re: stats.pid erased
« Reply #11 on: May 31, 2010, 09:46:32 PM »

That makes no sense to me, where does it get $ANOPID from? It's not set anywhere lol



Nevermind... I'm blind :| but anyways, this does happen to mine not as much on this new shell of mine,  maybe its a crontab problem? the software i mean
« Last Edit: June 01, 2010, 03:51:44 AM by Taylor »
Logged
Cronus
irc.cncirc.net
http://CnCIRC.net

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 176
    • French Eggdrop community
Re: stats.pid erased
« Reply #12 on: June 01, 2010, 03:54:12 PM »

The main part of the services.chk is:
Code: [Select]
if [ -f $ANOPIDF ]
then
        ANOPID=`cat $ANOPIDF`
        if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
        then
                exit
        fi
        rm -f $ANOPIDF
fi
Third line: ANOPID=`cat $ANOPIDF`. It means that ANOPID is set with the content of ANOPIDF (services.pid)

Edit: whoops, I answered you when you were editing your message :)
I don't think it's crontab himself, but peharps a side effect if the server is overload, and the ps auwx don't respond fast enough ?
« Last Edit: June 01, 2010, 03:57:34 PM by CrazyCat »
Logged
Pages: [1]   Go Up