Archive for December, 2008

Install check_mysql_perf on FreeBSD

I recently had to install check_mysql_perf on our nagios server runing FreeBSD.

After a few failed attempts , I contacted the author Gerhard asking for help. Sure enough a few minutes ( !!! ) later he send me a reply back : 

Add the following at the end of the check_mysql_perf.c : 

char* strndup(const char* string, size_t n)
{
char* copy_string = 0;

if(0 == string || 0 == n)
return 0;

copy_string = (char*) malloc(n + 1);
if(0 == copy_string)
return 0;

memcpy(copy_string, string, n);
*(copy_string + n) = ‘\0′;

return copy_string;
}

and find this line ( line number 77 in my file ) :

char *mysql_status_historical (MYSQL *, char *, long *, int);

and add below it :

char *strndup(const char*, size_t);

this worked like a charm and I have a working plugin now.

thanks Gerhard !!!

Add comment December 18th, 2008

Mount ISO on Linux/FreeBSD

On Linux
mount -o loop -t iso9660 path/to/iso.iso /mnt

On FreeBSD
mdconfig -a -t vnode -f /isofile -u 0
mount -t cd9660 /dev/md0 /mnt

Add comment December 4th, 2008


Calendar

December 2008
M T W T F S S
« Sep   Jan »
1234567
891011121314
15161718192021
22232425262728
293031  

Posts by Month

Posts by Category