<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.inthewings.net/index.php?action=history&amp;feed=atom&amp;title=Grab.pl</id>
	<title>Grab.pl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.inthewings.net/index.php?action=history&amp;feed=atom&amp;title=Grab.pl"/>
	<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=Grab.pl&amp;action=history"/>
	<updated>2026-05-06T09:14:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>http://wiki.inthewings.net/index.php?title=Grab.pl&amp;diff=2360&amp;oldid=prev</id>
		<title>Jka at 17:00, 21 February 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=Grab.pl&amp;diff=2360&amp;oldid=prev"/>
		<updated>2008-02-21T17:00:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:00, 21 February 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Description==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This script converts the output of ibnetdiscover, which is in turn a script that does a mapping of an infiniband network, into a format suitable for inputting into the &amp;#039;&amp;#039;dot&amp;#039;&amp;#039; program. This then generates a GIF image of the mappings.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Code==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/usr/bin/perl&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/usr/bin/perl&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jka</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.inthewings.net/index.php?title=Grab.pl&amp;diff=2359&amp;oldid=prev</id>
		<title>Jka at 16:57, 21 February 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=Grab.pl&amp;diff=2359&amp;oldid=prev"/>
		<updated>2008-02-21T16:57:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
&lt;br /&gt;
$tmpfile = &amp;quot;/tmp/ib.txt&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
open(OUT, &amp;quot;&amp;gt;test.dot&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
@output = `ssh -x submit ibnetdiscover --switch-map ib.map`;&lt;br /&gt;
&lt;br /&gt;
for ($i=0; $i&amp;lt;=$#output; $i++) {&lt;br /&gt;
    @fields = split(/\s+/, @output[$i]);&lt;br /&gt;
    @vendid = split(/=/, @fields[0]);&lt;br /&gt;
    if (@fields[0] eq &amp;#039;Switch&amp;#039;) {&lt;br /&gt;
        $n1 = @fields[4];&lt;br /&gt;
        $switch=1;&lt;br /&gt;
        next;&lt;br /&gt;
    }&lt;br /&gt;
    if (@vendid[0] eq &amp;#039;vendid&amp;#039;) {&lt;br /&gt;
        $switch=0;&lt;br /&gt;
        $n1 = &amp;quot;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    if ($switch &amp;amp;&amp;amp; @fields[3]) {&lt;br /&gt;
        $n2 = @fields[3];&lt;br /&gt;
        $n1 =~ s/\&amp;quot;//g;&lt;br /&gt;
        $n2 =~ s/\&amp;quot;//g;&lt;br /&gt;
        $n1 =~ s/\-/_/g;&lt;br /&gt;
        $n2 =~ s/\-/_/g;&lt;br /&gt;
        @n1 = split(/\./, $n1);&lt;br /&gt;
        @n2 = split(/\./, $n2);&lt;br /&gt;
        if (@n1[0] &amp;amp;&amp;amp; @n2[0]) {&lt;br /&gt;
            print OUT &amp;quot;\t&amp;quot; . @n1[0] . &amp;quot; -&amp;gt; &amp;quot; . @n2[0] . &amp;quot;;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
close(OUT);&lt;br /&gt;
system (&amp;quot;cat test.dot | sort -r | uniq &amp;gt; test.sorted&amp;quot;);&lt;br /&gt;
open (OUT, &amp;quot;&amp;gt;test.dot&amp;quot;);&lt;br /&gt;
print OUT &amp;quot;digraph G {\n&amp;quot;;&lt;br /&gt;
print OUT &amp;quot;\trankdir = LR;\n&amp;quot;;&lt;br /&gt;
print OUT &amp;quot;\tranksep = \&amp;quot;2.0\&amp;quot;;\n&amp;quot;;&lt;br /&gt;
print OUT &amp;quot;\t{ rank = same;\n&amp;quot;;&lt;br /&gt;
print OUT &amp;quot;\t  \&amp;quot;ib9601\&amp;quot;; \&amp;quot;ib9602\&amp;quot;;\n&amp;quot;;&lt;br /&gt;
print OUT &amp;quot;\t};\n&amp;quot;;&lt;br /&gt;
close (OUT);&lt;br /&gt;
system (&amp;quot;cat test.sorted &amp;gt;&amp;gt; test.dot&amp;quot;);&lt;br /&gt;
system (&amp;quot;echo &amp;#039;}&amp;#039; &amp;gt;&amp;gt; test.dot&amp;quot;);&lt;br /&gt;
system (&amp;quot;dot -Tgif test.dot -o graph.gif&amp;quot;);&lt;br /&gt;
system (&amp;quot;rm test.dot test.sorted&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jka</name></author>
		
	</entry>
</feed>