#!/bin/sh                                                                                                                                                                                                                             
                                                                                                                                                                                                                                      
up=`uptime | awk -F, '{print $1}'`                                                                                                                                                                                                    
up_sec=`cat /proc/uptime | awk  '{print $1}'`                                                                                                                                                                                         
cd /opt/preinstall/u01v3/files/                                                                                                                                                                                                       
[ -f CLI_client ] || ln -s m01-u01 CLI_client                                                                                                                                                                                         
                                                                                                                                                                                                                                      
send_ok=`./CLI_client __uni_oper read | grep send_ok\" | awk -F[:,] '{print $2 }'`                                                                                                                                                    
send_fail=`./CLI_client __uni_oper read | grep send_fail\" | awk -F[:,]  '{print $2}'`                                                                                                                                                
test_send=`./m01-client c.c 0xff01 '{"a":2}' | grep send`                                                                                                                                                                             
sn=`./CLI_client arch read | grep sn | awk -F[:,\"] '{print $5}'`                                                                                                                                                                     
oui=`./CLI_client arch read | grep oui  | awk -F[:,\"] '{print $5}'`                                                                                                                                                                  
out=/tmp/.uci/u01_chk_$sn.log                                                                                                                                                                                                         
                                                                                                                                                                                                                                      
echo $sn "," $oui","$up "," $up_sec ","$send_ok "," $send_fail "," $test_send >  $out                                                                                                                                                 
cat  $out                                                                                                                                                                                                                             
cat  $out | nc freedpi.cn 8098    

