From owner-freebsd-questions@FreeBSD.ORG Thu Aug 2 12:16:43 2007 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 AF24116A419 for ; Thu, 2 Aug 2007 12:16:43 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from smtp.teledomenet.gr (smtp.teledomenet.gr [213.142.128.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6B97013C46A for ; Thu, 2 Aug 2007 12:16:43 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from iris (unknown [192.168.1.71]) by smtp.teledomenet.gr (Postfix) with ESMTP id 895E5143799; Thu, 2 Aug 2007 15:16:42 +0300 (EEST) From: Nikos Vassiliadis To: freebsd-questions@freebsd.org Date: Thu, 2 Aug 2007 15:17:40 +0300 User-Agent: KMail/1.9.1 References: <200708021344.34110.nvass@teledomenet.gr> <29ffef3611266e3465b2ec20c079dc69@szalbot.homedns.org> In-Reply-To: <29ffef3611266e3465b2ec20c079dc69@szalbot.homedns.org> X-NCC-RegID: gr.telehouse MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200708021517.41157.nvass@teledomenet.gr> Cc: Zbigniew Szalbot Subject: Re: logging system load 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, 02 Aug 2007 12:16:43 -0000 On Thursday 02 August 2007 13:52, Zbigniew Szalbot wrote: > Hello, > > On Thu, 2 Aug 2007 13:44:33 +0300, Nikos Vassiliadis > > > wrote: > > On Wednesday 25 July 2007 20:50, Momchil Ivanov wrote: > >> На Wednesday 25 July 2007 19:38:41 Zbigniew Szalbot написа: > >> > Dear all, > >> > > >> > Is there a tool similar to top which would measure system load and > >> > write it to a file that could later be analyzed? The time when my > >> > system is most loaded happens between 3 and 5 a.m. so a trace of > >> > the system load would be a wonderful thing to have. I need it to > >> > tailor some of the jobs accordingly. Any advice? > >> > > >> > Thanks in advance! > >> > >> You can make a cronjob doing "uptime >> /path/to/logfile" every > >> minute > > > > Or perhaps "sysctl -n vm.loadavg" instead of uptime, > > which is the same information, but requires less > > scrubbing. > > Thanks but that wouldn't record the time, would it? With uptime it is > nice to have the current time also recorded and I can compare logs to > load by time. If I had to implement this for me, I would do it this way: echo `date "+%Y-%m-%d %H:%M"; sysctl -n vm.loadavg` But I had in mind easy parsing. If you do eye "parsing" then uptime is fine too:) Nikos