LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-26-2016, 09:52 PM   #1
wtfamidoing
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 10:23 PM.
 
Old 07-27-2016, 12:14 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
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 --
Code:
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
Code:
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.

m.m.
 
Old 07-28-2016, 05:49 PM   #3
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 746

Rep: Reputation: 234Reputation: 234Reputation: 234
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.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:17 AM.

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
Open Source Consulting | Domain Registration