LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2010, 04:46 PM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Rep: Reputation: 30
why did server shutdown


According to admins my server had shutdown so they rebooted it.
How can I check what happened?
I checked the var/log/messages file but it only seems to start from when they rebooted.

They said they rebooted and uptime says 6hrs but the things that confuses me is that when I looked at it, squid and openvpn were already running (1 and 2 processes respectively) and I don't think they are in the boot process anywhere.

Last edited by qwertyjjj; 12-26-2010 at 04:53 PM.
 
Old 12-26-2010, 04:48 PM   #2
phpdba
LQ Newbie
 
Registered: Sep 2009
Distribution: OpenSuSE & Centos
Posts: 8

Rep: Reputation: 0
Normally, with logrotate, there should be a messages.1 file or an archive file with a .Z extention within the same directory. You can either tail it or cat through it by the date and time.
 
Old 12-27-2010, 03:57 AM   #3
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by phpdba View Post
Normally, with logrotate, there should be a messages.1 file or an archive file with a .Z extention within the same directory. You can either tail it or cat through it by the date and time.
messages.1 has a record at Dec 25 22:47:59
messages next record is
Dec 26 00:01:52 server88-208-237-198 syslogd 1.4.1: restart.

Seems to be some time in between with no indication of why...

Last edited by qwertyjjj; 12-27-2010 at 04:30 AM.
 
Old 12-28-2010, 06:01 AM   #4
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Any ideas what else I could check?
 
Old 12-29-2010, 09:27 AM   #5
phpdba
LQ Newbie
 
Registered: Sep 2009
Distribution: OpenSuSE & Centos
Posts: 8

Rep: Reputation: 0
You could try looking at any of the other logs in that directory to see what was running and for how long. As an example, you can look at the httpd logs to see if they were running during that time or were they seized up as well. I am wondering if a process went out of control and locked up the server (similar to what I have seen on some Oracle boxes) to the point of preventing the logs from writing. What puzzles me is your statement in regards to openvpn and squid. They are not in your init.d scripts or have you done a chkconfig --list squid to see what runlevels they run? Is it possible some other process starts them as a dependent process so they won't show up in the scripts (assuming they aren't there). The other place I would check is the rc.d directories just to make sure. My thinking is that if we can find the logs to the last process running, it is probably the process that caused the problem. This is no guarantee of what it might be, but it should help.
 
Old 12-29-2010, 09:46 AM   #6
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by phpdba View Post
You could try looking at any of the other logs in that directory to see what was running and for how long. As an example, you can look at the httpd logs to see if they were running during that time or were they seized up as well. I am wondering if a process went out of control and locked up the server (similar to what I have seen on some Oracle boxes) to the point of preventing the logs from writing. What puzzles me is your statement in regards to openvpn and squid. They are not in your init.d scripts or have you done a chkconfig --list squid to see what runlevels they run? Is it possible some other process starts them as a dependent process so they won't show up in the scripts (assuming they aren't there). The other place I would check is the rc.d directories just to make sure. My thinking is that if we can find the logs to the last process running, it is probably the process that caused the problem. This is no guarantee of what it might be, but it should help.
[root ~]# chkconfig --list squid
squid 0 off 1 off 2 off 3 on 4 on 5 on 6 off
[root ~]# chkconfig --list openvpn
openvpn 0 off 1 off 2 off 3 on 4 on 5 on 6 off
[root ~]#

I found both squid and openvpn in the rc.d/init/d folder so I'm guessing that they must start up on server reboot.

Does the last line in the fstab seem ok? squid would not be able to start without that so I guess it must have.
Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda6         swap                    swap    defaults        0 0
/dev/sda2 /var/spool/squid reiserfs defaults,notail,noatime 1 2
I don't have the webserver running on the server most of the time.
These are all the startup programs, I could check each individual log?

Code:
/etc/init.d
/etc/rc.d/init.d
/etc/rc.d/init.d/NetworkManager
/etc/rc.d/init.d/SystemEmail
/etc/rc.d/init.d/acpid
/etc/rc.d/init.d/anacron
/etc/rc.d/init.d/apmd
/etc/rc.d/init.d/atd
/etc/rc.d/init.d/auditd
/etc/rc.d/init.d/autofs
/etc/rc.d/init.d/avahi-daemon
/etc/rc.d/init.d/avahi-dnsconfd
/etc/rc.d/init.d/conman
/etc/rc.d/init.d/courier
/etc/rc.d/init.d/courier-authlib
/etc/rc.d/init.d/cpuspeed
/etc/rc.d/init.d/crond
/etc/rc.d/init.d/dc_client
/etc/rc.d/init.d/dc_server
/etc/rc.d/init.d/dhcdbd
/etc/rc.d/init.d/dnsmasq
/etc/rc.d/init.d/firstboot
/etc/rc.d/init.d/functions
/etc/rc.d/init.d/gpm
/etc/rc.d/init.d/haldaemon
/etc/rc.d/init.d/halt
/etc/rc.d/init.d/heartbeat
/etc/rc.d/init.d/httpd
/etc/rc.d/init.d/httpd-matrixsa
/etc/rc.d/init.d/ibmasm
/etc/rc.d/init.d/ip6tables
/etc/rc.d/init.d/iptables
/etc/rc.d/init.d/irda
/etc/rc.d/init.d/irqbalance
/etc/rc.d/init.d/killall
/etc/rc.d/init.d/krb524
/etc/rc.d/init.d/kudzu
/etc/rc.d/init.d/lm_sensors
/etc/rc.d/init.d/lvm2-monitor
/etc/rc.d/init.d/matrixsa
/etc/rc.d/init.d/mcstrans
/etc/rc.d/init.d/mdmonitor
/etc/rc.d/init.d/mdmpd
/etc/rc.d/init.d/messagebus
/etc/rc.d/init.d/microcode_ctl
/etc/rc.d/init.d/multipathd
/etc/rc.d/init.d/mysqld
/etc/rc.d/init.d/named
/etc/rc.d/init.d/netconsole
/etc/rc.d/init.d/netfs
/etc/rc.d/init.d/netplugd
/etc/rc.d/init.d/network
/etc/rc.d/init.d/nfs
/etc/rc.d/init.d/nfslock
/etc/rc.d/init.d/nscd
/etc/rc.d/init.d/ntpd
/etc/rc.d/init.d/oddjobd
/etc/rc.d/init.d/openvpn
/etc/rc.d/init.d/pcscd
/etc/rc.d/init.d/portmap
/etc/rc.d/init.d/postfix
/etc/rc.d/init.d/pptpd
/etc/rc.d/init.d/psacct
/etc/rc.d/init.d/pure-ftpd
/etc/rc.d/init.d/rawdevices
/etc/rc.d/init.d/rdisc
/etc/rc.d/init.d/readahead_early
/etc/rc.d/init.d/readahead_later
/etc/rc.d/init.d/restorecond
/etc/rc.d/init.d/rpcgssd
/etc/rc.d/init.d/rpcidmapd
/etc/rc.d/init.d/rpcsvcgssd
/etc/rc.d/init.d/saslauthd
/etc/rc.d/init.d/single
/etc/rc.d/init.d/smartd
/etc/rc.d/init.d/squid
/etc/rc.d/init.d/sshd
/etc/rc.d/init.d/syslog
/etc/rc.d/init.d/sysstat
/etc/rc.d/init.d/tux
/etc/rc.d/init.d/webmin
/etc/rc.d/init.d/wpa_supplicant
/etc/rc.d/init.d/xfs
/etc/rc.d/init.d/xinetd
/etc/rc.d/init.d/ypbind
/etc/rc.d/init.d/yum-updatesd
 
Old 12-29-2010, 12:44 PM   #7
phpdba
LQ Newbie
 
Registered: Sep 2009
Distribution: OpenSuSE & Centos
Posts: 8

Rep: Reputation: 0
To turn off the squid and openvpn you simply need to run "chkconfig squid off" and do the same for openvpn. You can then check them by running the chkconfig --list command. As for the logs, you can check each one, but it may be simpler to grep through them for time stamps between the start and stop times you noticed in messages.1 file. There should be a good sed command for this as well, but I am pretty week on the sed/awk side at the moment. Someone else in the forum may be able to give you a quick sed command. I am taking a guess here, but you are running a version of SuSE? You may have posted it and I simply missed it so please forgive me if I did. There is also a possibility you may not find out for certain. The real question will be if this happens again. It gives you the ability to find a pattern (or in this case - a sort of pattern). Let me know how it turns out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to shutdown x server? hoserdude Linux - Newbie 22 04-25-2015 01:21 PM
Unable to shutdown/reboot server, no shutdown process running dctw Linux - Server 5 03-31-2010 06:46 AM
server shutdown cbtshare Linux - Server 4 08-05-2009 02:11 PM
My Server won't off when i shutdown kamtono Mandriva 1 09-30-2003 10:46 AM
how can I remote shutdown other WinNT server from Linux Server? adelel Linux - Networking 2 01-06-2002 01:21 AM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration