Sponsored Content
Special Forums UNIX and Linux Applications Infrastructure Monitoring snmp,how to edit code generated by mib2c? Post 302309726 by viklahan on Wednesday 22nd of April 2009 05:17:44 PM
Old 04-22-2009
No output from mib2c compiled MIB

Hey dude!

I am working on a 64 bit system for which I need to know its
diagnostics. Like array status, cpu temp, hard drive status, temp
etc.
What I have done is I have written a new MIB for that system which is
error free [I checked it through snmpB mib editor].
Then I produced the 2 files[.h & .c] through mib2c script provided
along with net-snmp 5.4.2.1 which are required to compile with new mib
modules.
Then I built the net-snmp package from the source using the option ./
configure --with-mib-modules and edited the snmpd.conf file as per
need.
Its reading my MIB and snmpwalk returns me some default values. for
example:

[root@vik local]# snmpwalk -v2c -c myco localhost .1.3.6.1.4.1.myoid
SNMPv2-SMI::enterprises.myoid.1.1.2.2.1.1.1.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.myoid.1.1.2.2.1.1.1.3.0 = INTEGER: 0
SNMPv2-SMI::enterprises.myoid.1.1.2.2.1.1.1.4.0 = INTEGER: 0
SNMPv2-SMI::enterprises.myoid.1.1.2.2.1.1.1.5.0 = INTEGER: 0
SNMPv2-SMI::enterprises.myoid.1.1.2.2.1.1.1.6.0 = INTEGER: 0
SNMPv2-SMI::enterprises.myoid.1.1.2.2.1.1.1.7.0 = INTEGER: 0

It looks like I have to add some code in the .c & .h file but I am not sure what it is?
Also I am using python scripts to retrieve the diagnostics, since its the external program I think I can pass the OIDs along with the script name & path in the snmpd.conf file.
It looks like if you are using an externam programme then u dnt need to compile it thru mib2c.

I am not sure as whats happening in there...

Anyways please reply if you have any information.

Thanks
Vik
 

10 More Discussions You Might Find Interesting

1. IP Networking

snmp ... mib2c.scalar.conf, how manipulate variables

Hi, I'm reading net-snmp, using Unix (Solaries) and C language ... - using mib2c.scalar.conf to get the .c and .h code ... I want to manipulate variable ( managed object which already defined in MIB file ) but there is no such variable declared in the generated .c code only handler for each... (0 Replies)
Discussion started by: zainab
0 Replies

2. Shell Programming and Scripting

Script to Check & Edit Content of a file (Addition of comma in each lines of code)

Hi all, I need to write an automated bash shell script which performs such operations: 1. Grep the header of everyline with the initial of "T" in "FILE_A" 2. Perform a for loop, Count the numbers of comma in the line of code, if (no. of comma < 17) ADD the comma until 17; ... (2 Replies)
Discussion started by: big_nutz
2 Replies

3. IP Networking

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (0 Replies)
Discussion started by: prabakar4all
0 Replies

4. Red Hat

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (1 Reply)
Discussion started by: prabakar4all
1 Replies

5. IP Networking

SNMP Problem - SNMP not getting to the agent.

I am having a problem with an SNMP event, and I am not sure where I should be looking to solve this problem. Description: There is an SNMP event in our system that for one reason or another is not getting sent out as an email because it is never getting to our SNMP agent. I see where the... (0 Replies)
Discussion started by: broberts
0 Replies

6. Infrastructure Monitoring

SNMP traps to SNMP server

Dear Champs, I am new to unix, and need to configure linux server to send below traps to a SNMP server. Monitoring TRAP Disk Space Low Monitoring TRAP Memory Low Monitoring TRAP CPU high Monitoring TRAP Admin login/Logoff Please help me how to send this information to my SNMP server... (2 Replies)
Discussion started by: stavar
2 Replies

7. Programming

Are there any C code r instruction to see where is the creation or last edit for the file

Are there any C or termina instructin code or instruction to see where is the creation or last edit for the file (1 Reply)
Discussion started by: fwrlfo
1 Replies

8. Web Development

Want to edit a sh file using php code

Hi friends, I want to edit sh file using php, i have tried different method. but its shows permission issues. Folder path : xyz permission :0755 owner: 545 group: 0 filename : abc.sh permission :0644 owner:0 group: 0 how to edit these files using php/ i have use below codes, but... (3 Replies)
Discussion started by: sanjay833i
3 Replies

9. Programming

C++ Edit code

Hi guys, I am learning C++ on my own and i wanna redit the code using classes and heritance to revamp the code below. example class for the card attributes -suit , - rank, - face and also class deck to contain shuffle and a class player with the function to setcard and a function handonecard... (1 Reply)
Discussion started by: ment0smintz
1 Replies

10. UNIX for Dummies Questions & Answers

Need to transfer all kernel logs (var/log/messages) to the snmp listener as snmp trap

i am working with embedded system -Dell DCS management sub system. my question is as below: currently we are using linux kernel 2.6.30 build and we have a kernel logs stored to the /var/log/messages path. now we have to transfer all this logs to the specified SNMP target as a part of SNMP... (4 Replies)
Discussion started by: vipul_prajapati
4 Replies
cups-snmp(8)							    Apple Inc.							      cups-snmp(8)

NAME
snmp - cups snmp backend SYNOPSIS
/usr/lib/cups/backend/snmp ip-address-or-hostname /usr/libexec/cups/backend/snmp ip-address-or-hostname lpinfo -v --include-schemes snmp DESCRIPTION
The CUPS SNMP backend provides legacy discovery and identification of network printers using SNMPv1. When used for discovery through the scheduler, the backend will list all printers that respond to a broadcast SNMPv1 query with the "public" community name. Additional queries are then sent to printers that respond in order to determine the correct device URI, make and model, and other information needed for printing. In the first form, the SNMP backend is run directly by the user to look up the device URI and other information when you have an IP address or hostname. This can be used for programs that need to configure print queues where the user has supplied an address but nothing else. In the second form, the SNMP backend is run indirectly using the lpinfo(8) command. The output provides all printers detected via SNMP on the configured broadcast addresses. Note: no broadcast addresses are configured by default. MIBS
The CUPS SNMP backend uses the information from the Host, Printer, and Port Monitor MIBs along with some vendor private MIBs and intelli- gent port probes to determine the correct device URI and make and model for each printer. CONFIGURATION
The SNMP backend reads the /etc/cups/snmp.conf configuration file, if present, to set the default broadcast address, community name, and logging level. The configuration file is documented in cups-snmp.conf(5). The DebugLevel value can be overridden using the CUPS_DEBUG_LEVEL environment variable and the MaxRunTime value can be overridden using the CUPS_MAX_RUN_TIME environment variable. SEE ALSO
backend(7), cups-snmp.conf(5), cupsd(8), cupsd.conf(5), filter(7), lpinfo(8), http://localhost:631/help COPYRIGHT
Copyright 2007-2013 by Apple Inc. 8 July 2013 CUPS cups-snmp(8)
All times are GMT -4. The time now is 12:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy