List of dmesg Error Codes
Does anyone know where I can find a list of most or all possbile error codes that are displayed in dmesg?
I am working on a server verification script to run after we apply patches to systems and I want to be able to automatically detect and log all errors in dmesg without haveing to actually read it. Thanks, Jared |
Hmm, not sure if such a thing exists. I think each module or component writes its own messages in its own formats. Most of them don't seem to have the kind of error codes that could be looked up in a list or used to drive automation.
What are you trying to do in the verification scripts? dmesg pretty much is "automatically detect and log all errors". I assume you want to get alerts to another system for error conditions? |
Well after we apply patched/updates we always scan dmesg to see if there are bad config options, failed hardware messages, segfaults, etc. So I am just trying to cut out the time it takes to read all of the dmesg manually and just write anything suspicious found to a log I have. Eventually I will also do the same thing for other system logs such as /var/log/messages and things. But as of now dmesg is the hardest one to find issues with. So I want to get it knocked out first.
Essentially I have a script now that remotely checks a node to gather infomation about the health of the machine and writes it to a local log. The after it gets that information it displays dmesg and /var/log/messages for manual review. I want to be able to completely automate it so I can execute the script and jsut read the local log only. |
Here is an example of what I am trying to do
Sample dmesg stores as /tmp/dmesg.fake Code:
time.c: can't update CMOS clock from 9 to 55 Code:
#!/bin/bash Code:
$ ./parse_dmesg.sh fake Code:
time.c: can't update CMOS clock from 9 to 55 |
Well I would do it with regular expressions (in Perl or Python) not plain string matches ... but still I think you are going to have to cook up your own list of warning matches. I'm not aware of any general standards for errors in dmesg.
Anyone else? |
I'm pretty sure there's no std; get yourself a good thesaurus eg http://thesaurus.com/ and lookup words like "don't", "can't", "fail", "bad" & friends ...
Good luck, you're going to need it ... You could try homing in on words related to whatever you just changed ... |
All times are GMT -5. The time now is 05:56 PM. |