graph/0 is an Erlang function exported by "age" module. This function collects information about the Grid topology, similarly to map/0, and also returns the current Grid's map. However, the function additionally generates Graphviz layout of the Grid's map and saves is it as "age_map.svg" file into Node's standard logs directory. For example, based on the Grid's map retrieved by the code sample below and the current Services configuration provided by connected nodes, the following layout could be generated: IMPORTANT! This function is tested with Graphviz software under Linux operating system only. In case Graphviz is not found in your working path then the function returns only the expected map result. Brief installation instructions for Graphviz software under UBUNTU 18.04: 1)Run sudo apt install graphviz. 2)Restart the AGE node. 3)Invoke function age:graph() and check the result in <node_root>/logs/age_map.svg |
|