Retrieving page fault events trough SNMP protocol...

This is a discussion on Retrieving page fault events trough SNMP protocol... within the SNMP Users forums, part of the Networking and Network Related category; Hello, Installing a monitoring solution, I'm trying to retrieve the number of page faults occuring on a Linux based ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-29-2008
bob
 
Posts: n/a
Default Retrieving page fault events trough SNMP protocol...

Hello,

Installing a monitoring solution, I'm trying to retrieve the number of
page faults occuring on a Linux based machine.
Do you think it's possible to do this using SNMP ?

Thanks.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users

Reply With Quote
  #2 (permalink)  
Old 05-29-2008
Dave Shield
 
Posts: n/a
Default Re: Retrieving page fault events trough SNMP protocol...

2008/5/29 bob <jav_poliarniy@club-internet.fr>:
> Installing a monitoring solution, I'm trying to retrieve the number of
> page faults occuring on a Linux based machine.
> Do you think it's possible to do this using SNMP ?


If you can find a way of retrieving this information from the kernel,
then yes - it should be possible to monitor this using SNMP.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users

Reply With Quote
  #3 (permalink)  
Old 05-30-2008
Max
 
Posts: n/a
Default Re: Retrieving page fault events trough SNMP protocol...

Hi,

Here is a short script I wrote that is called using the old style of
Net-SNMP oid/script extension that calls vmstat, takes a few samples,
then returns the numbers in a style that is Cacti-compatible. Should
be easy to make this work for page faults if you don't want to do a
real sub-agent / MIB extension.

I am including a little shell library I use with the script. Again,
this is not an optimal way to do this, but is an easy way if you are
not concerned about a script being forked every few minutes on the
client system.

Hope you don't find this example too strange / hard to understand to be useful.

-= Max

What the configuration to call a script looks like in snmpd.conf:

exec 1.3.6.1.4.1.YOUR.OID.HERE s22-vmstat.sh /usr/local/bin/s22-vmstat.sh

esf-lib.sh:

#!/bin/bash

glob_count() {

local pat="$1"

perl -e 'BEGIN{$t=0};$t++ for glob("'"$pat"'");END{print $t}'

return 0;

}

output_oid_conf() {

local script="$1"
local oid="$2"
local name=$(basename $script)

echo exec $oid $name $script

return 0;

}

and the script:

s22-vmstat.sh:

#!/bin/bash

.. ./esf-lib.sh || exit 1

if [ "$1" == "--snmp-conf" ]
then
output_oid_conf /usr/local/bin/s22-vmstat.sh 1.3.6.1.4.1.YOUR.OID.HERE
..22
exit 0
fi

vmstat 2 4 | awk '
{ line++; }
line > 3 {

r += $1;
b += $2;
si += $7;
so += $8;
io += $(NF);

} END {

printf("r:%d b:%d si:%d so:%d io:%d",
int(r/3), int(b/3), int(si/3), int(so/3), int(io/3));
}'

exit 0

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:24 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0