Troubleshooing Ubuntu using /var/log

Posted by: oliver

Troubleshooing Ubuntu using /var/log - 05/02/2008 13:38

Hi,
I've got a couple ubuntu servers scattered around town. Mainly as routers using shorewall because linksys can't make a product that has an uptime greater than 24 hours.

Anyways, all of the ubuntu servers except one has been running flawlessly for over a year. About a week ago I got a call from one of my buddies saying his internet has started to drop out, and he has been resetting the ubuntu server multiple times every morning to get it up and running again. (these are hard resets too)

I just connected to the box, and tried to view /var/log/syslog and /var/log/dmesg. I didn't see anything out of place in the dmesg log, but my syslog looks to be about 1gb in size and my console commands for filtering the log to a certain timespan are horriable (or don't exist).

So, I was wondering how you guys would troubleshoot this type of problem. I started with an apt-get dist-upgrade hoping something just fixes itself smile
Posted by: andy

Re: Troubleshooing Ubuntu using /var/log - 05/02/2008 14:03

You can filter on dates just by using grep quite easily. For example, this will give you an hours worth of messages:

Code:
grep "Feb  5 06" /var/log/syslog*
Posted by: canuckInOR

Re: Troubleshooing Ubuntu using /var/log - 05/02/2008 20:27

Originally Posted By: andy
You can filter on dates just by using grep quite easily. For example, this will give you an hours worth of messages:

Code:
grep "Feb  5 06" /var/log/syslog*

I'd just add a "| less" to the end of that...