Peppermint | Linux OS Community Forum
It is currently Fri Jun 05, 2020 8:09 am

All times are UTC - 5 hours [ DST ]

Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Debugging 101
PostPosted: Wed Jun 15, 2011 1:43 pm 
User avatar

Joined: Thu Jun 24, 2010 5:37 am
Posts: 59
Location: UK
Dealing with problems can be remarkably frustrating - especially when you don't understand the lingo sufficiently to be able to either describe the problem correctly, or respond to requests for further information; so my aim here is to try and give you an insight into how I solve problems.

Asking for help

A cry I so often here (and see in the forums) is "it doesn't work". or equally useless is the "So whats the current thinking/opinion/workaround for X". In both cases I would have to respond with a request for more information which means it's just not going to happen.

On the other hand; "I have this problem with X. It does Y, it should be doing Z. I've read the man pages and associated help files, and I've searched Google". Ideal! There will be plenty of people how are feeling up to the challenge.

Be able to reproduce the problem

You have a problem - you must be able to reproduce it. But, make it *easy* to reproduce. If I'm to help (or indeed almost anybody else) we may well be busy and don't really want to setup a highly complex environment in order to reproduce something. You need a provable test case - something that always breaks. Ideally you also need to know what *should* happen. While I may use Peppermint, I definitely don't have your hardware, so I may not be able to reproduce the problem in the same way; software will also be a common stumbling point as I've almost certainly not got whatever it is installed.

Get any relevant error messages

(See the footnote for command line help)

There is a number of ways of getting formation out of the system. First is to simply try the command in a terminal. For example:
[vash@pepper]$ pcmanfm
(pcmanfm:1140): Gtk-CRITICAL **: gtk_list_store_iter_next: assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed
You wouldn't see that error of you ran the file-manager the normal way!

You can save this error report by copying and pasting the text into an editor or using the shell's redirection facilities:
[vash@pepper]$ pcmanfm 2&> ~/errors.txt
Next, look at ~/.xsession-errors:
[vash@pepper]$ less ~/.xsession-errors
and scroll down to the bottom (arrow keys, page-up/down, q to quit).

Next, there is a lot of log files in /var/log. I tend to use:
[vash@pepper]$ ls -lart /var/log
which will list out the files in order they were last modified (most recent at the bottom). You can then use less (as before) to examine the last few files for anything suspicious.

Finally, the big one:
[vash@pepper]$ dmesg | less
Again, scroll down looking for anything relevant to your problem, although this one is often more connected with hardware problems - it still may bear relevance however, so never discount it.

You can save the contents of the dmesg to a file for later editing / uploading with:
[vash@pepper]$ dmesg > ~/dmesg.txt
Now you will more than likely also need to provide a little bit of information about your machine, again there are a number of ways of doing this; some good, some bad.
[vash@pepper]$ lsmod
[vash@pepper]$ lspci -vv
[root@pepper]$ lshw
[vash@pepper]$ lscpu
[vash@pepper]$ inxi -F
Note that `lshw` should be run as root.

These will provide a lot of information, a lot of which is irrelevant, so don't paste it all! At the same time the output of inxi -F is not really that impressive. You can find more information about these and what type of data they return with:
[vash@pepper]$ man lspci
for example.

Remember, the output of the these commands is lengthy, and complex. Don't expect to understand everything you see first time. I've been working with machines for years, and I still don't fully understand al that I see, but I know enough to ignore a lot of the dross and narrow the problem down.

Provding error reports and screen shots

Use a pastebin ( or any of the hundreds out there, or an imagbin ( for images - *make sure you mask any sensitive data* - and post the resulting shortlinks. Apparently you can paste short snippets of text here, but not much, and certainly pasting anything more than a couple of lines into IRC is frowned upon and liable to get you killed by a floodbot (or simply called every name under the sun by the residents)

Let us know if we helped

Basic I know but thanks does go a long way. The forums have a facility apparently where you can add "Solved" to your original topic, in IRC however just let us know. It is actually pretty soul destroying sitting in IRC 14 hours plus a day responding to requests for help where people come and go without any simple courtesy - be nice to us!


Problem solving like this will of course require some familiarity with the command line (or shell) and while there are a lot of guides out there, some good, most bad, one of my respected colleagues wrote a nice one over at the Mint Community:The 5-Minute Essential Shell Tutorial. Give it a look over, I'm sure Kendall & the crew won't mind me cross-OS linking to it.

Susan Vash


 Post subject: Re: Debugging 101
PostPosted: Wed Jun 15, 2011 5:24 pm 
User avatar

Joined: Tue Jan 04, 2011 10:50 am
Posts: 889
excellent tips, thank you for the contribution :D

Please do take the time to visit the Help Us Help You Forum
A link to your inxi -F in your signature might save you a lot of questions.
Returning to mark your thread as SOLVED if a solution has been found is appreciated
Forum Admin

 Post subject: Re: Debugging 101
PostPosted: Sun Jul 03, 2011 7:40 am 
User avatar

Joined: Thu May 20, 2010 8:56 am
Posts: 2132
I've copied this over to the "Help Us to Help You" forum.


Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by php B.B. © 2000, 2002, 2005, 2007 php B.B. Group
Template made by DEVPPL