<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: snmpget result and ip name on the same row in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034361#M95126</link>
    <description>Thanks for reply, but don't work to me.</description>
    <pubDate>Fri, 16 Mar 2007 07:46:42 GMT</pubDate>
    <dc:creator>Alpha977</dc:creator>
    <dc:date>2007-03-16T07:46:42Z</dc:date>
    <item>
      <title>snmpget result and ip name on the same row</title>
      <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034359#M95124</link>
      <description>Hello to all!&lt;BR /&gt;&lt;BR /&gt;I need a command to show the nodename and ip address on the same row, example of result:&lt;BR /&gt;&lt;BR /&gt;system.sysName.0 : DISPLAY STRING- (ascii):  MANROUTER9 192.168.0.1&lt;BR /&gt;&lt;BR /&gt;I think something like this:&lt;BR /&gt;snmpget -c public 192.168.0.1 system.sysName.0 |echo "192.168.0.1"&lt;BR /&gt;&lt;BR /&gt;but don't work.&lt;BR /&gt;&lt;BR /&gt;Thanks to all&lt;BR /&gt;&lt;BR /&gt;Points for all reply</description>
      <pubDate>Fri, 16 Mar 2007 05:25:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034359#M95124</guid>
      <dc:creator>Alpha977</dc:creator>
      <dc:date>2007-03-16T05:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: snmpget result and ip name on the same row</title>
      <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034360#M95125</link>
      <description>It's ugly but it works.&lt;BR /&gt;&lt;BR /&gt;snmpget -c public -v 1 192.168.0.1 system.sysName.0 | awk '{print $0, "#", $4}' | perl -MSocket -ne '($snmp, $host) = split (/#/, $_); $host =~ s/^\s+|\s+$//g; print $snmp; print inet_ntoa(scalar gethostbyname($host));'&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Mar 2007 07:31:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034360#M95125</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-03-16T07:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: snmpget result and ip name on the same row</title>
      <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034361#M95126</link>
      <description>Thanks for reply, but don't work to me.</description>
      <pubDate>Fri, 16 Mar 2007 07:46:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034361#M95126</guid>
      <dc:creator>Alpha977</dc:creator>
      <dc:date>2007-03-16T07:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: snmpget result and ip name on the same row</title>
      <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034362#M95127</link>
      <description>What is the error you get?</description>
      <pubDate>Fri, 16 Mar 2007 07:49:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034362#M95127</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-03-16T07:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: snmpget result and ip name on the same row</title>
      <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034363#M95128</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;Don't appear anything.&lt;BR /&gt;Remain in wait status.&lt;BR /&gt;&lt;BR /&gt;thks</description>
      <pubDate>Fri, 16 Mar 2007 08:14:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034363#M95128</guid>
      <dc:creator>Alpha977</dc:creator>
      <dc:date>2007-03-16T08:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: snmpget result and ip name on the same row</title>
      <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034364#M95129</link>
      <description>does this return anything:&lt;BR /&gt;&lt;BR /&gt;snmpget -c public -v 1 192.168.0.1 system.sysName.0 &lt;BR /&gt;&lt;BR /&gt;if so see if this works:&lt;BR /&gt;&lt;BR /&gt;snmpget -c public -v 1 192.168.0.1 system.sysName.0 | awk '{print $0, "#", $4}'&lt;BR /&gt;&lt;BR /&gt;Let me know and we can work from there. Maybe you left of the trailing '.</description>
      <pubDate>Fri, 16 Mar 2007 08:22:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034364#M95129</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-03-16T08:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: snmpget result and ip name on the same row</title>
      <link>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034365#M95130</link>
      <description>Hello to all!&lt;BR /&gt;&lt;BR /&gt;I have created this.&lt;BR /&gt;This scan all the 192.168.1.xxx subnet and output a file with "hostname ipaddress".&lt;BR /&gt;I hope this helpful for someone!&lt;BR /&gt;&lt;BR /&gt;i=1&lt;BR /&gt;while [[ ${i} -lt 255 ]]&lt;BR /&gt;do&lt;BR /&gt;export IP="192.168.1.${i}"&lt;BR /&gt;snmpget -c public -t 1 -r 0  ${IP} system.sysName.0 2&amp;gt; /dev/null | awk '{ print $6 }' |while read a&lt;BR /&gt;do&lt;BR /&gt;echo $a $IP &amp;gt;&amp;gt; nodes.txt&lt;BR /&gt;done</description>
      <pubDate>Fri, 16 Mar 2007 10:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/snmpget-result-and-ip-name-on-the-same-row/m-p/5034365#M95130</guid>
      <dc:creator>Alpha977</dc:creator>
      <dc:date>2007-03-16T10:01:20Z</dc:date>
    </item>
  </channel>
</rss>

