Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed do not watch to reflect a name change. Fixed bug with MB and …

…GB calculations
  • Loading branch information...
commit 31fd3c1848ba49fa7de7853fae7343ab878db397 1 parent a014d97
Kevin Wojcik authored
Showing with 8 additions and 7 deletions.
  1. +3 −3 bin/plots.py
  2. +1 −0  config/donotwatch.conf
  3. +4 −4 site.php
View
6 bin/plots.py
@@ -81,10 +81,10 @@ def plotDiskUsage(disk_id, start_time, end_time, filename = '../images/plot.png'
lines = [times, used, 'Used Space']
plot_title = 'Disk usage of %s mounted on %s of %s at %s' % (device, mount, name, location)
xlabel = 'Date & Time (UTC)'
- if(size > 1000000000):
- ylabel = 'Disk Usage %% (of %d GB)' % (size/1000000000.0)
+ if(size > 1048576):
+ ylabel = 'Disk Usage %% (of %d GB)' % (size/1048576.0)
else:
- ylabel = 'Disk Usage %% (of %d MB)' % (size/1000000.0)
+ ylabel = 'Disk Usage %% (of %d MB)' % (size/1024.0)
#Now get any reboots
if(start_time == 0 and end_time == 0):
View
1  config/donotwatch.conf
@@ -1,3 +1,4 @@
<root>
+<site>4</site>
<site>5</site>
</root>
View
8 site.php
@@ -53,10 +53,10 @@ function getDisks($dir, $mach_id){
else
echo '<td class="green"></td>';
echo '<td class="highlight">'.$device.'</td>';
- if($size > 1073741824)
- echo '<td class="highlight">'.round(($size/1073741824),2).' GB</td>';
+ if($size > 1048576)
+ echo '<td class="highlight">'.round(($size/1048576),2).' GB</td>';
else
- echo '<td class="highlight">'.round(($size/1048576), 2).' MB</td>';
+ echo '<td class="highlight">'.round(($size/1024), 2).' MB</td>';
echo '<td class="highlight">'.$used.'%</td>';
echo '<td class="highlight">'.$mnt.'</td>';
echo '<td class="highlight">'.date('Y:m:d H:i:s', $timestamp).'</td>';
@@ -102,4 +102,4 @@ function getDisks($dir, $mach_id){
});
});
$("tr.disk_clickable:first").trigger("click");
-</script>
+</script>
Please sign in to comment.
Something went wrong with that request. Please try again.