Re: how to clear dmesg outpout
Jose H. wrote: Kernel messages since a certain time and hide the hardware specs from users will be achieved the same way, suppose you have a parameter for dmesg that prints the current buffer and then clears it. I don't think it is a silly knob, in fact it may be the only knob you can have, dmesg holds messages/texts, you can print it, and you can clear it, other than that may be a silly knob. Possible uses for this ?, you bet people will find them, the whole idea of unix is to have specialized tools you can put together to do great things, in this case dmesg will be doing that has to do with kernel messages, but your approach is to relay on external mechanisms to accomplish something that dmesg can do easily, see HP-UX for example, and the fact that other important unix flavors use this knob. asking for extra knobs in openbsd will always get the same answer: saw it off! the cases where people, such as yourself, desire or require knobs have an easy enough solution: fix it yourself. it's clear that there is little to no interest in changing this based on the minimal dev replies. don't press your luck or you might get a whammy. cheers, jake Also, consider the security factor, you can hide information from users as Stuart pointed out. From my stand point it is useful and appropriate, if you have to rewrite kernel code it may otherwise.
Re: how to clear dmesg outpout
On 7/6/07, Jose H. <[EMAIL PROTECTED]> wrote: Kernel messages since a certain time and hide the hardware specs from users will be achieved the same way, suppose you have a parameter for dmesg that prints the current buffer and then clears it. I don't think it is a silly knob, in fact it may be the only knob you can have, dmesg holds messages/texts, you can print it, and you can clear it, other than that may be a silly knob. I'm failing to understand why anyone feels the hardware specs are sensitive enough to hide from anyone. Honestly. There's security that matters, and then there's make-believe not-worth-an-ounce-of-effort-to-obfuscate stuff that isn't important at all. I classify this in the latter. DS
Re: how to clear dmesg outpout
On 2007/07/06 11:12, Jose H. wrote: > Also, consider the security factor, you can hide information from users as > Stuart pointed out. that is not security, it's obscurity.
Re: how to clear dmesg outpout
Kernel messages since a certain time and hide the hardware specs from users will be achieved the same way, suppose you have a parameter for dmesg that prints the current buffer and then clears it. I don't think it is a silly knob, in fact it may be the only knob you can have, dmesg holds messages/texts, you can print it, and you can clear it, other than that may be a silly knob. Possible uses for this ?, you bet people will find them, the whole idea of unix is to have specialized tools you can put together to do great things, in this case dmesg will be doing that has to do with kernel messages, but your approach is to relay on external mechanisms to accomplish something that dmesg can do easily, see HP-UX for example, and the fact that other important unix flavors use this knob. Also, consider the security factor, you can hide information from users as Stuart pointed out. >From my stand point it is useful and appropriate, if you have to rewrite kernel code it may otherwise. On 7/5/07, Stuart Henderson <[EMAIL PROTECTED]> wrote: > > On 2007/07/05 06:42, Nick Holland wrote: > > Yes, there are benefits to looking at the change in the dmesg. I do NOT > > like the idea of CLEARING this most valuable resource, > however. Whatever > > you wish to accomplish this way can be easily accomplished in some other > > way, I think. > > The OP needs to say *what* they would like to achieve (e.g. 'only > list kernel messages since a certain time', or 'hide the hardware spec > from users'), rather than think up a possible way to do it (i.e. > 'clear dmesg output'). > > -- You should be the change that you want to see in the world. - Gandhi
Re: how to clear dmesg outpout
On 2007/07/05 06:42, Nick Holland wrote: > Yes, there are benefits to looking at the change in the dmesg. I do NOT > like the idea of CLEARING this most valuable resource, however. Whatever > you wish to accomplish this way can be easily accomplished in some other > way, I think. The OP needs to say *what* they would like to achieve (e.g. 'only list kernel messages since a certain time', or 'hide the hardware spec from users'), rather than think up a possible way to do it (i.e. 'clear dmesg output').
Re: how to clear dmesg outpout
Jose H. wrote: ... > On 7/4/07, Nick Guenther <[EMAIL PROTECTED]> wrote: ... >> Why do you need to clear the dmesg? > I think it is a pretty valid question(request?), you have to relay on > external mechanisms, like syslog, or to compare differences from previous > outputs of dmesg. and the problem with that is...? > On HP-UX dmesg has the optional parameter '-' which: > system tables overflow or the system crashes). If the - argument is > specified, dmesg computes (incrementally) the new messages since the > last time it was run and places these on the standard output. This is > typically used with cron (see cron(1)) to produce the error log > /var/adm/messages by running the command: > > On FreeBSD and Linux it can be cleared. > > I think it is a feature that can help a lot. I think not. Let's not be adding silly knobs for things that can be done better in other ways: /home/nick $ dmesg |diff -u /var/run/dmesg.boot - --- /var/run/dmesg.boot Sun Jun 24 11:17:24 2007 +++ - Wed Jul 4 22:33:35 2007 @@ -87,3 +87,9 @@ dkcsum: sd1 matches BIOS drive 0x81 root on sd0a swap on sd0b dump on sd0b WARNING: / was not properly unmounted +umass0 at uhub0 port 2 configuration 1 interface 0 +umass0: LG USB DRIVE, rev 2.00/2.00, addr 2 +umass0: using SCSI over Bulk-Only +scsibus2 at umass0: 2 targets +sd2 at scsibus2 targ 1 lun 0: SCSI2 0/direct removable +sd2: 993MB, 126 cyl, 255 head, 63 sec, 512 bytes/sec, 2034944 sec total oh, look, someone plugged in a flash disk. Yes, there are benefits to looking at the change in the dmesg. I do NOT like the idea of CLEARING this most valuable resource, however. Whatever you wish to accomplish this way can be easily accomplished in some other way, I think. Nick.
Re: how to clear dmesg outpout
Jose H. wrote: I think it is a pretty valid question(request?), you have to relay on external mechanisms, like syslog, or to compare differences from previous outputs of dmesg. Or just look at /var/run/dmesg.boot. Really, what's the point of clearing the buffer? I think it is a feature that can help a lot. Help a lot with what? --- Lars Hansson
Re: how to clear dmesg outpout
How is this any worse? On 7/4/07, Jose H. <[EMAIL PROTECTED]> wrote: I think it is a pretty valid question(request?), you have to relay on external mechanisms, like syslog, or to compare differences from previous outputs of dmesg. On HP-UX dmesg has the optional parameter '-' which: system tables overflow or the system crashes). If the - argument is specified, dmesg computes (incrementally) the new messages since the last time it was run and places these on the standard output. This is typically used with cron (see cron(1)) to produce the error log /var/adm/messages by running the command: On FreeBSD and Linux it can be cleared. I think it is a feature that can help a lot.
Re: how to clear dmesg outpout
I think it is a pretty valid question(request?), you have to relay on external mechanisms, like syslog, or to compare differences from previous outputs of dmesg. On HP-UX dmesg has the optional parameter '-' which: system tables overflow or the system crashes). If the - argument is specified, dmesg computes (incrementally) the new messages since the last time it was run and places these on the standard output. This is typically used with cron (see cron(1)) to produce the error log /var/adm/messages by running the command: On FreeBSD and Linux it can be cleared. I think it is a feature that can help a lot. On 7/4/07, Nick Guenther <[EMAIL PROTECTED]> wrote: > > On 7/4/07, smonek <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > On FreeBSD i have 'sysctl kern.msgbuf_clear' bu OpenBSD don't > > > > > > have this options > > > > > > > > > > find a clean one here: /var/run/dmesg.boot > > > > > > > > > > HTH, > > > > > > > > > > Timo > > > > > > > > This now work > > > > > > cool! :) > > sorry not work :-( > > I think what he's getting at is that there's no way to clear the dmesg > buffer, but that if you need a clean dmesg from-boot, you can open > /var/run/dmesg.boot > > Why do you need to clear the dmesg? > > -- You should be the change that you want to see in the world. - Gandhi
Re: how to clear dmesg outpout
On 7/4/07, smonek <[EMAIL PROTECTED]> wrote: > > > > > > > > On FreeBSD i have 'sysctl kern.msgbuf_clear' bu OpenBSD don't > > > > have this options > > > > > > find a clean one here: /var/run/dmesg.boot > > > > > > HTH, > > > > > > Timo > > > > This now work > > cool! :) sorry not work :-( I think what he's getting at is that there's no way to clear the dmesg buffer, but that if you need a clean dmesg from-boot, you can open /var/run/dmesg.boot Why do you need to clear the dmesg?
Re: how to clear dmesg outpout
Thus Dimitry Andric spake: smonek wrote: How to clear kern msg buffer (dmesg output ) without restart system Turn computer off. Breathe out calmly for a few minutes. Turn computer on. maybe /var/run/dmesg.boot can be of help? remember to breath...
Re: how to clear dmesg outpout
smonek wrote: > How to clear kern msg buffer (dmesg output ) without restart system Turn computer off. Breathe out calmly for a few minutes. Turn computer on.
Re: Re: how to clear dmesg outpout
WiadomoED Oryginalna Od: Timo Schoeler <[EMAIL PROTECTED]> Do: smonek <[EMAIL PROTECTED]> Data: 4 lipca 2007 16:50 Temat: Re: how to clear dmesg outpout > Thus smonek <[EMAIL PROTECTED]> spake on Wed, 04 Jul 2007 16:40:17 +0200: > > > WiadomoE D Oryginalna > > Od: Timo Schoeler <[EMAIL PROTECTED]> > > Do: smonek <[EMAIL PROTECTED]> > > Data: 4 lipca 2007 16:00 > > Temat: Re: how to clear dmesg outpout > > > > > Thus smonek <[EMAIL PROTECTED]> spake on Wed, 04 Jul 2007 15:50:52 +0200: > > > > > > > How to clear kern msg buffer (dmesg output ) without restart > > > > system > > > > > > > > > > > > On FreeBSD i have 'sysctl kern.msgbuf_clear' bu OpenBSD don't > > > > have this options > > > > > > find a clean one here: /var/run/dmesg.boot > > > > > > HTH, > > > > > > Timo > > > > This now work > > cool! :) sorry not work :-(
Re: Re: how to clear dmesg outpout
WiadomoED Oryginalna Od: Timo Schoeler <[EMAIL PROTECTED]> Do: smonek <[EMAIL PROTECTED]> Data: 4 lipca 2007 16:00 Temat: Re: how to clear dmesg outpout > Thus smonek <[EMAIL PROTECTED]> spake on Wed, 04 Jul 2007 15:50:52 +0200: > > > How to clear kern msg buffer (dmesg output ) without restart system > > > > > > On FreeBSD i have 'sysctl kern.msgbuf_clear' bu OpenBSD don't have > > this options > > find a clean one here: /var/run/dmesg.boot > > HTH, > > Timo This now work
how to clear dmesg outpout
How to clear kern msg buffer (dmesg output ) without restart system On FreeBSD i have 'sysctl kern.msgbuf_clear' bu OpenBSD don't have this options