Intel NetStructure MPCBL0001 Instrukcja Użytkownika Strona 79

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 198
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 78
Technical Product Specification 79
Order #273817
Intel NetStructure
®
MPCBL0001 High Performance Single Board Computer
Contents
if [ $# -ne 1 ]; then
PrintUsage
fi
LOC=$1 # Location to read from
SEL_FILENAME="$LOC.txt"
echo
echo "Serial Buffer from $LOC will be saved as $SEL_FILENAME"
echo
rm -f $SEL_FILENAME
declare val
OFFSET_LSB=0
OFFSET_MSB=0
TOTAL_BYTES=0
while true; do
# Read some bytes
val=(`cmmset -l $LOC -d ipmicommand -v "0x30 0x30 0 $OFFSET_LSB $OFFSET_MSB"`)
# If no bytes were read, it is an error
if [ "${#val}" -eq "0" ]; then
echo "Error accessing $LOC"
exit 1
elif [ "${val[0]}" -eq "0" ]; then
if [ "${val[1]}" -eq "0" ]; then
# No more bytes to read. Finished.
echo ""
echo "Read $TOTAL_BYTES bytes of Serial Buffer"
exit 0
fi
# Output a dot to show progress
echo -n "."
# Output the data bytes as ASCII characters
# skipping the first 2 bytes (comp code and length)
OutAscii 2 ${val[*]} >> $SEL_FILENAME
# Increment the offset bytes
lsb=$(( $OFFSET_LSB + ${val[1]} ))
OFFSET_MSB=$(( $OFFSET_MSB + ( $lsb / 256 ) ))
OFFSET_LSB=$(( $lsb % 256 ))
TOTAL_BYTES=$(( $TOTAL_BYTES + ${val[1]} ))
else
# Completion Code non-0.
echo
echo "Error: Completion Code `DecToHex ${val[0]}`h received"
exit 1
fi
done
echo
# ***** end of file *****
Przeglądanie stron 78
1 2 ... 74 75 76 77 78 79 80 81 82 83 84 ... 197 198

Komentarze do niniejszej Instrukcji

Brak uwag