Print this page
13178 ::msgbuf could see more than 8KB of logs
Reviewed by: Andy Fiddaman <Andy@omniosce.org>
Reviewed by: Toomas Soome <tsoome@me.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/log.h
+++ new/usr/src/uts/common/sys/log.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
23 23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 28 /* All Rights Reserved */
29 29
30 30 #ifndef _SYS_LOG_H
31 31 #define _SYS_LOG_H
32 32
33 -#pragma ident "%Z%%M% %I% %E% SMI"
34 -
35 33 #include <sys/types.h>
36 34 #include <sys/strlog.h>
37 35 #include <sys/stream.h>
38 36
39 37 #ifdef __cplusplus
40 38 extern "C" {
41 39 #endif
42 40
43 41 #define LOG_CONSMIN 0 /* /dev/conslog minor */
44 42 #define LOG_LOGMIN 5 /* /dev/log minor */
45 43 #define LOG_BACKLOG LOG_LOGMIN /* console backlog queue */
46 44
47 45 #define LOG_LOGMINIDX 0 /* index of smallest /dev/log clone */
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
48 46 #define LOG_LOGMAXIDX 15 /* up to 16 /dev/log clones */
49 47 #define LOG_NUMCLONES (LOG_LOGMAXIDX - LOG_LOGMINIDX + 1)
50 48
51 49 #define LOG_MID 44 /* module ID */
52 50 #define LOG_MINPS 0 /* min packet size */
53 51 #define LOG_MAXPS 1024 /* max packet size */
54 52 #define LOG_LOWAT 2048 /* threshold for backenable */
55 53 #define LOG_HIWAT 1048576 /* threshold for tossing messages */
56 54
57 55 #define LOG_MAGIC 0xf00d4109U /* "food for log" - unsent msg magic */
58 -#define LOG_RECENTSIZE 8192 /* queue of most recent messages */
56 +#define LOG_RECENTSIZE 65536 /* queue of most recent messages */
59 57 #define LOG_MINFREE 4096 /* message cache low water mark */
60 58 #define LOG_MAXFREE 8192 /* message cache high water mark */
61 59
62 60 typedef struct log log_t;
63 61 typedef int (log_filter_t)(log_t *, log_ctl_t *);
64 62
65 63 struct log {
66 64 queue_t *log_q; /* message queue */
67 65 log_filter_t *log_wanted; /* message filter */
68 66 mblk_t *log_data; /* parameters for filter */
69 67 uint16_t log_flags; /* message type (e.g. SL_CONSOLE) */
70 68 short log_inuse; /* is this log device open? */
71 69 int log_overflow; /* messages lost due to QFULL */
72 70 zoneid_t log_zoneid; /* zone id of log */
73 71 major_t log_major; /* device type */
74 72 minor_t log_minor; /* minor number of associated device */
75 73 };
76 74
77 75 /* Array of /dev/log minor devices */
78 76 typedef struct log_zone {
79 77 log_t lz_clones[LOG_NUMCLONES];
80 78 uint16_t lz_active; /* active types (OR of all log_flags fields) */
81 79 } log_zone_t;
82 80
83 81 #define LOG_MSGSIZE 200
84 82
85 83 typedef struct log_dump {
86 84 uint32_t ld_magic; /* LOG_MAGIC */
87 85 uint32_t ld_msgsize; /* MBLKL(mp->b_cont) */
88 86 uint32_t ld_csum; /* checksum32(log_ctl) */
89 87 uint32_t ld_msum; /* checksum32(message text) */
90 88 /*
91 89 * log_ctl and message text follow here -- see dump_messages()
92 90 */
93 91 } log_dump_t;
94 92
95 93 #ifdef _KERNEL
96 94
97 95 /* global zone variables */
98 96 extern log_zone_t log_global;
99 97 extern queue_t *log_consq; /* primary console reader queue */
100 98 extern queue_t *log_backlogq; /* console backlog queue */
101 99 extern queue_t *log_intrq; /* pending high-level interrupt message queue */
102 100
103 101 extern log_filter_t log_error;
104 102 extern log_filter_t log_trace;
105 103 extern log_filter_t log_console;
106 104
107 105 extern void log_init(void);
108 106 extern void log_enter(void);
109 107 extern void log_exit(void);
110 108 extern void log_update(log_t *, queue_t *, short, log_filter_t);
111 109 extern mblk_t *log_makemsg(int, int, int, int, int, void *, size_t, int);
112 110 extern void log_freemsg(mblk_t *);
113 111 extern void log_sendmsg(mblk_t *, zoneid_t);
114 112 extern void log_flushq(queue_t *);
115 113 extern void log_printq(queue_t *);
116 114 extern log_t *log_alloc(minor_t);
117 115 extern void log_free(log_t *);
118 116
119 117 #endif /* _KERNEL */
120 118
121 119 #ifdef __cplusplus
122 120 }
123 121 #endif
124 122
125 123 #endif /* _SYS_LOG_H */
↓ open down ↓ |
57 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX