Linode Forum Index Linode Forum
Linode Community Forums
 


Very high disk i/o?

Click here to go to the original topic

 
       Linode Forum Index -> General Discussion
Author Message
marshmallow



Joined: 17 Feb 2010
Posts: 6
Location: Upper Midwest

Posted: Wed Feb 17, 2010 1:13 pm    Post subject: Very high disk i/o?  

My server was experiencing very high disk i/o for a several hours last night, and was not very responsive in this time.

When it started, I checked out what was running and I didn't see anything other than the usual apache processes. Load was spiking too, though it wasn't clear why. It got better though, but then the issue came back overnight.

I see

ip_conntrack: table full, dropping packet.

in the log several times, and then it rebooted last night. I didn't reboot it, and hadn't in about 60 days.

Does this sound like a security issue? Syn flood? Any tips are appreciated.
Back to top  
marshmallow



Joined: 17 Feb 2010
Posts: 6
Location: Upper Midwest

Posted: Wed Feb 17, 2010 9:53 pm    Post subject:  

Argh, I figured it out: I had 13.6 GB of Apache log files on a server with a 15GB disk. Well, time to ... do ... something!
Back to top  
BarkerJr



Joined: 02 Aug 2009
Posts: 220
Location: Connecticut, USA

Posted: Thu Feb 18, 2010 7:00 am    Post subject:  

The logrotate package will rotate the logs weekly (configurable).
Back to top  
marshmallow



Joined: 17 Feb 2010
Posts: 6
Location: Upper Midwest

Posted: Thu Feb 18, 2010 11:09 pm    Post subject:  

Sure, I have it set to rotate logs daily actually. I like to save the logs for our records, so I have it set to keep up to a full year of logs.

Each day's access.log is about 1.5GB uncompressed, which goes down to 100MB. So, they sure do take up a lot of space when you have a few months worth!
Back to top  
carmp3fan



Joined: 14 Feb 2009
Posts: 113

Posted: Thu Feb 18, 2010 11:30 pm    Post subject:  

marshmallow wrote: Sure, I have it set to rotate logs daily actually. I like to save the logs for our records, so I have it set to keep up to a full year of logs.

Each day's access.log is about 1.5GB uncompressed, which goes down to 100MB. So, they sure do take up a lot of space when you have a few months worth!

I am biased since my main job is in computer security, but I like to keep some uncompressed logs around. How do you deal with reviewing the files when you need to? The only thing I can really think of is using some odd command line kung-fu like:

Code: tar -xOzf logfile.tgz | grep "search string"

I can see that being a pain for large files. Perhaps there is a way to leave 7 days uncompressed and compress anything after that? Any thoughts?
Back to top  
Xan



Joined: 08 Feb 2004
Posts: 562
Location: Austin

Posted: Fri Feb 19, 2010 4:12 am    Post subject:  

Have you tried Code: zgrep "search string" *.gz ?
Back to top  
carmp3fan



Joined: 14 Feb 2009
Posts: 113

Posted: Fri Feb 19, 2010 10:07 am    Post subject:  

Xan wrote: Have you tried Code: zgrep "search string" *.gz ?

I have not. That did work though.
Back to top  
Xan



Joined: 08 Feb 2004
Posts: 562
Location: Austin

Posted: Fri Feb 19, 2010 11:59 am    Post subject:  

Cool. There's zcat as well, whose function you can probably guess. Also bzcat and bzgrep.
Back to top  
Stever



Joined: 07 Dec 2007
Posts: 329
Location: NC, USA

Posted: Fri Feb 19, 2010 2:53 pm    Post subject:  

Also, less is pretty good at figuring out how to display most compressed files.
Back to top  
Xan



Joined: 08 Feb 2004
Posts: 562
Location: Austin

Posted: Fri Feb 19, 2010 2:58 pm    Post subject:  

Huh, the less that I'm using doesn't seem to do that, but zless and bzless work.
Back to top  
Stever



Joined: 07 Dec 2007
Posts: 329
Location: NC, USA

Posted: Fri Feb 19, 2010 3:37 pm    Post subject:  

Xan wrote: Huh, the less that I'm using doesn't seem to do that, but zless and bzless work.
Yeah, now that I look at it it may be a gentoo-specific thing. The functionality seems to be enabled by
Code: export LESSOPEN='|lesspipe.sh %s'
and then a fairly substantial script in /usr/bin/lesspipe.sh

Not sure why other distros wouldn't be using it though, it is pretty handy.
Back to top  
marshmallow



Joined: 17 Feb 2010
Posts: 6
Location: Upper Midwest

Posted: Fri Feb 19, 2010 9:46 pm    Post subject:  

carmp3fan wrote:
I can see that being a pain for large files. Perhaps there is a way to leave 7 days uncompressed and compress anything after that? Any thoughts?

I usually do use zcat|grep.

I think you could set logrotate to leave 7 days uncompressed and compressing what is after that, but I'm not certain if that's built in as an option.

Usually it is set to change the compress logname.1 as logname.2.gz, move the old log to logname.1, and create a new current log fie. So, yesterdays log is left uncompressed by default until the next day. I think it does that in case a process is still writing to it, though.
Back to top  
 
       Linode Forum Index -> General Discussion
Page 1 of 1