Sponsored Content
Special Forums UNIX and Linux Applications Infrastructure Monitoring modifying existing file using C Post 302449541 by zing_foru on Tuesday 31st of August 2010 12:53:41 AM
Old 08-31-2010
Thanks Corona688, I have changed the approach now. Will use stad. net-snmp based solution.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

can someone help me with modifying this file

Hi, I have a file which has data kind of like this. Apr 13 08:20:38 uslis10a sendmail: m3DDKSx3006432: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKSoK006433: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKcSo006442: usliss26.ca.com Apr 13 08:20:38 uslis10c... (2 Replies)
Discussion started by: eamani_sun
2 Replies

2. Shell Programming and Scripting

Modifying file from outside

hi , I have a javascript file like this: function fnValidateId(){ var array_id = new Array("444","7888","6633","555","146562","3333","33332") var tmp_id = document.form1.id.value; var num=0; while(1) { if(tmp_id ==... (9 Replies)
Discussion started by: Sreejith_VK
9 Replies

3. Shell Programming and Scripting

folder existing and file existing

I want to look into a folder to see if there are any folders within it. If there are, I need to check inside each folder to see if it contains a .pdf file So If /myserver/myfolder/ contains a folder AND that folder conatins a .pdf file do X Else do Z I may have multiple folders and... (4 Replies)
Discussion started by: crowman
4 Replies

4. Solaris

Add existing user into an existing group

Pre: no gpasswd/adduser there is just usermod can be used, also there is no -a option for usermod. How should I add a user into a group? (4 Replies)
Discussion started by: a2156z
4 Replies

5. UNIX for Dummies Questions & Answers

Modifying a .ksh file

Hi, i have created a simple .ksh file in the following manner cat <<EOF >mfile #!/bin/ksh echo "hello world" EOF I have 2 questions 1. now i would like to add a second line after the first echo command e.g. echo "this is line 2" how can i do that ? 2. I would then like... (1 Reply)
Discussion started by: corbusier
1 Replies

6. Shell Programming and Scripting

insert pipes for existing and non-existing records

I have a source file like this, L4058S462 34329094 F51010141TK1070000483L4058S462 34329094 0232384840 381892 182 5690 L4058S462 34329094 F51020141FIRST CLEARING, LLC A/C 3432-9094 L4058S462 34329094 F51030141JOHAN HOLMQVIST ... (1 Reply)
Discussion started by: saravanamr
1 Replies

7. Shell Programming and Scripting

Modifying a file?

Hi, I want to convert a file that looks like this >joe XXXXXXXXXXXXXXXXXXX >man BBBBBBBBBBBBBBBBBBBBBSSSSSSSS to something that looks like this (where the spacing is tab seperated) joe XXXXXXXXXXXXXXXXXXX man BBBBBBBBBBBBBBBBBBBBBSSSSSSSS I am able to do the reverse but the other... (3 Replies)
Discussion started by: kylle345
3 Replies

8. Shell Programming and Scripting

Help in modifying existing Perl Script to produce report of dupes

Hello, I have a large amount of data with the following structure: Word=Transliterated word I have written a Perl Script (reproduced below) which goes through the full file and identifies all dupes on the right hand side. It creates successfully a new file with two headers: Singletons and Dupes.... (5 Replies)
Discussion started by: gimley
5 Replies

9. Shell Programming and Scripting

Modifying file to 75 characters

I have a text file containing some notes and I want to limit the lines to 75 characters. Tried using fold, however fold will cut words. Need something in bash, sed or awk to do this. Find the blank space less than 75 ant cut from there (10 Replies)
Discussion started by: kristinu
10 Replies

10. Shell Programming and Scripting

Modifying listener file

Hi Pros, I'm writing a script to modify listener.ora file on multiple hosts. When I ssh to any server from a central server in our environment we are presented with menu to select the instance. I need to set my environment to listener which could be different number on every instance. How can I... (5 Replies)
Discussion started by: humble_learner
5 Replies
snmp_trapsnd(8) 					      System Manager's Manual						   snmp_trapsnd(8)

NAME
snmp_trapsnd - A program that sends SNMPv1 and SNMPv2 traps SYNOPSIS
/usr/sbin/snmp_trapsnd enterprise agent_addr generic specific timeticks [-v version] [-c community] [-h host] [-p port] [-tcp] [variable [type value]] OPTIONS
Specifies the type of message in which to send the PDU. The default version is SNMPv1. Use 2c to specify that the PDU be sent in an SNMPv2C message. Specifies the host name or dot-formatted IP address of the destination node to receive the trap message. If no host is specified, the trap is sent to the loopback interface. Causes a hexadecimal dump of the encoded packet to be sent to stdout. Specifies that the TCP transport be used instead of the UDP transport. If a connection cannot be established, the program silently sends the trap to the standard transport address (UDP 162). Specifies the port number on the destination host to which this message is sent. The default is 162, the well-known SNMP trap port. Specifies the community string used to send the trap. The default is public. OPERANDS
For SNMPv1 traps, this is the enterprise object identifier, in dot string notation, on whose behalf the trap is being sent (for example, 1.3.6.1.4.1.232). For SNMPv2 traps (specified with the -v 2c option), this represents the value of snmpTrapOID.0. For an SNMPv2 enterprise-specific trap, this is typically a concatenated string containing the enterprise OID, 0 (zero), and a single digit. See the generic parame- ter table. The hostname or IP address of the entity on whose behalf the trap is being generated (the agent-addr field in the V1 trap PDU). The special name local reports the host on which this program is running. This value is ignored if the -v 2c option is present. The generic trap identifier. This is a non-zero number. The following table summarizes the trap IDs: ------------------------------------------------------------------------ Description V1 generic Value V2 enterprise Value ------------------------------------------------------------------------ coldStart 0 1.3.6.1.6.3.1.1.5.1 warmStart 1 1.3.6.1.6.3.1.1.5.2 linkDown 2 1.3.6.1.6.3.1.1.5.3 linkUp 3 1.3.6.1.6.3.1.1.5.4 authenticationFailure 4 1.3.6.1.6.3.1.1.5.5 egpNeighborLoss 5 1.3.6.1.6.3.1.1.5.6 enterpriseSpecific 6 enterprise.0.x ------------------------------------------------------------------------ If the -v 2c option is present, this parameter is ignored. Specifies the enterprise-specific trap number. A value must be present, but is ignored if the -v 2c option is present or if generic is a value other than 6. Specifies the relative time associated with the generation of this trap message. This is the number of TIMETICKS (1/100 of a second) since the sending SNMP entity started. Specifies a list of MIB variables to be included in the trap message. See snmp_request(8) for information on specifiying SNMP MIB variables on the command line. DESCRIPTION
The snmp_trapsnd program encodes an SNMPv1 Trap protocol data unit (PDU) (see RFC 1215) or a SNMPv2 Trap PDU (see RFC 1905) into an SNMP message, and sends it to the specified host(s). All data fields in the trap PDU can be specified in the run-time arguments. SNMPv1 traps are uniquely identified by the combination of enterprise, generic, and specific operands. SNMPv2 traps are uniquely identi- fied by the value of snmpTrapOID.0 in the enterprise operand. RESTRICTIONS
The use of this command should be limited. SNMP traps should be sent rarely, when significant state changes occur on a managed node. SEE ALSO
Commands: snmpd(8), snmp_request(8), snmp_traprcv(8) RFC 1907, Management Information Base for Version 2 of the Simple Network Management Protocol (SNMPv2) snmp_trapsnd(8)
All times are GMT -4. The time now is 09:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy