Category:Munin Graphs: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
(make many lines 1 line using find)
Line 10: Line 10:


# resize each image only if needed
# resize each image only if needed
for file in $(ls *.gif); do
# TODO adjust 2000000 as needed
  fileSize=`du --bytes "$file" | cut -f1`
find . -maxdepth 1 -iname '*.gif' -size +800k -exec convert {} -resize '2000000@>' {} \;
  if [[ $fileSize -gt 800000 ]]; then
    # TODO adjust 2000000 as needed
    convert "$file" -resize '2000000@>'
  fi
done
</pre>
</pre>



Revision as of 07:10, 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
# TODO adjust 2000000 as needed
find . -maxdepth 1 -iname '*.gif' -size +800k -exec convert {} -resize '2000000@>' {} \;

See Also

Media in category "Munin Graphs"

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