Re: Hexstring <-> ASCII

Roy Chan <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello,

Here are 2 samples of the SNMP notifications. One is
taken using snmptrapd of UCD-SNMP v4.2.5 which is
displayed in ACSII string. The other is taken using
snmptapd of NET_SNMP v5.1 which is displayed in Hex
string.

Is there a way to display the Hex string into ASCII
string? Please help. Thanks!

Sample SNMP Notification using UCD-SNMP v4.2.5:

linux:~/AXLRM_107 # /usr/sbin/snmptrapd -P
2005-10-21 08:09:14 UCD-snmp version 4.2.5 Started.
2005-10-21 08:09:23 localhost [127.0.0.1]:
        system.sysUpTime.0 = Timeticks: (1129853363)
130       
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapOID.0
= OID: enterprises.2653.3.1.1.0.1       
enterprises.2653.3.1.1.0.1 = "[10/21/2005 08:09:23]
[linux, HEAD] FF60FFFFh: No ADTX device connected. ."
2005-10-21 08:09:23 localhost [127.0.0.1]:
        system.sysUpTime.0 = Timeticks: (1129853363)
130       
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapOID.0
= OID: enterprises.2653.3.1.1.0.1       
enterprises.2653.3.1.1.0.1 = "[10/21/2005 08:09:23]
[linux, HEAD] FFEFFFFFh: Program Do Nothing. ."
2005-10-21 08:09:29 UCD-snmp version 4.2.5 Stopped.


Sample SNMP Notification using NET-SNMP v5.1:

linux:/usr/sbin # ./snmptrapd -P
Warning: -P option is deprecated; use -f -Le instead
2005-10-21 08:10:18 NET-SNMP version 5.1 Started.
2005-10-21 08:10:27 localhost [127.0.0.1]:
SNMPv2-MIB::sysUpTime.0 = Timeticks: (1129853427) 130
days, 18:28:54.27 SNMPv2-MIB::snmpTrapOID.0 = OID:
SNMPv2-SMI::enterprises.2653.3.1.1.0.1
SNMPv2-SMI::enterprises.2653.3.1.1.0.1 = Hex-STRING:
5B 31 30 2F 32 31 2F 32 30 30 35 20 30 38 3A 31
30 3A 32 37 5D 20 5B 6C 69 6E 75 78 2C 20 48 45
41 44 5D 20 46 46 36 30 46 46 46 46 68 3A 20 4E
6F 20 41 44 54 58 20 64 65 76 69 63 65 20 63 6F
6E 6E 65 63 74 65 64 0A 20 0A
2005-10-21 08:10:27 localhost [127.0.0.1]:
SNMPv2-MIB::sysUpTime.0 = Timeticks: (1129853427) 130
days, 18:28:54.27 SNMPv2-MIB::snmpTrapOID.0 = OID:
SNMPv2-SMI::enterprises.2653.3.1.1.0.1
SNMPv2-SMI::enterprises.2653.3.1.1.0.1 = Hex-STRING:
5B 31 30 2F 32 31 2F 32 30 30 35 20 30 38 3A 31
30 3A 32 37 5D 20 5B 6C 69 6E 75 78 2C 20 48 45
41 44 5D 20 46 46 45 46 46 46 46 46 68 3A 20 50
72 6F 67 72 61 6D 20 44 6F 20 4E 6F 74 68 69 6E
67 0A 20 0A
2005-10-21 08:10:37 NET-SNMP version 5.1 Stopped.

- Roy


--- Thomas Anders <[email protected]> wrote:

> Roy Chan wrote:
> > When using the snmptrapd utility in NET-SNMP v5.1.
> The
> > SNMP notifications is displayed in Hex String.
> > 
> > How can I view the SNMP notifications in ASCII
> string
> > instead of Hex String? Is there a setting that
> must be
> > set? How can I set it?
> 
> What objects are affected? Please show examples.
> IIRC they should be 
> displayed as ASCII if the string *only* contains
> printable characters.
> 
> 
> +Thomas
> 
> -- 
> Thomas Anders (thomas.anders at blue-cable.de)
> 
> 
>
-------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content,
> downloads, discussions,
> and more.
> http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or
> change other options:
>
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.