VirtualBox

Changeset 64580 in vbox for trunk


Ignore:
Timestamp:
Nov 4, 2016 3:46:01 PM (8 years ago)
Author:
vboxsync
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/docs/testbox-maintenance.sh

    r64578 r64580  
    3131#
    3232MY_REBOOT_WHEN_DONE="yes"
    33 #MY_REBOOT_WHEN_DONE=""
     33#MY_REBOOT_WHEN_DONE="" # enable this for debugging the script
    3434
    3535MY_TFTP_ROOT="/mnt/testbox-tftp"
     
    109109MY_LOG_FILE="${MY_BACKUP_DIR}/maintenance.log"
    110110mkdir -p "${MY_BACKUP_DIR}"
     111echo "================ `date -uIsec`: ${MY_IP}: ${MY_HOSTNAME} starts a new session ================" >> "${MY_LOG_FILE}"
     112echo "`date -uIsec`: ${MY_IP}: ${MY_HOSTNAME} says hi." >> "${MY_GLOBAL_LOG_FILE}"
    111113InfoMsg "MY_IP=${MY_IP}<eol>"
    112 echo "`date -uIsec`: ${MY_IP}: ${MY_HOSTNAME} says hi." >> "${MY_GLOBAL_LOG_FILE}"
     114
     115#
     116# Redirect stderr+stdout thru tee and to a log file on the server.
     117#
     118MY_OUTPUT_LOG_FILE="${MY_BACKUP_DIR}/maintenance-output.log"
     119echo "" >> "${MY_OUTPUT_LOG_FILE}"
     120echo "================ `date -uIsec`: ${MY_IP}: ${MY_HOSTNAME} starts a new session ================" >> "${MY_OUTPUT_LOG_FILE}"
     121exec &> >(tee -a "${MY_OUTPUT_LOG_FILE}")
    113122
    114123#
     
    134143# Dig the action out of from the kernel command line.
    135144#
    136 InfoMsg "/proc/cmdline: `cat /proc/cmdline`"
    137 set `cat /proc/cmdline`
     145if test -n "${MY_REBOOT_WHEN_DONE}"; then
     146    InfoMsg "/proc/cmdline: `cat /proc/cmdline`"
     147    set `cat /proc/cmdline`
     148else
     149    InfoMsg "Using script command line: $*"
     150fi
    138151MY_ACTION=not-found
    139152while test $# -ge 1; do
     
    211224    echo "**** fdisk -l ****" >> ${MY_INFO_FILE};
    212225    fdisk -l >> ${MY_INFO_FILE} 2>&1;
    213 
     226    echo "" >> ${MY_INFO_FILE};
     227    echo "**** dmesg ****" >> ${MY_INFO_FILE};
     228    echo "**** dmesg ****" >> ${MY_INFO_FILE};
     229    echo "**** dmesg ****" >> ${MY_INFO_FILE};
     230    dmesg >> ${MY_INFO_FILE} 2>&1;
     231
     232    #
    214233    # Get the raw ACPI tables and whatnot since we can.  Use zip as tar will
    215234    # zero pad virtual files due to wrong misleading size returned by stat (4K).
    216     zip -r9 "${MY_BACKUP_DIR}/testbox-info.zip" \
     235    #
     236    # Note! /sys/firmware/dmi/entries/15-0/system_event_log/raw_event_log has been
     237    #       see causing fatal I/O errors, so skip all raw_event_log files.
     238    #
     239    zip -qr9 "${MY_BACKUP_DIR}/testbox-info.zip" \
     240        /proc/cpuinfo \
    217241        /sys/firmware/ \
    218         /proc/cpuinfo
     242        -x "*/raw_event_log"
    219243fi
    220244
     
    282306            if test -b "${MY_SRC}"; then
    283307                InfoMsg "Backing up ${MY_SRC} to ${MY_DST}...";
    284                 dd if="${MY_SRC}" bs=2M count=1024 | gzip -c > "${MY_DST}";
     308                dd if="${MY_SRC}" bs=2M | gzip -c > "${MY_DST}";
    285309                MY_RCS=("${PIPESTATUS[@]}");
    286310                if test "${MY_RCS[0]}" -eq 0 -a "${MY_RCS[1]}" -eq 0; then
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette