- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: sending snmp traps in openVMS
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 02:10 PM
тАО03-23-2009 02:10 PM
Re: sending snmp traps in openVMS
if you can help me write this snmp_trap for DEC C i would be greatful. First of all where do I get the source code of snmp_trapsend?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 07:31 PM
тАО03-23-2009 07:31 PM
Re: sending snmp traps in openVMS
_do_ know how to run a program using the
system() function.
show symbol snmp_trapsnd
alp $ type snmp.c
#include
#include
int main( void)
{
int sts;
char *cmd = "mcr tcpip$snmp_trapsnd.exe\
1.3.6.1.6.3.1.1.4.1.0 local 0 0 0 -v2c -h 10.100.10.112";
printf( " cmd: >%s<.\n", cmd);
sts = system( cmd);
printf( " sts = %%x%08x.\n", sts);
}
alp $ cc snmp
alp $ link snmp
alp $ run snmp
cmd: >mcr tcpip$snmp_trapsnd.exe 1.3.6.1.6.3.1.1.4.1.0 local 0 0 0 -v2c -h 10.1
00.10.112<.
sts = %x00000001.
Around here, no one seems to know what "-D"
does (with or without quotation marks):
ALP $ mcr tcpip$snmp_trapsnd.exe 1.3.6.1.6.3.1.1.4.1.0 local 0 0 0 -v2c -h 10.10
0.10.112 -D "TEST MESSAGE FROM node1 USING TCP SNMP TRAP"
Unexpected arguments.
#snmp_trapsnd enterprise agent-address generic specific timeticks
[-v version] [-c community] [-h host] [-p port] [-tcp] {variable [type value]}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 07:55 PM
тАО03-23-2009 07:55 PM
Re: sending snmp traps in openVMS
as you see below without the "D" argument snmp command does not work . I found out somewhere someone using it thats how I learned. so assuming this is the right command I have to use how can I put it in the C program cause its using double quotes ?
This is a perfectly working command and
we are using it .
NODE1$ snmp_trapsnd 0.0 local 0 0 0 -h 10.100.18.245 -v2c 1.3.6.1.6.3.1.1.4.1.0
"D" " TEST MSG "
if I omit the "D" or dont use it the command
does not work.
NODE1$ snmp_trapsnd 0.0 local 0 0 0 -h 10.100.18.245 -v2c 1.3.6.1.6.3.1.1.4.1.0
" " " TEST MSG "
Unknown data type code
Invalid variable list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 08:30 PM
тАО03-23-2009 08:30 PM
Re: sending snmp traps in openVMS
char *cmd = "mcr sys$system:tcpip$snmp_trapsnd.exe 0.0 local 0 0 0 -h 10.100.18.245 -v2c 1.3.6.1.6.3.1.1.4.1.0 "D" "test"";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 08:50 PM
тАО03-23-2009 08:50 PM
Re: sending snmp traps in openVMS
char *cmd = "mcr sys$system:tcpip$snmp_trapsnd.exe 0.0 local 0 0 0 -h 10.100.18.245 -v2c 1.3.6.1.6.3.1.1.4.1.0 \"D\" \"<
now my second problem ... i need to pass the message part as parameter .. how can I do this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 09:12 PM
тАО03-23-2009 09:12 PM
Re: sending snmp traps in openVMS
sprintf()? strcat()?
How much don't you know about C programming?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 09:14 PM
тАО03-23-2009 09:14 PM
Re: sending snmp traps in openVMS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2009 07:25 AM
тАО03-24-2009 07:25 AM
Re: sending snmp traps in openVMS
If it's your manager that tossed you into this proverbial pool, then this is your opportunity to request training or books or more formal assistance (which helps your manager deliver on his/her commitments, and it also helps you) on these topics. I would strongly encourage you to work with your manager here, rather than with ITRC. ITRC really isn't going to help you through this, though. That's your manager's job.
There's no API for sending traps on OpenVMS, it's done through a C or Perl or Lua or other SNMP-related library that you must port over (or find somebody to port it for you) and there's no source code for the snmp_trapsnd tool (ask HP for that).
There's some basic SNMP source code stuff in
SYS$COMMON:[SYSHLP.EXAMPLES.TCPIP.SNMP]
but I'd not expect that code to get anywhere near what you're looking for here.
Your application programming interface is going to require the Perl or Lua or C or (pick your preferred OpenVMS language) SNMP library. A library which you're going to have to port, or get somebody to port for you.
I've had various tussles with TCP/IP Services and C in this area over the years. It's not a very forgiving area.
Did some quick digging using Google and there's no obvious solution here that doesn't also involve a library such as net-snmp. The snmptrap command in Mac OS X source pool is based on a C module that looks to call into the net-snmp library, for instance. And the Lua stuff all uses a LuaSNMP library. You could certainly use the RFC to build the full RFC-specified data and toss that over, but (for now) the system() of the command is almost certainly the easiest approach.
As for the "-d" switch on the command (I prefer to quote those switches, unless I know I'm running with the ODS-5 extended parsing enabled within DCL), that's a packet dump request, based on what's in the documentation:
http://h71000.www7.hp.com/doc/82final/6530/6530pro_005.html
I'd guess that you don't have extended parsing enabled here, and thus that the usual (and somewhat weird) C argument processing rules apply. DCL upcases its stuff, and the switch and the rest of the command is converted to lowercase when gets to C, so your -D is showing up at snmp_trapsnd as the -d switch.
And again, work with your manager. That'll help you get trained; it'll help your manager deliver on his/her commitments through your improved skills.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-29-2009 09:09 AM
тАО03-29-2009 09:09 AM
Re: sending snmp traps in openVMS
- « Previous
-
- 1
- 2
- Next »