aboutsummaryrefslogtreecommitdiffstats
path: root/website/fetchmail-FAQ.html
blob: 1237cbbefcfab5127387f6945a64019bf1a015a7 (plain)
1
../fetchmail-FAQ.html
her */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/sh
#
# timeplot -- plot data on fetchmail release intervals
#
# 

# Get data from the NEWS file
timeseries | awk >/tmp/timeplot$$ '
START	{maxdiff = 0;}
/^[#%]/	{next;}
	{days[count++] = $6;}
END	{
		for (i = 0; i < count-1; i++)
		{
			diffs[i] = days[i] - days[i + 1];
			if (maxdiff < diffs[i])
				maxdiff = diffs[i];
		}
		for (i = 0; i <= maxdiff; i++)
			freq[i] = 0;
		for (i = 0; i < count - 1; i++)
		{
			freq[diffs[i]]++;
		}
		for (i = 0; i <= maxdiff; i++)
			printf("%d	%d\n", i, freq[i]);
	}
'

gnuplot >time.png - <<EOF
set xlabel "Release interval (days)"
set ylabel "Interval frequency"
plot '/tmp/timeplot$$' using 1:2 \
	title "Release interval frequency"
pause 9999
EOF

rm -f /tmp/time*

# timeplot ends here