Check the snmpcmd man page. There maybe be a from of the -O option that does what you want, although I couldn't find specific mention of it. Aside from hacking snmpwalk you could also write a wrapper script to strip newlines from the hex output.

Regards,
Andy

Yusuf Kürşat Tuncel wrote:
Hi All,

Searching through the google returned no result, so I'm asking directly to the list. I think net-snmp-coders list would be appropriate for this question.

Is there any way to prevent line wrapping of hex data from the output of snmpwalk?

I'm writing a script based on a mib var, the output is like this:

snmpwalk -v1 -c public -OQbxv [ip_address] [relevant_mib_var_here]

"01 00 00 00 03 6B 75 72 73 61 74 2D 72 61 64 69
75 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 01 00 01 01 56 52 D2 78 21 80 01 78
21 80 01 03 00 00 64
"
(wrapped exactly at 16th octet of the returned value)

What I want is to display this data in one line (for easier parsing)
"01 00 00 00 03 6B 75 72 73 61 74 2D 72 61 64 69 75 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 01 56 52 D2 78 21 80 01 78 21 80 01 03 00 00 64"


Is there anyway to prevent this line wrapping behaviour of snmpwalk via option switches or do I need to "hack" the source code to get the desired effect?

best regards,
kursat.


------------------------------------------------------- This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to