Difference between revisions of "Bootchart (Italiano)"

From ArchWiki
Jump to: navigation, search
m (Introduzione)
(installare bootchart)
Line 10: Line 10:
  
 
Bootchart al momento non è supporato ma è disponibile in  [[AUR]].
 
Bootchart al momento non è supporato ma è disponibile in  [[AUR]].
 +
{{Nota|Un'alternativa a Bootchart è [https://github.com/mmeeks/bootchart bootchart2], che almeno ha attività più recenti del 2005. Può essere trovato in [[AUR]] come {{Package AUR|bootchart2-git}}. Usa python per generare il grafico finale, aniché usare una JVM. }}
  
 
= Eseguire Bootchart =
 
= Eseguire Bootchart =

Revision as of 11:28, 14 October 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Introduzione

Bootchart è un programma utilizzato per l'analisi dei processi d'avvio (ad esempio può essere utile per ottimizzare e velocizzare il boot). È composto dal demone bootchartd e da bootchart-render; una volta usato genererà una tabella per ogni avvio che fornisce indicazioni su come, quanto e quali processi sono in esecuzione, utilizzo di cpu, memoria e tempi di accesso al disco.

installare bootchart

Bootchart al momento non è supporato ma è disponibile in AUR.

Nota: Un'alternativa a Bootchart è bootchart2, che almeno ha attività più recenti del 2005. Può essere trovato in AUR come Template:Package AUR. Usa python per generare il grafico finale, aniché usare una JVM.

Eseguire Bootchart

per utilizzare bootchart dovrete inserirlo in init o avviarlo manualmente tramite uno degli script di init (rc.sysinit preferibilmente). nota, se lo avviate manualmente dovrete anche fermarlo altrimenti ad ogni avvio verrà generata una ulteriore tabellla

Impostare Boot loader

aggiungete alla riga kernel di grub 'init=/sbin/bootchartd' . quanto avviato dal bootloader bootchar indicherà il tempo trascoros dalla selezione del sistema da avviare fino alla schermata di login .

# (1) Arch Linux Bootchart
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/d531ff5b-de65-499a-9942-d18682375163 ro vga=37C init=/sbin/bootchartd
initrd /boot/kernel26.img

Lilo

TODO

Grub 2

Open up /boot/grub/grub.cfg, copy the boot option you want to profile and edit it to look like this:

# (0) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,1)
linux /boot/vmlinuz26 root=/dev/sda1 ro
initrd /boot/kernel26.img
}
# (1) Arch Linux with Bootchart
menuentry "Arch Linux with Bootchart" {
set root=(hd0,1)
linux /boot/vmlinuz26 root=/dev/sda1 ro init=/sbin/bootchartd
initrd /boot/kernel26.img
}

Now you can reboot and choose the new bootcharting option.

rc.sysinit setup

This one is dangerous (you can make your Arch Linux unbootable) - use it only when the first approach fails. When run in this way, not only you'll have to stop bootchartd manually after you boot up (or it will completely fill your harddrive) but it will start with every boot too. Also, any changes to /etc/rc.sysinit will be reverted next time you update the initscripts package. On the positive side, you'll end up with a bootchart that shows what happens after you log in.

Edit /etc/rc.sysinit

Now, we're going to add this line:

/sbin/bootchartd start

to /etc/rc.sysinit

It cannot be too high up, because that would render the system unbootable, but placing it too far into the script will hide anything that happened before from the bootchart. It should be safe to put this right before the section that brings up the system clock. Look for this line:

stat_busy "Configuring System Clock"

Put this:

/sbin/bootchartd start

before it.

Stop bootchartd after login

As stated previously, you have to stop bootchartd manually. Either run this as root:

/sbin/bootchartd stop

Or with sudo if you have that set up:

sudo /sbin/bootchartd stop

Generating a chart

Generating a bootchart involves running:

bootchart-render

in a folder to which you have write access. This will generate a 'bootchart.png' image with your chart. You'll have to have a Java runtime installed and properly set up before you can do this.

Troubleshooting

Bootchart-render cannot generate a 'bootchart.png' image and shows the error message:

/var/log/bootchart.tgz not found

It mostly means that bootchartd was unable to detect when the booting process was finished. This can happen when you are using different login manager then KDM or GDM such as SLIM or entrance. You have to open /sbin/bootchartd script and append those applications to exit_proc variable, for example:

# The processes we have to wait for
local exit_proc="gdmgreeter gdm-binary kdm_greet kdm slim"

If you are using no login manager, edit the exit_proc variable in this way:

# The processes we have to wait for
local exit_proc="login"

Example bootcharts

Boot in 5 seconds

LWN Article on fast booting netbooks

This article is really awesome and along with a bunch of bootcharts provides some tips on how to boot faster. Some of those improvements are beyond reach of the ordinary user though (patching X.org, kernel, etc.).

Useful links