<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: way to clear dmesg content (or add lines) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627484#M40248</link>
    <description>If you still have a problem/question, then can you please re-explain it, because I do not understand the problem/question.&lt;BR /&gt;&lt;BR /&gt;As to your:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I was considering doing that James, and it is the best option so far,&lt;BR /&gt;&lt;BR /&gt;It is not only the best option, it is the only correct/documented option. See the dmesg(1M) manual page (and root's default crontab).&lt;BR /&gt;&lt;BR /&gt;If you want to know *why* the system message buffer / dmesg work in this 'strange'/'difficult' way, then let me know and I will explain.</description>
    <pubDate>Thu, 13 Dec 2001 14:27:25 GMT</pubDate>
    <dc:creator>Frank Slootweg</dc:creator>
    <dc:date>2001-12-13T14:27:25Z</dc:date>
    <item>
      <title>way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627477#M40241</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;is there a way to clear the dmesg.. or add lines to it?&lt;BR /&gt;&lt;BR /&gt;For example, here is a c file that'll create syslog warnings.&lt;BR /&gt;&lt;BR /&gt;Is there any recommendation of how and what kind of problems go into these logs?&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Bill&lt;BR /&gt;&lt;BR /&gt;logsys.c&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include "/usr/include/syslog.h"&lt;BR /&gt;&lt;BR /&gt;/* man 3 syslog */&lt;BR /&gt;/* see /etc/syslog.conf for log redirection administration */&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;syslog(LOG_INFO,    "process          &amp;gt;  severity     &amp;lt; message ");&lt;BR /&gt; syslog(LOG_INFO,    "---------------- &amp;gt; ------------ &amp;lt; --------");&lt;BR /&gt;/*    set the PID  */&lt;BR /&gt; openlog("myprogram : pid &amp;gt;",LOG_PID|LOG_CONS|LOG_NDELAY, LOG_DAEMON);&lt;BR /&gt; syslog(LOG_ALERT,   "&amp;gt; LOG_ALERT:   &amp;lt; alert message");&lt;BR /&gt; syslog(LOG_EMERG,   "&amp;gt; LOG_EMERG:   &amp;lt; emergency message");&lt;BR /&gt; syslog(LOG_CRIT,    "&amp;gt; LOG_CRIT:    &amp;lt; critical message");&lt;BR /&gt; syslog(LOG_ERR,     "&amp;gt; LOG_ERR:     &amp;lt; error message");&lt;BR /&gt; syslog(LOG_WARNING, "&amp;gt; LOG_WARNING: &amp;lt; warning message");&lt;BR /&gt; syslog(LOG_NOTICE,  "&amp;gt; LOG_NOTICE:  &amp;lt; notice message");&lt;BR /&gt; syslog(LOG_INFO,    "&amp;gt; LOG_INFO:    &amp;lt; info message");&lt;BR /&gt; syslog(LOG_DEBUG,   "&amp;gt; LOG_DEBUG:   &amp;lt; debug message");&lt;BR /&gt; syslog(LOG_DEBUG,   "&amp;gt; LOG_DEBUG:   &amp;lt; debug message");&lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;BR /&gt;~&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Fri, 07 Dec 2001 13:29:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627477#M40241</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2001-12-07T13:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627478#M40242</link>
      <description>Not sure Bill but the following may be worth a note .....&lt;BR /&gt;&lt;BR /&gt;PHKL_25493               &lt;BR /&gt;s700_800 11.11 syslog and console data handling improved &lt;BR /&gt;Document Information Table &lt;BR /&gt;&lt;BR /&gt;Patch Name: PHKL_25493&lt;BR /&gt;&lt;BR /&gt;Patch Description: s700_800 11.11 syslog and console data handling improved&lt;BR /&gt;&lt;BR /&gt;Creation Date: 01/10/19&lt;BR /&gt;&lt;BR /&gt;Post Date:  01/10/30&lt;BR /&gt;&lt;BR /&gt;Hardware Platforms - OS Releases:&lt;BR /&gt;        s700: 11.11&lt;BR /&gt;        s800: 11.11&lt;BR /&gt;&lt;BR /&gt;Products: N/A&lt;BR /&gt;&lt;BR /&gt;Filesets:&lt;BR /&gt;        OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP&lt;BR /&gt;        OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP&lt;BR /&gt;&lt;BR /&gt;Automatic Reboot?: Yes&lt;BR /&gt;&lt;BR /&gt;Status: General Release&lt;BR /&gt;&lt;BR /&gt;Critical: No&lt;BR /&gt;&lt;BR /&gt;Category Tags:&lt;BR /&gt;        defect_repair general_release&lt;BR /&gt;&lt;BR /&gt;Path Name: /hp-ux_patches/s700_800/11.X/PHKL_25493&lt;BR /&gt;&lt;BR /&gt;Symptoms:&lt;BR /&gt;        PHKL_25493:&lt;BR /&gt;        ( SR: [8606196155/STARS-ACTIVE/English]  CR:JAGad65359 )&lt;BR /&gt;        Missing console and/or syslog data when vmunix tries to&lt;BR /&gt;        print more than 4 kilobytes of information at boot time.&lt;BR /&gt;        Possible side effects include:&lt;BR /&gt;         * The console repeats 4k worth of data -- up to 16 times&lt;BR /&gt;         * The "dmesg" command returns information that was&lt;BR /&gt;           printed prior to the first vmunix entry in syslog.log&lt;BR /&gt;         * Important boot time messages may be lost.&lt;BR /&gt;&lt;BR /&gt;Defect Description:&lt;BR /&gt;        PHKL_25493:&lt;BR /&gt;        ( SR: [8606196155/STARS-ACTIVE/English]  CR:JAGad65359 )&lt;BR /&gt;        The old system message buffer was too small, and several&lt;BR /&gt;        defects appeared when it overflowed. (Having a large&lt;BR /&gt;        number of IO devices could trigger a buffer overflow.)&lt;BR /&gt;&lt;BR /&gt;        Resolution:&lt;BR /&gt;        1) Increased the size of the system message buffer.&lt;BR /&gt;        2) Solved the defects by using a cleaner implementation.&lt;BR /&gt;        3) Maintained full compatibility with dmesg.&lt;BR /&gt;&lt;BR /&gt;11.00 equiv : PHKL_25352</description>
      <pubDate>Fri, 07 Dec 2001 13:45:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627478#M40242</guid>
      <dc:creator>Alex Glennie</dc:creator>
      <dc:date>2001-12-07T13:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627479#M40243</link>
      <description>Bill&lt;BR /&gt;&lt;BR /&gt;This has always been a bone of contention with me. Dmegs while it's useful also doesn't have a date/time stamp to say what's recent or not. The file has a time stamp on it but the contents do not, so you have to play detective and decipher what's recent and what's not. &lt;BR /&gt;&lt;BR /&gt;I know this doesn't solve the question at hand but I just wanted to get this out there.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 07 Dec 2001 13:48:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627479#M40243</guid>
      <dc:creator>fg_1</dc:creator>
      <dc:date>2001-12-07T13:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627480#M40244</link>
      <description>Hi Bill:&lt;BR /&gt;&lt;BR /&gt;If you create a crontab entry that runs every 10-minutes, and looks like:&lt;BR /&gt;&lt;BR /&gt;/usr/sbin/dmesg - &amp;gt;&amp;gt; /var/adm/messages&lt;BR /&gt;&lt;BR /&gt;...then you can capture diagnostic messages accumulated in the dmesg buffer.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 07 Dec 2001 13:49:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627480#M40244</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-12-07T13:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627481#M40245</link>
      <description>I was considering doing that James, and it is the best option so far,&lt;BR /&gt;&lt;BR /&gt;I suppose I would write some kind of driver program (like at hp.com/go/developer) and add printfs (as described in the driver quick and dirty debugging) but it seems like a hell of a lot of work!&lt;BR /&gt;&lt;BR /&gt;Bill</description>
      <pubDate>Fri, 07 Dec 2001 13:52:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627481#M40245</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2001-12-07T13:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627482#M40246</link>
      <description>Sorry it's go/developers&lt;BR /&gt;&lt;BR /&gt;or the direct link..&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/dspp/home/home_HomePage_IDX/1,1292,,00.html" target="_blank"&gt;http://h21007.www2.hp.com/dspp/home/home_HomePage_IDX/1,1292,,00.html&lt;/A&gt;</description>
      <pubDate>Fri, 07 Dec 2001 13:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627482#M40246</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2001-12-07T13:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627483#M40247</link>
      <description>Hi Bill,&lt;BR /&gt;&lt;BR /&gt;I assumed you were questioning how to clear the system buffer dmesg uses.  I dunno.  But as far as logging goes and to add to James's suggestion:&lt;BR /&gt;&lt;BR /&gt;date&amp;gt;&amp;gt;/var/adm/messages;/usr/sbin/dmesg - &amp;gt;&amp;gt;/var/adm/messages&lt;BR /&gt;&lt;BR /&gt;At least you'd have some idea of when things happened although you should be getting a lot of date entries without anything from dmesg - but that's a good thing.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Fri, 07 Dec 2001 14:17:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627483#M40247</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-12-07T14:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627484#M40248</link>
      <description>If you still have a problem/question, then can you please re-explain it, because I do not understand the problem/question.&lt;BR /&gt;&lt;BR /&gt;As to your:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I was considering doing that James, and it is the best option so far,&lt;BR /&gt;&lt;BR /&gt;It is not only the best option, it is the only correct/documented option. See the dmesg(1M) manual page (and root's default crontab).&lt;BR /&gt;&lt;BR /&gt;If you want to know *why* the system message buffer / dmesg work in this 'strange'/'difficult' way, then let me know and I will explain.</description>
      <pubDate>Thu, 13 Dec 2001 14:27:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627484#M40248</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2001-12-13T14:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627485#M40249</link>
      <description>go for it Frank!&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Bill</description>
      <pubDate>Tue, 15 Jan 2002 10:13:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627485#M40249</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2002-01-15T10:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: way to clear dmesg content (or add lines)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627486#M40250</link>
      <description>Wow! It is over a month ago and you expect me to *remember* this stuff? :-)&lt;BR /&gt;&lt;BR /&gt;Well, the system message buffer / dmesg work in this 'strange'/'difficult' way, because when the 'kernel', i.e. also the drivers, have a problem to report, they can not expect the disk, filesystem, etc. to work. So they know there is a problem, but can not, at least not directly, log it to a disk file. So instead, they report it in 'the system message buffer', which is a circular FIFO (first-in, first-out)part of main memory (RAM). They *also* (try to) report the error on the system console.&lt;BR /&gt;&lt;BR /&gt;So now the kernel's/driver's job is done, but the user is probably still unaware (unless he has seen the message on the console).&lt;BR /&gt;&lt;BR /&gt;The job of dmesg is to 'empty' the system message buffer to a logfile on this. Therefor dmesg keeps a copy of the old (i.e. previous dmesg run) content of the system message buffer in a disk file, compares the new content to it, and appends the difference to the logfile. See the dmesg(1M) manual page for details about this part.&lt;BR /&gt;&lt;BR /&gt;So in short:&lt;BR /&gt;- 'kernel' problems are always reported in the system message buffer.&lt;BR /&gt;- If the console is functioning, they are also reported on the system console.&lt;BR /&gt;- If the filesystem, cron and dmesg are functioning (and dmesg is properly configured), dmesg will log the problems to the designated logfile.&lt;BR /&gt;&lt;BR /&gt;"Elementary, dear Watson!" :-)</description>
      <pubDate>Tue, 15 Jan 2002 11:17:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/way-to-clear-dmesg-content-or-add-lines/m-p/2627486#M40250</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2002-01-15T11:17:56Z</dc:date>
    </item>
  </channel>
</rss>

