日記/2013-05-18
をテンプレートにして作成
ホーム
検索
最終更新
テスト
リンク
ヘルプ
新規
pukiwiki-official
pukiwiki-dev
ヘルプ
プラグインヘルプ
開始行:
**ログのUTC→JSTに変換 [#h5124630]
Raspberry Pi のircddbgateway + gmskrepeater(or dvapnode...
+変換前
# tail -12 /var/log/GMSKRepeater-2013-05-18.log
M: 2013-05-18 14:10:57: Transmitting to - My: JH1BLT C/ ...
M: 2013-05-18 14:10:58: Network header received - My: JH...
M: 2013-05-18 14:10:58: Transmitting to - My: JH1BLT /I...
M: 2013-05-18 14:11:01: Stats for JH1BLT Frames: 2.5s...
M: 2013-05-18 14:12:24: Header decoded - My: JH1BLT /ID...
M: 2013-05-18 14:12:24: Slow data set to "Linking to REF...
M: 2013-05-18 14:12:24: Slow data set to "Linked to REF0...
M: 2013-05-18 14:12:24: AMBE for JH1BLT Frames: 0.3s,...
M: 2013-05-18 14:12:24: Transmitting to - My: JH1BLT C/ ...
M: 2013-05-18 14:12:26: Network header received - My: JH...
M: 2013-05-18 14:12:26: Transmitting to - My: JH1BLT /I...
M: 2013-05-18 14:12:33: Stats for JH1BLT Frames: 7.1s...
+変換後((今回はhh:mm:ssのみ表示してある))
#./gmlog2.sh
23:10:57 JST: Transmitting to - My: JH1BLT C/ Your...
23:10:58 JST: Network header received - My: JH1BLT /IN...
23:10:58 JST: Transmitting to - My: JH1BLT /INFO Your...
23:11:01 JST: Stats for JH1BLT Frames: 2.5s, Loss: 0...
23:12:24 JST: Header decoded - My: JH1BLT /ID80 Your:...
23:12:24 JST: Slow data set to "Linking to REF008 C "
23:12:24 JST: Slow data set to "Linked to REF008 C "
23:12:24 JST: AMBE for JH1BLT Frames: 0.3s, Silence:...
23:12:24 JST: Transmitting to - My: JH1BLT C/ Your...
23:12:26 JST: Network header received - My: JH1BLT /IN...
23:12:26 JST: Transmitting to - My: JH1BLT /INFO Your...
23:12:33 JST: Stats for JH1BLT Frames: 7.1s, Loss: 0...
+gmlog2.sh
#!/bin/sh
LOGF=`ls /var/log/GMSK* | sort | tail -1`
LOG1=`tail -1 $LOGF`
DT0=`echo "$LOG1" | cut -b4-22`
#DT0="2013-05-18 14:10:56" ; for example
while :
do
LOGF=`ls /var/log/GMSK* | sort | tail -1`
LOG1=`tail -1 $LOGF`
DT1=`echo "$LOG1" | cut -b4-22`
DTN=`grep -n "$DT0" $LOGF | cut -d":" -f1 | tail -1`
DTALL=`wc -l $LOGF | cut -d" " -f1`
FLAG=`expr $DTALL - $DTN`
if test "$FLAG" = "" ; then
FLAG="0"
fi
#echo "DT0=[$DT0] LOGF=[$LOGF] LOG1=[$LOG1]"
#echo "DT1=[$DT1] DTN=[$DTN] DTALL=[$DTALL] FLAG=[$FLA...
tail -$FLAG $LOGF > temp1.txt
while read line
do
DTUTC=`echo "$line" | cut -b4-22`
MSG0=`echo "$line" | cut -b24-`
DTTEMP=`date +%s --date "$DTUTC"`
DTJST=`expr $DTTEMP + "32400"` ; +9:00H(秒にして加え...
DTJST=`date --date "@$DTJST" | cut -b30-46` ; ← 時刻表...
echo "$DTJST:$MSG0"
done <temp1.txt
DT0="$DT1"
sleep 5
done
#clear
#comment
#navi(日記)
終了行:
**ログのUTC→JSTに変換 [#h5124630]
Raspberry Pi のircddbgateway + gmskrepeater(or dvapnode...
+変換前
# tail -12 /var/log/GMSKRepeater-2013-05-18.log
M: 2013-05-18 14:10:57: Transmitting to - My: JH1BLT C/ ...
M: 2013-05-18 14:10:58: Network header received - My: JH...
M: 2013-05-18 14:10:58: Transmitting to - My: JH1BLT /I...
M: 2013-05-18 14:11:01: Stats for JH1BLT Frames: 2.5s...
M: 2013-05-18 14:12:24: Header decoded - My: JH1BLT /ID...
M: 2013-05-18 14:12:24: Slow data set to "Linking to REF...
M: 2013-05-18 14:12:24: Slow data set to "Linked to REF0...
M: 2013-05-18 14:12:24: AMBE for JH1BLT Frames: 0.3s,...
M: 2013-05-18 14:12:24: Transmitting to - My: JH1BLT C/ ...
M: 2013-05-18 14:12:26: Network header received - My: JH...
M: 2013-05-18 14:12:26: Transmitting to - My: JH1BLT /I...
M: 2013-05-18 14:12:33: Stats for JH1BLT Frames: 7.1s...
+変換後((今回はhh:mm:ssのみ表示してある))
#./gmlog2.sh
23:10:57 JST: Transmitting to - My: JH1BLT C/ Your...
23:10:58 JST: Network header received - My: JH1BLT /IN...
23:10:58 JST: Transmitting to - My: JH1BLT /INFO Your...
23:11:01 JST: Stats for JH1BLT Frames: 2.5s, Loss: 0...
23:12:24 JST: Header decoded - My: JH1BLT /ID80 Your:...
23:12:24 JST: Slow data set to "Linking to REF008 C "
23:12:24 JST: Slow data set to "Linked to REF008 C "
23:12:24 JST: AMBE for JH1BLT Frames: 0.3s, Silence:...
23:12:24 JST: Transmitting to - My: JH1BLT C/ Your...
23:12:26 JST: Network header received - My: JH1BLT /IN...
23:12:26 JST: Transmitting to - My: JH1BLT /INFO Your...
23:12:33 JST: Stats for JH1BLT Frames: 7.1s, Loss: 0...
+gmlog2.sh
#!/bin/sh
LOGF=`ls /var/log/GMSK* | sort | tail -1`
LOG1=`tail -1 $LOGF`
DT0=`echo "$LOG1" | cut -b4-22`
#DT0="2013-05-18 14:10:56" ; for example
while :
do
LOGF=`ls /var/log/GMSK* | sort | tail -1`
LOG1=`tail -1 $LOGF`
DT1=`echo "$LOG1" | cut -b4-22`
DTN=`grep -n "$DT0" $LOGF | cut -d":" -f1 | tail -1`
DTALL=`wc -l $LOGF | cut -d" " -f1`
FLAG=`expr $DTALL - $DTN`
if test "$FLAG" = "" ; then
FLAG="0"
fi
#echo "DT0=[$DT0] LOGF=[$LOGF] LOG1=[$LOG1]"
#echo "DT1=[$DT1] DTN=[$DTN] DTALL=[$DTALL] FLAG=[$FLA...
tail -$FLAG $LOGF > temp1.txt
while read line
do
DTUTC=`echo "$line" | cut -b4-22`
MSG0=`echo "$line" | cut -b24-`
DTTEMP=`date +%s --date "$DTUTC"`
DTJST=`expr $DTTEMP + "32400"` ; +9:00H(秒にして加え...
DTJST=`date --date "@$DTJST" | cut -b30-46` ; ← 時刻表...
echo "$DTJST:$MSG0"
done <temp1.txt
DT0="$DT1"
sleep 5
done
#clear
#comment
#navi(日記)
ページ名: