Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a amazon ec2 server that i'm playing around with TCP settings in the sysctl.conf to increase the number of concurrent TCP connections it can handle, and i want to be able to view the kernel log to see any errors in the TCP stack, to ensure i've configured everything correctly.

I've read somewhere that i need to enable the kernel log first somehow. Can anyone point me in the right direction? Thanks.

The AMI i'm using is: amzn-ami-2011.02.1.x86_64

share|improve this question
    
I'm not familiar with Amazon EC2, so could you please post the output of cat /etc/issue to see which distro you are running. –  quanta Sep 6 '11 at 10:11
    
Amazon linux is based on centos / redhat AFAIK. –  Chris Sep 6 '11 at 23:17
    
@quanta - When i did a cat /etc/issue i got the following: [ec2-user@ip-10-112-97-251 ~]$ cat /etc/issue Amazon Linux AMI release 2011.02.1.1 (beta) Kernel \r on an \m –  Chris Sep 7 '11 at 10:32

1 Answer 1

dmesg give you the kernel logs but it doesn't include the timestamp by default (it can be enable by recompiling kernel with CONFIG_PRINTK_TIME=y)

With [r]syslog, you can log all kernel messages to a file (with timestamp) by inserting a below line into /etc/[r]syslog.conf:

kern.*          /var/log/kern.log

Don't forget to restart [r]syslog daemon.

share|improve this answer
    
If i do ps -ef | grep log it shows that i'm running rsyslogd. –  Chris Sep 14 '11 at 9:33
    
Is this how to restart rsyslog? sudo service rsyslog restart –  Chris Sep 14 '11 at 9:47
    
OK. Or /etc/init.d/rsyslog restart. –  quanta Sep 14 '11 at 9:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.