| 1 | #!/usr/bin/env perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use CGI qw(:standard); | ||
| 6 | use App::ProcTrends::RRD; | ||
| 7 | |||
| 8 | exit(main()); | ||
| 9 | |||
| 10 | sub main { | ||
| 11 | my $ref = {}; | ||
| 12 | |||
| 13 | my $q = CGI->new(); | ||
| 14 | $ref->{ rrd_dir } = $q->param('rrd_dir'); | ||
| 15 | $ref->{ start } = $q->param('start'); | ||
| 16 | $ref->{ end } = $q->param('end'); | ||
| 17 | $ref->{ line } = $q->param('line'); | ||
| 18 | $ref->{ stack } = $q->param('stack'); | ||
| 19 | $ref->{ imgformat } = $q->param('imgformat'); | ||
| 20 | $ref->{ title } = $q->param('title'); | ||
| 21 | $ref->{ width } = $q->param('width'); | ||
| 22 | $ref->{ height } = $q->param('height'); | ||
| 23 | my $process = $q->param('process'); | ||
| 24 | my $metric = $q->param('metric'); | ||
| 25 | |||
| 26 | my $rrd = App::ProcTrends::RRD->new( $ref ); | ||
| 27 | $rrd->gen_image( '/home/satoshi/test.png', 'cpu', 'firefox' ); | ||
| 28 | } |