[rrd-developers] test suite in php or shell scripts needed.

D. Walsh info at daleenterprise.com
Mon Feb 20 15:01:32 MET 2006

Can someone help me out please.

I'm just about done my PHP extension rewrite and what I need are some  
PHP or shell scripts to test rrdtool functionality.

These tests should be basic and simple to allow compatibility for all  
version of RRDTool.

I'm trying to test functionality in different OS's under different  
versions of RRDTool (because I'll never know what version the end  
user will actually be using) so simplicity is the key factor.

The functions that need testing.


The PHP or shell script needs to create the rrd file used to test the  
function and the only requirement is it cannot use perl to perform  
any of the tasks.

Here is an example of the graph function that has already been tested.
(you could write a {hard-coded} shell script {not using perl} that  
tests the functions
  and I can convert it easily to PHP if your more comfortable with  
shell scripts)

if (file_exists("/usr/local/rrdtool/bin/rrdtool")) {
	$rrdtool = "/usr/local/rrdtool/bin/rrdtool";
} elseif (file_exists("/usr/local/bin/rrdtool")) {
	$rrdtool = "/usr/local/bin/rrdtool";
} elseif (file_exists("/usr/bin/rrdtool")) {
	$rrdtool = "/usr/bin/rrdtool";

function rrd_graph ($img, $opts, $count)  {
	global $rrd_error_val, $rrdtool;

	$rrd_error_val = NULL;

	$cmd = "$rrdtool graph $img '". implode("' \\\n'",$opts) . "'" . "  
	$out = exec($cmd, $output, $rrd_error_val);

	if ($rrd_error_val) {
		if (!is_numeric($rrd_error_val)) {
			$rrd_error_val = $output[0];
		return false;
	return $output;


Any assistance in this area will be greatly appreciated.

-- Dale

Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-developers mailing list