- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- dmesg timestamp; msgbuf
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
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
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
12-10-2018 02:22 PM
12-10-2018 02:22 PM
dmesg timestamp; msgbuf
Hello,
1. Is msgbuf file content is identical to the output of dmesg ?
2. how can I add timestamp to dmesgbuf ?
3. how /var/adm/msgbuf is created? I have this file in one server but missing on ther other
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2018 11:49 PM
12-10-2018 11:49 PM
Re: dmesg timestamp; msgbuf
dmesg is an in-core buffer kept by the kernel and also a command which will always report everything when you run it *UNLESS* you use the - option (I know, it's hard to see). This option is designed to keep a cumulative log and an example using cron is available in /usr/newconfig, but it looks like this:
00,10,20,30,40,50 * * * * /usr/sbin/dmesg - >> /var/adm/messages
Be sure you use the - flag. This makes dmesg scan the buffer for new info and if none is found, nothing is reported. Otherwise a timestamp is added to the file and the newest contents from dmesg is added.
Actually, I prefer /var/adm/dmesg.log rather than "messages" since it makes more sense.
Like this:
00,10,20,30,40,50 * * * * /usr/sbin/dmesg - >> /var/adm/dmesg.log
The msgbuf is a scratch file used by the "-" option and should not be touched.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2018 01:54 PM
12-26-2018 01:54 PM
Re: dmesg timestamp; msgbuf
Bill, thank you so much for your response.
Is msgbuf file is created by the system itself? Because I did not have msgbuf file until I ran dmesg command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2018 02:03 PM
12-26-2018 02:03 PM
Re: dmesg timestamp; msgbuf
Bill Hassell, sysadmin