From owner-freebsd-questions@FreeBSD.ORG Thu Aug 2 14:35:10 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 B9A5416A418 for ; Thu, 2 Aug 2007 14:35:10 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 5877713C46A for ; Thu, 2 Aug 2007 14:35:09 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with ESMTP id AAA26446; Fri, 3 Aug 2007 00:34:52 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 3 Aug 2007 00:34:51 +1000 (EST) From: Ian Smith To: Zbigniew Szalbot In-Reply-To: <20070802120018.9322D16A4DC@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Cc: freebsd-questions@freebsd.org 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 14:35:10 -0000 On Thu, 2 Aug 2007 12:52:20 +0200 Zbigniew Szalbot wrote: > 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. paqi% /bin/echo `/bin/date` `/sbin/sysctl -n vm.loadavg` Fri Aug 3 00:33:13 EST 2007 { 0.04 0.11 0.09 } Cheers, Ian