1) Please take messages for the development version to ntop-dev. That's
where you'll see the cvs commit messages and know what's going on.
The constant is hard coded many times in graph.c, but always as
/tmp/ntop-graph-..... The actual message is in util.c in
getNewRandomFile().
It's almost a trivial pattern - each graph routine looks like this:
void hostTrafficDistrib(HostTraffic *theHost, short dataSent) {
char fileName[NAME_MAX] = "/tmp/ntop-graph-XXXXXX";
<snip />
fd = getNewRandomFile(fileName, NAME_MAX); /* leave it inside the
mutex */
Looking at the code, I can see that the -XXXXXX is not necessary except
under Windows where it uses tmpnam() <gack/> But it doesn't hurt anything.
What I can't see is how it gets truncated to 3 chars.
All I can think is that NAME_MAX is too small on your OS.
The definition is in globals-defines.h:
/*
* This is POSIX, but might not be set - see <dirent.h>
*/
#ifndef NAME_MAX
#define NAME_MAX 255
#endif
So can you check dirent.h and see (it may not be there, you might have to
recursively grep in /usr/include for NAME_MAX then grep that set for a
#define, e.g. (Linux):
$ grep -R NAME_MAX /usr/include/* | grep '#define'
which gives
...
/usr/include/linux/limits.h:#define NAME_MAX 255 /* # chars
in a
file name */
...
Either that or there's some odd link as /tmp? Something root can write to
but other's can't??
-----Burton
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> Richard Crane
> Sent: Wednesday, March 31, 2004 11:16 AM
> To: ntop list
> Subject: [Ntop] Problem generating graphs V3.0.050 on Mac OS X
>
>
> Hi --
>
> Running ntop v.3.0.050 MT (SSL) on Mac OS 10.3.3, I get lots of
> messages like
>
> ntop[4062]: [MSGID8774708] **WARNING** Unable to create temp. file
> (/tm).
>
> on any page that has charts.
>
> Adding -t 5 didn't give any more info.
>
> If I run as root, they work fine. What directory is ntop using for
> temp chart files?
>
> Thanks,
> Richard Crane
> -------
> Haskins Laboratories / (203) 865-6163 X 275 / FAX (203) 865-8963
> 270 Crown Street / New Haven, CT 06511
>
> _______________________________________________
> Ntop mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop