Date: Thu, 2 Aug 2007 15:17:40 +0300 From: Nikos Vassiliadis <nvass@teledomenet.gr> To: freebsd-questions@freebsd.org Cc: Zbigniew Szalbot <zbigniew@szalbot.homedns.org> Subject: Re: logging system load Message-ID: <200708021517.41157.nvass@teledomenet.gr> In-Reply-To: <29ffef3611266e3465b2ec20c079dc69@szalbot.homedns.org> References: <200708021344.34110.nvass@teledomenet.gr> <29ffef3611266e3465b2ec20c079dc69@szalbot.homedns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 02 August 2007 13:52, Zbigniew Szalbot wrote: > Hello, > > On Thu, 2 Aug 2007 13:44:33 +0300, Nikos Vassiliadis > <nvass@teledomenet.gr> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708021517.41157.nvass>