Do you have another machine you can use? Basically, use FTP and a command file (see 'man ftp') to upload/download a semi-large file. You can then use grep to grab your upload/download speeds.
Once you have those, what you do with them is up to you. I'd suggest RRDTool, though it's interface can be a bit confusing.
I've done this before, here's some PHP code that I used. The ftp1.optonline.net link probably isn't helpful to you, you basically just need to find a large file on a http/ftp server.
<?php
chdir('/tmp');
$c = curl_init('ftp://ftp1.optonline.net/test4');
curl_setopt($c,CURLOPT_RETURNTRANSFER,true);
curl_exec($c);
echo "Down: ".curl_getinfo($c,CURLINFO_SPEED_DOWNLOAD)."\n";
$down = curl_getinfo($c,CURLINFO_SPEED_DOWNLOAD);
if (!file_exists('/tmp/speedup'))
{
exec('dd if=/dev/urandom of=/tmp/speedup bs=1024 count=1024');
}
$u = curl_init('ftp://your_ftp_server');
curl_setopt($u,CURLOPT_USERPWD,"username:password");
curl_setopt($u,CURLOPT_UPLOAD,1);
curl_setopt($u,CURLOPT_INFILE,fopen('/tmp/speedup','r'));
curl_setopt($u,CURLOPT_INFILESIZE,filesize('/tmp/speedup'));
curl_exec($u);
echo "Up: ".curl_getinfo($u,CURLINFO_SPEED_UPLOAD)."\n";
$up = curl_getinfo($u,CURLINFO_SPEED_UPLOAD);
$f = fopen("/tmp/speed_data.txt","a");
fwrite($f,mktime()." $down $up\n");
fclose($f);