Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 09-01-2014, 03:33 PM   #1
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
Logs for Services Killed or Stopped

Is there a way to see the logs of services as to when they were stopped or their PIDs were killed?

For example,

Nagios is alerting:

PROCS CRITICAL: 0 processes with command name 'nsca'
I see on the server:
# /etc/init.d/nsca status
nsca dead but pid file exists
The PID file is here:

# ls -l
-rw-r--r-- 1 nagios nagios 6 Jun 13 07:26

# cat

# ps up 32533

# grep 32533 /var/log/messages
So, I can see the process was started on 6th June but can't determine when it was stopped / killed.
Old 09-02-2014, 09:46 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,549
Blog Entries: 15

Rep: Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494
You could look through the system logs of the client (e.g. /var/log/messages).

Also the Nagios master keeps logs of when it sees events. You can step back through the logs in the web GUI (i.e. select the service that is alerting then select the option for view history for this service) by day. Alternatively you can grep for what you want in the logs which are generally in /var/log/nagios (and /var/log/nagios/archive) on the master server to get the first time it alerted. You may have to convert the time entry seen from epoch to human readable. You can do that with:

perl -e 'print scalar localtime <epoch>;print "\n"'


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
[SOLVED] Can these services be killed? battles Linux - Software 8 05-08-2014 01:21 PM
Port based services stopped working InventiousTech Linux - Networking 1 10-10-2013 04:40 PM
stopped processes - finding out who/what killed them? simulator Linux - Newbie 11 03-30-2012 02:09 AM
LXer: Linux automatically monitor and restart services when daemon is killed LXer Syndicated Linux News 0 11-25-2006 11:21 PM
webalizer - stopped updating my logs nickd63 Linux - Networking 1 12-13-2004 10:55 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:13 PM.

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