From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Joe Perches <joe@perches.com>
Cc: "Greg KH" <gregkh@suse.de>, "Kay Sievers" <kay.sievers@vrfy.org>,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
lf_kernel_messages@lists.linux-foundation.org,
"Andrew Morton" <akpm@linux-foundation.org>,
"Michael Holzheu" <holzheu@de.ibm.com>,
"Gerrit Huizenga" <gh@us.ibm.com>,
"Randy Dunlap" <randy.dunlap@oracle.com>,
"Jan Kara" <jack@suse.cz>, "Pavel Machek" <pavel@ucw.cz>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Jochen Voß" <jochen.voss@googlemail.com>,
"Kunai Takashi" <kunai@linux-foundation.jp>,
"Tim Bird" <tim.bird@am.sony.com>
Subject: Re: [patch 1/3] kmsg: Kernel message catalog macros.
Date: Sun, 10 Aug 2008 02:08:22 +0200 [thread overview]
Message-ID: <1218326902.14983.22.camel@localhost> (raw)
In-Reply-To: <1218124771.5882.37.camel@localhost>
On Thu, 2008-08-07 at 08:59 -0700, Joe Perches wrote:
> On Thu, 2008-08-07 at 10:31 +0200, Martin Schwidefsky wrote:
> > On Wed, 2008-08-06 at 13:07 -0700, Greg KH wrote:
> > > No, I mean use dev_printk() as the base for your logging macro. Add
> > > your message tag as the first field after the dev_printk() information.
> > Hmm, you are proposing to introduce a second format for the kmsg
> > messages to avoid the need for some more printk wrapper macros. To me it
> > seems that this has two problems:
> > 1) The message tag is for the user of the system. If it does not have a
> > fixed position it gets confusing.
>
> I think the message tag today is not useful for a user.
>
> It seems a barely useful maintainer value.
>
> Perhaps the message tag allows for run-time language
> translation and maybe a bit better selective logging.
Aehhm, .. what ? If a user does not understand a message directly
how can he NOT be interested in the kmsg tag? As a random example
consider the situation when the user gets the message
monwriter.1: Writing monitor data failed with rc=5
Usually a user will go "Huh?" except if he is a z/VM expert. Looking
at the source code won't help too much either:
static int monwrite_diag(struct monwrite_hdr *myhdr, char *buffer, int fcn)
{
struct appldata_product_id id;
int rc;
strcpy(id.prod_nr, "LNXAPPL");
id.prod_fn = myhdr->applid;
id.record_nr = myhdr->record_num;
id.version_nr = myhdr->version;
id.release_nr = myhdr->release;
id.mod_lvl = myhdr->mod_level;
rc = appldata_asm(&id, fcn, (void *) buffer, myhdr->datalen);
if (rc <= 0)
return rc;
if (rc == 5)
return -EPERM;
kmsg_err(1,"Writing monitor data failed with rc=%i\n", rc);
return -EINVAL;
}
What the user should do is to cut-copy-paste the kmsg tag monwriter.1
and pass it to man:
# man monwriter.1
What the user will then get is the man page that has been generated
from the kmsg comment with "make D=2":
--- snip
monwriter.1(9) monwriter.1(9)
Message
monwriter.1: Writing monitor data failed with rc=%i
Severity
Error
Parameters
@1: return code
Description
The monitor stream application device driver used the z/VM diagnose
call DIAG X'DC' to start writing monitor data. z/VM returned an error
and the monitor data cannot be written. If the return code is 5, your
z/VM guest virtual machine is not authorized to write monitor data.
User action
If the return code is 5, ensure that your z/VM guest virtual machine's
entry in the z/VM directory includes the OPTION APPLMON statement. For
other return codes see the section about DIAGNOSE Code X'DC' in "z/VM
CP Programming Services".
LINUX Linux Messages monwriter.1(9)
--- snip
Now the user actually gets help: the description tells him that rc=5
probably is because the virtual machine is not authorized. The key to
be able to get to the description associated to a message is the kmsg
tag.
By the way the kmsg comment for monwriter.1 is as follows just in case
you are wondering:
/*?
* Tag: monwriter.1
* Text: "Writing monitor data failed with rc=%i"
* Severity: Error
* Parameter:
* @1: return code
* Description:
* The monitor stream application device driver used the z/VM diagnose call
* DIAG X'DC' to start writing monitor data. z/VM returned an error and the
* monitor data cannot be written. If the return code is 5, your z/VM guest
* virtual machine is not authorized to write monitor data.
* User action:
* If the return code is 5, ensure that your z/VM guest virtual machine's
* entry in the z/VM directory includes the OPTION APPLMON statement.
* For other return codes see the section about DIAGNOSE Code X'DC'
* in "z/VM CP Programming Services".
*/
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2008-08-10 0:08 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 16:56 [patch 0/3] [RFC] kmsg macros and script, take x+1 Martin Schwidefsky
2008-07-30 16:56 ` [patch 1/3] kmsg: Kernel message catalog macros Martin Schwidefsky
2008-07-30 19:39 ` Greg KH
2008-07-31 8:35 ` Martin Schwidefsky
2008-07-30 22:02 ` Kay Sievers
2008-07-30 22:04 ` Greg KH
2008-07-31 9:10 ` Martin Schwidefsky
2008-08-05 22:31 ` Greg KH
2008-08-06 8:35 ` Martin Schwidefsky
2008-08-06 20:07 ` Greg KH
2008-08-07 8:31 ` Martin Schwidefsky
2008-08-07 15:59 ` Joe Perches
2008-08-10 0:08 ` Martin Schwidefsky [this message]
2008-08-16 19:36 ` Joe Perches
2008-08-17 17:27 ` Martin Schwidefsky
2008-08-07 17:01 ` Greg KH
2008-08-10 0:03 ` Martin Schwidefsky
2008-08-11 10:54 ` Jan Kara
2008-07-31 8:36 ` Martin Schwidefsky
2008-08-13 0:35 ` Tim Hockin
2008-08-14 17:04 ` Martin Schwidefsky
2008-08-14 18:50 ` Tim Hockin
2008-08-15 3:08 ` Joe Perches
2008-08-15 3:44 ` Greg KH
2008-08-15 5:33 ` Tim Hockin
2008-08-15 11:21 ` Jan Blunck
2008-08-15 15:39 ` Tim Hockin
2008-08-18 9:23 ` Pavel Machek
2008-08-18 10:39 ` Jan Kara
2008-08-18 17:51 ` Tim Hockin
2008-08-15 16:03 ` Greg KH
2008-08-15 17:03 ` Tim Hockin
2008-08-16 18:06 ` Martin Schwidefsky
2008-08-13 4:33 ` Rusty Russell
2008-08-13 7:04 ` Tim Hockin
2008-08-13 7:13 ` Pavel Machek
2008-08-13 14:50 ` Tim Hockin
2008-08-14 1:53 ` Rusty Russell
2008-08-14 15:40 ` Tim Hockin
2008-08-14 17:11 ` Martin Schwidefsky
2008-08-14 17:07 ` Martin Schwidefsky
2008-08-14 23:22 ` Rusty Russell
2008-08-16 17:49 ` Martin Schwidefsky
2008-08-16 20:40 ` Tim Hockin
2008-08-17 3:39 ` Rick Troth
2008-08-17 5:11 ` Rusty Russell
2008-08-17 17:33 ` Martin Schwidefsky
2008-08-17 17:28 ` Martin Schwidefsky
2008-08-17 17:31 ` Tim Hockin
2008-08-15 20:05 ` Rick Troth
2008-08-16 17:45 ` Martin Schwidefsky
2008-08-25 15:56 ` Martin Schwidefsky
2008-08-26 1:38 ` Rusty Russell
2008-09-01 12:28 ` Martin Schwidefsky
2008-09-02 13:34 ` Rusty Russell
2008-09-02 14:16 ` Martin Schwidefsky
2008-07-30 16:56 ` [patch 2/3] kmsg: Kernel message catalog script Martin Schwidefsky
2008-07-31 6:40 ` KOSAKI Motohiro
2008-07-31 10:23 ` Takashi Nishiie
2008-07-31 10:23 ` Takashi Nishiie
2008-08-01 11:39 ` Martin Schwidefsky
2008-07-30 16:56 ` [patch 3/3] kmsg: convert xpram messages to kmsg api Martin Schwidefsky
2008-07-30 19:43 ` Greg KH
2008-07-31 8:33 ` Martin Schwidefsky
2008-08-05 22:34 ` Greg KH
2008-08-06 8:46 ` Martin Schwidefsky
2008-08-06 8:46 ` Martin Schwidefsky
2008-08-06 20:11 ` Greg KH
2008-08-07 8:39 ` Martin Schwidefsky
2008-08-07 17:03 ` Greg KH
2008-08-04 6:48 ` Pavel Machek
2008-08-04 8:06 ` Martin Schwidefsky
[not found] ` <20080804202614.GA29170@uranus.ravnborg.org>
2008-08-05 8:03 ` [patch 0/3] [RFC] kmsg macros and script, take x+1 Martin Schwidefsky
[not found] <OF576C88F7.D38E7FE6-ONC12574B1.00547361-C12574B1.005502D2@de.ibm.com>
2008-09-01 12:30 ` [patch 1/3] kmsg: Kernel message catalog macros Martin Schwidefsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1218326902.14983.22.camel@localhost \
--to=schwidefsky@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=gh@us.ibm.com \
--cc=gregkh@suse.de \
--cc=holzheu@de.ibm.com \
--cc=jack@suse.cz \
--cc=jochen.voss@googlemail.com \
--cc=joe@perches.com \
--cc=kay.sievers@vrfy.org \
--cc=kunai@linux-foundation.jp \
--cc=lf_kernel_messages@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=randy.dunlap@oracle.com \
--cc=sam@ravnborg.org \
--cc=tim.bird@am.sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.