14

For underdeveloped troubleshooting questions like this one I want to look at whole log files such as /var/log/syslog.1 or /var/log/kern.log.1, which can be several thousands of lines long.

How should users share this kind of information on Ask Ubuntu?

3
  • This makes me wonder how we could help users remove or avoid posting sensitive information that could be contained in a log file. (For example, what if the user didn't realize that a program had saved their current latitude & longitude into the log?) I'm always nervous about that sort of thing happening to me. May 17, 2011 at 21:13
  • 1
    @Firefeather This is an important issue. Perhaps we can learn from similar discussions about the collection of sensitive data in Apport.
    – ændrük
    May 17, 2011 at 22:50
  • you mention a very good point. I haven't come across a discussion about sensitive data in Apport bug reporting, but I'm familiar with the warning in the Apport GUI. Do you, by chance, have a link to the discussion (and its possible resolution)? May 19, 2011 at 17:38

4 Answers 4

13

I suggest using http://paste.ubuntu.com.

2
  • What is a reasonable upper limit in file size for this utility? My web browser starts to crawl when I copy and paste twenty thousand lines of logs into a text field.
    – ændrük
    May 12, 2011 at 20:51
  • 25k lines were no problem here, but copying from gedit failed, so I opened it in the browser and copied it from there.
    – htorque
    May 12, 2011 at 20:58
10

In addition to htorque's suggestion of paste.ubuntu.com, I found there is a command line app that can be used to make it easier:

pastebinitInstall pastebinit

It's quite relevant considering ændrük's comment about problems pasting very large log into the browser.

An example:

df -h | pastebinit -b http://paste.ubuntu.com


The only question I have about paste.ubuntu.com is that there is no information about the expiry of the url and no explicit option to make it longer, such as dpaste.

9

It is generally a bad idea to post enormous log files. Who is going to read an enormous wall of text? It's a disincentive to answering.

Generally, try to post the most relevant section of the log file, then link to the full file elsewhere.

Give it a shot, at least.. since the full file is linked, it's the best of both worlds.

3
  • 4
    I think a common problem is that for many users finding what's relevant in a wall of (obscure) text is the hard part. Hence wanting to paste up the whole shebang. There's always Ctrl+F to do a quick search once it's been posted to, say, paste.ubuntu.com.
    – boehj
    May 16, 2011 at 2:09
  • 2
    Speaking as an answerer, it takes me a lot more energy to deal with askers who won't post full logs (Post all the lines containing sda. No, not the first five lines, all of them. No, actually I need to see /md. Ok, I see the first symptom, now I need everything before this line. No, that line) than to locate what's wrong in a long log (if I have a chance of knowing the answer). Posting partial logs is like posting partial error messages. Don't do it. May 19, 2011 at 20:15
  • @gilles that's incompatible with our engine; you want 50,000 character log files in every post? Or, worse, just "FIX MY PROBLEM (link to log file)?" No thanks. May 20, 2011 at 3:49
3

Jeff's point is valid when you know what is the relevant part of the log - but when you don't, it's best to resort to Ubuntu Pastebin to "paste up the whole shebang" as boehj puts it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .