Commit 8d479841 authored by Leigh B Stoller's avatar Leigh B Stoller

Also write out a simple csv file of free/inuse info, suitable for

use with d3.csv parsing.
parent 62b6036e
......@@ -99,4 +99,18 @@ print PLOT "plot 'freenodes.dat' using 2 ti col, '' using 3:xtic(1) ti col\n";
or die("Error running gnuplot");
system("cp -fp freenodes.svg @prefix@/www/node_usage/");
# Create a csv file.
open(DAT, ">freenodes.csv")
or die("Could open freenodes.csv for writing");
print DAT "Type,Inuse,Free\n";
foreach my $type (@free_types) {
my $free = $free{$type};
my $inuse = $total{$type} - $free{$type};
print DAT "$type,$inuse,$free\n";
system("cp -fp freenodes.svg freenodes.csv @prefix@/www/node_usage/");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment