!7 // works with certain versions of vnstat. Try apt-get install vnstat module EstimatedMonthlyTrafficPercentage > DynBigNumber { start { doEvery(0.0, 10*60.0, r updateStats); } void updateStats enter { if (getMonthlyTrafficLimit() == 0) setValue("Please set traffic limit"); else if (!isOnPATH('vnstat)) setValue("vnstat not installed"); else { S s = regexpReplaceWithNothing(",\\d+", parse_vnstat(backtick('vnstat)).thisMonthEstimated); long mb; if (s.endsWith("MiB")) mb = parseFirstLong(s); else if (s.endsWith("GiB")) mb = parseFirstLong(s)*1024; else ret with setValue("(?) " + s); setValue(intPercentRatio(mb, getMonthlyTrafficLimit()*1024) + " %"); } } afterVisualize { componentPopupMenuItem(label, "Set traffic limit...", r setLimit); onLeftClick(label, r setLimit); } enhanceFrame { internalFramePopupMenuItem(f, "Set traffic limit...", r setLimit); } void setLimit enter { inputText("Monthly traffic limit (GB, 0 for unknown)", str(getMonthlyTrafficLimit()), voidfunc(S s) { setMonthlyTrafficLimit(parseLong(s)); updateStats(); }); } }