Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a list of available events that can be used for Upstart?

For example start on local-filesystems so local-filesystems is an event but when is it triggered and what other events are there?

share|improve this question
add comment

3 Answers

Manpages

Starting in Ubuntu 11.04, there is an awesome man page created by James Hunt called usptart-events so from the terminal run:

man upstart-events

It is also available from the Ubuntu online manpages, upstart-events, but loses some formatting so a better online resource for the same information is from the Upstart cookbook.

Visualisation of Jobs and Events

There is also an excellent tool, initctl2dot for visualization of upstart events. Below are examples of using the command to generate images from Ubuntu 12.04.

View all jobs:

initctl2dot -o - | dot -Tpng -o upstart.png

View only plymouth, lightdm and mountall jobs:

initctl2dot -r plymouth,lightdm,mountall -o - | dot -Tpng -o upstart2.png

Source

Grep init

You can also grep for emit in the following directories:

grep -r emit /etc/init /etc/init.d /etc/network/if*.d

That will give you most of them, the others are emitted by the dbus bridge.


For more information and best practices, see The Upstart Cookbook.

share|improve this answer
    
The best way to view upstart-events(7) online is via the cookbook btw: upstart.ubuntu.com/cookbook/… (better formatting than manpages.ubuntu.com). –  jamesodhunt Aug 15 '12 at 16:11
add comment

These events are emited by either upstart itself or by mountall and all of them have their man pages:

mounting mounted virtual-filesystems local-filesystems all-swaps filesystem remote-filesystems started starting stopping stopped startup runlevel(7)

Any application can emit its own event, for example by

initctl emit suspend

Some of them you can see as the output of

grep emit /etc/init/*

More information also at:

http://netsplit.com/2008/04/27/upstart-05-events/

http://upstart.at/

share|improve this answer
add comment

Have you tried Bootchart

Boot charts allow the developers to see how fast a machine is booting and to pinpoint where the bottlenecks are. People interested in helping out can install the bootchart package and report the results on this page.

How to install bootchart

  1. Install the bootchart and pybootchartgui packages, either through apt-get or Synaptic*
  2. Reboot your machine

    • Older versions of Ubuntu uses bootchart and bootchart-java

What to do with your bootchart

  1. The bootchart is in /var/log/bootchart as a .png file

  2. Upload the bootchart to this wiki page here: Attach file to this wiki page

  3. Create a new row in one of the below tables

  4. If you see a regression in boot-up speed, compare your new bootchart with older ones and try to find the reason

  5. Report any problems to the developers

share|improve this answer
2  
As is this answer is of a lower quality. Please try to add additional details on what Bootchart is, how it can be used, and how it applies to this question. Including a summary from the linked site is one way to achieve this. –  Marco Ceppi Feb 27 '11 at 14:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.