Tag Archives: udf

MariaDB: Get the Load Average

Here we present a simple user defined function in C, that returns the load average.

The function returns a string formatted like top‘s because C functions cannot return individual rows nor an array of reals.

The following code can be viewed as an example code for user defined functions in C — or alternatively as an example of how to use snprintf() correctly.

Continue reading MariaDB: Get the Load Average