Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 25 lines (23 sloc) 0.918 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php
include 'config/phpconf.php';
$type = $_GET['type'];
$start = $_GET['start'];
$end = $_GET['end'];

if(is_numeric($start) && is_numeric($end)){
if($type == "disk"){
$disk_id = $_GET['disk_id'];
if(is_numeric($disk_id))
exec('export MPLCONFIGDIR=`pwd`/'.$mplconfigdir.';cd '.$python_scripts.'; echo "import plots; plots.plotDiskUsage('.$disk_id.','.$start.','.$end.');" | python');
}
if($type == "cpu"){
$mach_id = $_GET['mach_id'];
if(is_numeric($mach_id))
exec('export MPLCONFIGDIR=`pwd`/'.$mplconfigdir.';cd '.$python_scripts.'; echo "import plots; plots.plotCpuUsage('.$mach_id.','.$start.','.$end.');" | python');
}
if($type == "file"){
$mach_id = $_GET['mach_id'];
if(is_numeric($mach_id))
exec('export MPLCONFIGDIR=`pwd`/'.$mplconfigdir.';cd '.$python_scripts.'; echo "import plots; plots.plotAllFiles('.$mach_id.','.$start.','.$end.');" | python');
}
}
?>
Something went wrong with that request. Please try again.