From owner-freebsd-questions Tue Feb 25 9:20:27 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAAAB37B401 for ; Tue, 25 Feb 2003 09:20:23 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 307F543F85 for ; Tue, 25 Feb 2003 09:20:22 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) by smtp.infracaninophile.co.uk (8.12.7/8.12.7) with ESMTP id h1PHKI5U064392 for ; Tue, 25 Feb 2003 17:20:18 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.7/8.12.7/Submit) id h1PHKIes064391 for freebsd-questions@FreeBSD.ORG; Tue, 25 Feb 2003 17:20:18 GMT Date: Tue, 25 Feb 2003 17:20:18 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: systat like statistics to a flat file ? Message-ID: <20030225172018.GA61003@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <5.2.0.9.0.20030224223728.032606b8@pop.swbell.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.2.0.9.0.20030224223728.032606b8@pop.swbell.yahoo.com> User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-3.3 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_MUTT version=2.44 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Feb 24, 2003 at 10:40:24PM -0600, Sean O'Neill wrote: > Is there anything in FreeBSD or the ports that will collect statistics > similar to those displayed by systat and drop them to a flat file ? systat actually provides a handy constantly updating display of data equivalent to a number of well known status reporting tools under Unix. So, going full circle, you have: uptime(1) System load averages ps(1) Process Status --- the systat 'pigs' mode selects those processes using a large fraction of the available processor power, which is roughly equivalent to runnign 'ps -rla' and picking out processes from the top of that list. netstat(1) Various counters to do with network traffic. Thus the systat icmp display shows the same sort of information as: netstat -s -p icmp The tcp and ip displays can be shown similarly. netstat(1) can show statistics for more traffic categories than systat(1), eg: igmp, udp, ip6, icmp6, and it can show the traffic counters just for a specific network interface: netstat -I lo0 -s -p ip6 netstat(1) also displays mbuf counts, similar to systat's mbuf mode: netstat -m The default output from netstat(1) is to show the status of all open sockets on the system --- equivalent to systat(1)'s netstat mode (unsurprisingly...) pstat(8), swapinfo(8) swapinfo(1) is just a special way of invoking 'pstat -s'. Anyhow, pstat(1) is a general interface for reporting various kernel statistics to do with swap, filesystems and terminals. swapinfo shows how much capacity is in use in each of the swap areas on the system, equivalently to systat's swap mode. vmstat(8) This comand will tell you all about the performance of the virtual memory system. The systat(1) vmstat mode manages to summarise several of vmstat(1)'s output modes onto one page vmstat -s shows counts (since the last reboot) of various types of paging event in the system. vmstat -i shows the number of interrupts per device since the last reboot, and plain vmstat produces a condensed display showing inter-alia the amount of virtual memory in use, the free memory available, page faults, paging disk IO. faults and cpu usage, averaged over the time since the last reboot. vmstat in this mode is intended to be run using the '-w' flag which causes it to loop and print out statistics for each successive period. iostat(8) Overlaps somewhat with vmstat(8), and has a similar one-line report which it will print out at intervals given the '-w' flag. However, the principal focus is on disk IO throughput. systat(1)'s iostat mode shows the same information spread out over a whole page. There's several other statistics or status reporting tools that come with the system and which don't have an analog within systat(1), such as sockstat(1), fstat(1), nfsstat(1), ifmcstat(8), arp(8) all of which are well worth knowing about. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message