Deleted Added
full compact
vmstat.c (97970) vmstat.c (109097)
1/*-
2 * Copyright (c) 1983, 1989, 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35
1/*-
2 * Copyright (c) 1983, 1989, 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35
36__FBSDID("$FreeBSD: head/usr.bin/systat/vmstat.c 97970 2002-06-06 23:01:50Z des $");
36__FBSDID("$FreeBSD: head/usr.bin/systat/vmstat.c 109097 2003-01-11 07:29:47Z dillon $");
37
38#ifdef lint
39static const char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
40#endif
41
42/*
43 * Cursed vmstat -- from Robert Elz.
44 */

--- 734 unchanged lines hidden (view full) ---

779 GETSYSCTL("vfs.numvnodes", ls->numvnodes);
780 GETSYSCTL("vfs.freevnodes", ls->freevnodes);
781 GETSYSCTL("vfs.cache.nchstats", ls->nchstats);
782 GETSYSCTL("vfs.numdirtybuffers", ls->numdirtybuffers);
783 getsysctl("hw.intrcnt", ls->intrcnt, nintr * sizeof(u_long));
784
785 size = sizeof(ls->Total);
786 mib[0] = CTL_VM;
37
38#ifdef lint
39static const char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
40#endif
41
42/*
43 * Cursed vmstat -- from Robert Elz.
44 */

--- 734 unchanged lines hidden (view full) ---

779 GETSYSCTL("vfs.numvnodes", ls->numvnodes);
780 GETSYSCTL("vfs.freevnodes", ls->freevnodes);
781 GETSYSCTL("vfs.cache.nchstats", ls->nchstats);
782 GETSYSCTL("vfs.numdirtybuffers", ls->numdirtybuffers);
783 getsysctl("hw.intrcnt", ls->intrcnt, nintr * sizeof(u_long));
784
785 size = sizeof(ls->Total);
786 mib[0] = CTL_VM;
787 mib[1] = VM_METER;
787 mib[1] = VM_TOTAL;
788 if (sysctl(mib, 2, &ls->Total, &size, NULL, 0) < 0) {
789 error("Can't get kernel info: %s\n", strerror(errno));
790 bzero(&ls->Total, sizeof(ls->Total));
791 }
792 size = sizeof(ncpu);
793 if (sysctlbyname("hw.ncpu", &ncpu, &size, NULL, 0) < 0 ||
794 size != sizeof(ncpu))
795 ncpu = 1;

--- 89 unchanged lines hidden ---
788 if (sysctl(mib, 2, &ls->Total, &size, NULL, 0) < 0) {
789 error("Can't get kernel info: %s\n", strerror(errno));
790 bzero(&ls->Total, sizeof(ls->Total));
791 }
792 size = sizeof(ncpu);
793 if (sysctlbyname("hw.ncpu", &ncpu, &size, NULL, 0) < 0 ||
794 size != sizeof(ncpu))
795 ncpu = 1;

--- 89 unchanged lines hidden ---