$halfway) { $offset = ($n - 24 - 1 - $quarter)*8; } else { // The first 24 ports grow up instead of down $offset = ($n - 1 - $quarter)*8; $voffset = -$voffset; $voffset2 = -$voffset2; } $target = "tgt?"; $infourl = "info?"; $overliburl = "over?"; printf("NODE %s\n\tPOSITION %s %d %d\n\tSET cacti_id %d\n\n", $nodename,$switchname,$offset,$voffset, $cacti_host_id); printf("LINK %s\n\tNODES %s:%d:%d %s\n\tBWLABEL none\n\tWIDTH 2\n\tARROWSTYLE compact\n\tOUTLINECOLOR none\n", $linkname, $switchname, $offset, $voffset2, $nodename ); $interfacename = sprintf($interfacepattern,$n); print "\tSET out_interface $interfacename"; # printf("\tINFOURL %s\n\tOVERLIBGRAPH %s\n\tTARGET %s\n", $infourl, $overliburl, $target ); print "\n\n"; } print "# Now run this output through cacti-integrate.php to add all the INFOURL and TARGET lines"; ?>
weathermap |
Subversion Repositories: |
Line No. | Rev | Author | Line |
---|