Generate network graph from command line

I recently wrote on gnuplot, today I tried another command line utility to generate graphs, graphviz, version 2.24.0 on AIX5L.

Pretty straightforward syntax :
(
echo "digraph Emp {"
sqlplus -s -L scott/tiger << EOF set pages 0 lin 120 hea off feed off select ename ||'->'||
(select ename from emp where empno=e.mgr) || ';'
from emp e where mgr is not null;
EOF
echo "}"
)| neato -Tpng | uuencode Emp.png | mailx laurentschneider@example.com

(or neato -Tpng -o Emp.png to save locally, or -Tps|lp, etc…)

One Reply to “Generate network graph from command line”

  1. That takes me back — I used graphviz in a very similar way to plot the flow of control on DBMS_Scheduler chains before this ability was built into SQL Developer v3. It looked prettier than SQL Developer too.

Leave a Reply

Your email address will not be published.