Any time I type dmesg it brings up a ton of logging info from UFW. Is there some way to disable UFW from logging info in to dmesg?
Announcement
Collapse
No announcement yet.
Omit UFW Logging From Dmesg?
Collapse
This topic is closed.
X
X
-
Omit UFW Logging From Dmesg?
OS: Kubuntu 12.10/Windows 8
CPU: Intel Core i7 2600K
Motherboard: Gigabyte GA-Z77X-UD5H
Memory: 2x4GB Corsair Dominator
Graphics Card: MSI R7770
Monitor: Dell 2208WFP
Mouse: Mionix NAOS 5000
PSU: Corsair 520HX
Case: Thermaltake Mozart TX
Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar GreenTags: None
- Top
- Bottom
-
Originally posted by 67GTA View PostThis should workCode:sudo ufw logging off
If you wish to keep firewall logging enabled, but only exclude them from dmesg output, you can (for example) create an alias like:
alias dmsg='dmesg | grep -v "\[UFW"'
in ~/.bashrc, after which you can use the command 'dmsg' to run dmesg without ufw log messages
For already started shells, you need to source ~/.bashrc for the alias to take effect.
- Top
- Bottom
Comment
-
@67GTA, man whatever is not the end all be all answer. In fact more often then not I feel this is a horrible answer unless you are dealing with a linux guru, which I am not. Simply put the manual output is often times using terms or offering options I don't understand. Now I don't mind doing a little googleing/searching but I/anyone for that matter, can only be expected to do so much googleing.Furthermore, at a glance I see nothing in the ufw manual that gives an answer like what kubicle provided.
Originally posted by kubicle View PostThis should work fine, if you don't wish to log firewall messages.
If you wish to keep firewall logging enabled, but only exclude them from dmesg output, you can (for example) create an alias like:
alias dmsg='dmesg | grep -v "\[UFW"'
in ~/.bashrc, after which you can use the command 'dmsg' to run dmesg without ufw log messages
For already started shells, you need to source ~/.bashrc for the alias to take effect.OS: Kubuntu 12.10/Windows 8
CPU: Intel Core i7 2600K
Motherboard: Gigabyte GA-Z77X-UD5H
Memory: 2x4GB Corsair Dominator
Graphics Card: MSI R7770
Monitor: Dell 2208WFP
Mouse: Mionix NAOS 5000
PSU: Corsair 520HX
Case: Thermaltake Mozart TX
Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green
- Top
- Bottom
Comment
-
I thought it was pretty simple. Copy/paste and hit "enter". I only gave you the man info in case you "wanted" to learn more. Kubicle's way of doing it is the guru way. I could have made it more difficult by explaining why dmesg reports the ufw logs, and about kernel buffer ring/rsyslog. An alternative way without totally disabling ufw logs, is to edit /etc/rsyslog.d/20-ufw.conf and uncomment the last line. Then you can still have ufw logs without the dmesg output. If you don't understand something, ask, and we can teach you.Klaatu Barada Nikto
- Top
- Bottom
Comment
-
Originally posted by 67GTA View PostAn alternative way without totally disabling ufw logs, is to edit /etc/rsyslog.d/20-ufw.conf and uncomment the last line.
Originally posted by Xplorer4x4 View PostI would prefer to use dmesg with out the ufw logging and have ufw logging in dmsg.)...you can also set up an alias to output *only* ufw messages with:
alias umsg='dmesg | grep "\[UFW"'
- Top
- Bottom
Comment
-
Originally posted by 67GTA View PostI thought it was pretty simple. Copy/paste and hit "enter".
I only gave you the man info in case you "wanted" to learn more.
Kubicle's way of doing it is the guru way.
If you don't understand something, ask, and we can teach you.OS: Kubuntu 12.10/Windows 8
CPU: Intel Core i7 2600K
Motherboard: Gigabyte GA-Z77X-UD5H
Memory: 2x4GB Corsair Dominator
Graphics Card: MSI R7770
Monitor: Dell 2208WFP
Mouse: Mionix NAOS 5000
PSU: Corsair 520HX
Case: Thermaltake Mozart TX
Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green
- Top
- Bottom
Comment
Comment