Thank you very much.

That exactly solved my problem.

best regards,
kursat.



Alex Burger wrote:
I knew there was a way to do this, but I couldn't remember the details. 
After some searching I found that 5.2 has an "snmp.conf" directive
"hexOutputLength" which you can use to set where to break the line. 
Setting it to 0 will have it print everything on one line.

It doesn't look like the docs were updated when it was added, but the
feature is there.  I'll update the man page for the next release.

Alex


  
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.
      


  
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to