- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Dmesg and Syslog
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
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
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
тАО06-16-2006 04:52 AM
тАО06-16-2006 04:52 AM
As I understand the dmesg command refers the system diagnostics message buffer. Syslog is destination of log messages for most of the system entities running on the system.
Does someone know, the difference between these two as far the logging of all kind messages are concerned? Is there something which only appears in dmesg but not in syslog or vice versa ?
If everything appears in syslog which dmesg can see, then why dmesg is used?
Is it possible to access the dmesg buffer and syslog buffer through a C code?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 05:07 AM
тАО06-16-2006 05:07 AM
Re: Dmesg and Syslog
Check the man pages for dmesg and syslogd for details.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 05:15 AM
тАО06-16-2006 05:15 AM
SolutionYes, 'dmesg' is a finite (small!) circular buffer used to receive system diagnostic messages like LVM path switches, etc.
You will indeed see the contents of 'dmesg' within '/var/adm/syslog/syslog.log'. While the dmesg buffer is small and circular, its value lies in being quickly able to peek at "important" events.
Insofar as the 'syslog' is concerned, you can add to it from a shell script with 'logger'. From a C program your interface comes in the form of 'syslog()'. See the manpages for 'logger(1)' and 'syslog(3C)' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 05:24 AM
тАО06-16-2006 05:24 AM
Re: Dmesg and Syslog
You can certainly use C to access dmesg with nothing more complicated than:
FILE *f = NULL;
f = popen("dmesg","r");
There is a function, syslog, to allow you to write to syslog. Man 3 syslog for details. Because syslog is simply a text file, you can fopen() /var/adm/syslog/syslog.log and read it to your heart's content.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2006 07:52 AM
тАО09-22-2006 07:52 AM
Re: Dmesg and Syslog
Now I know where from "dmesg" pick up the data.