<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.racktables.org/index.php?action=history&amp;feed=atom&amp;title=Visualisation_with_GraphViz</id>
	<title>Visualisation with GraphViz - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.racktables.org/index.php?action=history&amp;feed=atom&amp;title=Visualisation_with_GraphViz"/>
	<link rel="alternate" type="text/html" href="https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;action=history"/>
	<updated>2026-04-17T15:29:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=439&amp;oldid=prev</id>
		<title>Grin: and the login data</title>
		<link rel="alternate" type="text/html" href="https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=439&amp;oldid=prev"/>
		<updated>2012-11-10T11:18:05Z</updated>

		<summary type="html">&lt;p&gt;and the login data&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 11:18, 10 November 2012&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-l134&quot; &gt;Line 134:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 134:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;print &amp;quot;\n};\n\n&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;print &amp;quot;\n};\n\n&amp;quot;;&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='diff-marker'&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;&amp;lt;/pre&amp;gt;&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='diff-marker'&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;&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='diff-marker'&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;&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='diff-marker'&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;== DatabaseLoginData.pm ==&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='diff-marker'&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;&amp;lt;pre&amp;gt;&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='diff-marker'&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;# database login data&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='diff-marker'&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;package DatabaseLoginData;&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='diff-marker'&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;&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='diff-marker'&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;our $db_user = &amp;quot;racktables_user&amp;quot;;&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='diff-marker'&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;our $db_pw = &amp;quot;supersecretpassword&amp;quot;;&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='diff-marker'&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;our $db_host = &amp;quot;racktables.example.com&amp;quot;;&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='diff-marker'&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;&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='diff-marker'&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;1;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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='diff-marker'&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='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=437&amp;oldid=prev</id>
		<title>Grin: /* dottr.pl */ comment about those funny-looking numbers</title>
		<link rel="alternate" type="text/html" href="https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=437&amp;oldid=prev"/>
		<updated>2012-11-10T11:10:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;dottr.pl: &lt;/span&gt; comment about those funny-looking numbers&lt;/span&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 11:10, 10 November 2012&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-l41&quot; &gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;  ORDER BY obj1, port1&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;  ORDER BY obj1, port1&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&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;# I append random number to reservation comments to prevent same comments to&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='diff-marker'&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;# be merged into one node.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;my $sth_reservations = $dbh-&amp;gt;prepare(&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;my $sth_reservations = $dbh-&amp;gt;prepare(&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;SELECT ro.name AS obj1, p.name AS port1, 'RESERVE' AS cable, '' AS port2,  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;SELECT ro.name AS obj1, p.name AS port1, 'RESERVE' AS cable, '' AS port2,  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=433&amp;oldid=prev</id>
		<title>Grin: typo</title>
		<link rel="alternate" type="text/html" href="https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=433&amp;oldid=prev"/>
		<updated>2012-11-10T10:59:59Z</updated>

		<summary type="html">&lt;p&gt;typo&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 10:59, 10 November 2012&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 class='diff-marker'&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://www.graphviz.org/ GraphViz] is an ingenious package created by IBM to visualise lots of possible object topologies. The package makes it very easy to create all kinds of directed and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;indirected &lt;/del&gt;graphs from raw data.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;[http://www.graphviz.org/ GraphViz] is an ingenious package created by IBM to visualise lots of possible object topologies. The package makes it very easy to create all kinds of directed and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;undirected &lt;/ins&gt;graphs from raw data.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;Hereby I share with you some simple code to create a ''very basic'' network topology graph from RackTables database. All updates (expecially fine-tuning the .dot file) are much welcome, since there are hundreds of possible tweaks in '''dot''' (the submodule I'm using here) itself.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;Hereby I share with you some simple code to create a ''very basic'' network topology graph from RackTables database. All updates (expecially fine-tuning the .dot file) are much welcome, since there are hundreds of possible tweaks in '''dot''' (the submodule I'm using here) itself.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=431&amp;oldid=prev</id>
		<title>Grin: generate topology graphs from the db</title>
		<link rel="alternate" type="text/html" href="https://wiki.racktables.org/index.php?title=Visualisation_with_GraphViz&amp;diff=431&amp;oldid=prev"/>
		<updated>2012-11-10T10:59:24Z</updated>

		<summary type="html">&lt;p&gt;generate topology graphs from the db&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[http://www.graphviz.org/ GraphViz] is an ingenious package created by IBM to visualise lots of possible object topologies. The package makes it very easy to create all kinds of directed and indirected graphs from raw data. &lt;br /&gt;
&lt;br /&gt;
Hereby I share with you some simple code to create a ''very basic'' network topology graph from RackTables database. All updates (expecially fine-tuning the .dot file) are much welcome, since there are hundreds of possible tweaks in '''dot''' (the submodule I'm using here) itself.&lt;br /&gt;
&lt;br /&gt;
I use '''dot''' (which is the most general topology module) because my tests showed that default layouts of other modules resulted inferior outputs. Still, the .dot file is the same, and you're all free to tweak other settings and show us all. :-)&lt;br /&gt;
&lt;br /&gt;
Code requires ''perl'' (DBI / DBD::mysql for database access) and ''graphviz''. If you use accented characters for strings you have to recode the output to UTF-8 somehow, I'm using ''konwert'' for that, but ''recode'' or other tools would do just fine, too.&lt;br /&gt;
&lt;br /&gt;
== dottr.pl ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
##$Id: dottr.pl,v 5aa2d11fa948 2012/11/10 10:57:04 grin $&lt;br /&gt;
#&lt;br /&gt;
# (c) Peter 'grin' Gervai, 2012&lt;br /&gt;
# Released under CreativeCommons-Attribution-ShareAlike-3.0-Unported&lt;br /&gt;
#&lt;br /&gt;
# create .dot from racktables links&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
use DBI;&lt;br /&gt;
use Encode;&lt;br /&gt;
&lt;br /&gt;
use DatabaseLoginData; # $db_user; $db_pw; $db_host&lt;br /&gt;
&lt;br /&gt;
my ($db_name, $db_port) = (&amp;quot;racktables_db&amp;quot;, 3306);&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;dbi:mysql:database=$db_name;host=$DatabaseLoginData::db_host;port=$db_port&amp;quot;,&lt;br /&gt;
                           $DatabaseLoginData::db_user, $DatabaseLoginData::db_pw, &lt;br /&gt;
                           { RaiseError =&amp;gt;1, AutoCommit =&amp;gt; 1 } );&lt;br /&gt;
&lt;br /&gt;
#########################################################################&lt;br /&gt;
&lt;br /&gt;
my $sth_links = $dbh-&amp;gt;prepare(&amp;quot;&lt;br /&gt;
SELECT ro1.name AS obj1, p1.name AS port1, Link.cable, p2.name AS port2, ro2.name AS obj2, d.dict_value AS obj1type&lt;br /&gt;
 FROM RackObject AS ro1 &lt;br /&gt;
   JOIN Port AS p1 ON(ro1.id=p1.object_id)&lt;br /&gt;
   JOIN Link       ON(p1.id=Link.porta)&lt;br /&gt;
   JOIN Port AS p2 ON(Link.portb=p2.id)&lt;br /&gt;
   JOIN RackObject AS ro2 ON(p2.object_id=ro2.id)&lt;br /&gt;
   LEFT JOIN Dictionary AS d ON(ro1.objtype_id=d.dict_key)&lt;br /&gt;
 ORDER BY obj1, port1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
my $sth_reservations = $dbh-&amp;gt;prepare(&amp;quot;&lt;br /&gt;
SELECT ro.name AS obj1, p.name AS port1, 'RESERVE' AS cable, '' AS port2, &lt;br /&gt;
 CONCAT(reservation_comment,' #',ROUND(RAND()*1000))  AS obj2,  d.dict_value AS obj1type&lt;br /&gt;
 FROM RackObject AS ro&lt;br /&gt;
   JOIN Port AS p  ON(ro.id=p.object_id)&lt;br /&gt;
   LEFT JOIN Dictionary AS d ON(ro.objtype_id=d.dict_key)&lt;br /&gt;
     WHERE p.reservation_comment IS NOT NULL&lt;br /&gt;
 ORDER BY obj1, port1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
my $res = $sth_links-&amp;gt;execute;&lt;br /&gt;
my $a = $sth_links-&amp;gt;fetchall_arrayref;&lt;br /&gt;
my @data = @$a;&lt;br /&gt;
&lt;br /&gt;
$res = $sth_reservations-&amp;gt;execute;&lt;br /&gt;
$a = $sth_reservations-&amp;gt;fetchall_arrayref;&lt;br /&gt;
@data = (@data, @$a);&lt;br /&gt;
&lt;br /&gt;
# header&lt;br /&gt;
print '&lt;br /&gt;
graph rackspace_topo {&lt;br /&gt;
&lt;br /&gt;
label = &amp;quot;Tarr Racktables topo&amp;quot;;&lt;br /&gt;
rankdir = LR;&lt;br /&gt;
&lt;br /&gt;
       edge [ color=&amp;quot;#0000a0&amp;quot;, decorate=true, fontsize=9, headclip=false ];&lt;br /&gt;
       node [ shape=box, headport=n, tailport=n ];&lt;br /&gt;
       &lt;br /&gt;
';&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# generate edges&lt;br /&gt;
foreach $a (@data) {&lt;br /&gt;
  # node+interface 1&lt;br /&gt;
  $node{$a-&amp;gt;[0]} = $a-&amp;gt;[1];&lt;br /&gt;
  $nodetype{$a-&amp;gt;[0]} = $a-&amp;gt;[5];&lt;br /&gt;
  # node+interface 2&lt;br /&gt;
  $node{$a-&amp;gt;[4]} = $a-&amp;gt;[3];&lt;br /&gt;
  # &lt;br /&gt;
  push @link, $a;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# output the nods first&lt;br /&gt;
foreach my $n (keys %node) {&lt;br /&gt;
  # nodes with empty or &amp;quot;space&amp;quot; names&lt;br /&gt;
  next if $n =~ /^\s*$/;&lt;br /&gt;
&lt;br /&gt;
  $ntyp = $nodetype{$n};&lt;br /&gt;
&lt;br /&gt;
  # color/style depends on node type&lt;br /&gt;
  my $color=&amp;quot;&amp;quot;;&lt;br /&gt;
  if( $ntyp eq &amp;quot;Server&amp;quot; ) {&lt;br /&gt;
    $color='color=&amp;quot;black&amp;quot;';&lt;br /&gt;
    &lt;br /&gt;
  } elsif( $ntyp eq &amp;quot;Network switch&amp;quot; ) {&lt;br /&gt;
    $color='color=&amp;quot;red&amp;quot; style=&amp;quot;bold&amp;quot;';&lt;br /&gt;
    &lt;br /&gt;
  } elsif( $ntyp eq &amp;quot;Server chassis&amp;quot; ) {&lt;br /&gt;
    $color='color=&amp;quot;blue&amp;quot; style=&amp;quot;dotted&amp;quot;';&lt;br /&gt;
    &lt;br /&gt;
  } elsif( $ntyp eq &amp;quot;Network chassis&amp;quot; ) {&lt;br /&gt;
    $color='color=&amp;quot;lightblue&amp;quot;';&lt;br /&gt;
    &lt;br /&gt;
  } elsif( $ntyp eq &amp;quot;MediaConverter&amp;quot; ) {&lt;br /&gt;
    $color='color=&amp;quot;gold&amp;quot;';&lt;br /&gt;
    &lt;br /&gt;
  } elsif( $ntyp eq &amp;quot;Router&amp;quot; ) {&lt;br /&gt;
    $color='color=&amp;quot;darkgreen&amp;quot;';&lt;br /&gt;
    &lt;br /&gt;
  } else {&lt;br /&gt;
    #$color='color=&amp;quot;pink&amp;quot;';			# Barbie syndrome FTW&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  print '&amp;quot;' . $n . &amp;quot;\&amp;quot; [ $color ];\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# and print the edges&lt;br /&gt;
foreach my $l (@link) {&lt;br /&gt;
  # skip empty...&lt;br /&gt;
  next if $l-&amp;gt;[0] =~ /^\s*$/;&lt;br /&gt;
&lt;br /&gt;
  if( defined( $link{ $l-&amp;gt;[0] }{ $l-&amp;gt;[4] } ) &amp;amp;&amp;amp; $link{ $l-&amp;gt;[0] }{ $l-&amp;gt;[4] } == $l-&amp;gt;[2] ) {&lt;br /&gt;
    # skip duplicate&lt;br /&gt;
    # if you need warnings... here you can.&lt;br /&gt;
  } else {&lt;br /&gt;
    print '&amp;quot;', $l-&amp;gt;[0], '&amp;quot; -- &amp;quot;', $l-&amp;gt;[4], '&amp;quot; [ label=&amp;quot;', $l-&amp;gt;[2], &amp;quot;\&amp;quot; color=\&amp;quot;grey\&amp;quot;];\n&amp;quot;;&lt;br /&gt;
    $link{ $l-&amp;gt;[0] }{ $l-&amp;gt;[4] } = $l-&amp;gt;[2];&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;\n};\n\n&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== create_svg.sh ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#$Id: create_svg.sh,v 5aa2d11fa948 2012/11/10 10:57:04 grin $&lt;br /&gt;
#&lt;br /&gt;
# (c) Peter 'grin' Gervai, 2012&lt;br /&gt;
# Released under CreativeCommons-Attribution-ShareAlike-3.0-Unported&lt;br /&gt;
#&lt;br /&gt;
# create .svg from racktables links&lt;br /&gt;
# recode the file&lt;br /&gt;
&lt;br /&gt;
# first create the .dot file, and recode it using konwert&lt;br /&gt;
# skip recoding if you're happy without accents, screws up svg otherwise&lt;br /&gt;
echo &amp;quot;Creating .dot file from the database...&amp;quot;&lt;br /&gt;
./dottr.pl | konwert isolatin2-utf8 &amp;gt; map.dot&lt;br /&gt;
&lt;br /&gt;
# dot output is fine, others (like neato or circo) not that useful&lt;br /&gt;
echo &amp;quot;Rendering map.svg and map.png...&amp;quot;&lt;br /&gt;
dot -Tsvg -o map.svg map.dot&lt;br /&gt;
dot -Tpng -o map.png map.dot&lt;br /&gt;
 &lt;br /&gt;
echo &amp;quot;That's all, folks!&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Grin</name></author>
		
	</entry>
</feed>