租虛擬主機很常碰到流量限制的問題。若不小心洩漏IP,惡意人士刻意做 DDOS 攻擊,導致超流斷線那還好,但有些服務是超流之後不斷線,反而是多收$$ 如:知名的 Digitialocean 每月限制 1TB 的 transfer,詳細查一下官方文件可以看到有一段超流的收費。 Do you charge for bandwidth? Yes. Plans start with 1TB per month and increase incrementally. Once the monthly transfer limit has been exceeded, the cost of bandwidth is $0.02 per GB over the limit. 引述自 — https://www.digitalocean.com/help/policy/ 因此,我們還是要試著自己監控流量,必要時採許相對應措施。 vnstat : linux 頻寬監測工具,可以根據小時、日、周等等單位統計頻寬使用狀況。 crontab : linux 排程工具,這邊將利用crontab […]