Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man8 / msgid.8
blob8c14b80bd400c08c87551377f56a1f24e7949604
1 '\" te
2 .\" Copyright (c) 2000, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH MSGID 8 "Oct 9, 1998"
7 .SH NAME
8 msgid \- generate message IDs
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/msgid\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBmsgid\fR utility generates message \fBID\fRs.
19 .sp
20 .LP
21 A message \fBID\fR is a numeric identifier that uniquely identifies a message.
22 Although the probability of two distinct messages having the same \fBID\fR is
23 high, this can be greatly reduced with the appropriate priority or
24 facility.level designator (see \fBsyslogd\fR(8)). Specifically, the message
25 \fBID\fR is a hash signature on the message's unexpanded format string,
26 generated by \fBSTRLOG_MAKE_MSGID()\fR as defined in \fB<sys/strlog.h>\fR\&.
27 .sp
28 .LP
29 \fBsyslogd\fR(8) is a simple filter that takes strings as input and produces
30 those same strings, preceded by their message \fBID\fRs, as output. Every
31 message logged by \fBsyslogd\fR(8) includes the message \fBID\fR. The message
32 \fBID\fR is intended to serve as a small, language-independent identifier.
33 .SH EXAMPLES
34 .LP
35 \fBExample 1 \fRUsing the msgid command to generate a message ID
36 .sp
37 .LP
38 The following example uses the \fBmsgid\fR command to generate a message
39 \fBID\fR for the \fBecho\fR command.
41 .sp
42 .in +2
43 .nf
44 example# \fBecho hello | msgid\fR205790 hello
45 .fi
46 .in -2
47 .sp
49 .LP
50 \fBExample 2 \fRUsing the msgid command to generate a message catalog
51 .sp
52 .LP
53 The following example uses the \fBmsgid\fR command to enumerate all of the
54 messages in the binary \fBufs\fR, to generate a message catalog.
56 .sp
57 .in +2
58 .nf
59 example# \fBstrings /kernel/fs/ufs | msgid\fR
61 137713 free:
62     freeing free frag, dev:0x%lx, blk:%ld, cg:%d, ino:%lu, fs:%s
63 567420 ialloccg: block not in mapfs = %s
64 845546 alloc: %s: file system full
65 \&...
66 .fi
67 .in -2
68 .sp
70 .SH SEE ALSO
71 .sp
72 .LP
73 \fBsyslogd\fR(8), \fBattributes\fR(5), \fBlog\fR(7d)