- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Is there anyway to refresh dmesg output?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 11:42 PM
08-22-2002 11:42 PM
Is there anyway to refresh dmesg output?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 11:50 PM
08-22-2002 11:50 PM
Re: Is there anyway to refresh dmesg output?
you can use dmesg -
See quote from man below:
dmesg looks in a system buffer for recently printed diagnostic
messages and prints them on the standard output. The messages are
those printed by the system when unusual events occur (such as when
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:
/usr/sbin/dmesg - >> /var/adm/messages
every 10 minutes.
Hope this helps!
Best Regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 11:57 PM
08-22-2002 11:57 PM
Re: Is there anyway to refresh dmesg output?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 12:02 AM
08-23-2002 12:02 AM
Re: Is there anyway to refresh dmesg output?
There is no command options available in the unix to refresh the dmesg command automatically as we do in sar, vmstat, iostat.
But you can write a small shell script with the command dmesg and run it in cron for the respective interval
The script can look like below
#!/bin/sh
#Beginning of script
echo "##################################" >> /tmp/dmesg.loh
dmesg -c >>/tmp/dmesg.log
echo "##################################" >> /tmp/dmesg.log
# End of script
Name the script as some "xyz.sh" and add the script name in crontab ( Command is crontab-e)
30 * * * * * /xyz.sh
Regds
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 12:06 AM
08-23-2002 12:06 AM
Re: Is there anyway to refresh dmesg output?
dmesg -c will clear the buffer content and hope the above would have solved your queries
Regds
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 12:43 AM
08-23-2002 12:43 AM
Re: Is there anyway to refresh dmesg output?
I tried "dmesg -c"! Does not seem to work!
============================================================
# dmesg -c
# dmesg
Aug 23 12:45
vuseg=52fd000
inet_clts:ok inet_cots:ok 8 ccio
10 ccio
10/0 c720
10/0.1 tgt
10/0.1.0 sdisk
10/0.1.1 sdisk
10/0.1.2 sdisk
10/0.1.3 sdisk
10/0.1.4 sdisk
10/0.3 tgt
10/0.3.0 sdisk
10/0.4 tgt
10/0.4.0 sdisk
10/0.5 tgt
10/0.5.0 sdisk
10/0.6 tgt
10/0.6.0 sdisk
10/0.7 tgt
10/0.7.0 sctl
10/4 bc
10/4/0 mux2
10/4/4 btlan1
10/4/8 btlan1
10/4/16 scsi3
10/4/16.0 target
10/4/16.0.0 disc3
10/4/16.0.1 disc3
10/4/16.0.2 disc3
10/4/16.0.3 disc3
10/4/16.0.4 disc3
10/8 GSCtoPCI
10/8/1/0 gelan
10/12 bus_adapter
10/12/5 c720
10/12/5.0 tgt
10/12/5.0.0 stape
10/12/5.2 tgt
10/12/5.2.0 sdisk
10/12/5.7 tgt
10/12/5.7.0 sctl
10/12/6 lan2
10/12/0 CentIf
ps2_readbyte_timeout: no byte after 500 uSec
ps2_readbyte_timeout: no byte after 500 uSec
10/12/7 ps2
32 processor
34 processor
49 memory
btlan1: Initializing 10/100BASE-T card at 10/4/4.......
btlan1: NOTE: Hub/Switch does not support autonegotiation.
btlan1: NOTE: 100Base-TX started.
btlan1: Initializing 10/100BASE-T card at 10/4/8.......
btlan1: NOTE: Hub/Switch does not support autonegotiation.
btlan1: NOTE: 100Base-TX started.
Networking memory for fragment reassembly is restricted to 80572416 bytes
Logical volume 64, 0x3 configured as ROOT
Logical volume 64, 0x2 configured as SWAP
Logical volume 64, 0x2 configured as DUMP
Swap device table: (start & size given in 512-byte blocks)
entry 0 - major is 64, minor is 0x2; start = 0, size = 1048576
WARNING: Insufficient space on dump device to save full crashdump.
Only 536870912 of 939516928 bytes will be saved.
Dump device table: (start & size given in 1-Kbyte blocks)
entry 0 - major is 31, minor is 0x6000; start = 52064, size = 524288
netisr real-time priority reset to 100
Starting the STREAMS daemons.
9245XB HP-UX (B.10.20) #1: Sun Jun 9 06:31:19 PDT 1996
Memory Information:
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 917496 Kbytes, lockable: 668644 Kbytes, available: 770436 Kbytes
#
============================================================
Regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 12:55 AM
08-23-2002 12:55 AM
Re: Is there anyway to refresh dmesg output?
There is a workaround i found for this.
There is a file by name msg.buf which is used by dmesg.
You can do a null input on that file and run dmseg -c to get a refreshed output
#> /var/adm/msg.buf
#dmesg -
Willl be useful
Regds
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 03:22 AM
08-23-2002 03:22 AM
Re: Is there anyway to refresh dmesg output?
If the question is how to make dmesg to not generate old information, *whatever* you do, then that is not possible.
dmesg processes the system message buffer which is is a FIFO buffer in memory. Whatever you do "dmesg" (*without* the "-" option) will always display the old information in the system message buffer.