netSnmpHostsTable.so segmentation fault

2007-02-15 Thread Elias Bou Rahal

Hi All,

 i am trying to create the netSnmpHostsTable.so from the example in "
net-snmp-5.2\agent\mibgroup\examples". It s created successfully but when i
add it to dlmod, it appears like its added normally:
  UCD-DLMOD-MIB::dlmodName.1 = STRING: netSnmpHostsTable
  UCD-DLMOD-MIB::dlmodPath.1 = STRING:
/home/jinny/example/netSnmpHostsTable.so
  UCD-DLMOD-MIB::dlmodError.1 = STRING:
  UCD-DLMOD-MIB::dlmodStatus.1 = INTEGER: loaded(1)
When i running the snmpwalk on netSnmpHostsTable OID, the snmpd will exit
with the segmentation fault.
the part of the debug file related to netSnmpHostsTable is below:
 read_config: /home/jinny/net-snmp/local//share/snmp/snmpd.conf:68
examining: dlmod   netSnmpHostsTable
/home/jinny/example/netSnmpHostsTable.so
 trace: run_config_handler(): read_config.c, 474:
 read_config: Found a parser.  Calling it: dlmod / netSnmpHostsTable
/home/jinny/example/netSnmpHostsTable.so
 trace: dlmod_create_module(): ucd-snmp/dlmod.c, 106:
 dlmod: dlmod_create_module
 trace: dlmod_load_module(): ucd-snmp/dlmod.c, 145:
 dlmod: dlmod_load_module netSnmpHostsTable:
/home/jinny/example/netSnmpHostsTable.so
 trace: initialize_table_netSnmpHostsTable(): netSnmpHostsTable.c, 93
 initialize_table_netSnmpHostsTable: Registering table
netSnmpHostsTable as a table iterator
 trace: netsnmp_inject_handler_before(): agent_handler.c, 336:
 handler:inject: injecting table_iterator before netSnmpHostsTable
 netsnmp_get_table_handler(NULL) called
 netsnmp_inject_handler() called illegally
 netsnmp_assert handler != ((void *)0) failed agent_handler.c:329
netsnmp_inject_handler_before()
 trace: netsnmp_register_handler(): agent_handler.c, 212:
 handler::register: Registering netSnmpHostsTable
(::table_iterator::netSnmpHostsTable) at NET-SNMP-MIB::netSnmp.2.2.2
 trace: netsnmp_inject_handler_before(): agent_handler.c, 336:
 handler:inject: injecting bulk_to_next before table_iterator
 trace: netsnmp_register_mib(): agent_registry.c, 587:
 register_mib: registering "netSnmpHostsTable" at NET-SNMP-MIB::
netSnmp.2.2.2
 trace: netsnmp_subtree_find_first(): agent_registry.c, 155:
 subtree: looking for subtree for context: ""



I am waiting ur reply,

Thanks

Best Regards
   Elias
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
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/listinfo/net-snmp-users


extended the agent "dynamically loaded"

2007-02-13 Thread Elias Bou Rahal

Hi All,

  I have a problem in creation the extended agent using dynamic loaded.
I used in the past the old api but will simple table . Now i am in need to
make an extened agent dynamically loaded using complex table. so i am in
need to use net-snmp. after my little knowledge i am in need to use mib2c to
generate the template code. So which congiguration file in mib2c should i
use? i used mib2c.iterator.conf, but unfortunalety it didn't succeed. so how
can i write the code, which mib2c configuration should i use? i will
appreciate too much if u send me an example of code. below an example of the
mib that i am using with complex table:


jxmlsaiEntry   OBJECT-TYPE
SYNTAX JXMLSAIEntry
ACCESS read-only
STATUS mandatory
DESCRIPTION ""
INDEX { name }
::= { jxmlsaiTable 1 }

JXMLSAIEntry   ::= SEQUENCE {
   name   OCTET STRING,
   jxmlsai-subCounter,
   jxmlsai-sub-a  Counter,
   jxmlsai-simple Counter,
   jxmlsai-nokia  Counter,
   jxmlsai-nok-cliCounter,
   jxmlsai-nok-logCounter,
   jxmlsai-nok-picCounter,
   jxmlsai-nok-prfCounter,
   jxmlsai-nok-rt Counter,
   jxmlsai-nok-bizCounter,
   jxmlsai-nok-calCounter,
   jxmlsai-moto-rtCounter,
   jxmlsai-eric   Counter,
   jxmlsai-eric-ems   Counter,
   jxmlsai-eric-xim   Counter,
   jxmlsai-siem   Counter,
   jxmlsai-siem-pic   Counter,
   jxmlsai-siem-rtCounter,
   jxmlsai-alca   Counter,
   jxmlsai-alca-ial   Counter,
   jxmlsai-alca-msq   Counter
   }
I am waiting for ur reply.

Thanks

Best Regards

   Elias
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
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/listinfo/net-snmp-users


index in netsnmp subagent

2007-02-05 Thread Elias Bou Rahal

Hi all,

 I extended the snmpd agent by using the Dynamic Module Creation for the
net-snmp agent. and it s working very well, but now i want to add index to
the mibs. which procedures can i use to register the index of my mibs in
snmp agent. in example if this is the mib:

*jxmlsaiTableOBJECT-TYPE
SYNTAX  SEQUENCE OF JXMLSAIEntry
ACCESS  read-only
STATUS  mandatory
DESCRIPTION ""
::= { jar 3 }*


*jxmlsaiEntry   OBJECT-TYPE
SYNTAX JXMLSAIEntry
ACCESS read-only
STATUS mandatory
DESCRIPTION ""
INDEX  { name }
::= { jxmlsaiTable 1 }*

I used before the index this function to register my counters
"register_mib()."

I am waiting ur response and i will be thankfull if u can give me an
example of  code on c.

Best Regards

  Elias
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
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/listinfo/net-snmp-users


the ucdavis with the extend agent

2006-08-24 Thread Elias Bou Rahal
Hi Sir,
 
 
   i have a problem in my snmpd. i use the version ucd-snmp 4.2.5 , when i try to execute a shell using ucdavis by typing:
 
"exec /bin/sh  /home/test.sh" in snmpd.conf which the shell just print "hello world", it works properly.
 
But after i add my extended agent to the snmpd.conf by adding: "dlmod ext_agent  /home/ext_agent.so"  
then the ucdavis failed in getting the result fo the shell test.sh, notice that the ext_agent.so is successfully loaded.
 
can u help me in this issue, and i used ucd-snmp 4.2.6 the same result
 
Best Regards
 
    Elias
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
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/listinfo/net-snmp-users


install net-snmp instead of ucd-snmp

2006-08-11 Thread Elias Bou Rahal
Hi sir,
 
 
   I am using ucd-snmp version 4.2.5 with an extended agent ext_snmp.so by adding dlmod = path of the extended agent in snmpd.conf.
 
this extended agend ext_snmp.so registers more than 20 private mibs. these mibs contain many Table.
 
I want to ask if it s possible to use the Net-snmp 5.x  instead of ucd-snmp and still using the same ext_snmp.so
 
if yes plz give me some details about installation and configuration to use this extended agent.
 
Thanks a lot
 
  Best Regards
 
  Elias
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
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/listinfo/net-snmp-users


Fwd: snmpd.conf

2006-08-11 Thread Elias Bou Rahal
 

Sorry to not copy any response to the mailing list.
the version of the ucd-snmp is: 4.2.5
snmpd -v
UCD-snmp version:  4.2.5Email: net-snmp-coders@lists.sourceforge.net
 
-- Forwarded message --From: Dave Shield <[EMAIL PROTECTED]>Date: Aug 11, 2006 4:08 PM
Subject: Re: snmpd.confTo: Elias Bou Rahal <[EMAIL PROTECTED]>Cc: net-snmp-users <net-snmp-users@lists.sourceforge.net
>   [ First - *please* don't mail me privately, without copyingany responses to the mailing list.  I don't have the timeor inclination to offer private, unpaid, SNMP consultancy.Keep discussions to the list, where others can both learn
and offer advice.  Thanks.   ]On 11/08/06, Elias Bou Rahal <[EMAIL PROTECTED]> wrote:>   1- the exact config file i am using is : "proc snmptrapd"
>   2- root 25384 1  0 Aug09 ?00:00:01> /home/jconsole2.0/snmptrapd -f>   3- i am using version 2 , O/S Linux columbia..com.lb 2.4.18-4smp #1 SMP> Thu May 2 18:32:34 EDT 2002 i686 unknown
What version of the net-snmp software are you using.There has never been a "version 2" - the earliest was v5.0(before that, it was called "ucd-snmp", and that started with v3)
>   About the second issue:>   1-the shell is "#!/bin/sh>   echo hello world>   exit 10"Yup - that's almost exactly what I had.>so the 
extResult.1 must be 10>and the extOutput.1  must be "hello world" but unfortunatly> extOutPut.1 is emtpy always.Strange.  It works fine for me.Which brings us back to the outstanding question - what version are you using?
Dave 
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
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/listinfo/net-snmp-users


snmpd.conf

2006-08-07 Thread Elias Bou Rahal
Hi sir,
 
    In he snmpd.confi wrote "proc NameOfPrcess"  and i get the value of snmpbulkwalk -v2c NameOfMachine public prTable, the enterprises.ucdavis.prTable.prEntry.prErrorFlag.1 is always 0 if the program is running or no, and the same for the 

 
"exec shelltest /bin/sh /home/jinny/shelltest.sh" in the snmpd.conf the value 
enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1enterprises.ucdavis.extTable.extEntry.extNames.1 = shelltestenterprises.ucdavis.extTable.extEntry.extCommand.1 = /bin/sh /tmp/shelltest.sh enterprises.ucdavis.extTable.extEntry.extResult.1
 = 0enterprises.ucdavis.extTable.extEntry.extOutput.1 = enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0enterprises.ucdavis.extTable.extEntry.extErrFixCmd.1 =  
the extRestult and the extOutput don't return any correct values
 
so it seems doesn't work properly , if u know the reason or if it needs and additional configuration plz tell me 
 
 
thank you 
 
 
Best Regards 
 
   Elias
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
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/listinfo/net-snmp-users


the enterprises . ucdavis . systemStats . ssCpuIdle represent the percentage instantly??

2006-08-04 Thread Elias Bou Rahal
Hi sir, 
 
 
    the OID enterprises . ucdavis . systemStats . ssCpuIdle is returning the percentages of idle cpu time instantly or percentages in one hour ?
  
   if it s the percentages of idle cpu time instantly , do we have anyway to collect the percentages of idle cpu time in hour ?
 
Thank you.
 
Best Regards 
 
   Elias
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
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/listinfo/net-snmp-users


hi need help

2006-07-18 Thread Elias Bou Rahal
hi Dear, 
 
 
   in the UCD-snmp extending agent , i have the function write_Name(int action, u_char  *var_val, u_char  var_val_type,   size_t   var_val_len,  u_char   *statP,  oid  *name, size_t   name_len):
   the second, third and fourth parameters provide information about the new desired value, both the type, value and length.
 
So my question is which function should i use to get the desiring value in the block of this function in case the type is integer.
 
I am waiting for your reply 
 
thank you 
  
   Best Regards 
    Elias
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
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/listinfo/net-snmp-users


FW: Re: how can i get the index of a mib by using any snmp api.c

2006-03-03 Thread elias bou rahal



Hi Dave,

 i am thankfull for ur aid and i ask u if u can send me an example of code 
c as attachement that can be parse a mib with index and than register the 
indexes in the snmp agent using v5.

 thank you very much

Best Regards

  Elias





From: Dave Shield <[EMAIL PROTECTED]>
To: elias bou rahal <[EMAIL PROTECTED]>
CC: net-snmp-users@lists.sourceforge.net
Subject: Re: how can i get the index of a mib by using any snmp api.c
Date: Thu, 02 Mar 2006 14:40:08 +

On Fri, 2006-02-03 at 13:30 +0000, elias bou rahal wrote:
> i need to know which function i have to call for getting
> the indexes of a mib .

Can you give a bit more detail about exactly what you mean?
Are you talking about the indexes used when registering the
MIB table (within the init_xxx routine), or the indexes used
when processing requests (within the xxx_handler routine) ?

Dave





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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/listinfo/net-snmp-users


FW: Re: FW: Re: how can i get the index of a mib by using any snmpapi.c

2006-03-03 Thread elias bou rahal



Hi Dave,

Sorry to bother you but i think this time is the last question or aid, 
in my extended agent of snmp by using the dlmod, in the function of 
registering the variables in init_Filename i use these functions:


in init_Filename()

init_mib()
/* after the parsing of my private mibs that 's contain many tables */
i register my variable by using this function:
register_mib_range(descr, (struct variable *)var, sizeof(struct vartype), 
var_len, theoid,
  sizeof(theoid)/sizeof(oid), DEFAULT_MIB_PRIORITY, 1, 1, 
NULL)!= MIB_REGISTERED_OK)


so my question is: if i define an index in the mib for a table how can i 
register this index after these functions above?


my solution for this problem is to construct the oid manually in the 
var_filename() function  by manually parsing the mib to get the index and 
then construct the oid  with index and return it as argument sturct oid  
name   to var_filename()


i want to know if there a better solution than this solution above

thank you very much for ur time

Best Regards

Elias



From: Dave Shield <[EMAIL PROTECTED]>
To: elias bou rahal <[EMAIL PROTECTED]>
CC: net-snmp-users@lists.sourceforge.net
Subject: Re: FW: Re: how can i get the index of a mib by using any 
snmpapi.c

Date: Thu, 02 Mar 2006 16:02:47 +

On Thu, 2006-03-02 at 15:56 +, elias bou rahal wrote:
> i am talking about the indexes used when registering the MIB table

OK.
Then you should provide this information manually (by looking
at the MIB file yourself).  The agent doesn't actually need the
MIB file at all, so it doesn't rely on looking up the syntax of
the table - that's part of the static design and ends up hardcoded
into the MIB implementation.

If you look at the code for some of the existing tables, you'll
see that they specify the syntax of the indexes as part of the
initialisation routine.  You should do the same.

Dave





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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/listinfo/net-snmp-users


FW: Re: how can i get the index of a mib by using any snmp api.c

2006-03-02 Thread elias bou rahal
i am talking about the indexes used when registering the MIB table ( within 
the init_xxx routing)

In other word:
 when i call init_mib for parsing all new mibs , through this process i 
need to read the indexes in each table in thie mibs and this is the aim 
which i talking about.



From: Dave Shield <[EMAIL PROTECTED]>
To: elias bou rahal <[EMAIL PROTECTED]>
CC: net-snmp-users@lists.sourceforge.net
Subject: Re: how can i get the index of a mib by using any snmp api.c
Date: Thu, 02 Mar 2006 14:40:08 +

On Fri, 2006-02-03 at 13:30 +0000, elias bou rahal wrote:
> i need to know which function i have to call for getting
> the indexes of a mib .

Can you give a bit more detail about exactly what you mean?
Are you talking about the indexes used when registering the
MIB table (within the init_xxx routine), or the indexes used
when processing requests (within the xxx_handler routine) ?

Dave





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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/listinfo/net-snmp-users


how can i get the index of a mib by using any snmp api.c

2006-02-03 Thread elias bou rahal

Hi,

i need to know which function i have to call for getting the indexes of a 
mib .

I am using the init_mib() in my subagent so how can i get the indexes.


thank you

Best Regards

Elias




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
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/listinfo/net-snmp-users