- Timestamp:
- Nov 4, 2016 3:46:01 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/docs/testbox-maintenance.sh
r64578 r64580 31 31 # 32 32 MY_REBOOT_WHEN_DONE="yes" 33 #MY_REBOOT_WHEN_DONE="" 33 #MY_REBOOT_WHEN_DONE="" # enable this for debugging the script 34 34 35 35 MY_TFTP_ROOT="/mnt/testbox-tftp" … … 109 109 MY_LOG_FILE="${MY_BACKUP_DIR}/maintenance.log" 110 110 mkdir -p "${MY_BACKUP_DIR}" 111 echo "================ `date -uIsec`: ${MY_IP}: ${MY_HOSTNAME} starts a new session ================" >> "${MY_LOG_FILE}" 112 echo "`date -uIsec`: ${MY_IP}: ${MY_HOSTNAME} says hi." >> "${MY_GLOBAL_LOG_FILE}" 111 113 InfoMsg "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 # 118 MY_OUTPUT_LOG_FILE="${MY_BACKUP_DIR}/maintenance-output.log" 119 echo "" >> "${MY_OUTPUT_LOG_FILE}" 120 echo "================ `date -uIsec`: ${MY_IP}: ${MY_HOSTNAME} starts a new session ================" >> "${MY_OUTPUT_LOG_FILE}" 121 exec &> >(tee -a "${MY_OUTPUT_LOG_FILE}") 113 122 114 123 # … … 134 143 # Dig the action out of from the kernel command line. 135 144 # 136 InfoMsg "/proc/cmdline: `cat /proc/cmdline`" 137 set `cat /proc/cmdline` 145 if test -n "${MY_REBOOT_WHEN_DONE}"; then 146 InfoMsg "/proc/cmdline: `cat /proc/cmdline`" 147 set `cat /proc/cmdline` 148 else 149 InfoMsg "Using script command line: $*" 150 fi 138 151 MY_ACTION=not-found 139 152 while test $# -ge 1; do … … 211 224 echo "**** fdisk -l ****" >> ${MY_INFO_FILE}; 212 225 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 # 214 233 # Get the raw ACPI tables and whatnot since we can. Use zip as tar will 215 234 # 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 \ 217 241 /sys/firmware/ \ 218 /proc/cpuinfo242 -x "*/raw_event_log" 219 243 fi 220 244 … … 282 306 if test -b "${MY_SRC}"; then 283 307 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}"; 285 309 MY_RCS=("${PIPESTATUS[@]}"); 286 310 if test "${MY_RCS[0]}" -eq 0 -a "${MY_RCS[1]}" -eq 0; then
Note:
See TracChangeset
for help on using the changeset viewer.

