hisi3531D 檢測vi 訊號拷機指令碼

2021-09-24 04:31:00 字數 1885 閱讀 9178

指令碼目的有3個觀測點

0.在多台機器上跑上拷機指令碼,對比結果來確定是個別機器故障,還是每機器的普遍故障。

1.統計一下上萬次開關機,出現個別視窗黑屏的概率。

2.出現黑屏的通道視窗是否固定,來適當排除驅動程式或軟體的故障的可能性。

#!/bin/sh

counterfile=/etc/dvx_config/vicouter.log

errlogfile=/etc/dvx_config/vierr.log

detectfile=/proc/umap/vi

write_log_err()

'` err_counter=`head -n 1 $counterfile | awk -f ' ' ''`

else

amount_counter=0

err_counter=0

fi if [ $1 = 1 ]

then

err_counter=`expr $err_counter + 1`

fi amount_counter=`expr $amount_counter + 1`

echo $amount_counter $err_counter

echo $amount_counter $err_counter > $counterfile

}if [ $# != 1 ];

then

echo input vichn amount : $0 16

exit 1;

fihas_err=0

line_num=`grep -nr "vi chn status" /proc/umap/vi | awk -f ':' ''`

line_start=`expr $line_num + 2`

line_end=`expr $line_start + $1 - 1`

echo line_num:$line_num line_start:$line_start line_end:$line_end

sed -n "$line_start,$p" $detectfile > /tmp/viinfo

while read vichn benusrp frmtime frmrate sendcnt swlost depth rotate

do #echo $vichn $benusrp $frmtime $frmrate $sendcnt $swlost $depth $rotate

if [ $sendcnt = 0 ];

then

has_err=`expr $has_err + 1`

#echo has_err1 $has_err

echo vichn=$vichn $benusrp $frmtime $frmrate $sendcnt $swlost $depth $rotate >> $errlogfile

fidone < /tmp/viinfo

if [ $has_err -gt 0 ];

then

write_log_err 1

echo amount_counter:$amount_counter err_counter:$err_counter

echo -e "--------`date +%y%m%d-%h:%m:%s`-------\n" >> $errlogfile

else

write_log_err 0

echo amount_counter:$amount_counter err_counter:$err_counter

fi

效果如下, 固定通道故障,我手上這台肯定是硬體故障

hisi3531 valgrind 交叉編譯移植

valgrind 神器不用我多說,linux平台開發利器。一 安裝 1.autoconf wget tar zxvf autoconf 2.69.tar.gz cd autoconf 2.69 configure make make install 2.automake wget tar zxvf ...

HISI3531DLinux開發學習 1環境搭建

1.安裝unbuntu2004 安裝過程中的技巧 1.使用sudo passwd root,直接改變管理員許可權密碼。2.在vmware安裝路徑下找到linux映象檔案,能夠直接windos和虛擬機器拖拽檔案。2.布置hisi開發環境 1.安裝交叉編譯工具和sdk 2.將交叉編譯壓縮包arm his...

3531 判斷整除

3531 判斷整除 總時間限制 1000ms 記憶體限制 65536kb 描述 乙個給定的正整數序列,在每個數之前都插入 號或 號後計算它們的和。比如序列 1 2 4共有8種可能的序列 1 2 4 7 1 2 4 1 1 2 4 3 1 2 4 5 1 2 4 5 1 2 4 3 1 2 4 1 1...