Category:Munin Graphs: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
   if [[ $fileSize -gt 800000 ]]; then
   if [[ $fileSize -gt 800000 ]]; then
     # TODO adjust 2000000 as needed
     # TODO adjust 2000000 as needed
     find . -maxdepth 1 -iname '*.gif' -exec convert {} -resize '2000000@>' {} \;
     -exec convert "$file" -resize '2000000@>'
   fi
   fi
done
done

Revision as of 07:07, 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
for file in $(ls *.gif); do
  fileSize=`du --bytes "$file" | cut -f1`
  if [[ $fileSize -gt 800000 ]]; then
    # TODO adjust 2000000 as needed
    -exec convert "$file" -resize '2000000@>'
  fi
done

See Also

Media in category "Munin Graphs"

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