What is upstart and why has it made a 38.1 GB file in ~/.cache

139

Solution 1

Upstart is the init system in Ubuntu (till 14.10). It manages services and starts/stops them at appropriate times, and captures their output into logs stored at appropriate locations. Upstart is also able to run services for each user, and the logs of these user-specific services are stored in ~/.cache/upstart by default.

Here is it's documentation

As to what caused them to grow so big, that's not up to Upstart, but to the applications being run. (In this case, gnome-keyring for one.) Inspect the logs to see what went wrong.

To see which programs are being run so, do:

initctl list

The configuration files for these services will be in ~/.config/upstart (if you created some yourself), or in /usr/share/upstart/sessions (for those that come with Ubuntu).

Can I just delete them for a quick fix?

Yep.

Solution 2

The accepted answer fixes the symptom but not the problem.

The problem is an application (or rarely but possibly more than one) that runs amok filling the logs with garbage - probably error messages.

It's ok to delete the huge log file, but it will grow again.

  1. Delete the largest log file, and check the content of the directory a few times to find which file is growing.

    ls ~/.cache/upstart
    
  2. Open System Monitor, sort by CPU, and check which application with similar name is active. Kill it. This application is likely to have this problem again, so try to use a different program.

    • or run ps -aux | grep -i ..aPartFromTheLogFileName.. to find the offending app, and kill -9 ..itsProcessNumber...
  3. If it didn't solve the issue, Open the growing log file with glogg, and search Google for the error message.

  4. If it's something you cannot fix, here's how to mute the symptom forever (for me it was gnome-session-Unity.log):

     ln -s /dev/null ~/.cache/upstart/gnome-session-Unity.log
    

Note that it will not fix the problem with the application, but it will send the log messages to oblivion.

Share:
139

Related videos on Youtube

Adamtky
Author by

Adamtky

Updated on September 18, 2022

Comments

  • Adamtky
    Adamtky over 1 year

    I have clone a repo on Colab and would like to load an image. Anyone any idea what is the simplest way to do it?

    I want to load an image called heatmap.png to my Colab notebook.

    thanks for any help.

    enter image description here

  • Panther
    Panther almost 9 years
    yes but if you do not fix the problem(s) your logs will just keep getting huge ;)
  • Wilf
    Wilf almost 9 years
    It is best to the fix the problems - I once had a similar issue with logs from a buggy version of CUPS filling /var, which meant I had to delete the files every hour or so.... then found it was a simple settings fix :)
  • Mark Kirby
    Mark Kirby almost 9 years
    @bodhi.zazen found the one that was the problem, was a terminal log for a program I made that just kept generating text endlessly, must of left it open and not realized
  • Mark Kirby
    Mark Kirby almost 9 years
    @Wilf Please see above