summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-11 06:37:00 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-11 06:37:00 +0000
commit42b3d449cd7394f4e614b3144ace06cc1b037f18 (patch)
tree2d45f755df1c21d2e402865ac6fbad21dbb8c4c4 /sys
parentb6c96efa8e1e873b71eeb62d8f2aaadcc17a57f0 (diff)
sysctl entries for kmemstats, nselcoll, nchstats, and forkstat.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/malloc.h27
-rw-r--r--sys/sys/namei.h25
-rw-r--r--sys/sys/sysctl.h10
-rw-r--r--sys/sys/vmmeter.h24
4 files changed, 66 insertions, 20 deletions
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index ffcbcae8871..e8812d31cdc 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.h,v 1.39 2001/05/05 20:57:02 art Exp $ */
+/* $OpenBSD: malloc.h,v 1.40 2001/05/11 06:36:59 angelos Exp $ */
/* $NetBSD: malloc.h,v 1.39 1998/07/12 19:52:01 augustss Exp $ */
/*
@@ -39,14 +39,18 @@
#ifndef _SYS_MALLOC_H_
#define _SYS_MALLOC_H_
-#define KERN_MALLOC_BUCKETS 1
-#define KERN_MALLOC_BUCKET 2
-#define KERN_MALLOC_MAXID 3
+#define KERN_MALLOC_BUCKETS 1
+#define KERN_MALLOC_BUCKET 2
+#define KERN_MALLOC_KMEMNAMES 3
+#define KERN_MALLOC_KMEMSTATS 4
+#define KERN_MALLOC_MAXID 5
#define CTL_KERN_MALLOC_NAMES { \
- {0, 0 }, \
- { "buckets", CTLTYPE_STRING }, \
- { "bucket", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { "buckets", CTLTYPE_STRING }, \
+ { "bucket", CTLTYPE_NODE }, \
+ { "kmemnames", CTLTYPE_STRING }, \
+ { "kmemstat", CTLTYPE_NODE }, \
}
/*
@@ -136,7 +140,6 @@
#define M_TDB 75 /* Transforms database */
#define M_XDATA 76 /* IPsec data */
#define M_VFS 77 /* VFS file systems */
-
#define M_PAGEDEP 78 /* File page dependencies */
#define M_INODEDEP 79 /* Inode dependencies */
#define M_NEWBLK 80 /* New block allocation */
@@ -154,23 +157,16 @@
#define M_VMSWAP 92 /* VM swap structures */
#define M_RAIDFRAME 97 /* Raidframe data */
-
#define M_UVMAMAP 98 /* UVM amap and realted */
#define M_UVMAOBJ 99 /* UVM aobj and realted */
#define M_POOL 100 /* Pool memory */
-
#define M_USB 101 /* USB general */
#define M_USBDEV 102 /* USB device driver */
#define M_USBHC 103 /* USB host controller */
-
#define M_PIPE 104 /* Pipe structures */
-
#define M_MEMDESC 105 /* Memory range */
-
#define M_DEBUG 106 /* MALLOC_DEBUG structures */
-
#define M_KNOTE 107 /* kernel event queue */
-
#define M_CRYPTO_DATA 108 /* Crypto framework data buffers (keys etc.) */
#define M_IPSEC_POLICY 109 /* IPsec SPD structures */
#define M_CREDENTIALS 110 /* IPsec-related credentials and ID info */
@@ -182,7 +178,6 @@
#define M_IP6NDP 124 /* IPv6 Neighbour Discovery */
#define M_IP6RR 125 /* IPv6 Router Renumbering Prefix */
#define M_RR_ADDR 126 /* IPv6 Router Renumbering Ifid */
-
#define M_TEMP 127 /* misc temporary data buffers */
#define M_LAST 128 /* Must be last type + 1 */
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index 2fa0f2ca35f..b5fa8409817 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: namei.h,v 1.6 1998/01/09 20:16:48 csapuntz Exp $ */
+/* $OpenBSD: namei.h,v 1.7 2001/05/11 06:36:59 angelos Exp $ */
/* $NetBSD: namei.h,v 1.11 1996/02/09 18:25:20 christos Exp $ */
/*
@@ -201,4 +201,27 @@ struct nchstats {
long ncs_pass2; /* names found with passes == 2 */
long ncs_2passes; /* number of times we attempt it */
};
+
+/* These sysctl names are only really used by sysctl(8) */
+#define KERN_NCHSTATS_GOODHITS 1
+#define KERN_NCHSTATS_NEGHITS 2
+#define KERN_NCHSTATS_BADHITS 3
+#define KERN_NCHSTATS_FALSEHITS 4
+#define KERN_NCHSTATS_MISS 5
+#define KERN_NCHSTATS_LONG 6
+#define KERN_NCHSTATS_PASS2 7
+#define KERN_NCHSTATS_2PASSES 8
+#define KERN_NCHSTATS_MAXID 9
+
+#define CTL_KERN_NCHSTATS_NAMES { \
+ { 0, 0 }, \
+ { "good_hits", CTLTYPE_INT }, \
+ { "negative_hits", CTLTYPE_INT }, \
+ { "bad_hits", CTLTYPE_INT }, \
+ { "false_hits", CTLTYPE_INT }, \
+ { "misses", CTLTYPE_INT }, \
+ { "long_names", CTLTYPE_INT }, \
+ { "pass2", CTLTYPE_INT }, \
+ { "2passes", CTLTYPE_INT }, \
+}
#endif /* !_SYS_NAMEI_H_ */
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index f68d920ca51..85c46de7c01 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.h,v 1.35 2001/03/16 08:49:08 art Exp $ */
+/* $OpenBSD: sysctl.h,v 1.36 2001/05/11 06:36:59 angelos Exp $ */
/* $NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $ */
/*
@@ -154,7 +154,10 @@ struct ctlname {
#define KERN_MSGBUFSIZE 38 /* int: size of message buffer */
#define KERN_MALLOCSTATS 39 /* node: malloc statistics */
#define KERN_CPTIME 40 /* array: cp_time */
-#define KERN_MAXID 41 /* number of valid kern ids */
+#define KERN_NCHSTATS 41 /* struct: vfs cache statistics */
+#define KERN_FORKSTAT 42 /* struct: fork statistics */
+#define KERN_NSELCOLL 43 /* int: select(2) collisions */
+#define KERN_MAXID 44 /* number of valid kern ids */
#define CTL_KERN_NAMES { \
{ 0, 0 }, \
@@ -198,6 +201,9 @@ struct ctlname {
{ "msgbufsize", CTLTYPE_INT }, \
{ "malloc", CTLTYPE_NODE }, \
{ "cp_time", CTLTYPE_STRUCT }, \
+ { "nchstats", CTLTYPE_STRUCT }, \
+ { "forkstat", CTLTYPE_STRUCT }, \
+ { "nselcoll", CTLTYPE_INT }, \
}
/*
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index 3cb9b7ecadd..608c5167978 100644
--- a/sys/sys/vmmeter.h
+++ b/sys/sys/vmmeter.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmmeter.h,v 1.9 2000/06/18 17:59:55 niklas Exp $ */
+/* $OpenBSD: vmmeter.h,v 1.10 2001/05/11 06:36:59 angelos Exp $ */
/* $NetBSD: vmmeter.h,v 1.9 1995/03/26 20:25:04 jtc Exp $ */
/*-
@@ -129,4 +129,26 @@ struct forkstat
int sizkthread; /* VM pages affected by kernel threads */
};
+/* These sysctl names are only really used by sysctl(8) */
+#define KERN_FORKSTAT_FORK 1
+#define KERN_FORKSTAT_VFORK 2
+#define KERN_FORKSTAT_RFORK 3
+#define KERN_FORKSTAT_KTHREAD 4
+#define KERN_FORKSTAT_SIZFORK 5
+#define KERN_FORKSTAT_SIZVFORK 6
+#define KERN_FORKSTAT_SIZRFORK 7
+#define KERN_FORKSTAT_SIZKTHREAD 8
+#define KERN_FORKSTAT_MAXID 9
+
+#define CTL_KERN_FORKSTAT_NAMES { \
+ { 0, 0 }, \
+ { "forks", CTLTYPE_INT }, \
+ { "vforks", CTLTYPE_INT }, \
+ { "rforks", CTLTYPE_INT }, \
+ { "kthreads", CTLTYPE_INT }, \
+ { "fork_pages", CTLTYPE_INT }, \
+ { "vfork_pages", CTLTYPE_INT }, \
+ { "rfork_pages", CTLTYPE_INT }, \
+ { "kthread_pages", CTLTYPE_INT }, \
+}
#endif /* __VMMETER_H__ */