'\" te .\" Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. .TH msgid 1M "17 May 2012" "SunOS 5.11" "System Administration Commands" .SH NAME msgid \- generate message IDs .SH SYNOPSIS .LP .nf \fB/usr/sbin/msgid\fR .fi .SH DESCRIPTION .sp .LP The \fBmsgid\fR utility generates message \fBID\fRs. .sp .LP A message \fBID\fR is a numeric identifier that uniquely identifies a message. Although the probability of two distinct messages having the same \fBID\fR is high, this can be greatly reduced with the appropriate priority or facility.level designator (see \fBsyslogd\fR(1M)). Specifically, the message \fBID\fR is a hash signature on the message's unexpanded format string, generated by \fBSTRLOG_MAKE_MSGID()\fR as defined in \fB\fR\&. .sp .LP \fBsyslogd\fR(1M) is a simple filter that takes strings as input and produces those same strings, preceded by their message \fBID\fRs, as output. Every message logged by \fBsyslogd\fR(1M) includes the message \fBID\fR. The message \fBID\fR is intended to serve as a small, language-independent identifier. .SH EXAMPLES .LP \fBExample 1 \fRUsing the msgid command to generate a message ID .sp .LP The following example uses the \fBmsgid\fR command to generate a message \fBID\fR for the \fBecho\fR command. .sp .in +2 .nf example# \fBecho hello | msgid\fR 205790 hello example# .fi .in -2 .sp .LP \fBExample 2 \fRUsing the msgid command to Generate a Message Catalog .sp .LP The following example uses the \fBmsgid\fR command to enumerate all of the messages in the binary \fBzfs\fR, on an x86 machine, to generate a message catalog. .sp .in +2 .nf example# \fBstrings /kernel/fs/amd64/zfs | msgid\fR \&... 726970 stride_hits 766819 stride_misses 929857 reclaim_successes 412490 reclaim_failures 234331 streams_resets 737841 streams_noresets 471619 bogus_streams 878613 onloan_read_buf \&... .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os .TE .SH SEE ALSO .sp .LP \fBsyslogd\fR(1M), \fBattributes\fR(5), \fBlog\fR(7D)