Ubuntu: How to quiet Ubuntu 15.04 noisy syslog



Question:

On Ubuntu 15.04 (Vivid Vervet) /var/log/syslog is extremely noisy. There are messages every few seconds, from systemd, thermald, gnome-session. Most messages appear to be non-essential, simply status or debug messages repeated over and over.

I find that this makes it very difficult to use the syslog for troubleshooting problems, monitor for errors and failures, as the log is filled with repeated chunks of non-essential status messages from various daemons. Is there any way to configure the system to disable such messages in the syslog? Thanks.

For example, the following chunk of thermald messages are repeated every 10-60 seconds in the syslog:

May 30 17:37:14 xxx thermald[960]: Dropped below poll threshold  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 0:Processor  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 4:intel_powerclamp  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 6:intel_pstate  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 5:rapl_controller  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 0:Processor  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 4:intel_powerclamp  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 6:intel_pstate  May 30 17:37:14 xxx thermald[960]: thd_trip_cdev_state_reset index 5:rapl_controller  May 30 17:37:15 xxx thermald[960]: Read set point 0  

Also, every time my-weather-indicator updates gnome-session fills the syslog with the following 150 lines of status messages (over time it fills most of the syslog):

May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075020  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433073280  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 1740  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075080  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433073280  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 1800  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: --- Updating data in location 1 ---  May 31 08:44:41 xxx gnome-session[1848]: ****** Updating weather  May 31 08:44:41 xxx gnome-session[1848]: ****** Calculating rawOffset  May 31 08:44:41 xxx gnome-session[1848]: ********************************************************  May 31 08:44:41 xxx gnome-session[1848]: ********************************************************  May 31 08:44:41 xxx gnome-session[1848]: 05:39 << 8:24 << 20:52  May 31 08:44:41 xxx gnome-session[1848]: ********************************************************  May 31 08:44:41 xxx gnome-session[1848]: ********************************************************  May 31 08:44:41 xxx gnome-session[1848]: -------------------------------------------------------  May 31 08:44:41 xxx gnome-session[1848]: -------------------------------------------------------  May 31 08:44:41 xxx gnome-session[1848]: OpenWeatherMap Weather Service url:http://api.openweathermap.org/data/2.5/weather?lat=43.6619&lon=-79.3952  May 31 08:44:41 xxx gnome-session[1848]: -------------------------------------------------------  May 31 08:44:41 xxx gnome-session[1848]: -------------------------------------------------------  May 31 08:44:41 xxx gnome-session[1848]: ****** Updated weather  May 31 08:44:41 xxx gnome-session[1848]: **** New temperature: 9°  May 31 08:44:41 xxx gnome-session[1848]: --- End of updating data in location 1 ---  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075141  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 60  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075201  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 120  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075261  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 180  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075321  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 240  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075381  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 300  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075441  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 360  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075501  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 420  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075561  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 480  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075621  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 540  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075681  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 600  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075741  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 660  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075801  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 720  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075861  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 780  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075921  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 840  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433075981  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 900  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433076041  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 960  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433076101  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 1020  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433076161  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 1080  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  May 31 08:44:41 xxx gnome-session[1848]: message repeated 3 times: [ ///////////////////////////////////////////////////////]  May 31 08:44:41 xxx gnome-session[1848]: time.time() = 1433076221  May 31 08:44:41 xxx gnome-session[1848]: self.actualization_time = 1433075081  May 31 08:44:41 xxx gnome-session[1848]: (time.time()-self.actualization_time) = 1140  May 31 08:44:41 xxx gnome-session[1848]: self.refresh*3600 = 1800  May 31 08:44:41 xxx gnome-session[1848]: ///////////////////////////////////////////////////////  

Furthermore, gnome-session sometimes spits out huge chunks of warnings regarding zeitgeist activity, for example 200-300 lines of messages similar to this:

May 31 15:01:21 xxx gnome-session[1848]: ** (zeitgeist-datahub:2657): WARNING **: recent-manager-provider.vala:132: Desktop file for "file:///home/zzz/Documents/file.png" was not found, exec: google-chrome-stable, mime_type: image/png  


Solution:1

[The other answer about loglevel=warn is wrong. thermald only supports loglevel=info and loglevel=debug, so it will always log at least info and higher levels. I verified this by checking the source code.]

To quiet thermald, use:

/etc/rsyslog.d/99-thermald.conf

if $programname == "thermald" and ($syslogseverity-text == "debug" or $syslogseverity-text == "info" or $syslogseverity-text == "notice") then stop  

Then restart rsyslog:

service rsyslog restart  

This will discard all thermald messages at the notice level or lower, while still logging those at the warning level or higher.

You can use the same basic template to quiet other programs to your liking. The starting point for documentation on this feature (Expressions):

http://www.rsyslog.com/doc/expression.html


Solution:2

To suppress the my-weather-indicator noise on syslog, you can edit the file myweatherindicator.py located in /opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/ and comment out all the debug print statements the author left in the code as shown below ...

#print('///////////////////////////////////////////////////////')  #print('///////////////////////////////////////////////////////')  #print('time.time() = %s'%int(time.time()))  #print('self.actualization_time = %s'%int(self.actualization_time))  #print('(time.time()-self.actualization_time) = %s'%int((time.time()-self.actualization_time)))  #print('self.refresh*3600 = %s'%(int(self.refresh*3600)))  #print('///////////////////////////////////////////////////////')  #print('///////////////////////////////////////////////////////')  

NOTE: there are more debug print statements in that file besides the ones shown above so you need to comment all of them.


Solution:3

I prefer to log the thermald messages in a separate file, so they are not discarded and are not cluttering up syslog. Put the following in a file called /etc/rsyslog.d/10-thermald.conf (as noted above it must be named with a name starting with a number less than 50)

if $programname == 'thermald' then /var/log/thermald.log & stop


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »