Compare commits
36 Commits
97f30adabb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea652d7254 | ||
|
|
f06f26c81b | ||
|
|
fbd48eb4ee | ||
|
|
6fee394db0 | ||
|
|
9ae7d50f73 | ||
|
|
c7523004bd | ||
|
|
5026cdb2b7 | ||
|
|
f744be8df8 | ||
|
|
a74d97e221 | ||
|
|
7f79b5abac | ||
|
|
b379a19aae | ||
|
|
e9347a3ae0 | ||
|
|
cab9a32f96 | ||
|
|
48e5b94f1f | ||
|
|
6d9e440ec8 | ||
|
|
8ef1414ea3 | ||
|
|
a1c7b3d2dd | ||
|
|
230812d6e1 | ||
|
|
6e7d29edad | ||
| 48f0493d4e | |||
| 2e658c5839 | |||
| 236f1937a6 | |||
|
|
530f9116ae | ||
| 91fb7cf944 | |||
| 8dc85066da | |||
| 5e9fabfc23 | |||
| 25ce1a5d4a | |||
| 9472b7d3e3 | |||
| 0e2ed9cbb0 | |||
| 9e94735d95 | |||
|
|
a95266652b | ||
| 54ffb086e4 | |||
| 8eb8329d45 | |||
| 7ac790cc51 | |||
| 5b74cd26bd | |||
| bb3ffe4658 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* text=auto
|
||||||
157
.gitignore
vendored
157
.gitignore
vendored
@@ -1,76 +1,81 @@
|
|||||||
# ---> VisualStudioCode
|
# ---> VisualStudioCode
|
||||||
.vscode/*
|
.vscode/*
|
||||||
!.vscode/settings.json
|
!.vscode/settings.json
|
||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
!.vscode/*.code-snippets
|
!.vscode/*.code-snippets
|
||||||
|
|
||||||
# Local History for Visual Studio Code
|
# Local History for Visual Studio Code
|
||||||
.history/
|
.history/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# Run temp file and dir
|
# Run temp file and dir
|
||||||
|
|
||||||
|
|
||||||
# Built Visual Studio Code Extensions
|
# Built Visual Studio Code Extensions
|
||||||
*.o
|
*.o
|
||||||
*.a
|
*.o.ES
|
||||||
*.vsix
|
*.a
|
||||||
*.log
|
*.vsix
|
||||||
*.log-*
|
*.log
|
||||||
*.bak
|
*.log-*
|
||||||
*.bak*
|
*.bak
|
||||||
*.exe
|
*.bak*
|
||||||
__debug_bin*.exe
|
*.exe
|
||||||
|
__debug_bin*.exe
|
||||||
# bin file
|
*.swp
|
||||||
bin/iptrans
|
|
||||||
bin/alive
|
# bin file
|
||||||
bin/bsscomm
|
bin/iptrans
|
||||||
bin/cdrCollector
|
bin/alive
|
||||||
bin/ftpSend
|
bin/bsscomm
|
||||||
bin/nrtrde
|
bin/cdrCollector
|
||||||
bin/sftpSend
|
bin/ftpSend
|
||||||
bin/smcli
|
bin/nrtrde
|
||||||
bin/subsComm
|
bin/sftpSend
|
||||||
bin/subsDataBackup
|
bin/smcli
|
||||||
bin/wsms
|
bin/subsComm
|
||||||
bin/paraComm
|
bin/subsDataBackup
|
||||||
bin/alarmAgent
|
bin/wsms
|
||||||
bin/alarmGenerator
|
bin/paraComm
|
||||||
bin/beatProc
|
bin/initKeys
|
||||||
bin/beatSend
|
bin/parseResult
|
||||||
bin/raidAgent
|
bin/sendfile
|
||||||
bin/statTest
|
bin/alarmAgent
|
||||||
bin/ftpclient
|
bin/alarmGenerator
|
||||||
bin/omcLibTest
|
bin/beatProc
|
||||||
bin/omcMain
|
bin/beatSend
|
||||||
bin/cstaCollector
|
bin/raidAgent
|
||||||
bin/logCollector
|
bin/statTest
|
||||||
bin/omcCleaner
|
bin/ftpclient
|
||||||
|
bin/omcLibTest
|
||||||
plat/iptrans/iptrans
|
bin/omcMain
|
||||||
src/configMgr/c_program/impmod/alive
|
bin/cstaCollector
|
||||||
src/configMgr/c_program/impmod/bsscomm
|
bin/logCollector
|
||||||
src/accountMgr/c_program/cdrCollector/cdrCollector
|
bin/omcCleaner
|
||||||
src/accountMgr/c_program/ftpsend/ftpSend
|
|
||||||
src/accountMgr/c_program/nrtrde/nrtrde
|
plat/iptrans/iptrans
|
||||||
src/accountMgr/c_program/sftpSend/sftpSend
|
src/configMgr/c_program/impmod/alive
|
||||||
src/accountMgr/c_program/smcli/smcli
|
src/configMgr/c_program/impmod/bsscomm
|
||||||
src/accountMgr/c_program/subsComm/subsComm
|
src/accountMgr/c_program/cdrCollector/cdrCollector
|
||||||
src/accountMgr/c_program/subsDataBackup/subsDataBackup
|
src/accountMgr/c_program/ftpsend/ftpSend
|
||||||
src/accountMgr/c_program/wsms/wsms
|
src/accountMgr/c_program/nrtrde/nrtrde
|
||||||
src/configMgr/c_program/paraComm/paraComm
|
src/accountMgr/c_program/sftpSend/sftpSend
|
||||||
src/faultMgr/c_program/alarmAgent/alarmAgent
|
src/accountMgr/c_program/smcli/smcli
|
||||||
src/faultMgr/c_program/alarmGenerator/alarmGenerator
|
src/accountMgr/c_program/subsComm/subsComm
|
||||||
src/faultMgr/c_program/beatProc/beatProc
|
src/accountMgr/c_program/subsDataBackup/subsDataBackup
|
||||||
src/faultMgr/c_program/beatSend/beatSend
|
src/accountMgr/c_program/wsms/wsms
|
||||||
src/faultMgr/c_program/raidAgent/raidAgent
|
src/configMgr/c_program/paraComm/paraComm
|
||||||
src/faultMgr/c_program/sysStat/statTest
|
src/faultMgr/c_program/alarmAgent/alarmAgent
|
||||||
src/omcLib/c_program/ftp/ftpclient
|
src/faultMgr/c_program/alarmGenerator/alarmGenerator
|
||||||
src/omcLib/c_program/omcLib/omcLibTest
|
src/faultMgr/c_program/beatProc/beatProc
|
||||||
src/omcMain/c_program/omcMain/omcMain
|
src/faultMgr/c_program/beatSend/beatSend
|
||||||
src/performanceMgr/c_program/cstaCollector/cstaCollector
|
src/faultMgr/c_program/raidAgent/raidAgent
|
||||||
src/performanceMgr/c_program/logCollector/logCollector
|
src/faultMgr/c_program/sysStat/statTest
|
||||||
src/securityMgr/c_program/omcCleaner/omcCleaner
|
src/omcLib/c_program/ftp/ftpclient
|
||||||
|
src/omcLib/c_program/omcLib/omcLibTest
|
||||||
|
src/omcMain/c_program/omcMain/omcMain
|
||||||
|
src/performanceMgr/c_program/cstaCollector/cstaCollector
|
||||||
|
src/performanceMgr/c_program/logCollector/logCollector
|
||||||
|
src/securityMgr/c_program/omcCleaner/omcCleaner
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ alarmAgent -d
|
|||||||
nrtrde -d
|
nrtrde -d
|
||||||
sftpSend -d
|
sftpSend -d
|
||||||
cstaCollector -d
|
cstaCollector -d
|
||||||
|
|
||||||
[slave_task]
|
[slave_task]
|
||||||
iptrans -d
|
iptrans -d
|
||||||
paraComm -d
|
paraComm -d
|
||||||
|
|||||||
11
bin/conf/tap.cfg
Normal file
11
bin/conf/tap.cfg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[local]
|
||||||
|
name=NFK
|
||||||
|
prefix=CD
|
||||||
|
currency=USD
|
||||||
|
utc_offset=+1200
|
||||||
|
tap_path=/opt
|
||||||
|
[partners]
|
||||||
|
name=PLWPC
|
||||||
|
plmnid=46000
|
||||||
|
place=CHINA
|
||||||
|
currency=CNY
|
||||||
32
bin/initKeys
32
bin/initKeys
@@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/expect
|
|
||||||
|
|
||||||
#This script use to init the server keys, it rewrite the known_hosts config file
|
|
||||||
|
|
||||||
#This script have 3 parameters
|
|
||||||
#remoteip: the ip of the remote server
|
|
||||||
#username: the name for logging in
|
|
||||||
#userpass: the password for logging in
|
|
||||||
|
|
||||||
set remoteip [lindex $argv 0]
|
|
||||||
set username [lindex $argv 1]
|
|
||||||
set userpass [lindex $argv 2]
|
|
||||||
|
|
||||||
set timeout 5
|
|
||||||
|
|
||||||
spawn sftp $username@$remoteip
|
|
||||||
|
|
||||||
expect "*(yes/no)?*"
|
|
||||||
|
|
||||||
send "yes\n"
|
|
||||||
|
|
||||||
expect "*password*"
|
|
||||||
|
|
||||||
send "$userpass\n"
|
|
||||||
|
|
||||||
expect "*sftp>*"
|
|
||||||
|
|
||||||
send "quit\n"
|
|
||||||
|
|
||||||
expect eof
|
|
||||||
exit
|
|
||||||
|
|
||||||
@@ -75,9 +75,30 @@
|
|||||||
"Description."
|
"Description."
|
||||||
::= { msc 1 }
|
::= { msc 1 }
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.1.99
|
||||||
|
control OBJECT IDENTIFIER ::= { msc 99 }
|
||||||
|
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.1.99.2
|
||||||
|
neSystem OBJECT IDENTIFIER ::= { control 2 }
|
||||||
|
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.1.99.2.1
|
||||||
|
config OBJECT IDENTIFIER ::= { neSystem 1 }
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.1.99.2.1.2
|
||||||
|
licenseUpdate OBJECT-TYPE
|
||||||
|
SYNTAX DisplayString
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Description."
|
||||||
|
::= { config 2 }
|
||||||
|
|
||||||
|
|
||||||
-- 1.3.6.1.4.1.1373.1.3.3.2.2
|
-- 1.3.6.1.4.1.1373.1.3.3.2.2
|
||||||
-- 1.3.6.1.4.1.1373.2.3.3.1.2
|
-- 1.3.6.1.4.1.1373.2.3.3.1.2
|
||||||
|
|
||||||
parameter OBJECT IDENTIFIER ::= { msc 2 }
|
parameter OBJECT IDENTIFIER ::= { msc 2 }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,26 @@
|
|||||||
"Description."
|
"Description."
|
||||||
::= { pps 1 }
|
::= { pps 1 }
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.6.99
|
||||||
|
control OBJECT IDENTIFIER ::= { pps 99 }
|
||||||
|
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.6.99.2
|
||||||
|
neSystem OBJECT IDENTIFIER ::= { control 2 }
|
||||||
|
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.6.99.2.1
|
||||||
|
config OBJECT IDENTIFIER ::= { neSystem 1 }
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.6.99.2.1.2
|
||||||
|
licenseUpdate OBJECT-TYPE
|
||||||
|
SYNTAX DisplayString
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Description."
|
||||||
|
::= { config 2 }
|
||||||
|
|
||||||
-- 1.3.6.1.4.1.1373.1.3.3.2.2
|
-- 1.3.6.1.4.1.1373.1.3.3.2.2
|
||||||
-- 1.3.6.1.4.1.1373.2.3.3.6.2
|
-- 1.3.6.1.4.1.1373.2.3.3.6.2
|
||||||
parameter OBJECT IDENTIFIER ::= { pps 2 }
|
parameter OBJECT IDENTIFIER ::= { pps 2 }
|
||||||
|
|||||||
@@ -74,6 +74,26 @@
|
|||||||
"Description."
|
"Description."
|
||||||
::= { smsc 1 }
|
::= { smsc 1 }
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.5.99
|
||||||
|
control OBJECT IDENTIFIER ::= { smsc 99 }
|
||||||
|
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.5.99.2
|
||||||
|
neSystem OBJECT IDENTIFIER ::= { control 2 }
|
||||||
|
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.5.99.2.1
|
||||||
|
config OBJECT IDENTIFIER ::= { neSystem 1 }
|
||||||
|
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.5.99.2.1.2
|
||||||
|
licenseUpdate OBJECT-TYPE
|
||||||
|
SYNTAX DisplayString
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Description."
|
||||||
|
::= { config 2 }
|
||||||
|
|
||||||
|
|
||||||
-- 1.3.6.1.4.1.1373.1.3.3.2.2
|
-- 1.3.6.1.4.1.1373.1.3.3.2.2
|
||||||
-- 1.3.6.1.4.1.1373.2.3.3.5.2
|
-- 1.3.6.1.4.1.1373.2.3.3.5.2
|
||||||
@@ -432,7 +452,8 @@
|
|||||||
smpp8dcs0def7(2),
|
smpp8dcs0def7(2),
|
||||||
smpp7def8(16),
|
smpp7def8(16),
|
||||||
smpp8dcs4def8(17),
|
smpp8dcs4def8(17),
|
||||||
smpp8dcs0def8(18)
|
smpp8dcs0def8(18),
|
||||||
|
smpp8dcs0Unpack7(19)
|
||||||
}
|
}
|
||||||
MAX-ACCESS read-write
|
MAX-ACCESS read-write
|
||||||
STATUS current
|
STATUS current
|
||||||
@@ -528,8 +549,15 @@
|
|||||||
::= { sMPPEntry 10 }
|
::= { sMPPEntry 10 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- 1.3.6.1.4.1.1373.2.3.3.5.2.3.1.1.11
|
-- 1.3.6.1.4.1.1373.2.3.3.5.2.3.1.1.11
|
||||||
|
smppRowStatus OBJECT-TYPE
|
||||||
|
SYNTAX RowStatus
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Key Parameter:Yes"
|
||||||
|
::= { sMPPEntry 11 }
|
||||||
|
-- 1.3.6.1.4.1.1373.2.3.3.5.2.3.1.1.12
|
||||||
smppRoleType OBJECT-TYPE
|
smppRoleType OBJECT-TYPE
|
||||||
SYNTAX INTEGER
|
SYNTAX INTEGER
|
||||||
{
|
{
|
||||||
@@ -541,30 +569,9 @@
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
"Key Parameter:Yes Name:Role Type
|
"Key Parameter:Yes Name:Role Type
|
||||||
Remark:Specify the role type of local SMPP entity"
|
Remark:Specify the role type of local SMPP entity"
|
||||||
::= { sMPPEntry 11 }
|
|
||||||
-- 1.3.6.1.4.1.1373.2.3.3.5.2.3.1.1.12
|
|
||||||
smppRerouteInd OBJECT-TYPE
|
|
||||||
SYNTAX INTEGER
|
|
||||||
{
|
|
||||||
disable(0),
|
|
||||||
enable(1)
|
|
||||||
}
|
|
||||||
MAX-ACCESS read-write
|
|
||||||
STATUS current
|
|
||||||
DESCRIPTION
|
|
||||||
"Key Parameter:Yes Name:Reroute Indication
|
|
||||||
Remark:Specify the reroute indication of local SMPP entity"
|
|
||||||
::= { sMPPEntry 12 }
|
::= { sMPPEntry 12 }
|
||||||
|
|
||||||
-- 1.3.6.1.4.1.1373.2.3.3.5.2.3.1.1.13
|
|
||||||
smppRowStatus OBJECT-TYPE
|
|
||||||
SYNTAX RowStatus
|
|
||||||
MAX-ACCESS read-write
|
|
||||||
STATUS current
|
|
||||||
DESCRIPTION
|
|
||||||
"Key Parameter:Yes"
|
|
||||||
::= { sMPPEntry 13 }
|
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#This script parse the result.txt file
|
|
||||||
#to judge whether the operation of sending file is successful
|
|
||||||
|
|
||||||
#The local do not have the Permission to access the remote directory
|
|
||||||
if [ `grep -c "handle" /tmp/result$1.txt` -gt 0 ] ; then
|
|
||||||
`echo 4 >/tmp/temp$1.txt`
|
|
||||||
#echo "The local do not have the Permission to access the remote directory"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
#The name or the password is not fit
|
|
||||||
if [ `grep -c "Permission denied" /tmp/result$1.txt` -gt 0 ] ; then
|
|
||||||
`echo 2 >/tmp/temp$1.txt`
|
|
||||||
#echo "The name or the password is not fit"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Successful
|
|
||||||
if [ `grep -c "100%" /tmp/result$1.txt` -gt 0 ] ; then
|
|
||||||
`echo 0 >/tmp/temp$1.txt`
|
|
||||||
#echo "Send the file successfully"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
#The remote server is unavailable
|
|
||||||
`echo 1 >/tmp/temp$1.txt`
|
|
||||||
#echo "The remote server is unavailable"
|
|
||||||
exit
|
|
||||||
|
|
||||||
32
bin/sendfile
32
bin/sendfile
@@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/expect
|
|
||||||
|
|
||||||
#This script interative with the remote server, and send the file to it
|
|
||||||
|
|
||||||
#This script have 6 parameters
|
|
||||||
#remoteip: the ip of the remote server
|
|
||||||
#username: the name for logining in
|
|
||||||
#userpass: the password for logining in
|
|
||||||
#resdir: the directory to store the files
|
|
||||||
#sendfile: the file to send to the remote server
|
|
||||||
#desdir: the directory to send the files
|
|
||||||
|
|
||||||
set remoteip [lindex $argv 0]
|
|
||||||
set username [lindex $argv 1]
|
|
||||||
set userpass [lindex $argv 2]
|
|
||||||
set resdir [lindex $argv 3]
|
|
||||||
set sendfile [lindex $argv 4]
|
|
||||||
set desdir [lindex $argv 5]
|
|
||||||
|
|
||||||
set timeout 120
|
|
||||||
|
|
||||||
spawn sftp $username@$remoteip
|
|
||||||
|
|
||||||
expect "yes/no" {send "yes\n"; expect "*assword: "} "*assword: "
|
|
||||||
send "$userpass\n"
|
|
||||||
expect "*sftp>*"
|
|
||||||
send "cd $desdir\n"
|
|
||||||
send "lcd $resdir\n"
|
|
||||||
send "put $sendfile\n"
|
|
||||||
|
|
||||||
expect "*100%*"
|
|
||||||
exit
|
|
||||||
@@ -184,7 +184,9 @@ case "$runMode" in
|
|||||||
hostName='single'
|
hostName='single'
|
||||||
|
|
||||||
#my.conf
|
#my.conf
|
||||||
mv -f /etc/my.cnf /etc/my.cnf_bak
|
if [ -f /etc/my.cnf ] ; then
|
||||||
|
mv -f /etc/my.cnf /etc/my.cnf_bak
|
||||||
|
fi
|
||||||
cp -f ../config/mariadb-50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf
|
cp -f ../config/mariadb-50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||||
chmod 644 /etc/mysql/mariadb.conf.d/50-server.cnf
|
chmod 644 /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||||
echo "set configuration file: /etc/mysql/mariadb.conf.d/50-server.cnf ok!"
|
echo "set configuration file: /etc/mysql/mariadb.conf.d/50-server.cnf ok!"
|
||||||
|
|||||||
BIN
bin/tapcvt
Normal file
BIN
bin/tapcvt
Normal file
Binary file not shown.
@@ -44,8 +44,6 @@
|
|||||||
## TEST_OBJ_PATH = [module object files Path for test ] => just for test
|
## TEST_OBJ_PATH = [module object files Path for test ] => just for test
|
||||||
##---------------------------------------------------------------------##
|
##---------------------------------------------------------------------##
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = 8ecp
|
MODULE = 8ecp
|
||||||
TYPE = plat
|
TYPE = plat
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Makefile for platform of EMS
|
# Makefile for platform of EMS
|
||||||
|
|
||||||
PLATDIR = ../plat
|
PLATDIR = $(shell pwd)
|
||||||
BINDIR = ../bin
|
BINDIR = $(PLATDIR)/../bin
|
||||||
PLATMODULELIST = 8ecp aif bicc debug haepub iptrans isdn isup m2ua mgc mgcp mgc_v2 mtp3 pal public rtp sccp scf sip smpp snmp tcap xapp
|
PLATMODULELIST = 8ecp aif bicc debug haepub iptrans isdn isup m2ua mgc mgcp mgc_v2 mtp3 pal public rtp sccp scf sip smpp snmp tcap xapp
|
||||||
|
|
||||||
.PHONY: all $(PLATMODULELIST) clean
|
.PHONY: all $(PLATMODULELIST) clean
|
||||||
@@ -14,6 +14,7 @@ $(PLATMODULELIST):
|
|||||||
@echo "====================== make $@ ======================="
|
@echo "====================== make $@ ======================="
|
||||||
@cd $(PLATDIR)/$@ && $(MAKE)
|
@cd $(PLATDIR)/$@ && $(MAKE)
|
||||||
@if [ $@ = "iptrans" ]; then \
|
@if [ $@ = "iptrans" ]; then \
|
||||||
|
cd $(PLATDIR)/$@; \
|
||||||
./mkiptrans.sh; \
|
./mkiptrans.sh; \
|
||||||
cp -f ./iptrans $(BINDIR); \
|
cp -f ./iptrans $(BINDIR); \
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#gcc -o iptrans ./src/iptrmain.c -Llib/ -liptrans -L../debug/lib -ldebug -lcurses -L../snmp/lib -lsnmp -L../public/lib -lpublic -lm
|
|
||||||
gcc -o iptrans ./src/iptrmain.c -Llib/ -liptrans -L../debug/lib -ldebug -L../snmp/lib -lsnmp -L../public/lib -lpublic -lm
|
#gcc -o iptrans ./src/iptrmain.c -Llib/ -liptrans -L../debug/lib -ldebug -lcurses -L../snmp/lib -lsnmp -L../public/lib -lpublic -lm
|
||||||
|
gcc -o iptrans ./src/iptrmain.c -Llib/ -liptrans -L../debug/lib -ldebug -L../snmp/lib -lsnmp -L../public/lib -lpublic -lm
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ BYTE str2oid(char *str, DWORD * array, BYTE max);
|
|||||||
char *bcd2str(BYTE* buf,int len);
|
char *bcd2str(BYTE* buf,int len);
|
||||||
int smsDecodeAll(int code_type,char* strIn,char* strOut,int length);
|
int smsDecodeAll(int code_type,char* strIn,char* strOut,int length);
|
||||||
char* digits2str(BYTE* buf,int len);
|
char* digits2str(BYTE* buf,int len);
|
||||||
|
char* askm2str(BYTE* buf,int len);
|
||||||
|
|
||||||
|
|
||||||
void test()
|
void test()
|
||||||
{
|
{
|
||||||
@@ -767,6 +769,9 @@ void create_record_table(cdr_src *psrc,MYSQL *pCdrConn)
|
|||||||
sprintf(tmpstr,"TEXT");
|
sprintf(tmpstr,"TEXT");
|
||||||
strcat(createfieldlist,tmpstr);
|
strcat(createfieldlist,tmpstr);
|
||||||
break;
|
break;
|
||||||
|
case 42: // 假设这是一个字符串类型的字段
|
||||||
|
strcat(createfieldlist, "VARCHAR(30)"); // 或者根据需要调整长度
|
||||||
|
break;
|
||||||
//integer
|
//integer
|
||||||
case 1:
|
case 1:
|
||||||
//unsigned integer
|
//unsigned integer
|
||||||
@@ -1442,9 +1447,22 @@ void cdr_parse(cdr_sys *psys,int tagcode,ASN_BUF *asnbuf,int fieldIndex,char* fi
|
|||||||
case 4:
|
case 4:
|
||||||
if((len = get_tlv(pdef->fields[fieldIndex].tags[tagcode],tempbyte,asnbuf)) > 0)
|
if((len = get_tlv(pdef->fields[fieldIndex].tags[tagcode],tempbyte,asnbuf)) > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
//opps need cc
|
//opps need cc
|
||||||
if(psrc->sysTypeNo == 375)
|
if (psrc->sysTypeNo == 375) {
|
||||||
sprintf(fieldstr,",'%s'",digits2str(tempbyte,len * 2));
|
sprintf(fieldstr, ",'%s'", digits2str(tempbyte, len * 2));
|
||||||
|
} else if ((psrc->sysTypeNo == 320 && !strcmp(pdef->fields[fieldIndex].tags[tagcode], "7.12")) ||
|
||||||
|
(psrc->sysTypeNo == 351 &&
|
||||||
|
(!strcmp(pdef->fields[fieldIndex].tags[tagcode], "0.1") ||
|
||||||
|
!strcmp(pdef->fields[fieldIndex].tags[tagcode], "0.2")))) {
|
||||||
|
|
||||||
|
if (tempbyte[0] == 0x91 || tempbyte[0] == 0x81 || tempbyte[0] == 0xa1) {
|
||||||
|
sprintf(fieldstr, ",'%s'", digits2str(tempbyte + 1, (len - 1) * 2));
|
||||||
|
} else {
|
||||||
|
// 阿斯克码值
|
||||||
|
sprintf(fieldstr, ",'%s'", askm2str(tempbyte, len * 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sprintf(fieldstr,",'%s'",digits2str(tempbyte + 1,(len - 1) * 2));
|
sprintf(fieldstr,",'%s'",digits2str(tempbyte + 1,(len - 1) * 2));
|
||||||
}
|
}
|
||||||
@@ -1714,7 +1732,16 @@ void cdr_parse(cdr_sys *psys,int tagcode,ASN_BUF *asnbuf,int fieldIndex,char* fi
|
|||||||
sprintf(fieldstr,",NULL");
|
sprintf(fieldstr,",NULL");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 42:
|
||||||
|
if((len = get_tlv(pdef->fields[fieldIndex].tags[tagcode], tempbyte, asnbuf)) > 0)
|
||||||
|
{
|
||||||
|
sprintf(fieldstr, ",'%d.%d.%d.%d'", tempbyte[0], tempbyte[1], tempbyte[2], tempbyte[3]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(fieldstr, ",NULL");
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1952,6 +1979,22 @@ char* digits2str(BYTE* buf,int len)
|
|||||||
return dig;
|
return dig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* askm2str(BYTE* buf, int len) {
|
||||||
|
static char str[512];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 512; i++) {
|
||||||
|
str[i] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
str[i] = buf[i];
|
||||||
|
}
|
||||||
|
str[len] = '\0';
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
// Extra function
|
// Extra function
|
||||||
int sendHeartbeat()
|
int sendHeartbeat()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1265,7 +1265,11 @@ void clear_table(char *table_name)
|
|||||||
cdr_log("[ERR %d][clear_table]:Can not connect to CDR_DB",mysql_errno(pubConn));
|
cdr_log("[ERR %d][clear_table]:Can not connect to CDR_DB",mysql_errno(pubConn));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sprintf(mng_sqlstr,"delete from CDR_DB.%s WHERE TO_DAYS(releaseTime)<TO_DAYS(NOW());",table_name);
|
sprintf(mng_sqlstr,"delete from CDR_DB.%s WHERE TO_DAYS(releaseTime)<TO_DAYS(NOW());",table_name);
|
||||||
|
|
||||||
|
|
||||||
if(mysql_getnores(pubConn,mng_sqlstr) != 0)
|
if(mysql_getnores(pubConn,mng_sqlstr) != 0)
|
||||||
cdr_log("[ERR %d][clear_table]:%s",mysql_errno(pubConn),mng_sqlstr);
|
cdr_log("[ERR %d][clear_table]:%s",mysql_errno(pubConn),mng_sqlstr);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
#!/usr/bin/expect
|
#!/usr/bin/expect
|
||||||
|
|
||||||
#This script use to init the server keys, it rewrite the known_hosts config file
|
#This script use to init the server keys, it rewrite the known_hosts config file
|
||||||
|
|
||||||
#This script have 3 parameters
|
#This script have 3 parameters
|
||||||
#remoteip: the ip of the remote server
|
#remoteip: the ip of the remote server
|
||||||
#username: the name for logging in
|
#username: the name for logging in
|
||||||
#userpass: the password for logging in
|
#userpass: the password for logging in
|
||||||
|
|
||||||
set remoteip [lindex $argv 0]
|
set remoteip [lindex $argv 0]
|
||||||
set username [lindex $argv 1]
|
set username [lindex $argv 1]
|
||||||
set userpass [lindex $argv 2]
|
set userpass [lindex $argv 2]
|
||||||
|
|
||||||
set timeout 5
|
set timeout 5
|
||||||
|
|
||||||
spawn sftp $username@$remoteip
|
spawn sftp $username@$remoteip
|
||||||
|
|
||||||
expect "*(yes/no)?*"
|
expect "*(yes/no)?*"
|
||||||
|
|
||||||
send "yes\n"
|
send "yes\n"
|
||||||
|
|
||||||
expect "*password*"
|
expect "*password*"
|
||||||
|
|
||||||
send "$userpass\n"
|
send "$userpass\n"
|
||||||
|
|
||||||
expect "*sftp>*"
|
expect "*sftp>*"
|
||||||
|
|
||||||
send "quit\n"
|
send "quit\n"
|
||||||
|
|
||||||
expect eof
|
expect eof
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#This script parse the result.txt file
|
#This script parse the result.txt file
|
||||||
#to judge whether the operation of sending file is successful
|
#to judge whether the operation of sending file is successful
|
||||||
|
|
||||||
#The local do not have the Permission to access the remote directory
|
#The local do not have the Permission to access the remote directory
|
||||||
if [ `grep -c "handle" /tmp/result$1.txt` -gt 0 ] ; then
|
if [ `grep -c "handle" /tmp/result$1.txt` -gt 0 ] ; then
|
||||||
`echo 4 >/tmp/temp$1.txt`
|
`echo 4 >/tmp/temp$1.txt`
|
||||||
#echo "The local do not have the Permission to access the remote directory"
|
#echo "The local do not have the Permission to access the remote directory"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#The name or the password is not fit
|
#The name or the password is not fit
|
||||||
if [ `grep -c "Permission denied" /tmp/result$1.txt` -gt 0 ] ; then
|
if [ `grep -c "Permission denied" /tmp/result$1.txt` -gt 0 ] ; then
|
||||||
`echo 2 >/tmp/temp$1.txt`
|
`echo 2 >/tmp/temp$1.txt`
|
||||||
#echo "The name or the password is not fit"
|
#echo "The name or the password is not fit"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Successful
|
#Successful
|
||||||
if [ `grep -c "100%" /tmp/result$1.txt` -gt 0 ] ; then
|
if [ `grep -c "100%" /tmp/result$1.txt` -gt 0 ] ; then
|
||||||
`echo 0 >/tmp/temp$1.txt`
|
`echo 0 >/tmp/temp$1.txt`
|
||||||
#echo "Send the file successfully"
|
#echo "Send the file successfully"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#The remote server is unavailable
|
#The remote server is unavailable
|
||||||
`echo 1 >/tmp/temp$1.txt`
|
`echo 1 >/tmp/temp$1.txt`
|
||||||
#echo "The remote server is unavailable"
|
#echo "The remote server is unavailable"
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
#!/usr/bin/expect
|
#!/usr/bin/expect
|
||||||
|
|
||||||
#This script interative with the remote server, and send the file to it
|
#This script interative with the remote server, and send the file to it
|
||||||
|
|
||||||
#This script have 6 parameters
|
#This script have 6 parameters
|
||||||
#remoteip: the ip of the remote server
|
#remoteip: the ip of the remote server
|
||||||
#username: the name for logining in
|
#username: the name for logining in
|
||||||
#userpass: the password for logining in
|
#userpass: the password for logining in
|
||||||
#resdir: the directory to store the files
|
#resdir: the directory to store the files
|
||||||
#sendfile: the file to send to the remote server
|
#sendfile: the file to send to the remote server
|
||||||
#desdir: the directory to send the files
|
#desdir: the directory to send the files
|
||||||
|
|
||||||
set remoteip [lindex $argv 0]
|
set remoteip [lindex $argv 0]
|
||||||
set username [lindex $argv 1]
|
set username [lindex $argv 1]
|
||||||
set userpass [lindex $argv 2]
|
set userpass [lindex $argv 2]
|
||||||
set resdir [lindex $argv 3]
|
set resdir [lindex $argv 3]
|
||||||
set sendfile [lindex $argv 4]
|
set sendfile [lindex $argv 4]
|
||||||
set desdir [lindex $argv 5]
|
set desdir [lindex $argv 5]
|
||||||
|
|
||||||
set timeout 120
|
set timeout 120
|
||||||
|
|
||||||
spawn sftp $username@$remoteip
|
spawn sftp $username@$remoteip
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
expect "yes/no" {send "yes\n"; expect "*assword: "} "*assword: "
|
expect "yes/no" {send "yes\n"; expect "*assword: "} "*assword: "
|
||||||
send "$userpass\n"
|
send "$userpass\n"
|
||||||
expect "*sftp>*"
|
expect "*sftp>*"
|
||||||
send "cd $desdir\n"
|
send "cd $desdir\n"
|
||||||
send "lcd $resdir\n"
|
send "lcd $resdir\n"
|
||||||
send "put $sendfile\n"
|
send "put $sendfile\n"
|
||||||
|
|
||||||
expect "*100%*"
|
expect "*100%*"
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -788,6 +788,8 @@ int sendFile(char *remoteip, char *username, char *userpass, char *srcdir, char
|
|||||||
|
|
||||||
//Use the expect script to send the file by sftp
|
//Use the expect script to send the file by sftp
|
||||||
sprintf(command,"expect sendfile %s %s %s %s %s %s 1>/tmp/result%d.txt 2>/dev/null",remoteip,username,userpass,srcdir,filename,desdir,fileIndex);
|
sprintf(command,"expect sendfile %s %s %s %s %s %s 1>/tmp/result%d.txt 2>/dev/null",remoteip,username,userpass,srcdir,filename,desdir,fileIndex);
|
||||||
|
sprintf(message,"command %s \n",command);
|
||||||
|
logMessage(message);
|
||||||
system(command);
|
system(command);
|
||||||
|
|
||||||
//Use the parseResult script to parse the result of sending file
|
//Use the parseResult script to parse the result of sending file
|
||||||
@@ -801,6 +803,9 @@ int sendFile(char *remoteip, char *username, char *userpass, char *srcdir, char
|
|||||||
|
|
||||||
sprintf(command,"rm -rf /tmp/result%d.txt",fileIndex);
|
sprintf(command,"rm -rf /tmp/result%d.txt",fileIndex);
|
||||||
system(command);
|
system(command);
|
||||||
|
|
||||||
|
sprintf(message,"SendFile()---The result is %d\n",res);
|
||||||
|
logMessage(message);
|
||||||
//printf("SendFile()---The result is %d\n",res);
|
//printf("SendFile()---The result is %d\n",res);
|
||||||
|
|
||||||
if(res==0)
|
if(res==0)
|
||||||
@@ -841,6 +846,8 @@ int sendFile(char *remoteip, char *username, char *userpass, char *srcdir, char
|
|||||||
}
|
}
|
||||||
//printf("%s\n",message);
|
//printf("%s\n",message);
|
||||||
sprintf(command,"rm -rf /tmp/temp%d.txt",fileIndex);
|
sprintf(command,"rm -rf /tmp/temp%d.txt",fileIndex);
|
||||||
|
sprintf(message,"rm command %s \n",command);
|
||||||
|
logMessage(message);
|
||||||
system(command);
|
system(command);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ linux72: $(PARACOMM_OBJ) $(LIB_OBJ)
|
|||||||
|
|
||||||
linuxES: $(PARACOMM_OBJ.ES) $(LIB_OBJ.ES)
|
linuxES: $(PARACOMM_OBJ.ES) $(LIB_OBJ.ES)
|
||||||
@echo Linking $(PROGS)
|
@echo Linking $(PROGS)
|
||||||
@$(LINK.c.ES) -o $(PROGS) $(PARACOMM_OBJ.ES) $(LINKFLAG.ES) -lm
|
@$(LINK.c.ES) -o $(PROGS) $(PARACOMM_OBJ) $(LINKFLAG.ES) -lm
|
||||||
ar r libparaComm.a $(LIB_OBJ.ES)
|
ar r libparaComm.a $(LIB_OBJ)
|
||||||
|
|
||||||
installbin: linuxES
|
installbin: linuxES
|
||||||
cp -f $(PROGS) ../../../../bin/
|
cp -f $(PROGS) ../../../../bin/
|
||||||
@@ -85,13 +85,13 @@ initParaConf.o: initParaConf.c
|
|||||||
$(COMPILE.c) -c initParaConf.c
|
$(COMPILE.c) -c initParaConf.c
|
||||||
|
|
||||||
paraCommMain.o.ES: paraCommMain.c
|
paraCommMain.o.ES: paraCommMain.c
|
||||||
$(COMPILE.c.ES) -c paraCommMain.c -o paraCommMain.o.ES
|
$(COMPILE.c.ES) -c paraCommMain.c # -o paraCommMain.o.ES
|
||||||
|
|
||||||
paraComm.o.ES: paraComm.c
|
paraComm.o.ES: paraComm.c
|
||||||
$(COMPILE.c.ES) -c paraComm.c -o paraComm.o.ES
|
$(COMPILE.c.ES) -c paraComm.c # -o paraComm.o.ES
|
||||||
|
|
||||||
initParaConf.o.ES: initParaConf.c
|
initParaConf.o.ES: initParaConf.c
|
||||||
$(COMPILE.c.ES) -c initParaConf.c -o initParaConf.o.ES
|
$(COMPILE.c.ES) -c initParaConf.c # -o initParaConf.o.ES
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.o.ES *.a $(PROGS)
|
rm -f *.o *.o.ES *.a $(PROGS)
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ int checkPlatHasSubSysNo(int sysTypeNo,int sysNo)
|
|||||||
{
|
{
|
||||||
// modified by simon at 2024/04/12
|
// modified by simon at 2024/04/12
|
||||||
//if(sysNo != 9)
|
//if(sysNo != 9)
|
||||||
if (sysNo != 9 && sysNo != 3 && sysNo != 5 && sysNo != 6 ) // 9-MSS,3-HLR,5-OCS/PPS,6-SMSC
|
if (sysNo != 9 && sysNo != 3 && sysNo != 5 && sysNo != 6 && sysNo != 11) // 9-MSS,3-HLR,5-OCS/PPS,6-SMSC 11-AAS
|
||||||
{
|
{
|
||||||
switch(sysTypeNo)
|
switch(sysTypeNo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ BYTE parseoid(char *str, DWORD * array, BYTE max);
|
|||||||
char *oidtostr(DWORD* oid,int oidlen,char *output);
|
char *oidtostr(DWORD* oid,int oidlen,char *output);
|
||||||
|
|
||||||
static char beatproc_sqlstr[8192];
|
static char beatproc_sqlstr[8192];
|
||||||
|
static char beatprocInfo_sqlstr[8192];
|
||||||
|
|
||||||
static char state_str[MAX_MSG_LEN];
|
static char state_str[MAX_MSG_LEN];
|
||||||
static _sys_conf sys_conf[MAX_SYS_CONF];
|
static _sys_conf sys_conf[MAX_SYS_CONF];
|
||||||
static int sys_conf_count=0;
|
static int sys_conf_count=0;
|
||||||
@@ -257,70 +259,198 @@ void localBeatRecv(BYTE oidLen, DWORD *oidArr, BYTE *pdata,WORD dataLen,snmp_add
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
//another omc
|
|
||||||
if(psysconf->systypeno == 0)
|
//check oidlen
|
||||||
{
|
// if(oidLen > oidArr[psysconf->prefixoidlen]+1)
|
||||||
if(oidArr[7] == 2 && oidArr[8] == 4 && oidArr[9] == 10)
|
// {
|
||||||
|
// //ems_debug(BEATPROC_DEBUG_LOGFILE,"The length of oid is big");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>澯 Trap (OID <20><> .8 <20><>β)
|
||||||
|
if (oidArr[psysconf->prefixoidlen] == 8)
|
||||||
{
|
{
|
||||||
update_ems_process_state(oidArr,pdata);
|
|
||||||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Trap (OID <20><> .2 <20><>β)
|
||||||
|
// <20><>ӡ pdata <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
// char pdatastring[256] = {0};
|
||||||
|
// char tmpstr[16];
|
||||||
|
// for (int j = 0; j < dataLen; j++)
|
||||||
|
// {
|
||||||
|
// sprintf(tmpstr, "%02X ", pdata[j]);
|
||||||
|
// strcat(pdatastring, tmpstr);
|
||||||
|
// }
|
||||||
|
// char oidstring[256] = {0};
|
||||||
|
// oidtostr(oidArr, oidLen, oidstring);
|
||||||
|
// ems_debug(BEATPROC_DEBUG_LOGFILE, "Received alarm trap OID: %s, data: %s", oidstring, pdatastring);
|
||||||
|
|
||||||
|
sysno=pdata[0];
|
||||||
|
subsysno=pdata[1];
|
||||||
|
if(sysno >= psysconf->maxsysnum || subsysno >= psysconf->maxsubsysnum)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"System %s sysno or subsysno is too big,[%d,%d] > [%d,%d]",psysconf->systypename,sysno,subsysno,psysconf->maxsysnum,psysconf->maxsubsysnum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=0;i<4;i++)
|
|
||||||
{
|
|
||||||
//ems_debug(BEATPROC_DEBUG_LOGFILE,"pdata[39+%d]:%d",i,(int *)pdata[39+i]);
|
|
||||||
//ems_debug(BEATPROC_DEBUG_LOGFILE,"beatProcSequenceNum[%d]:%d",i,(int)beatProcSequenceNum[i]);
|
|
||||||
|
|
||||||
if(pdata[39+i] != beatProcSequenceNum[i])
|
// <20><>ȡʱ<C8A1><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3-6 <20>ֽڣ<D6BD>
|
||||||
|
unsigned long alarmTime = (pdata[2] << 24) | (pdata[3] << 16) | (pdata[4] << 8) | pdata[5];
|
||||||
|
|
||||||
|
// <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϊ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD> alarmId
|
||||||
|
char alarmIdStr[32];
|
||||||
|
sprintf(alarmIdStr, "%lu", alarmTime);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ת<><D7AA>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ϊʱ<CEAA><CAB1><EFBFBD><EFBFBD>ʽ
|
||||||
|
char alarmTimeStr[20]; // <20><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||||
|
time_t alarmTime_t = (time_t)alarmTime;
|
||||||
|
strftime(alarmTimeStr, sizeof(alarmTimeStr), "%Y-%m-%d %H:%M:%S", localtime(&alarmTime_t));
|
||||||
|
|
||||||
|
|
||||||
|
// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
|
||||||
|
int clearMode = pdata[6]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
int compCode = pdata[8]; // <20><><EFBFBD><EFBFBD> ID
|
||||||
|
int alarmCode = pdata[9]; // <20>澯<EFBFBD><E6BEAF>
|
||||||
|
|
||||||
|
|
||||||
|
// <20><>ȡ<EFBFBD>澯<EFBFBD><E6BEAF>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD> 11 <20>ֽڿ<D6BD>ʼ<EFBFBD><CABC>
|
||||||
|
char alarmInfo[256] = {0};
|
||||||
|
memcpy(alarmInfo, &pdata[10], dataLen - 10); // ʣ<><CAA3><EFBFBD>ֽ<EFBFBD>Ϊ<EFBFBD>澯<EFBFBD><E6BEAF>Ϣ
|
||||||
|
|
||||||
|
MYSQL *pubConn = mysql_conn("localhost","OMC_PUB");
|
||||||
|
if (pubConn == NULL)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "Connect to OMC_PUB fail");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD> SQL <20><><EFBFBD><EFBFBD>
|
||||||
|
if (clearMode == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>澯
|
||||||
|
sprintf(beatproc_sqlstr,
|
||||||
|
"UPDATE sysAlarmInfo SET clearTime=CURRENT_TIMESTAMP, clearMode=0, clearBy='System' "
|
||||||
|
"WHERE sysTypeNo=%d AND sysNo=%d AND subSysNo=%d AND compCode=%d AND alarmCode=%d AND clearMode=1 AND alarmId='%s';",
|
||||||
|
psysconf->systypeno, sysno, subsysno, compCode, alarmCode, alarmIdStr);
|
||||||
|
|
||||||
|
if (mysql_getnores(pubConn, beatproc_sqlstr) != 0)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "[SQL ERR], %s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "Alarm cleared: %s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
mysql_close(pubConn);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (clearMode == 1)
|
||||||
|
{
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>澯
|
||||||
|
sprintf(beatproc_sqlstr,
|
||||||
|
"INSERT INTO sysAlarmInfo (sysTypeNo, sysNo, subSysNo, compCode, alarmCode, alarmTime, clearTime, clearMode, alarmId, alarmInfo) "
|
||||||
|
"VALUES (%d, %d, %d, %d, %d, '%s', '0000-00-00 00:00:00', 1, '%s', '%s');",
|
||||||
|
psysconf->systypeno, sysno, subsysno, compCode, alarmCode, alarmTimeStr, alarmIdStr, alarmInfo);
|
||||||
|
|
||||||
|
if (mysql_getnores(pubConn, beatproc_sqlstr) != 0)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "[SQL ERR], %s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "New alarm inserted: %s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
mysql_close(pubConn);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(clearMode == 2)
|
||||||
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>澯
|
||||||
|
|
||||||
|
sprintf(beatproc_sqlstr,
|
||||||
|
"INSERT INTO sysAlarmEvent (sysTypeNo, sysNo, subSysNo, compCode, alarmCode, alarmTime, clearTime, clearMode, alarmId, alarmInfo) "
|
||||||
|
"VALUES (%d, %d, %d, %d, %d, '%s', '0000-00-00 00:00:00', 2, '%s', '%s');",
|
||||||
|
psysconf->systypeno, sysno, subsysno, compCode, alarmCode, alarmTimeStr, alarmIdStr, alarmInfo);
|
||||||
|
|
||||||
|
if (mysql_getnores(pubConn, beatproc_sqlstr) != 0)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "[SQL ERR], %s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "Event alarm inserted: %s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
mysql_close(pubConn);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} //end if .8
|
||||||
|
else{
|
||||||
|
//another omc
|
||||||
|
if(psysconf->systypeno == 0)
|
||||||
{
|
{
|
||||||
//ems_debug(BEATPROC_DEBUG_LOGFILE,"beatProcSequenceNum:%s",Sequencstring);
|
if(oidArr[7] == 2 && oidArr[8] == 4 && oidArr[9] == 10)
|
||||||
|
{
|
||||||
|
update_ems_process_state(oidArr,pdata);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0;i<4;i++)
|
||||||
|
{
|
||||||
|
//ems_debug(BEATPROC_DEBUG_LOGFILE,"pdata[39+%d]:%d",i,(int *)pdata[39+i]);
|
||||||
|
//ems_debug(BEATPROC_DEBUG_LOGFILE,"beatProcSequenceNum[%d]:%d",i,(int)beatProcSequenceNum[i]);
|
||||||
|
|
||||||
|
if(pdata[39+i] != beatProcSequenceNum[i])
|
||||||
|
{
|
||||||
|
//ems_debug(BEATPROC_DEBUG_LOGFILE,"beatProcSequenceNum:%s",Sequencstring);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//ems_debug(BEATPROC_DEBUG_LOGFILE,"EqHBProSequenceNum:%s",Sequencstring);
|
||||||
|
|
||||||
|
}
|
||||||
|
//msc trap message for parameter
|
||||||
|
else if(psysconf->systypeno == 320)
|
||||||
|
{
|
||||||
|
if(oidLen <= psysconf->prefixoidlen)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"MSC trap message oid is too short %d <= %d",oidLen,psysconf->prefixoidlen);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//parameter
|
||||||
|
if(oidArr[psysconf->prefixoidlen] == 2)
|
||||||
|
{
|
||||||
|
update_msc_trap_msg(oidLen,oidArr,pdata,dataLen,addr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//check sysno and subsysno
|
||||||
|
sysno=pdata[0];
|
||||||
|
subsysno=pdata[1];
|
||||||
|
if(sysno >= psysconf->maxsysnum || subsysno >= psysconf->maxsubsysnum)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"System %s sysno or subsysno is too big,[%d,%d] > [%d,%d]",psysconf->systypename,sysno,subsysno,psysconf->maxsysnum,psysconf->maxsubsysnum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//ems_debug(BEATPROC_DEBUG_LOGFILE,"EqHBProSequenceNum:%s",Sequencstring);
|
if(psysconf->systems[sysno][subsysno].isalive == 0)
|
||||||
|
{
|
||||||
}
|
psysconf->systems[sysno][subsysno].isalive=1;
|
||||||
//msc trap message for parameter
|
//printf("%s-%d-%d-%d is alive\n",psysconf->systypename,index,sysno,subsysno);
|
||||||
else if(psysconf->systypeno == 320)
|
}
|
||||||
{
|
|
||||||
if(oidLen <= psysconf->prefixoidlen)
|
if(psysconf->isalive == 0)
|
||||||
{
|
{
|
||||||
ems_debug(BEATPROC_DEBUG_LOGFILE,"MSC trap message oid is too short %d <= %d",oidLen,psysconf->prefixoidlen);
|
psysconf->isalive=1;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
//parameter
|
psysconf->systems[sysno][subsysno].lastupdatetime=time(NULL);
|
||||||
if(oidArr[psysconf->prefixoidlen] == 2)
|
|
||||||
{
|
update_state(psysconf,sysno,subsysno,pdata,dataLen,addr);
|
||||||
update_msc_trap_msg(oidLen,oidArr,pdata,dataLen,addr);
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//check sysno and subsysno
|
|
||||||
sysno=pdata[0];
|
|
||||||
subsysno=pdata[1];
|
|
||||||
if(sysno >= psysconf->maxsysnum || subsysno >= psysconf->maxsubsysnum)
|
|
||||||
{
|
|
||||||
ems_debug(BEATPROC_DEBUG_LOGFILE,"System %s sysno or subsysno is too big,[%d,%d] > [%d,%d]",psysconf->systypename,sysno,subsysno,psysconf->maxsysnum,psysconf->maxsubsysnum);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(psysconf->systems[sysno][subsysno].isalive == 0)
|
|
||||||
{
|
|
||||||
psysconf->systems[sysno][subsysno].isalive=1;
|
|
||||||
//printf("%s-%d-%d-%d is alive\n",psysconf->systypename,index,sysno,subsysno);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(psysconf->isalive == 0)
|
|
||||||
{
|
|
||||||
psysconf->isalive=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
psysconf->systems[sysno][subsysno].lastupdatetime=time(NULL);
|
|
||||||
|
|
||||||
update_state(psysconf,sysno,subsysno,pdata,dataLen,addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -414,6 +544,17 @@ void update_state(_sys_conf *psysconf,int sysNo,int subSysNo,BYTE *pdata,int dat
|
|||||||
{
|
{
|
||||||
ems_debug(BEATPROC_DEBUG_LOGFILE,"%s",beatproc_sqlstr);
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"%s",beatproc_sqlstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sprintf(beatproc_sqlstr,"update OMC_PUB.sysAlarmInfo set clearTime=CURRENT_TIMESTAMP,clearMode=0,clearBy='System' where sysTypeNo=%d and sysNo=%d and subSysNo=%d and compCode=0 and alarmCode=254;",
|
||||||
|
psysconf->systypeno,sysNo,subSysNo);
|
||||||
|
if(mysql_getnores(pubConn,beatproc_sqlstr) != 0)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"[SQL ERR],%s",beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"%s",beatproc_sqlstr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_close(pubConn);
|
mysql_close(pubConn);
|
||||||
@@ -587,6 +728,39 @@ void update_alarm(_sys_conf *psysconf,int sysno,int subsysno,int compcode,int al
|
|||||||
{
|
{
|
||||||
ems_debug(BEATPROC_DEBUG_LOGFILE,"%s",beatproc_sqlstr);
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"%s",beatproc_sqlstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD> alarmCode Ϊ 254 ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD>뵽 alarmInfo <20><>
|
||||||
|
if (alarmcode == 254)
|
||||||
|
{
|
||||||
|
|
||||||
|
sprintf(beatproc_sqlstr,"update OMC_PUB.sysAlarmInfo set clearTime=CURRENT_TIMESTAMP,clearMode=0,clearBy='System' where sysTypeNo=%d and sysNo=%d and subSysNo=%d and compCode=0 and alarmCode=254;",
|
||||||
|
psysconf->systypeno,sysno,subsysno);
|
||||||
|
if(mysql_getnores(pubConn,beatproc_sqlstr) != 0)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"[SQL ERR],%s",beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE,"%s",beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
time_t current_time = time(NULL);
|
||||||
|
char alarmIdStr[32];
|
||||||
|
sprintf(alarmIdStr, "%ld", (long)current_time); // <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϊ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||||
|
|
||||||
|
sprintf(beatproc_sqlstr, "insert into OMC_PUB.sysAlarmInfo(sysTypeNo,sysNo,subSysNo,compCode,alarmCode,alarmTime,clearTime,clearMode,alarmInfo,alarmId) "
|
||||||
|
"values(%d,%d,%d,%d,%d,CURRENT_TIMESTAMP,'0000-00-00 00:00:00',1,'Can not receive heartbeat','%s');",
|
||||||
|
psysconf->systypeno, sysno, subsysno, compcode, alarmcode,alarmIdStr);
|
||||||
|
if (mysql_getnores(pubConn, beatproc_sqlstr) != 0)
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "[SQL ERR],%s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ems_debug(BEATPROC_DEBUG_LOGFILE, "Inserted into alarmInfo: %s", beatproc_sqlstr);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
psys->lastcompcode=compcode;
|
psys->lastcompcode=compcode;
|
||||||
|
|||||||
188
src/mkall.sh
188
src/mkall.sh
@@ -1,188 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
src_dir=`pwd`
|
|
||||||
|
|
||||||
#omcLib
|
|
||||||
cd ${src_dir}/omcLib/c_program/omcLib
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "-------------------- omcLib ------------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make
|
|
||||||
|
|
||||||
#smeg
|
|
||||||
cd ${src_dir}/smeg
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------------------- smeg ------------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make
|
|
||||||
|
|
||||||
#faultMgr sysStat
|
|
||||||
cd ${src_dir}/faultMgr/c_program/sysStat
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------------- faultMgr-->sysStat ----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make
|
|
||||||
|
|
||||||
#omcLib ftp
|
|
||||||
cd ${src_dir}/omcLib/c_program/ftp
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "----------------- omcLib ftp------------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr cdrCollector
|
|
||||||
cd ${src_dir}/accountMgr/c_program/cdrCollector
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------- accountMgr cdrCollector -----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr ftpSend
|
|
||||||
cd ${src_dir}/accountMgr/c_program/ftpsend
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr ftpSend ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr nrtrde
|
|
||||||
cd ${src_dir}/accountMgr/c_program/nrtrde
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr nrtrde ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr sftpSend
|
|
||||||
cd ${src_dir}/accountMgr/c_program/sftpSend
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr sftpSend ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr smcli
|
|
||||||
cd ${src_dir}/accountMgr/c_program/smcli
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "-------------- accountMgr smcli --------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr subsComm
|
|
||||||
cd ${src_dir}/accountMgr/c_program/subsComm
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr subsComm ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr subsDataBackup
|
|
||||||
cd ${src_dir}/accountMgr/c_program/subsDataBackup
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "----------- accountMgr subsDataBackup --------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#accountMgr wsms
|
|
||||||
cd ${src_dir}/accountMgr/c_program/wsms
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------------- accountMgr wsms -------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#configMgr paraComm
|
|
||||||
cd ${src_dir}/configMgr/c_program/paraComm
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- configMgr-->paraComm ---------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#faultMgr alarmAgent
|
|
||||||
cd ${src_dir}/faultMgr/c_program/alarmAgent
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "-------------- faultMgr-->alarmAgent ---------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#faultMgr alarmGenerator
|
|
||||||
cd ${src_dir}/faultMgr/c_program/alarmGenerator
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------ faultMgr-->alarmGenerator -------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#faultMgr beatProc
|
|
||||||
cd ${src_dir}/faultMgr/c_program/beatProc
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->beatProc ----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#faultMgr beatSend
|
|
||||||
cd ${src_dir}/faultMgr/c_program/beatSend
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->beatSend ----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#faultMgr dualsrv
|
|
||||||
cd ${src_dir}/faultMgr/c_program/dualsrv
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->dualsrv -----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#performanceMgr logCollector
|
|
||||||
cd ${src_dir}/performanceMgr/c_program/logCollector
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------- performanceMgr-->logCollector ------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#performanceMgr cstaCollector
|
|
||||||
cd ${src_dir}/performanceMgr/c_program/cstaCollector
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------- performanceMgr-->cstaCollector -----------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#securityMgr omcCleaner
|
|
||||||
cd ${src_dir}/securityMgr/c_program/omcCleaner
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "----------- securityMgr-->omcCleaner ---------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#faultMgr raidAgent
|
|
||||||
cd ${src_dir}/faultMgr/c_program/raidAgent
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->raidAgent ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
#omcMain omcMain
|
|
||||||
cd ${src_dir}/omcMain/c_program/omcMain
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- omcMain-->omcMain ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
make clean
|
|
||||||
make linuxES
|
|
||||||
|
|
||||||
187
src/mkbin.sh
187
src/mkbin.sh
@@ -1,187 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
src_dir=`pwd`
|
|
||||||
|
|
||||||
#omcLib
|
|
||||||
cd ${src_dir}/omcLib/c_program/omcLib
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "-------------------- omcLib ------------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make
|
|
||||||
|
|
||||||
#smeg
|
|
||||||
cd ${src_dir}/smeg
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------------------- smeg ------------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make
|
|
||||||
|
|
||||||
#faultMgr sysStat
|
|
||||||
cd ${src_dir}/faultMgr/c_program/sysStat
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------------- faultMgr-->sysStat ----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make
|
|
||||||
|
|
||||||
#omcLib ftp
|
|
||||||
cd ${src_dir}/omcLib/c_program/ftp
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "----------------- omcLib ftp------------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr cdrCollector
|
|
||||||
cd ${src_dir}/accountMgr/c_program/cdrCollector
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------- accountMgr cdrCollector -----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr ftpSend
|
|
||||||
cd ${src_dir}/accountMgr/c_program/ftpsend
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr ftpSend ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr nrtrde
|
|
||||||
cd ${src_dir}/accountMgr/c_program/nrtrde
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr nrtrde ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr sftpSend
|
|
||||||
cd ${src_dir}/accountMgr/c_program/sftpSend
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr sftpSend ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr smcli
|
|
||||||
cd ${src_dir}/accountMgr/c_program/smcli
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "-------------- accountMgr smcli --------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr subsComm
|
|
||||||
cd ${src_dir}/accountMgr/c_program/subsComm
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------- accountMgr subsComm ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr subsDataBackup
|
|
||||||
cd ${src_dir}/accountMgr/c_program/subsDataBackup
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "----------- accountMgr subsDataBackup --------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#accountMgr wsms
|
|
||||||
cd ${src_dir}/accountMgr/c_program/wsms
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "---------------- accountMgr wsms -------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#configMgr paraComm
|
|
||||||
cd ${src_dir}/configMgr/c_program/paraComm
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- configMgr-->paraComm ---------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#faultMgr alarmAgent
|
|
||||||
cd ${src_dir}/faultMgr/c_program/alarmAgent
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "-------------- faultMgr-->alarmAgent ---------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#faultMgr alarmGenerator
|
|
||||||
cd ${src_dir}/faultMgr/c_program/alarmGenerator
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "------------ faultMgr-->alarmGenerator -------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#faultMgr beatProc
|
|
||||||
cd ${src_dir}/faultMgr/c_program/beatProc
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->beatProc ----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#faultMgr beatSend
|
|
||||||
cd ${src_dir}/faultMgr/c_program/beatSend
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->beatSend ----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#faultMgr dualsrv
|
|
||||||
cd ${src_dir}/faultMgr/c_program/dualsrv
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->dualsrv -----------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#performanceMgr logCollector
|
|
||||||
cd ${src_dir}/performanceMgr/c_program/logCollector
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------- performanceMgr-->logCollector ------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#performanceMgr cstaCollector
|
|
||||||
cd ${src_dir}/performanceMgr/c_program/cstaCollector
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------- performanceMgr-->cstaCollector -----------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#securityMgr omcCleaner
|
|
||||||
cd ${src_dir}/securityMgr/c_program/omcCleaner
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "----------- securityMgr-->omcCleaner ---------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#faultMgr raidAgent
|
|
||||||
cd ${src_dir}/faultMgr/c_program/raidAgent
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- faultMgr-->raidAgent ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
|
|
||||||
#omcMain omcMain
|
|
||||||
cd ${src_dir}/omcMain/c_program/omcMain
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
echo "--------------- omcMain-->omcMain ------------------"
|
|
||||||
echo "----------------------------------------------------"
|
|
||||||
#make clean
|
|
||||||
make installbin
|
|
||||||
@@ -12,6 +12,8 @@ int getOmcSysNo(int* sysNo);
|
|||||||
int getOmcStatus(int sysNo);
|
int getOmcStatus(int sysNo);
|
||||||
int omcSysNo=-1;
|
int omcSysNo=-1;
|
||||||
|
|
||||||
|
static char cstaproc_sqlstr[8192];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
return:
|
return:
|
||||||
TIMETO_NONE
|
TIMETO_NONE
|
||||||
@@ -1009,7 +1011,9 @@ int csta_send(csta_src *pcsta,csta_sys *psys)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
if(pcsta->sysTypeNo != 350){
|
||||||
csta_pdu.var[0].oid[b_oidlen++]=psys->id1;
|
csta_pdu.var[0].oid[b_oidlen++]=psys->id1;
|
||||||
|
}
|
||||||
if(pcsta->sysTypeNo==320 || pcsta->sysTypeNo==378|| pcsta->sysTypeNo==387)
|
if(pcsta->sysTypeNo==320 || pcsta->sysTypeNo==378|| pcsta->sysTypeNo==387)
|
||||||
{
|
{
|
||||||
//Entry OID
|
//Entry OID
|
||||||
@@ -1143,7 +1147,7 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
{
|
{
|
||||||
csta_obj *pobj;
|
csta_obj *pobj;
|
||||||
var_list *pvar;
|
var_list *pvar;
|
||||||
DWORD d_timestamp,*p_long;
|
DWORD d_timestamp,*p_long;
|
||||||
DWORD *pval4;
|
DWORD *pval4;
|
||||||
WORD *pval2;
|
WORD *pval2;
|
||||||
char sqlstr[8192],sumsqlstr[8192],sumCondition[512],sumFieldList[8192];
|
char sqlstr[8192],sumsqlstr[8192],sumCondition[512],sumFieldList[8192];
|
||||||
@@ -1225,6 +1229,7 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
sprintf(tmpstr3," and %s=%d",pobj->id1_field,psys->pre_id1 + pobj->id1_offset);
|
sprintf(tmpstr3," and %s=%d",pobj->id1_field,psys->pre_id1 + pobj->id1_offset);
|
||||||
strcat(sumCondition,tmpstr3);
|
strcat(sumCondition,tmpstr3);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sprintf(key_field,"%s,%s,",pobj->id1_field, pobj->id2_field);
|
sprintf(key_field,"%s,%s,",pobj->id1_field, pobj->id2_field);
|
||||||
@@ -1234,6 +1239,7 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
sprintf(tmpstr3," and %s=%d and %s=%d",pobj->id1_field,psys->pre_id1 + pobj->id1_offset,pobj->id2_field,psys->pre_id2 + pobj->id2_offset);
|
sprintf(tmpstr3," and %s=%d and %s=%d",pobj->id1_field,psys->pre_id1 + pobj->id1_offset,pobj->id2_field,psys->pre_id2 + pobj->id2_offset);
|
||||||
strcat(sumCondition,tmpstr3);
|
strcat(sumCondition,tmpstr3);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//csta_log("single_message_flag:%d",pcsta->single_message_flag);
|
//csta_log("single_message_flag:%d",pcsta->single_message_flag);
|
||||||
@@ -1241,13 +1247,14 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
{
|
{
|
||||||
sprintf(sqlstr, "replace into %s.%sData (%s%s%s,csta_datetime)VALUES(%s%s",
|
sprintf(sqlstr, "replace into %s.%sData (%s%s%s,csta_datetime)VALUES(%s%s",
|
||||||
CSTA_DB,pobj->detail_table,sys_field,key_field,pobj->sql_detail,sys_value,key_value);
|
CSTA_DB,pobj->detail_table,sys_field,key_field,pobj->sql_detail,sys_value,key_value);
|
||||||
|
|
||||||
//sum up accord to the map table
|
//sum up accord to the map table
|
||||||
if(needSumFlag)
|
if(needSumFlag)
|
||||||
{
|
{
|
||||||
sprintf(tmpstr3," and UNIX_TIMESTAMP(csta_datetime) = %ld",d_timestamp);
|
sprintf(tmpstr3," and UNIX_TIMESTAMP(csta_datetime) = %ld",d_timestamp);
|
||||||
strcat(sumCondition,tmpstr3);
|
strcat(sumCondition,tmpstr3);
|
||||||
sprintf(sumsqlstr,"select %s from %s.%sData where %s",pobj->sql_sum,CSTA_DB,pobj->detail_table,sumCondition);
|
sprintf(sumsqlstr,"select %s from %s.%sData where %s",pobj->sql_sum,CSTA_DB,pobj->detail_table,sumCondition);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pobj->field_width == 2)
|
if(pobj->field_width == 2)
|
||||||
@@ -1260,6 +1267,8 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (pcsta->sysTypeNo != 362)
|
||||||
{
|
{
|
||||||
for(i=0;i<pobj->detail_field_count;i++)
|
for(i=0;i<pobj->detail_field_count;i++)
|
||||||
{
|
{
|
||||||
@@ -1267,6 +1276,37 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
sprintf(tmpstr3,"%u,",htonl(*pval4));
|
sprintf(tmpstr3,"%u,",htonl(*pval4));
|
||||||
strcat(sqlstr,tmpstr3);
|
strcat(sqlstr,tmpstr3);
|
||||||
}
|
}
|
||||||
|
}else{ //SPGW
|
||||||
|
for(i=0;i<pobj->detail_field_count-2;i++)
|
||||||
|
{
|
||||||
|
pval4=(DWORD*)(pvar->msg + 4 + i * 4);
|
||||||
|
sprintf(tmpstr3,"%u,",htonl(*pval4));
|
||||||
|
strcat(sqlstr,tmpstr3);
|
||||||
|
|
||||||
|
// printf("Field %d: %u\n", i + 1, htonl(*pval4));
|
||||||
|
|
||||||
|
} //ǰʮ<C7B0><CAAE><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
DWORD *uplink_tmp1, *uplink_tmp2;
|
||||||
|
DWORD *downlink_tmp1, *downlink_tmp2;
|
||||||
|
uint64_t uplink_total_volume;
|
||||||
|
uint64_t downlink_total_volume;
|
||||||
|
// <20><><EFBFBD><EFBFBD> uplink_total_volume
|
||||||
|
uplink_tmp1 = (DWORD*)(pvar->msg + 4 + (pobj->detail_field_count - 2) * 4); //68
|
||||||
|
uplink_tmp2 = (DWORD*)(pvar->msg + 4 + (pobj->detail_field_count -1) * 4); // 72
|
||||||
|
uplink_total_volume = ((uint64_t)ntohl(*uplink_tmp1) << 32) +ntohl(*uplink_tmp2);
|
||||||
|
|
||||||
|
sprintf(tmpstr3, "%llu,", uplink_total_volume);
|
||||||
|
strcat(sqlstr, tmpstr3);
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD> downlink_total_volume
|
||||||
|
downlink_tmp1 = (DWORD*)(pvar->msg + 4 + (pobj->detail_field_count ) * 4); //76<37><36>ʼ
|
||||||
|
downlink_tmp2 = (DWORD*)(pvar->msg + 4 + (pobj->detail_field_count +1) * 4); //80<38><30>ʼ
|
||||||
|
downlink_total_volume = ((uint64_t)ntohl(*downlink_tmp1) << 32) +ntohl(*downlink_tmp2);
|
||||||
|
|
||||||
|
sprintf(tmpstr3, "%llu,", downlink_total_volume);
|
||||||
|
strcat(sqlstr, tmpstr3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sprintf(tmpstr3,"FROM_UNIXTIME(%ld))",d_timestamp);
|
sprintf(tmpstr3,"FROM_UNIXTIME(%ld))",d_timestamp);
|
||||||
strcat(sqlstr,tmpstr3);
|
strcat(sqlstr,tmpstr3);
|
||||||
@@ -1359,6 +1399,9 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
|
|
||||||
sprintf(sqlstr, "replace into %s.%sData (%s%s%scsta_datetime)VALUES(%s%s",
|
sprintf(sqlstr, "replace into %s.%sData (%s%s%scsta_datetime)VALUES(%s%s",
|
||||||
CSTA_DB,pobj->sum_table,sys_field,key_field,sumFieldList,sys_value,key_value);
|
CSTA_DB,pobj->sum_table,sys_field,key_field,sumFieldList,sys_value,key_value);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(i=0;i<pobj->sum_field_count;i++)
|
for(i=0;i<pobj->sum_field_count;i++)
|
||||||
{
|
{
|
||||||
if(row[i] == NULL)
|
if(row[i] == NULL)
|
||||||
@@ -1377,7 +1420,56 @@ int csta_record(csta_src *pcsta,csta_sys *psys,snmp_pdu *pdu)
|
|||||||
}
|
}
|
||||||
sprintf(tmpstr3,"FROM_UNIXTIME(%ld))",d_timestamp);
|
sprintf(tmpstr3,"FROM_UNIXTIME(%ld))",d_timestamp);
|
||||||
strcat(sqlstr,tmpstr3);
|
strcat(sqlstr,tmpstr3);
|
||||||
|
|
||||||
|
//only 320 mscSumData.check Signal Error
|
||||||
|
if (pcsta->sysTypeNo == 320 && strcmp(pobj->sum_table, "mscSumData") == 0) {
|
||||||
|
|
||||||
|
int sysNo = psys->sysid; // <20><> psys <20><>ȡ sysNo
|
||||||
|
int subSysNo = psys->subsysid;
|
||||||
|
|
||||||
|
unsigned int SignalErr = 0, Attempt = 0 ,KeyType =0;
|
||||||
|
sscanf(sqlstr, "%*[^,],%*[^,],%u,%*[^,],%u,%*[^,],%u", &KeyType,&Attempt, &SignalErr);
|
||||||
|
|
||||||
|
// MO-12 MT-13
|
||||||
|
if (Attempt > 0 && (KeyType == 12 || KeyType == 13)) {
|
||||||
|
double ratio = (double)SignalErr / Attempt;
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD> SignalErr / Attempt > 5%<25><><EFBFBD><EFBFBD><F2B4A5B7>澯
|
||||||
|
if (ratio > 5.0) {
|
||||||
|
time_t current_time = time(NULL);
|
||||||
|
char alarmIdStr[32];
|
||||||
|
sprintf(alarmIdStr, "%ld", (long)current_time); // <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϊ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> alarmInfo <20><><EFBFBD><EFBFBD> SQL <20><><EFBFBD><EFBFBD>
|
||||||
|
sprintf(cstaproc_sqlstr, "insert into OMC_PUB.sysAlarmInfo(sysTypeNo,sysNo,subSysNo,compCode,alarmCode,alarmTime,clearTime,clearMode,alarmInfo,alarmId) "
|
||||||
|
"values(%d,%d,%d,%d,%d,CURRENT_TIMESTAMP,'0000-00-00 00:00:00',1,'Call failure rate exceeds 5%%');",
|
||||||
|
pcsta->sysTypeNo,sysNo,subSysNo, 0, 10, alarmIdStr);
|
||||||
|
|
||||||
|
// ִ<><D6B4> SQL <20><><EFBFBD><EFBFBD>
|
||||||
|
if (mysql_getnores(pubConn, cstaproc_sqlstr) != 0) {
|
||||||
|
csta_log("[SQL ERR]: %s", cstaproc_sqlstr);
|
||||||
|
} else {
|
||||||
|
csta_log("Inserted into alarmInfo: %s", cstaproc_sqlstr);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//clear 5% alarm
|
||||||
|
sprintf(cstaproc_sqlstr, "update OMC_PUB.sysAlarmInfo set clearTime=CURRENT_TIMESTAMP,clearMode=0,clearBy='System' "
|
||||||
|
"where sysTypeNo=%d and sysNo=%d and subSysNo=%d and compCode=%d and alarmCode=%d and clearMode=1;",
|
||||||
|
pcsta->sysTypeNo, sysNo, subSysNo, 0, 10);
|
||||||
|
|
||||||
|
// ִ<><D6B4> SQL <20><><EFBFBD><EFBFBD>
|
||||||
|
if (mysql_getnores(pubConn, cstaproc_sqlstr) != 0) {
|
||||||
|
csta_log("[SQL ERR]: %s", cstaproc_sqlstr);
|
||||||
|
} else {
|
||||||
|
csta_log("Cleared alarmInfo: %s", cstaproc_sqlstr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
csta_log("Attempt is zero, skipping SignalErr/Attempt calculation.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if(mysql_getnores(pCstaConn,sqlstr) != 0)
|
if(mysql_getnores(pCstaConn,sqlstr) != 0)
|
||||||
{
|
{
|
||||||
if(mysql_errno(pCstaConn) == 1146)
|
if(mysql_errno(pCstaConn) == 1146)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MaxLogSrcNum 16 //max number of command can be execute as same time
|
#define MaxLogSrcNum 16 //max number of command can be execute as same time
|
||||||
#define MaxAttrDefnNum 256
|
#define MaxAttrDefnNum 512
|
||||||
#define MaxOidLen 20 //max number of object ID
|
#define MaxOidLen 20 //max number of object ID
|
||||||
#define MaxSubOidLen 10 //max number of sub object ID
|
#define MaxSubOidLen 10 //max number of sub object ID
|
||||||
#define MaxVarNum 50 //max number of var in one pdu
|
#define MaxVarNum 50 //max number of var in one pdu
|
||||||
|
|||||||
Reference in New Issue
Block a user