From owner-freebsd-questions@FreeBSD.ORG Thu Jan 29 13:20:54 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC5A4106568E for ; Thu, 29 Jan 2009 13:20:54 +0000 (UTC) (envelope-from gunther.mayer@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3D0098FC18 for ; Thu, 29 Jan 2009 13:20:53 +0000 (UTC) (envelope-from gunther.mayer@googlemail.com) Received: by ey-out-2122.google.com with SMTP id d26so114507eyd.7 for ; Thu, 29 Jan 2009 05:20:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=b0pcsyVNmFFyucO4eK7sfuLFynmPIGckPH1ZDjajTc0=; b=D88SXZ29eFV2fextmRxTEj0rGugAGuTEOTvFSFmotm+mq/FzRvYX+yiVGHghzPvmXd GOh6U1e9iZ6YgTO2WvxCVe2oZPEJiFu1cKY/W6I/ZYfx9w4kbGRkhVOL2E6aAdjWd+co eRIsxkj69OOeO+xKoHh97a1nENV40KpyZPvOI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=exWWeuw6tCsUHI/9TeIhjuBbe3tP72zCnxDOgUMmkvetoXc7ATaEmSiRX3iuNAXs2P MFSEK847VeUTnmGcje5k878v/Nrh3BoJAwCzCZKyrbH4CGZd2MDpGPCnRw8u6rsDKhYe Sy9rOY3R43FsmA8/5Illi+g4M5xMa/GrlErm8= Received: by 10.210.67.4 with SMTP id p4mr39522eba.95.1233233275633; Thu, 29 Jan 2009 04:47:55 -0800 (PST) Received: from ?172.25.0.130? ([196.7.14.186]) by mx.google.com with ESMTPS id h6sm51073627nfh.64.2009.01.29.04.47.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Jan 2009 04:47:55 -0800 (PST) Message-ID: <4981A577.6090002@gmail.com> Date: Thu, 29 Jan 2009 14:47:51 +0200 From: Gunther Mayer User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: FreeBSD Questions Mailing List Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Saving pf state for accounting X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 13:20:56 -0000 Hi guys, My server uses up tons of bandwidth every month and I'd like to start recording what traffic volumes my different services chew up on a monthly basis. My firewall utility of choice is pf and I've recently come across its neat "label" facility so that I can do a simple "pfctl -sl" to get the latest readings. That's all fair and well but I lose all that lovely accounting information upon reboot so how do I go about saving this? I've googled quite a bit to look for a solution but have found nothing useful so far, just unanswered posts in the past. From what I can tell so far I'd have to write a custom rc script which redirects "pfctl -sl" into some sort of logfile which then may be retrieved at a later stage (and added to current counter output). Is there an easier way perhaps? Gunther