Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
bootchart
bootchart-0.9.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bootchart-0.9.diff of Package bootchart
Index: bootchart-0.9/script/bootchart =================================================================== --- bootchart-0.9.orig/script/bootchart +++ bootchart-0.9/script/bootchart @@ -13,8 +13,8 @@ fi # Configuration MAIN_CLASS="org.bootchart.Main" -BASE_JARS="commons-cli.jar bootchart.jar" -FLAGS="-Djava.awt.headless=true -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D" +BASE_JARS="bootchart-commons-cli.jar bootchart.jar" +FLAGS="-Xmx300m -Djava.awt.headless=true -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D" # Set parameters set_jvm Index: bootchart-0.9/script/bootchartd =================================================================== --- bootchart-0.9.orig/script/bootchartd +++ bootchart-0.9/script/bootchartd @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Bootchart logger script # Ziga Mahkovec <ziga.mahkovec@klika.si> @@ -45,7 +45,7 @@ start() # directory. LOG_DIR="$( mktemp -d /tmp/bootchart.XXXXXX 2>/dev/null )" if [ -z "$LOG_DIR" ]; then - LOG_DIR="/mnt" + LOG_DIR="/lib/bootchart/mnt" LAZY_UMOUNT="yes" mount -n -t tmpfs -o size=$TMPFS_SIZE none "$LOG_DIR" >/dev/null 2>&1 fi @@ -71,7 +71,7 @@ start() # /proc/diskstats is available in 2.6 kernels [ -f /proc/diskstats ] && log_output "cat /proc/diskstats" proc_diskstats.log & - log_output "cat /proc/*/stat" proc_ps.log & + log_output "cat /proc/*/task/*/stat" proc_ps.log & #log_output "ps -eww -o pid,ppid,s,pcpu,comm,cmd" ps.log & if [ -n "$IN_INIT" ]; then @@ -108,7 +108,7 @@ log_output() eval $cmd 2>/dev/null echo sleep $SAMPLE_PERIOD - done >> "$logfile" || stop + done >> "$LOG_DIR/$logfile" || stop } # Wait for the boot process to end. @@ -117,22 +117,31 @@ wait_boot() local runlevel=$( sed -n 's/.*:\(.*\):initdefault:.*/\1/gp' /etc/inittab ) # The processes we have to wait for - local exit_proc="gdmgreeter gdm-binary kdm_greet kdm" + local exit_proc="gdmgreeter gdm-binary kdm_greet xterm konsole gnome-terminal stopinitrd icewm-session" # early_login in FC4 starts gdm early, so fall back to mingetty local early_login="no" grep -q early_login /proc/cmdline && early_login="yes" - if [ "$runlevel" -eq "2" -o "$runlevel" -eq "3" -o "$early_login" = "yes" ]; then + if [ "x$runlevel" = "x2" -o "x$runlevel" = "x3" -o "$early_login" = "yes" ]; then exit_proc="mingetty agetty rungetty getty" fi while [ -f "$BOOTLOG_LOCK" ]; do if [ -n "$( pidof $exit_proc )" ]; then # Give the exit process some time to start - sleep 5 + stopinitrd=$( pidof stopinitrd ) + if [ -n "$stopinitrd" ] ; then + mv $LOG_DIR/* /dev/shm/ + rm -f "$BOOTLOG_LOCK" + wait + kill $stopinitrd + exit 0 + else + sleep 2 + fi # Flush the log files stop return fi - sleep 2 + usleep 200000 done; } @@ -162,6 +171,13 @@ stop() log_header # Package log files + for i in *.log; do + if test -f /dev/shm/$i; then + cat /dev/shm/$i $i > $i.new && mv $i.new $i + rm /dev/shm/$i + fi + done + tar -zcf "$BOOTLOG_DEST" header $pacct *.log if [ -z "$LAZY_UMOUNT" ]; then rm "$LOG_DIR"/* @@ -169,8 +185,10 @@ stop() fi # Render the chart if configured (and the renderer is installed) - [ "$AUTO_RENDER" = "yes" -a -x /usr/bin/bootchart ] && \ - /usr/bin/bootchart -o "$AUTO_RENDER_DIR" -f $AUTO_RENDER_FORMAT "$BOOTLOG_DEST" + if [ "$AUTO_RENDER" = "yes" -a -x /usr/bin/pybootchartgui ]; then + cd $AUTO_RENDER_DIR + /usr/bin/pybootchartgui -o "$AUTO_RENDER_DIR"/bootchart.$AUTO_RENDER_FORMAT -f $AUTO_RENDER_FORMAT "$BOOTLOG_DEST" + fi } @@ -226,6 +244,13 @@ if [ $$ -eq 1 ]; then init="${i#*=}" break fi + if [ "${i%%=*}" = "init" ]; then + _init=${i#*=} + if test "$_init" != "/sbin/bootchartd"; then + init="$_init" + fi + break + fi done exec $init $* fi Index: bootchart-0.9/script/bootchartd.conf =================================================================== --- bootchart-0.9.orig/script/bootchartd.conf +++ bootchart-0.9/script/bootchartd.conf @@ -16,7 +16,7 @@ SAMPLE_PERIOD=0.2 # kernel needs to be configured to enable v3 accounting # (CONFIG_BSD_PROCESS_ACCT_V3). accton from the GNU accounting utilities # is also required. -PROCESS_ACCOUNTING="no" +PROCESS_ACCOUNTING="yes" # Tarball for the various boot log files BOOTLOG_DEST=/var/log/bootchart.tgz @@ -24,7 +24,7 @@ BOOTLOG_DEST=/var/log/bootchart.tgz # Whether to automatically generate the boot chart once the boot logger # completes. The boot chart will be generated in $AUTO_RENDER_DIR. # Note that the bootchart package must be installed. -AUTO_RENDER="no" +AUTO_RENDER="yes" # Image format to use for the auto-generated boot chart # (choose between png, svg and eps).
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor