LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-18-2012, 05:34 PM   #1
sieuvocmaytinh
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Rep: Reputation: Disabled
syslog-ng eat too much CPU, Diskspace


I install syslog-ng, it eat < 1%CPU
but to day, syslog-ng eat 35% CPU and create big log file. Folder /var/log/ is 60GB.

I google, syslog-ng eat too much cpu beacause server use vga, desktop environment.

How wo fix it? How to config syslog-ng is not log tty12

http://zargony.com/2008/03/04/syslog...ticular-reason
 
Old 08-18-2012, 07:10 PM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
which application sent 60GB of syslogs?
 
1 members found this post helpful.
Old 08-18-2012, 08:08 PM   #3
sieuvocmaytinh
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
file kern.log, messages, syslog is very big
 
Old 08-19-2012, 12:59 AM   #4
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
syslog entries always have application IDs, look at them
 
Old 08-19-2012, 08:08 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by sieuvocmaytinh View Post
How to config syslog-ng is not log tty12
Comment out the
Code:
destination console_all { file("/dev/tty12"); };
line. Also ensure you set know logrotate defaults and tune it according to your servers needs.
 
1 members found this post helpful.
Old 08-19-2012, 08:41 AM   #6
sieuvocmaytinh
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
@Ygrex: kern.log, messages, syslog have no IDs.
them have many many many... line as

messages


Aug 19 15:03:26 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=205.196.120.8 DST=**************** LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=21950 PROTO=TCP SPT=80 DPT=50301 WINDOW=32767 RES=0x00 ACK URGP=0
Aug 19 15:03:26 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=205.196.120.8 DST=**************** LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=21951 PROTO=TCP SPT=80 DPT=50301 WINDOW=32767 RES=0x00 ACK URGP=0
Aug 19 15:03:26 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=205.196.120.8 DST=**************** LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=21952 PROTO=TCP SPT=80 DPT=50301 WINDOW=32767 RES=0x00 ACK URGP=0
Aug 19 15:03:26 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=205.196.120.8 DST=**************** LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=21953 PROTO=TCP SPT=80 DPT=50301 WINDOW=32767 RES=0x00 ACK URGP=0
Aug 19 15:03:26 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=205.196.120.8 DST=**************** LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=21954 PROTO=TCP SPT=80 DPT=50301 WINDOW=32767 RES=0x00 ACK URGP=0
Aug 19 15:03:26 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=205.196.120.8 DST=**************** LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=19754 PROTO=TCP SPT=80 DPT=49064 WINDOW=32767 RES=0x00 ACK URGP=0

kernel

Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23754 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23759 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23760 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23766 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23770 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=27.74.137.223 DST=**************** LEN=46 TOS=0x00 PREC=0x00 TTL=114 ID=17622 DF PROTO=TCP SPT=14563 DPT=5902 WINDOW=63632 RES=0x00 ACK PSH URGP=0
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=95.178.0.165 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=121 ID=11716 PROTO=UDP SPT=11745 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23783 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23787 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23805 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23808 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23823 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23824 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23835 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23842 PROTO=UDP SPT=41723 DPT=45581 LEN=28

syslog

Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=205.196.120.8 DST=**************** LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=18803 PROTO=TCP SPT=80 DPT=55208 WINDOW=32767 RES=0x00 ACK URGP=0
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23754 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23759 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23760 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23766 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23770 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=27.74.137.223 DST=**************** LEN=46 TOS=0x00 PREC=0x00 TTL=114 ID=17622 DF PROTO=TCP SPT=14563 DPT=5902 WINDOW=63632 RES=0x00 ACK PSH URGP=0
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=95.178.0.165 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=121 ID=11716 PROTO=UDP SPT=11745 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23783 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23787 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23805 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23808 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23823 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23824 PROTO=UDP SPT=41723 DPT=45581 LEN=28
Aug 19 15:20:24 sieuvocmaytinh kernel: IN=eth0 OUT= MAC=**************** SRC=90.17.122.65 DST=**************** LEN=48 TOS=0x00 PREC=0x00 TTL=117 ID=23835 PROTO=UDP SPT=41723 DPT=45581 LEN=28
 
Old 08-19-2012, 12:03 PM   #7
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
look at your iptables, most likely you have some rule with LOG target
 
1 members found this post helpful.
Old 08-19-2012, 01:30 PM   #8
sieuvocmaytinh
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
@Ygrex: thank you
i was install psad and add iptables rule to run psad

Quote:
iptables -A INPUT -j LOG
iptables -A FORWARD -j LOG
i remove this rule, syslog-ng work perfect. But psad don't work
 
Old 08-19-2012, 11:49 PM   #9
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
from psad instructions: http://cipherdyne.org/psad/docs/fwconfig.html

these rules should be added after all legitimate ACCEPT rules, so that only some suspicious packets are logged; it's not intended to log 60GB per day; if you have 60GB suspicious packets, look at them and add some rejecting rules before logging
 
1 members found this post helpful.
Old 08-25-2012, 05:04 AM   #10
sieuvocmaytinh
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
@Ygrex: Thank you very much.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Xorg and xfce's Terminal eat up my cpu's cores Jefferson Slackware 2 07-08-2012 07:18 AM
HELP! Diskspace :( TheOnlyQ Linux - Newbie 10 04-15-2011 05:37 AM
Eat Mem/CPU program for Stress Testing steak-house Linux - Software 7 04-10-2008 01:25 PM
Mysqld Eat's all the CPU cooper Linux - Software 1 12-04-2005 05:13 PM
diskspace.... yenonn Slackware 5 03-19-2004 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:08 PM.

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