Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-26-2016, 10:52 PM   #1
LQ Newbie
Registered: Jul 2016
Posts: 1

Rep: Reputation: Disabled
Need Logging Help

Hey I'm new here, I just signed up tonight hoping to find the answer to this question...

Based solely off of a process list, how can I find out out whether or not a process is logging? And can I tell where it logging without referencing .conf?

Edit: I should have elaborated... If I were to choose a random or interesting process from the process list, is there a way, using native commands, to interrogate the process to find out if it is being logged, and if so where?

Last edited by wtfamidoing; 07-26-2016 at 11:23 PM.
Old 07-27-2016, 01:14 AM   #2
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,665

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Hi, welcome to LQ!

System process are usually logged at /var/log/syslog; same with the system messages you can query the logs concerning the process if there are some reports --
sudo cat /var/log/syslog | grep <name of process application> 
or you may get the tail 20 lines reports by 
sudo tail -20 /var/log/syslog
Other applications keep their log reports in their own log file. You can examine
ls /var/log
there you will find where common apps place their logs.

If you wish to short sight from the process listing whether the log switch is on or not you may examine if the " -l" switch follows the application list, at least that is a common way of switching although it is not always the case.

Hope that helps.

Good luck and enjoy.

Old 07-28-2016, 06:49 PM   #3
Registered: Jul 2003
Location: NY
Distribution: Slackware64, LFS
Posts: 312

Rep: Reputation: 53
lsof -p `pidof whatever-program` or lsof -p $PID will show you what that process has open, which usually includes the logfile. You may need root depending on what the process is running under and/or if hidepid is in use on the /proc file system.


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] Linux Ent 5 only root logging in.not other users logging authentication failure error ravikavala Linux - General 1 09-30-2014 04:46 AM
Auditd file logging not logging daemon processes Charles Darwin Linux - Newbie 5 04-24-2013 07:14 PM
Logging in and logging out of a server in a script frankie_DJ Linux - Newbie 4 01-28-2007 12:03 AM
CLI -- Logging Out and Logging In StyngerSmash Linux - Newbie 1 09-05-2006 05:23 AM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 03:55 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 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