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
-
This should work fine, if you don't wish to log firewall messages.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.
Thanks this is more along the lines of what I was looking for, but is it possible to do the opposite? I would prefer to use dmesg with out the ufw logging and have ufw logging in dmsg.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
-
This will stop rsyslog from logging the messages to other log files except ufw.log (so probably a good idea if you have a busy firewall), but shouldn't actually change 'dmesg' output (dmesg should still output all messages in the ring buffer).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.
Probably doable, but a good rule of thumb is to leave system commands as they are, unless there is a really, really, really good reason not to do so...and use your own aliases if you wish to tinker with their functionality (and dmsg is shorter to type than dmesgOriginally 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
-
Yeah, I don't see where I said this was the complicated part.Originally posted by 67GTA View PostI thought it was pretty simple. Copy/paste and hit "enter".
My point still stands, people are all to quick to say "man insertsomethinghere" to newbies when I generally find the man page is going to go right over there head, or be way to much reading in some cases.I only gave you the man info in case you "wanted" to learn more.
Perhaps but it is explained simple enough and it focuses on one single aspect which is aliases.Kubicle's way of doing it is the guru way.
Noted and appreciated! I feel I came off a bit harsh on my last post, maybe because I been under the weather. I still stand firm in regards to my point, and I wasn't trying to single you out per say, but just passing along my feelings on the manual aspect. It can be a useful tool at times, but far to often, I feel things are poorly explained or to technical for the new user and even the average(?) linux user in my case.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
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.




Comment