Virtual Box on Mac OS X: Failed to load VMMR0.r0 (VERR_SUPLIB_OWNER_NOT_ROOT)


The permissions on /Applications folder is not correct. It should be owned by root.

Go to Disk Utility and select your disk. Then select Repair Disk Permissions.
If you have a SSD then it will take roughly 5 mins.

No Comments

Returning linux timestamp

To return linux timestamp use the following:

Date and time now in timestamp format:
date "+%s"

A specific date and time in timestamp format:

date -d "<time>" "+%s"
e.g. date <del>d "2014</del>01-30 15:00:00" "+%s"

Date and time now in timestamp format and nano seconds:

date "+%s%N"

Date and time now in timestamp format and milli seconds:

date “+%s%N” | cut -b1-13
echo $(($(date “+%s%N”)/1000000))

To return a specific date and time in timestamp with nano or milli seconds then simply add -d parameter similar to the previous example.

No Comments

MySQL – limiting the result returned by Show Processlist

Use /P (pager) to limit the result you wish to see.

For example, if you wish to see all processes except the ones sleeping then do the following:

mysql> \P grep -v Sleep
mysql> show processlist;

No Comments

Request-URI Too Large

The circumstances that I came across the “Request-URI Too Large” Apache message is rather unique. In short, I’m loading graphs (images) on a dashboard from another website (Graphite) and the URL for the image can get pretty big because the image needs to be rendered by the Graphite render API.

Disclaimer: If you’re using forms and GET then I would definitely recommend changing the form to use POST and this solution should not be used.

The problem here is that Apache httpd has limited the amount of data that can be accepted through Request line. The default is 8192 bytes or 8 KB.

In order to overwrite this then simply add the following to virtual host or server config.

LimitRequestLine <sub>bytes</sub>

e.g. LimitRequestLine 15360

No Comments

MySQL innodb_flush_log_at_trx_commit parameter

Setting innodb_flush_log_at_trx_commit in my.cnf file can have huge impact to the performance of your MySQL server. The impact of setting this parameter is stated below:


  • Setting X to 2: causes the log buffer to be written to the log file after each commit, but file writes are flushed to disk approximately once a second. This is somewhat slower than a setting of 0. However the committed changes will not be lost if it is only the MySQL server that crashes and not the operating system or server host. In this scenario the machine continues to run, so the changes written to the log file are in the filesystem cache and eventually will be flushed normally.

  • Setting X to 1: changes are written from log buffer to the log file and the log file is flushed to disk for each commit. This guarantees that the changes will not be lost even in the event of a crash. This is the safest setting, and is also the required setting if you need ACID durability. It is also the slowest setting.

  • Setting X to 0: causes the log file to be written and flushed to disk approximately once a second, but not after each commit. on a busy system, this can reduce log-related disk activity significantly, but in the event of a crash can result in loss of about a second’s worth of commited changes.

No Comments

Graphite’s perSecond function

So as per my previous post I came across this function because derivative and nonNegativeDerivative were not working correctly.

I tried this function out on Graphite 0.9.10 and I got exception messages that I outlined on Graphite’s Launchpad. I installed Graphite 0.9.9 and got the same exception and after looking up the documentation for Graphite 0.9.9 I noticed that function is missing. Since I got the exact same exception message I’m assuming the function was missed from 0.9.10 stable release as well. I’m still not sure if that is the real problem but hopefully someone will reply to my post on launchpad.

Since it was crucial for us to get this working I downloaded the Graphite Web development code (version 0.10) from Github project along with Ceres project and compiled and installed them. I also needed Python-byparsing to be able to resolve the dependencies. Note that I used whisper and carbon at latest stable release (0.9.10) to increase my chances of hitting bugs in development code. After installation the function was working perfectly!

So far it looks like we’re in the clear and haven’t hit any bugs…##fingers crossed##

No Comments

Graphite’s Derivative Function

Struggled with this for a day since it looked like we weren’t able to get the correct values from Graphite’s derivative and nonNegativeDerivative functions.

Found this blog that explains it pretty clearly.

Switched to perSecond() and using Graphite’s 0.9.10 it fails with an exception message. I’ve explained the problem at Graphite’s launchpad..

I think perSecond deserves its own post so to be continued…

No Comments

MySQL – Return table creation time along with other information

Quick query to return the time of creation along with some other info for a table:


No Comments

Choosing a metric in Graphite Web UI will return a broken image icon

This happens when Graphite render returns a 500 message (server side error).
The best way to troubleshoot is to:

  1. See the webapp log files located usually at /opt/graphite/storage/log/webapp

  2. Run the graph using the URL API and that way you can see the full exception message
  3. Most times the problem is due to permission problems on the file. Make sure all users (e.g. user running Apache HTTPD server) who need access are able to access the file.

No Comments

How to feed data into Graphite?

I came across of this when wanting to back fill the data from RRDs to Graphite/whisper… The following link explains how to use nc to insert data.

I simply use nc in my shell script to feed it to Carbon. Below is part of the script that does that.


No Comments