Do you still googling error messages?


 
Thread Tools Search this Thread
Operating Systems Linux Do you still googling error messages?
# 1  
Old 05-23-2013
Do you still googling error messages?

I am intermediate Linux user which has basic knowledge of programming (c, perl, js ...) and some system troubleshooting (strace, SystemTap, lsof ...) and I am tired of Googling the messages which comes to Linux logs (/var/log/messages). I would like to improve my Linux kernel knowledge. Since Linux (and it's utilities like ssh etc.) is open source there are source codes available somewhere. So my question is: How can I troubleshoot/debug Linux problems on source code level? Is this even possible for intermediate Linux user? Where to begin and how to improve my programming skills and Linux kernel knowledge this way? Any best practices are welcomed.

Something like this:

  1. Copy your error message
  2. Paste it to online search engine for kernel source codes which can be found *
  3. Now you have file name where it appears under kernel structures
  4. See folders and files structure contained in kernel here *
  5. You can deduce from file location what is purpose of this file under kernel, or find further documentation here *
  6. Use tool * to find further files in kernel on which your incriminated file depends
  7. Now read their source until it will be clear
  8. Now you can see under which conditions this message happens (if else statements)
  9. You can use software like * to debug or write some kind of exception to see when this message appears.

Thank you.
# 2  
Old 05-23-2013
I don't see a point looking in source code. It still won't tell you what it means, exactly.

Knowing which module is provoking the error is half the battle. If you know what it is, you can narrow down from there.
# 3  
Old 05-23-2013
Why looking into source wont tell me what is the problem? I really like this kind of explaining Tsuna's blog: The "Out of socket memory" error
where the author goes directly into the source from user perspective and also touches kernel. What do you mean by module? Is there any repository for source codes of Linux utilities/commands which I can read online, then find here the error message of program and see what causes this message? I do not have general problem just trying to improve my experiences beyond classical debugging. For example if I see something like this in messages

May 19 10:29:57 lonsha10 sshd[32373]: Closing connection to 192.168.1.1

I know that this comes from sshd so I wold like to inspect deep what causes this error/message. This can be applied also for example when you issue command and it gives you some message and you do not know what this means. My aim is to better understand system, learn some kernel hacking and C by some kind of "reverse engineering" process.
# 4  
Old 05-23-2013
I certainly see value in digging in sshd's source code.

Kernel code is unfortunately another thing again. Educating yourself on the relevant structures and conventions is an entire career. Sometimes you may luck out, often you won't be able to tell what you're looking at.
# 5  
Old 05-23-2013
So what would you recommend to starting kernel/C language newbie (hacker)?
# 6  
Old 05-23-2013
Depends what you want to do. You could start with one of the many 'write a linux device driver' tutorials you can find all over the internet, but be sure to pick a current one, an old one probably won't work with a new kernel. A better understanding of the C language than newbie would also be a plus.

And keep in mind that the environment inside the kernel is profoundly not what you're used to. Memory layout and memory management will be bizarre and inconsistent and limited and messy. You can't just open a file if you feel like it, you have to jump through many hoops. And any bugs in your code can crash or freeze your PC. All the nice things you've come to expect when programming C are things a kernel gives you, which no longer applies when building the kernel itself.
# 7  
Old 05-23-2013
If you're interested in learning kernel internals, Linux Kernel Development (3rd Edition) by Robert Love is highly regarded. It introduces key subsystems and data structures.

You may also find useful information at kernelnewbies.org

Regards,
Alister
This User Gave Thanks to alister For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SuSE

Some error messages in var/log/messages

How are you? SUSE V10 and 11. In /var/log/messages I see these lines in some servers. I'd like to know what causes these errors and how to fix them. Thank you, error: PAM: Authentication failure for root from XXXXXXXX Did not receive identification string from XXXXXXX Invalid user suse-gm... (2 Replies)
Discussion started by: JDBA
2 Replies

2. AIX

Error messages in syslog

Hi, Can you please look into the below errors from syslog in AIX? And let me know is this a issue? How can I avoid these errors with out affecting my LPAR. Detail Data SYSLOG MESSAGE <27>Aug 23 08:24:28 syslog: slp: 0660-084 The SA failed to decode and compute received message:... (0 Replies)
Discussion started by: System Admin 77
0 Replies

3. Shell Programming and Scripting

Appending error messages from log file next to the corresponding error record

Hi Everyone, I have an issue and trying to get a solution but was not succesful yet. Any help is greatly appreciated. I am using ksh to inoke sql loader to load data from txt file into two oracle tables based on the condition written in the control file. If an error occurs while loading into... (8 Replies)
Discussion started by: vpv0002
8 Replies

4. UNIX for Dummies Questions & Answers

WHat do these error messages mean

New to UNIX. I saw these messages in my logs. What do they mean? What is a forward and reverse map? Unable to add forward map from Rogers.ga.com to 205.150.86.252: timed out unable to add reverse map from 241.86.150.205.in-addr.arpa. to FFXXB2RNHR71.NA.XOM.COM: timed out (2 Replies)
Discussion started by: mojoman
2 Replies

5. Shell Programming and Scripting

ftp error messages!

Please see the below script- ftp $FTPREMOTESERVER prompt mput $DATAPATH/*.dat quit | ftp -in > FTPRETURNMSGLOGFILE # iam trying write the eroor messages inside a file when the ftp quits. Based on the above script te ftp is properly working but writing into the file wen ftp quits is nor... (1 Reply)
Discussion started by: dineshr85
1 Replies

6. Solaris

error messages

dear all i have the following error in messages in solaris server named devweb does any one can help me about the error the disk devapp connect by nfs to another server called devdb : Oct 10 09:55:41 devweb nfs: WARNING: NFSMAPID_DOMAIN does not match the server: devdb domain. Oct 10... (0 Replies)
Discussion started by: murad.jaber
0 Replies

7. UNIX for Advanced & Expert Users

error messages in /var/adm/messages

Hi, I have a SunFire V490, Solaris 10 with XP1024 storage and HP Library. I have noticed the following error messages in the /var/adm/messages file. These errors are being generated constantly. Also commands like devfsadm, format cfgadm etc are getting hung. After a reboot it works fine for a... (1 Reply)
Discussion started by: nitinp82
1 Replies

8. UNIX for Dummies Questions & Answers

Error Messages

I have got script like this #!/bin/ksh -e function errtrap { es=$? print "ERROR line $1: Command exited with status $es." ... (1 Reply)
Discussion started by: akrathi
1 Replies

9. UNIX for Advanced & Expert Users

System Error messages

Hi Experts, I'm getting the following errors on /var/adm/messages file permanently. Dec 28 10:19:38 ioocsrv1 bsd-gw: open(dfA415ioocsrv3): File exists Dec 28 10:20:53 ioocsrv1 bsd-gw: open(dfA415ioocsrv3): File exists Dec 28 10:22:08 ioocsrv1 bsd-gw: open(dfA415ioocsrv3): File exists Dec... (1 Reply)
Discussion started by: nikk
1 Replies

10. UNIX for Dummies Questions & Answers

error messages

Dear Guys , AM using linux R.H 6.1 , I configured sendmail , when i update the alias file , i keep getting the following message : " Warning: .cf file is out of date: sendmail 8.11.6 supports version 9, .cf file is version 8 " so what does it mean , even though .cf file is not empty or... (1 Reply)
Discussion started by: tamemi
1 Replies
Login or Register to Ask a Question