LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-03-2014, 10:38 AM   #1
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Rep: Reputation: Disabled
trying to find a process that is creating log files everyday


Hi all

I got this Fedora release 14 server running. And it has a process somewhere that creates a very large log file every day at 2:30am on the dot.

Let's call it application A. It will create the log file names with following format: A.time_stamp.cfg

and it's always in the same directory: home/userB/appA/

I would like to find this process and shut it off. ps -tree doesn't really help because there are too many unknown processes for me to rule out.

Lsof doesn't help, it shows me nothing for some reason. Even when I vi'ed the file and afterwards I ran lsof I get nothing back.




I would also like to find out where it is running from so I can see the execution script.

Does any have any clues about how I should proceed with this?

Thanks
 
Old 03-03-2014, 10:44 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
look in the various folders /etc/crond.* you may find that cron.daily is set to run at 2:30am

Or look in the various users crontabs to see if they have anything scheduled to run at 2:30am.

The crontab of the "owner" of the created file may be a good start point.
 
Old 03-03-2014, 11:53 AM   #3
heytimc
LQ Newbie
 
Registered: Nov 2003
Distribution: Centos 7/Ubuntu 20.04.2
Posts: 14

Rep: Reputation: 6
@jzoudavy I'm guessing lsof only showed you files for the user that you ran it *as*. To see all files run it as root, you probably want to try something like:

lsof | grep "suspectusernamehere"

Further to TenTenth's good suggestions, depending on your distro you might find private cron entries in /var/spool/cron/(usernames)
 
1 members found this post helpful.
Old 03-03-2014, 11:57 AM   #4
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Original Poster
Rep: Reputation: Disabled
hey guys

thanks for your help. I found the script that seems to be getting executed, but the weird thing is that it is not in any of the cron jobs. But fortunately the guy who wrote it signed it so I will talk to him and find more.

Thanks for the help
 
  


Reply



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
rsync - how to suppress counting files during --process to log output file ? masuch Linux - Newbie 1 09-16-2012 03:20 PM
[SOLVED] sorting of files and creating a loop to process them date wise umix Linux - Newbie 8 12-03-2011 04:12 AM
How to find the words in log files genROCK Linux - Newbie 9 10-19-2011 09:18 AM
Creating Multiple Log Files koacamper Linux - Newbie 3 09-24-2005 07:24 PM
User and Process Accounting Log Files lafinhyena Linux - Newbie 0 05-19-2004 03:57 AM

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

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