Questions tagged [logfiles]

215 questions
50
votes
5 answers

How can I view log files in Linux and apply custom filters while viewing?

I need to read through some gigantic log files on a Linux system. There's a lot of clutter in the logs. At the moment I'm doing something like this: cat logfile.txt | grep -v "IgnoreThis\|IgnoreThat" | less But it's cumbersome -- every time I…
Dan
  • 5,929
  • 6
  • 42
  • 52
49
votes
4 answers

Shellscript to monitor a log file if keyword triggers then execute a command?

Is there a cheap way to monitor a log file like tail -f log.txt, then if something like [error] appears, execute a command? Thank you.
est
  • 11,429
  • 14
  • 70
  • 118
27
votes
5 answers

log4j vs. System.out.println - logger advantages?

I'm using log4j for the first time in a project. A fellow programmer told me that using System.out.println is considered a bad style and that log4j is something like standard for logging matters nowadays. We do lots of JUnit testing - System.out…
wishi
  • 7,188
  • 17
  • 64
  • 103
25
votes
6 answers

How do I use Nagios to monitor a log file

We are using Nagios to monitor our network with great success. However, we have a syslog for critical application errors and while I set up check_log, it doesn't seem to work as well as monitering a device. The issues are: It only shows the last…
Kenoyer130
  • 6,874
  • 9
  • 51
  • 73
22
votes
3 answers

Linux display average CPU load for last week

On a Linux box, I need to display the average CPU utilisation per hour for the last week. Is that information logged somewhere? Or do I need to write a script that wakes up every 15 minutes to copy /proc/loadavg to a logfile? EDIT: I'm not allowed…
thornate
  • 4,902
  • 9
  • 39
  • 43
19
votes
7 answers

Split access.log file by dates using command line tools

I have a Apache access.log file, which is around 35GB in size. Grepping through it is not an option any more, without waiting a great deal. I wanted to split it in many small files, by using date as splitting criteria. Date is in format…
mr.b
  • 4,932
  • 11
  • 38
  • 55
11
votes
6 answers

extract last 10 minutes from logfile

Trying to find a simple way for watching for recent events (from less than 10 minutes), I've tried this: awk "/^$(date --date="-10 min" "+%b %_d %H:%M")/{p++} p" /root/test.txt but it doesn't work as expected... Log files are in form : Dec 18…
user1204671
  • 183
  • 1
  • 1
  • 8
11
votes
3 answers

log_errors_max_len = 1024 in php.ini, but php log keeps growing

As the title says, I've set the max length for the php error log, but it seems to keep growing much much larger than 1024. I am using the correct php.ini, I've restarted apache, etc. The permissions on the php log are 666.
Jeremy Blum
  • 488
  • 1
  • 6
  • 18
9
votes
1 answer

logstash: multiple logfiles with different pattern

We want to set up a server for logstash for a couple of different project in our company. Now I try to enable them in Kibana. My question is: If I have different patterns of the logfiles, how can I build for them a filter? example:…
user3300940
  • 91
  • 1
  • 1
  • 3
8
votes
1 answer

Changing Location of Velocity.Log File

Seems pretty straight forward. Documentation at http://velocity.apache.org/engine/devel/developer-guide.html#Configuring_Logging says to set the runtime.log property. Here's what I got for all my…
bobber205
  • 12,948
  • 27
  • 74
  • 100
8
votes
2 answers

IIS 6 Logs M.I.A

I'm trying to find my IIS log files and I seem to be having a problem. First off I've gone into IIS and right clicked on the site in question and selected properties... Under the Web Site tab I have the Enable Logging check box checked. The active…
Ryan
  • 6,756
  • 13
  • 49
  • 68
7
votes
1 answer

Should application log files and user generated data files be stored in APPDATA or PROGRAMDATA

We are migrating our APP to Win7. The program generates log files to help us support and also saves a number of dictionary files and settings files that are useful for the user though the user will rarely if ever actually want to interact with the…
PyNEwbie
  • 4,882
  • 4
  • 38
  • 86
7
votes
5 answers

Storing millions of log files - Approx 25 TB a year

As part of my work we get approx 25TB worth log files annually, currently it been saved over an NFS based filesystem. Some are archived as in zipped/tar.gz while others reside in pure text format. I am looking for alternatives of using an NFS based…
Ankur Gupta
  • 2,284
  • 4
  • 27
  • 40
7
votes
4 answers

Are there any existing batch log file aggregation solutions?

I wish to export from multiple nodes log files (in my case apache access and error logs) and aggregate that data in batch, as a scheduled job. I have seen multiple solutions that work with streaming data (i.e think scribe). I would like a tool…
Mohan Gulati
  • 28,219
  • 5
  • 22
  • 20
7
votes
5 answers

netbeans tomcat clear log files

I've been working on an application and accidentally created an infinite loop. Great lots of output went to the tomcat server log file and each time I start tomcat from NetBeans, the IDE is loading all those logs into the GUI. It makes my computer…
ducin
  • 25,621
  • 41
  • 157
  • 256
1
2 3
14 15