Category:Munin Graphs: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 6: Line 6:


<pre>
<pre>
for file in $(ls *.png); do
# convert all PNGs to GIFs
fileSize=`du --bytes $file | cut -f1`
for file in $(ls *.png); do name=${file%.*}; echo $name; convert $file "${name}.gif"; rm $file; done
if [[ $fileSize -gt 800000 ]]; then
 
for file in $(ls *.png); do name=${file%.*}; echo $name; convert $file "${name}.gif"; rm $file; done
# resize each image only if needed
find . -maxdepth 1 -iname '*.gif' -exec convert {} -resize '1920000@>' {} \;
find . -maxdepth 1 -iname '*.gif' -size +800k -exec convert '{}' -resize '2700000@>' {} \;
fi
done
</pre>
</pre>



Latest revision as of 07:14, 7 September 2019

Add this category to all uploads of screenshots taken of Munin Graphs. These graphs may be useful in debugging the OSE_Server or for provisioning when calculating requirements of expected future hardware needs.

It would be wise to dump snapshots of such graphs to the wiki every year or so for the historical record.

Note that these images compress & view best as gif images max ~800k in size. This can be done in batch on the cli (after creating a backup of the original files!), for example:

# convert all PNGs to GIFs
for file in $(ls *.png); do name=${file%.*}; echo $name; convert $file "${name}.gif"; rm $file; done

# resize each image only if needed
find . -maxdepth 1 -iname '*.gif' -size +800k -exec convert '{}' -resize '2700000@>' {} \;

See Also

Media in category "Munin Graphs"

The following 41 files are in this category, out of 41 total.