7

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
  • Whats the output of grep '^[^#].*syslog' /etc/rsyslog.d/50-default.conf ? – heemayl May 30 '15 at 21:45
  • .;auth,authpriv.none -/var/log/syslog – Andreas J. May 30 '15 at 23:33
  • Ok..if thermald is occupying most entries in the syslog, you should run it changing the loglevel to warn or higher..change the ExecStart=/usr/sbin/thermald --no-daemon --dbus-enable line of /lib/systemd/system/thermald.service to ExecStart=/usr/sbin/thermald --no-daemon --dbus-enable --loglevel=warn and then restart the service.. – heemayl May 30 '15 at 23:37
  • Nice. Thanks. Can I do something similar for gnome-session and systemd messages? It seems like 15.04 introduced a ton of new output written to the syslog. Anyway, If you make your comment into and answer, I could check it as an accepted answer. – Andreas J. May 31 '15 at 5:29
  • Check my answer..if you want you can do so but before changing be sure that they are actually not of any help to you..also check if the services actually let you change the loglevel like that, many programs have different ways of chaging the loglevels.. – heemayl May 31 '15 at 13:05
2

[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

  • It works but I have to name the file 49-thermald.conf (it has to run before 50-default.conf). – Marc Belmont Sep 27 '15 at 9:17
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.

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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