Technology Insights

Error installing memprof: checking for gelf_getshdr() in -lelf… no

I received the below error when attempting to install the memprof gem on a CentOS Linux server. The errors pointed out below could occur when attempting to install other packages as well though. Below I display a summary of the error output, the entire error output, and information on what to install to resolve the error. I noticed that on one server where the memprof gem installed without issue the gelf.h file was in the /usr/include/ directory however are the server that produced the error gelf.h was not installed.

Technology Insights

Find Out If My Ruby Binaries are Stripped Or Not Stripped

During some testing earlier a gem we were using required that the Ruby binaries on the server to be unstripped or not stripped. I wanted to provide information relating to finding out if your Ruby binaries were stripped or not stripped including what the output of each will look like. Below is a command you can use to find out if your Ruby version is stripped or not stripped including example outputs to display what each will look like.

Technology Insights

Modify WordPress Admin Plugin To Display As A WP Admin Dashboard Widget

Previously I wrote an article that detailed modifying the WordPress Most Commented plugin to display the most commented WordPress posts via the WP admin site. If you need more information on creating admin plugins or just wanted to glance over the article related to this one you can read it by clicking here. Something I did not include in that article was how to add code to the plugin that would also display a widget on the WP Admin dashboard. Below is basic information that should assist you in adding code that will display a dashboard widget.

Technology Insights

NRPE Nagios Plugin To Check The Number Of Files In A Directory

We have various scripts on a server that process files that are uploaded to a specific directory so we needed a way to monitor these directories and verify that all files are being processed. Once they are processed on our server they are moved to different directory so the file count should never get over a certain amount of files. The below script assumes that you have NRPE installed on the server so you can reference the bash script locally. Follow the directions below with some monitor modifications and you can monitor directories for the number of files with Nagios very easily.