Added CPU load OIDs.

git-svn-id: http://voip.null.ro/svn/yate@3902 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2010-12-03 11:40:35 +00:00
parent 1fefffe0e4
commit dc8c0177fa
3 changed files with 77 additions and 3 deletions

View File

@ -419,6 +419,7 @@ public:
ENGINE_RUNATTEMPT = 11, ENGINE_RUNATTEMPT = 11,
ENGINE_NODENAME = 12, ENGINE_NODENAME = 12,
ENGINE_STATE = 13, ENGINE_STATE = 13,
ENGINE_CALL_ACCEPT = 14,
}; };
// Constructor // Constructor
inline EngineInfo() inline EngineInfo()
@ -1099,6 +1100,7 @@ static TokenDict s_categories[] = {
{"locks", Monitor::ENGINE}, {"locks", Monitor::ENGINE},
{"semaphores", Monitor::ENGINE}, {"semaphores", Monitor::ENGINE},
{"waitingSemaphores", Monitor::ENGINE}, {"waitingSemaphores", Monitor::ENGINE},
{"acceptStatus", Monitor::ENGINE},
// node info // node info
{"runAttempt", Monitor::ENGINE}, {"runAttempt", Monitor::ENGINE},
{"name", Monitor::ENGINE}, {"name", Monitor::ENGINE},
@ -1255,6 +1257,7 @@ static TokenDict s_engineQuery[] = {
{"locks", EngineInfo::ENGINE_LOCKS}, {"locks", EngineInfo::ENGINE_LOCKS},
{"semaphores", EngineInfo::ENGINE_SEMAPHORES}, {"semaphores", EngineInfo::ENGINE_SEMAPHORES},
{"waitingSemaphores", EngineInfo::ENGINE_WAITING}, {"waitingSemaphores", EngineInfo::ENGINE_WAITING},
{"acceptStatus", EngineInfo::ENGINE_CALL_ACCEPT},
// node info // node info
{"runAttempt", EngineInfo::ENGINE_RUNATTEMPT}, {"runAttempt", EngineInfo::ENGINE_RUNATTEMPT},
{"name", EngineInfo::ENGINE_NODENAME}, {"name", EngineInfo::ENGINE_NODENAME},
@ -1275,6 +1278,7 @@ TokenDict EngineInfo::s_engineInfo[] = {
{"waiting", EngineInfo::ENGINE_WAITING}, {"waiting", EngineInfo::ENGINE_WAITING},
{"runattempt", EngineInfo::ENGINE_RUNATTEMPT}, {"runattempt", EngineInfo::ENGINE_RUNATTEMPT},
{"nodename", EngineInfo::ENGINE_NODENAME}, {"nodename", EngineInfo::ENGINE_NODENAME},
{"acceptcalls", EngineInfo::ENGINE_CALL_ACCEPT},
{0,0} {0,0}
}; };
@ -1499,8 +1503,7 @@ bool MsgUpdateHandler::received(Message& msg)
bool SnmpMsgHandler::received(Message& msg) bool SnmpMsgHandler::received(Message& msg)
{ {
DDebug(__plugin.name(),DebugAll,"SnmpMsgHandler::received()"); DDebug(__plugin.name(),DebugAll,"SnmpMsgHandler::received()");
__plugin.solveQuery(msg); return __plugin.solveQuery(msg);
return true;
} }
/** /**
@ -2114,6 +2117,7 @@ bool EngineInfo::load()
String& status = m.retValue(); String& status = m.retValue();
if (TelEngine::null(status)) if (TelEngine::null(status))
return false; return false;
cutNewLine(status);
Lock l(this); Lock l(this);
m_table.clear(); m_table.clear();

View File

@ -130,6 +130,48 @@ waitingSemaphores OBJECT-TYPE
"Engine number of waiting semaphores." "Engine number of waiting semaphores."
::= { semaphores 1 } ::= { semaphores 1 }
acceptStatus OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The call accept status of the YATE engine."
::= { engine 8 }
cpuLoad OBJECT IDENTIFIER ::= { engine 9 }
kernelLoad OBJECT-TYPE
SYNTAX INTEGER (1..100)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"CPU load of YATE in kernel space."
::= { cpuLoad 1 }
userLoad OBJECT-TYPE
SYNTAX INTEGER (1..100)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"CPU load of YATE in user space."
::= { cpuLoad 2 }
totalLoad OBJECT-TYPE
SYNTAX INTEGER (1..100)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total CPU load for YATE."
::= { cpuLoad 3 }
systemLoad OBJECT-TYPE
SYNTAX INTEGER (1..100)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The CPU load of the host system."
::= { cpuLoad 4 }
-- engine END -- engine END
-- nodeInfo BEGIN -- nodeInfo BEGIN

View File

@ -1,4 +1,4 @@
; generated on Oct 19, 2010 3:18 PM. DO NOT MODIFY! ; generated on Nov 30, 2010 4:17 PM. DO NOT MODIFY!
[1.3] [1.3]
name=org name=org
@ -322,6 +322,34 @@ name=waitingSemaphores
access=read-only access=read-only
type=Counter32 type=Counter32
[1.3.6.1.4.1.34501.1.3.1.8]
name=acceptStatus
access=read-only
type=DisplayString
[1.3.6.1.4.1.34501.1.3.1.9]
name=cpuLoad
[1.3.6.1.4.1.34501.1.3.1.9.1]
name=kernelLoad
access=read-only
type=INTEGER
[1.3.6.1.4.1.34501.1.3.1.9.2]
name=userLoad
access=read-only
type=INTEGER
[1.3.6.1.4.1.34501.1.3.1.9.3]
name=totalLoad
access=read-only
type=INTEGER
[1.3.6.1.4.1.34501.1.3.1.9.4]
name=systemLoad
access=read-only
type=INTEGER
[1.3.6.1.4.1.34501.1.3.2] [1.3.6.1.4.1.34501.1.3.2]
name=nodeInfo name=nodeInfo