Hi
On Thu, Mar 02, 2006 at 08:57:17PM +0530, Strykar wrote:
>
> Hi,
>
> I'm running ntop on a Slackware 10.2 box running the stock 2.4.31 kernel.
> Trying to view the local network traffic map, I get this error:
>
> Command was:
> /usr/local/bin/dot -Tpng -Goverlap=false /usr/local/var/ntop/ntop.dot -o
> /usr/local/var/ntop/network_map.png 2>&1
> Results were:
> Renderer type: "png" not recognized. Use one of: canon cmap cmapx dia dot
> fig gd gd2 gif hpgl imap ismap jpeg jpg mif mp pcl pic plain plain-ext ps
> ps2 svg svgz vtx wbmp xdot
I did a grep after dot in the source and found a variable dotPath:
[EMAIL PROTECTED]:~/cvs/ntop$ grep -rn dotPath *
report.c:2207: path[384], dotPath[256], buf0[128], buf2[128];
report.c:2219: snprintf(dotPath, sizeof(dotPath), "%s", buf);
report.c:2221: snprintf(dotPath, sizeof(dotPath), "/usr/local/bin/dot");
report.c:2222: storePrefsValue("dot.path", dotPath); /* Set the default */
report.c:2225: revertSlashIfWIN32(dotPath, 0);
report.c:2227: if(stat(dotPath, &statbuf) != 0) {
report.c:2231: dotPath);
report.c:2314: dotPath, myGlobals.spoolPath, myGlobals.spoolPath);
report.c:2342: snprintf(path, sizeof(path), "%s -Tcmap -Goverlap=false
%s/ntop.dot", dotPath, myGlobals.spoolPath);
The code look like this:
/*
First of all let's see if the path of dot is inside
the preferences
*/
if(fetchPrefsValue("dot.path", buf, sizeof(buf)) != -1) {
snprintf(dotPath, sizeof(dotPath), "%s", buf);
} else {
snprintf(dotPath, sizeof(dotPath), "/usr/local/bin/dot");
storePrefsValue("dot.path", dotPath); /* Set the default */
}
As there is a function {fetch,store}PrefsValue it may even be possible to change
that to something else. I assume that is the case at least as I do not have
ntop in /usr/local in Debian. I actually do not seem to have dot either
though... :)
I think that is a good starting point at least.
Regards,
// Ola
>
>
>
> I understand this is because the version of dot I have does not support the
> png format.
> Where do I change ntop to issue "/usr/local/bin/dot -Tjpg" instead?
>
>
>
> -S
>
> _______________________________________________
> Ntop mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop
>
--
--------------------- Ola Lundqvist ---------------------------
/ [EMAIL PROTECTED] Annebergsslingan 37 \
| [EMAIL PROTECTED] 654 65 KARLSTAD |
| +46 (0)54-10 14 30 +46 (0)70-332 1551 |
| http://www.opal.dhs.org UIN/icq: 4912500 |
\ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 /
---------------------------------------------------------------
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop