LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-25-2014, 09:20 PM   #1
sy85
LQ Newbie
 
Registered: Dec 2014
Posts: 3

Rep: Reputation: Disabled
[NET-SNMP] OID parameter to use for SNMP Trap - Overall CPU utilisation


Hi All,


I have enabled SNMP (NET-SNMP) agent on Red Hat V6.2.

We used to use ssCpuIdle as it is already presented in overall CPU utlisation in %.

However, as known, ssCpuIdle is already deprecated and replaced by ssCpuRawIdle, which is an integer counter.



We have been using the “monitor” method, with each monitor statement, associated with one OID parameter as below example:

monitor –r 15 “High CPU Utilization" ssCpuIdle< 25

Tried to make use of ssCpuRawIdle in a monitor statement but was unable to find much examples for reference.



Kindly need your expertise on the following:

- Can ssCpuRawIdle be used in a monitor statement?

- How do I determine (the integer output of ssCpuRawIdle =How many Overall CPU idle (%)?

- Are there other means (eg. OID parameters) to set and monitor threshold for SNMP trap?


Please help me.
Thanks.
 
Old 12-28-2014, 08:04 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Hi Sy,

Quote:
Can ssCpuRawIdle be used in a monitor statement?
Sure, if it's an snmp counter, it can be used in a trap.

Quote:
- How do I determine (the integer output of ssCpuRawIdle =How many Overall CPU idle (%)?
The Manual from UC Davis suggests
On a multi-processor system, the 'ssCpuRaw*'
counters are cumulative over all CPUs, so their
sum will typically be N*100 (for N processors).


Quote:
Are there other means (eg. OID parameters) to set and monitor threshold for SNMP trap ?
SNMP trap should work, if you are simply concerned about monitoring CPU idle and triggering an alert/event when it crosses a pre-determined threshold I'd stick to trying to get that set up. However...

There are a lot of things to consider when you look at something like this, particularly are we talking about instances or metal? If these are instances I'd look at more closely monitoring the compute profile of my instances at the environmental level (QEMU-KVM/VmWare/Xen etc), since that's where it matters.

Last edited by dijetlo; 12-28-2014 at 08:34 PM.
 
Old 12-29-2014, 03:49 AM   #3
sy85
LQ Newbie
 
Registered: Dec 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi, dijetlo

Thanks a lot for the reply.

Please see further clarification required below:

Quote:
Originally Posted by dijetlo View Post
Hi Sy,


Sure, if it's an snmp counter, it can be used in a trap.
I understand that it can be used in a trap , but unlikely as a parameter alone in a "monitor" statment.
As I have taken reference from this following link: http://serverfault.com/questions/441...-ticks-in-snmp, seems to indicate that it does require more than 1 OID paramater to compute the idle / overall CPU utilisation (%)

Hence, from what I understand from the explanation in the link, assuming that the number of ticks is 100, then a computation is required as follow:
CPU idle (%) = [Sum(ssCpuRawUser, ssCpuRawNice, ssCpuRawSystem) / Sum(ssCpuRawUser, ssCpuRawNice, ssCpuRawSystem, ssCpuRawIdle)] * 100


I need to confirm whether my understanding is correct.
1) Whether ssCpuRawIdle can be used alone in a "monitor" statement, if yes, I really need help with some "monitor" examples OR
2) I will need to resort to Scripting to compute the above formula.


Kindly, all, please help me.
Thanks.
 
Old 12-29-2014, 09:29 AM   #4
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Hmmm... I see what you're saying, the MIB is just a counter, the integer it corresponds to only has value if we're talking about the integers delta over time.
The answer would seem to be to pop the trap every so many seconds and let the snmp monitor carry the overhead of the calculations on the %'s and alert you if a boundry is breached.

So yeah... scripting? There'll be some.
 
Old 02-14-2015, 12:08 AM   #5
sy85
LQ Newbie
 
Registered: Dec 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
I have tried to come up with a Perl script to compute and return a value.

However, it crosses my mind on how I can integrate it with NET-SNMP;
1) Push the value to the SNMP agent module
2) Trigger an SNMP trap based on a configured threshold (where should I configure this?)
3) SNMP trap is recognised by the SNMP monitoring application

Can anyone please enlighten me?
Are there also really no other NET-SNMP oid for CPU utilisation other than a) ssCpu* and b) ssCpuRaw*?

I am also looking for Professional Services to complete this implementation.
If anyone has others in mind, please let me know as well.

Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to transfer all kernel logs (var/log/messages) to the snmp listener as snmp trap vipul prajapati Linux - Server 4 03-03-2014 11:35 PM
[SOLVED] net-SNMP Trap Handling Rockin80sRob Linux - Newbie 1 08-15-2012 10:52 PM
How to associate SNMP OID with specific parameter under SNMP agent? m4rtin Linux - Server 1 09-16-2011 09:04 AM
generate snmp trap to check High CPU Usage...... dashang.trivedi Linux - Networking 2 03-17-2011 02:51 AM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration