Clearing Logs or Poller Cache

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
User avatar
ichoudhury
Posts: 46
Joined: Tue May 31, 2005 8:18 am

Clearing Logs or Poller Cache

Post by ichoudhury »

When I try to clear log, I get this error
Warning: unlink(d:\cacti/log/cacti.log) [function.unlink]: Permission denied in d:\cacti\utilities.php on line 195

Warning: touch() [function.touch]: Utime failed: Permission denied in d:\cacti\utilities.php on line 196

log directory has the right permission setup (Now I have full permission). Anyway, I checked that line the error is talking about...but what am I not seeing here?

function utilities_clear_logfile() {
$logfile = read_config_option("path_cactilog");

if ($logfile == "") {
$logfile = "./log/rrd.log";
}

if (file_exists($logfile)) {
unlink($logfile);
touch($logfile);
}
}
Poller Cache also never clears...
There are those who think fast, and there are others who sleep on a decision. I belong to the third group.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

check for hung processes. Also, check permissions on the log file and make sure that your web server account has rwx to the log directory and rx to the rra directory.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
ichoudhury
Posts: 46
Joined: Tue May 31, 2005 8:18 am

Post by ichoudhury »

you must be right about the hung processes. I couldn't find any, but rebooted the server (needed one anyway).... And I am not getting the error anymore.

Poller cache still doesn't clears... (or maybe it does but get filled back up before even it refreshes.... (no big deal). No error msg there..

Thanks..
There are those who think fast, and there are others who sleep on a decision. I belong to the third group.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Clearing the poller cache is a little misleading and will be fixed in future versions to something like "Refresh Poller Cache"

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
lee_connell
Posts: 10
Joined: Fri Aug 19, 2005 6:36 am

where is the poller cache

Post by lee_connell »

which dir is the poller cache located in on disk?
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It is part of the database and not a specific file.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
lee_connell
Posts: 10
Joined: Fri Aug 19, 2005 6:36 am

table

Post by lee_connell »

which table in the database? because when i clear it, it dont clear, have you ever figured that out?
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It does not clear, it get's rebuilt.

thewitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

*shakes head* We really need to rename that function..... :o
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The table name is poller_item :wink:

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
ichoudhury
Posts: 46
Joined: Tue May 31, 2005 8:18 am

Post by ichoudhury »

just rename it to "Refresh Poller Cache" :P
There are those who think fast, and there are others who sleep on a decision. I belong to the third group.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests