How to stop the OS X VM system log being flooded with WindowServer errors

The below post is graciously borrowed from Jeff at Insomniac Software. Original post is here How to stop the OS X VM system log being flooded with WindowServer errors

I found this to be extremely useful and I wanted to keep a record of it in case the original post disappeared.

The guts of the post from Jeff is replicated below:

After installing OS X into a VM on ESXi, you have probably seen the system log file flooded multiple times per second with this error message.

WindowServer: _CGXGLDisplayContextForDisplayDevice: No matching context for device (0xdeadbeef) – disabling OpenGL

As root, edit the /etc/asl.conf file. About 20 lines down, before the rule that saves every message, we want to add our exclusion rule so that it won’t be saved. So just before this line…’

# save everything from emergency to notice

copy and insert the following 2 lines:

# ignore WindowServer messages due to ESXi display device
? [= Sender WindowServer] [= Level 4] [= Facility user] [CA= Message _CGXGLDisplayContextForDisplayDevice] ignore

Save the file and exit your editor.

Now you will need to restart the syslog daemon so it will use the updated rule. You could reboot the OS X system but it is a lot faster to just manually restart the process.

Get the process ID of the syslogd process using pgrep (if you have it installed) or with a combo of ps and grep. Here are examples of both methods.

# /usr/bin/pgrep syslogd
19

# /bin/ps aux | grep syslogd
root 19 0.0 0.1 2459156 1052 ?? Ss 12:11PM 0:11.20 /usr/sbin/syslogd

So in the example outputs, you can see the pid is 19. Now just restart the syslog daemon.

# kill -HUP 19

If you monitor the /var/log/system.log file now, you will see a bunch of Configuration Notice: ASL Module messages as the daemon reloads but more importantly, no more WindowServer messages!

Again thanks to Jeff for the tips!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s