SwapCached-Error with cacti 0.6

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply

#1 Post by pbleser » Fri Nov 30, 2001 2:25 am

I'm always getting the following error when cmd.php is executed:
ERROR: expected 1 data source readings (got 2) from N:SwapCached::...

The strage thing is, data_src has a row where its value is "SwapCached: 2080".
It seems that data_src is updated by the cron job, because removing the ": 2080" from the field in the database doesn't fix it.
Do you have any idea what could be wrong ? I'd like to know before I'd have to dive into cacti's sourcecode...



#2 Post by pbleser » Fri Nov 30, 2001 2:52 am

OK, I found the error.
2.4.x kernels have "Cached" and "SwapCached" in /proc/meminfo.
Just need to change "Cached" into "^Cached" in SQL (line #970) and it works :smile:

Lead Developer
Posts: 2237
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA

#3 Post by raX » Fri Nov 30, 2001 9:42 am

One of the things that cacti needs work on is the perl scripts it uses to gather data. Most were origionally written to gather data from my own servers and probably do not scale as well as they should.

If you come up with any more "robust" scripts than are included, I will be more than happy to include them in a future version of cacti.


Post Reply