Re: FreeBSD-7 reboots hourly

2008-08-20 Thread Jeff Kletsky
I had a similar puzzle to unravel with a CentOS (RHEL equivalent) box. 
The clues there were in the log files that showed that gdm was exec-ing 
shutdown. I'm not suggesting that is the answer here, but looking at 
your logs may help.


While the CentOS shutdown process is different than FreeBSD, you might 
get some use out of wrapping the commands that shutdown the box to see 
who called them. The script below worked for CentOS and probably needs 
some modification for FreeBSD, but the idea is to log the caller (and 
caller's caller) of all the executables that are used to 
shutdown/halt/reboot etc. the system.


(Note that this one errors in ps if there isn't a ppid at one of the 
levels, but it doesn't seem to hurt anything and could be cleaned up 
with a check of the ppid variables used).


This is a ***CentOS*** script -- use for concept with FreeBSD

$ cat /sbin/shutdown
#!/bin/bash
### Log who is calling a program
###
### Program to be executed
###
true_executable=/sbin/shutdown.orig
#
# Helper commands
#
ps=/bin/ps --noheaders
logger=/usr/bin/logger -t $0[$$]
#
this_ps_line=`${ps} up $$`;
# Get parent
this_ppid=`${ps} -p $$ -o ppid=`;
ppid_ps_line=`${ps} up ${this_ppid}`
# And parent's parent
ppid_ppid=`${ps} -p ${this_ppid} -o ppid=`;
ppid_ppid_ps_line=`${ps} up ${ppid_ppid}`;
${logger} Called by: ${ppid_ps_line}
${logger} w/ parent: ${ppid_ppid_ps_line}
${logger} Remaining parameters: $@
exec ${true_executable} $@


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: FreeBSD-7 reboots hourly

2008-08-18 Thread Johan Hendriks

Hello dear colleagues.

2 days I have strange behaviour on my 7.0-RELEASE-p3 server.
It started to reboot once an hour.
No any suspicious task in crontab, nothing strange in /var/log.
Just silent reboot.
I have no physical access to server - only remote one.

Question is: what could it be?
How to find what send computer to reboot?

Just extra information: I had such stuff before - installworld helped me 
for one week,
now it appears again :(

Opened services/sockets are:
nobody   proftpd647   1  tcp4   *:21  *:*
root sshd   845   4  tcp4   *:22  *:*
postfix  smtpd  5115  6  tcp4   *:25  *:*
bind named  525   20 udp4   xxx.xxx.xxx.xxx:53*:*
nobody   nginx  643   4  tcp4   *:80  *:*
root couriertcp 769   3  tcp4   *:110 *:*
root couriertcp 789   3  tcp4   *:143 *:*
root rsync  659   5  tcp4   *:873 *:*
root couriertcp 779   3  tcp4   *:993 *:*
root couriertcp 760   3  tcp4   *:995 *:*
root syslogd461   9  udp4   *:514 *:*

also on local interface (lo0) I have apache, postgrey, spamassasin.

I need some pieces of advice what to do with it and what could it be.

Thanks in advance,
Alexey A. Ukhov

P.S.: I mean hourly: I start top and just wait. last what I see is: 
0:59:59 uptime

Try to disable some cronjobs that run hourly.
I think it is something within a cronjob.

Regards,
Johan

No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.4/1617 - Release Date: 17-8-2008 12:58
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: FreeBSD-7 reboots hourly

2008-08-18 Thread Johan Hendriks
Hm, already did.
No any cron tasks - only system ones.
Moreover - stopped all non-system services.
System is still going to reboot hourly.

Try to disable the system jobs also.
It could be something like the system tools!

Regards,
Johan


No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.4/1617 - Release Date: 17-8-2008 12:58
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD-7 reboots hourly

2008-08-18 Thread Bhasker C V

There could be memory issues.

I had a system which used to periodically reboot.

Eventually found out that after some time, when a part of memory
 is accessed, due to the faulty memory chip, the system crashes
 and reboots.

Try swapping the memory banks and boot the system. If the faulty chip
 falls in the memory range where the system is booting up, then you will
 be able to see that the booting fails !

OR

Try to replace the memory cards and try to run the system.

Johan Hendriks wrote:

Hello dear colleagues.



2 days I have strange behaviour on my 7.0-RELEASE-p3 server.
It started to reboot once an hour.
No any suspicious task in crontab, nothing strange in /var/log.
Just silent reboot.
I have no physical access to server - only remote one.



Question is: what could it be?
How to find what send computer to reboot?


Just extra information: I had such stuff before - installworld helped me 
for one week,

now it appears again :(



Opened services/sockets are:
nobody   proftpd647   1  tcp4   *:21  *:*
root sshd   845   4  tcp4   *:22  *:*
postfix  smtpd  5115  6  tcp4   *:25  *:*
bind named  525   20 udp4   xxx.xxx.xxx.xxx:53*:*
nobody   nginx  643   4  tcp4   *:80  *:*
root couriertcp 769   3  tcp4   *:110 *:*
root couriertcp 789   3  tcp4   *:143 *:*
root rsync  659   5  tcp4   *:873 *:*
root couriertcp 779   3  tcp4   *:993 *:*
root couriertcp 760   3  tcp4   *:995 *:*
root syslogd461   9  udp4   *:514 *:*



also on local interface (lo0) I have apache, postgrey, spamassasin.



I need some pieces of advice what to do with it and what could it be.



Thanks in advance,
Alexey A. Ukhov


P.S.: I mean hourly: I start top and just wait. last what I see is: 
0:59:59 uptime


Try to disable some cronjobs that run hourly.
I think it is something within a cronjob.

Regards,
Johan

No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.4/1617 - Release Date: 17-8-2008 12:58

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]



--
Bhasker C V
Registered Linux user: #306349 (counter.li.org)
The box said Requires Windows 95, NT, or better, so I installed Linux.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]