From owner-freebsd-questions@FreeBSD.ORG Wed Feb 3 08:22:30 2010 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 484201065693 for ; Wed, 3 Feb 2010 08:22:30 +0000 (UTC) (envelope-from sparvu@systemdatarecorder.org) Received: from systemdatarecorder.org (mail.systemdatarecorder.org [217.30.176.121]) by mx1.freebsd.org (Postfix) with ESMTP id C625B8FC1B for ; Wed, 3 Feb 2010 08:22:28 +0000 (UTC) Received: from systemdatarecorder.org (localhost [127.0.0.1]) by systemdatarecorder.org (8.14.3+Sun/8.14.3) with ESMTP id o1381KtV008617 for ; Wed, 3 Feb 2010 10:01:20 +0200 (EET) Received: from localhost (sparvu@localhost) by systemdatarecorder.org (8.14.3+Sun/8.14.3/Submit) with ESMTP id o1381KLE008614 for ; Wed, 3 Feb 2010 10:01:20 +0200 (EET) Date: Wed, 3 Feb 2010 10:01:20 +0200 (EET) From: Stefan Parvu To: freebsd-questions@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: cpu utilization question in FreeBSD 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: Wed, 03 Feb 2010 08:22:30 -0000 Hi, Im trying to put together a number of data recorders, to collect raw data from kernel or from applications. Here you can see a basic idea of SDR: http://www.systemdatarecorder.org/recording/recdesign.html http://www.systemdatarecorder.org/recording/recorders.html Im currently trying to port sysrec, http://www.systemdatarecorder.org/recording/sdr_bin/sysrec to FreeBSD. I would like to understand how CPU Utilization in FreeBSD counts, comparing to Solaris. Currently sysrec records the following metrics: # Utilisation, # CPU # usr + sys time across all CPUs # Memory # free RAM. freemem from availrmem # Disk # %busy. r+w times across all Disks # Network # throughput. r+w bytes across all NICs # # Saturation, # CPU # threads on the run queue # Memory # scan rate of the page scanner # Disk # operations on the wait queue # Network # errors due to buffer saturation # Would be fair to count CPU Util in FreeBSD similar with Solaris, User + System time ? Is there any Perl module or KSTAT functionality which exports these functionalities to userland for simple consumption ? Thanks, Stefan