Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2003 17:20:18 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: systat like statistics to a flat file ?
Message-ID:  <20030225172018.GA61003@happy-idiot-talk.infracaninophi>
In-Reply-To: <5.2.0.9.0.20030224223728.032606b8@pop.swbell.yahoo.com>
References:  <5.2.0.9.0.20030224223728.032606b8@pop.swbell.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030225172018.GA61003>