LBS_基站数据排查

  • 格式:docx
  • 大小:111.94 KB
  • 文档页数:4

LBS-基站数据同步检查流程LBS-基站数据故障排查:1. 基站数据执行图:68: 定时执行脚本后,68会从94那取文件。

94: 定时执行脚本后,94会删除数据库中原数据,再从203数据库那取数据,并插入数据库中。

2.10.46.40.68上面执行基站数据脚本:下载:20 06 * * * "/export/home/mals/ftp_jizhan.sh" >> /export/home/mals/ftp_jizhan.log 2>&1脚本如下: -bash-3.00$ more /export/home/mals/ftp_jizhan.sh#!/usr/bin/bashFtpFile="fujian_"`date '+%Y-%m-%d'`"_lbs.txt"/export/home/mals/upload.sh $FtpFileexit-bash-3.00$ more /export/home/mals/upload.sh#!/usr/local/bin/expectset file [lindex $argv 0]set userid smlcset pass Sml_u*."pspawn ftp 10.46.40.94expect -re ":"send "$userid\r"expect -re "assword:"send "$pass\r"expect -re ">"send "lcd /export/home/mals/mals_run/data_files/GSMWebFiles\r"expect -re ">"send "cd /opt/smlc/nop/lbs/LEMR/new\r"expect -re ">"send "get $file\r"expect -re ">"send "bye\r"expect eof-bash-3.00$上传:30 05 * * * "/export/home/mals/put_jizhan.sh" >> /export/home/mals/put_jizhan.log 2>&1脚本如下:-bash-3.00$ more /export/home/mals/put_jizhan.sh#!/usr/bin/bashPutFile="O_BSD_10_0591_"`date '+%Y%m%d'`"_00.order"/export/home/mals/putload.sh $PutFileexit-bash-3.00$ more /export/home/mals/putload.sh#!/usr/local/bin/expectset file [lindex $argv 0]set userid smlcset pass Sml_u*."pspawn ftp 10.46.40.94expect -re ":"send "$userid\r"expect -re "assword:"send "$pass\r"expect -re ">"send "lcd /export/home/mals/mals_run/data_files/GSM_BSD\r"expect -re ">"send "cd /opt/smlc/nop/lbs/LEMR/log\r"expect -re ">"send "put $file\r"expect -re ">"send "bye\r"expect eof-bash-3.00$-bash-3.00$ telnet 0 19999Trying 0.0.0.0...Connected to 0.Escape character is '^]'.MaintainX>info allNetwork:2[1:GSM 2:TD 3:CDMA], Provincd:fujian, cellNumber=11984, loadTime=2010-06-02 16:46:34.024Network:1[1:GSM 2:TD 3:CDMA], Provincd:fujian, cellNumber=109730, loadTime=2010-07-09 09:44:10.877 --(正常) MaintainX>1.故障现象:在10.46.40.68上无法查到有基站数据存在。

1.查询路径:/export/home/mals/mals_run/data_files 查看日志当天日志:正常日志如下:-bash-3.00$ more fujian_2010-07-09_lbs.txt.logLine 18750: BORE: out of range,2043; [IMPORTED]Line 18751: BORE: out of range,2043; [IMPORTED]Line 19348: BORE: out of range,2043; [IMPORTED]Line 19772: BORE: out of range,973; [IMPORTED]Line 19773: BORE: out of range,3911; [IMPORTED]Line 21033: BORE: out of range,973; [IMPORTED]Line 24644: BORE: out of range,370; [IMPORTED]GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-09_lbs.txt After execute:GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-09_lbs.txt The line of file is 53281GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-09_lbs.txt Successful line is 53280GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-09_lbs.txt Inserted records: 1280GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-09_lbs.txt Updated records: 52000 (正常)异常日志如下:-bash-3.00$ more fujian_2010-07-08_lbs.txt.logGSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-08_lbs.txt After execute:GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-08_lbs.txt The line of file is 1GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-08_lbs.txt Successful line is 0GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-08_lbs.txt Inserted records: 0GSMDataFile:../../data_files//GSMWebFiles/fujian_2010-07-08_lbs.txt Updated records: 0 (异常)2.查看文件大小:路径:/export/home/mals/mals_run/data_files-rw-r--r-- 1 mals dba 984555 6月17日06:56 fujian_2010-06-17_lbs.txt.rsp-rw-r--r-- 1 mals dba 984555 6月18日06:57 fujian_2010-06-18_lbs.txt.rsp-rw-r--r-- 1 mals dba 1004163 6月19日06:57 fujian_2010-06-19_lbs.txt.rsp-rw-r--r-- 1 mals dba 0 7月8日17:31 fujian_2010-07-08_lbs.txt.rsp (异常)-rw-r--r-- 1 mals dba 1001218 7月9日09:44 fujian_2010-07-09_lbs.txt.rsp2.故障排查1.检查94是否顺利从网优取到数据;cd /opt/smlc/nop/lbs/LEMR/newsmlc@FJSMLC ~/nop/lbs/LEMR/new$ ls -lrttotal 44112-rw-r--r-- 1 smlc smlcuser 22553834 Jul 9 09:02 fujian_2010-07-09_lbs.txt --(正常) smlc@FJSMLC ~/nop/lbs/LEMR/new$如果有异常按以下方法排查:2.检查94与网优网络是否正常:smlc@FJSMLC ~/nop/lbs/LEMR/new$ netstat -nrRouting Table: IPv4Destination Gateway Flags Ref Use Interface-------------------- -------------------- ----- ----- ------ ---------10.46.1.203 10.46.40.99 UGH 1 210.210.5.200 10.46.40.99 UGH 1 1172.16.1.0 10.46.40.99 UGH 1 010.210.15.200 10.46.40.99 UGH 1 910.46.40.0 10.46.40.94 U 1 949 eri0172.16.0.0 10.46.40.99 UG 1 0224.0.0.0 10.46.40.94 U 1 0 eri0127.0.0.1 127.0.0.1 UH 3 2324 lo0smlc@FJSMLC ~/nop/lbs/LEMR/new$ /usr/sbin/ping 10.46.1.20310.46.1.203 is alive --(正常)smlc@FJSMLC ~/nop/lbs/LEMR/new$3.检查网优数据库的基站同步视图是否有数据:smlc@FJSMLC ~/nop/lbs/LEMR/new$ su - oraclePassword:Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001$$$ sqlplus user_gc/xxx@nopSQL*Plus: Release 8.1.7.0.0 - Production on Fri Jul 9 14:34:15 2010(c) Copyright 2000 Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.1.0 – ProductionSQL> select count(*) from nop.v_lbs_cell_3;COUNT(*)----------53280 -------(正常)SQL>4.检查94基站数据库是否有数据,且基站同步程序是否能正常取数据;$ sqlplus nop/xxx@smlcSQL*Plus: Release 8.1.7.0.0 - Production on Fri Jul 9 14:38:47 2010(c) Copyright 2000 Oracle Corporation. All rights reserved.Error accessing PRODUCT_USER_PROFILEWarning: Product user profile information not loaded!You may need to run PUPBLD.SQL as SYSTEMConnected to:Oracle8i Enterprise Edition Release 8.1.7.0.0 - ProductionWith the Partitioning optionJServer Release 8.1.7.0.0 - ProductionSQL> select * from tab;TNAME TABTYPE CLUSTERID------------------------------ ------- ----------P2_LBS_CELL TABLESQL> select count(*) from p2_lbs_cell;COUNT(*)----------53280 -----(正常)SQL>$ sh lbs.shLog4j:/opt/smlc/nop/lbs/config/log4j.properties[2010-07-09 08:58:59,861] INFO (Config.java:25) - Config file:/opt/smlc/nop/lbs/config/config.properties[2010-07-09 08:58:59,900] INFO (Write_lbs_xls.java:83) - /opt/smlc/nop/lbs/LEMR/new/fujian_2010-07-09_lbs.txt [2010-07-09 08:58:59,902] INFO (Write_lbs_xls.java:288) - /opt/smlc/nop/lbs/LEMR/new/fujian_2010-07-09_lbs.txt [2010-07-09 08:58:59,996] INFO (Write_lbs_xls.java:292) - delete file fujian_2010-07-09_lbs.txt success![2010-07-09 08:59:00,010] INFO (Write_lbs_xls.java:111) - Connect to nop[null] database...[2010-07-09 08:59:00,535] INFO (Write_lbs_xls.java:118) - nop database is ok[2010-07-09 08:59:00,537] INFO (Write_lbs_xls.java:119) - make lbs data start[2010-07-09 09:01:13,725] INFO (Write_lbs_xls.java:206) - make region:591[2010-07-09 09:01:23,244] INFO (Write_lbs_xls.java:206) - make region:592[2010-07-09 09:01:27,994] INFO (Write_lbs_xls.java:206) - make region:593[2010-07-09 09:01:31,836] INFO (Write_lbs_xls.java:206) - make region:594[2010-07-09 09:01:34,529] INFO (Write_lbs_xls.java:206) - make region:595[2010-07-09 09:01:45,247] INFO (Write_lbs_xls.java:206) - make region:596[2010-07-09 09:01:50,305] INFO (Write_lbs_xls.java:206) - make region:597[2010-07-09 09:01:54,789] INFO (Write_lbs_xls.java:206) - make region:598[2010-07-09 09:01:58,257] INFO (Write_lbs_xls.java:206) - make region:599[2010-07-09 09:02:01,671] INFO (Write_lbs_xls.java:189) - make lbs data end $如果执行sh lbs.sh后出现上面情况,说明从网优数据库取基站数据正常;3.总结。