cmd.php runs longer than 5 minutes

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

Moderators: Developers, Moderators

Post Reply
chadw
Cacti User
Posts: 52
Joined: Thu Jul 17, 2003 7:20 am

cmd.php runs longer than 5 minutes

Post by chadw »

I'm not quite there yet, but cmd.php is running close to 3 minutes. If I add all the machines I am planning to add, this will surely run longer than 5 minutes.

I have it cron'd to run every 5, so what happens when 2 cmd.php jobs start running together?

Chad
Harrie van Arragon
Posts: 1
Joined: Thu Jul 17, 2003 9:35 am

my cmd.php runs longer than 5 minutes too

Post by Harrie van Arragon »

I got the same problem.

my cmd.php takes 4 mins 15 sec.

my computer is a 533 mhz via c3.

top shows 100% load.

I use self compiled apache 2. mysql 4 and php 4.3.2

php is compiles without snmp!!!

is it important to install php with snmp
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

If you are polling enough items to cause cmd.php to run >5 minutes, I suggest that you check out cactid. You will find the best results by copying the 'cactid/' directory from the latest pre-release. Hopefully cactid will one day replace cmd.php as a fast c-based threaded alternative. For now, it should work for most users.

-Ian
Jeppe
Posts: 47
Joined: Sun Feb 09, 2003 4:48 am
Contact:

Post by Jeppe »

Cactid is a god's gift to mankind. :-)

I had cmd.php run over 20 minutes, now running with cactid from today's snapshot and it collects the data in just under 20 seconds!
Great work!

J
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

I have RH 7.3 and cacti 0.8.2a
Anybody describe me how can I configure my cacti tu use cactid ??????
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

I try to confıgure cactid but I get this message:

Code: Select all

configure: error: Cannot find SNMP headers. Use --with-snmp=to specify non-default path.
Anybody help me?
Beacuse My cmd.php runs in 406 sec. :(
Guest

Post by Guest »

TFC wrote:I try to confıgure cactid but I get this message:

Code: Select all

configure: error: Cannot find SNMP headers. Use --with-snmp=to specify non-default path.
Anybody help me?
Beacuse My cmd.php runs in 406 sec. :(
I don't know what ı write after --with-snmp=
Have you any idea?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Anonymous wrote:I don't know what ı write after --with-snmp=
Have you any idea?
If you installed net-snmp/ucd-snmp from source, you should put '--with-snmp=/usr/local'. I know that Redhat 7.3 installs ucd-snmp by default. In this case you need to make sure the 'ucd-snmp-devel' package is installed.

-Ian
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

I have 'ucd-snmp' and 'ucd-snmp-devel' packages. And I use that command

Code: Select all

./configure --with-snmp=/usr/include/ucd-snmp/
I solve this problem but now I have another problem :(
configuration cut off because:

Code: Select all

configure: error: libcrypto not found!
what is libcrypto and how can I install that?
Is it necessary? If not how can I install without libcrypto?
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

HEY!!
As an information,
I uninstall openssl and reinstall. Then problem solved.
Then I use 'make' and 'make install'
Now I have these files in cactid directory:

Code: Select all

aclocal.m4   cactid.h   config.log     INSTALL      mysql.c   README
AUTHORS      cactid.o   config.status  locks.c      mysql.o   rrd.c
cactid       ChangeLog  configure      Makefile     NEWS      rrd.o
cactid.c     common.h   configure.in   Makefile.am  poller.c  util.c
cactid.conf  config     COPYING        Makefile.in  poller.o  util.o
Now what should I do?
Which command must be written in crontab?
Remember that I am a newbie ;)
Additionally,
when I use ./cactid command why I get "permission denied" messages? just wonder..
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

After you successfully compile:

1) Edit 'cactid.conf' so it points to your Cacti database.
2) Add a crontab entry like:

Code: Select all

*/5 * * * * iberry cd /var/www/html/cacti/cactid; ./cactid > /dev/null 2>&1
After you edit cactid.conf and before you add the crontab entry double check to make sure cactid actually runs and polls data. If you are getting permission related errors, make sure the files in your 'rra/' directory are writable by the user cactid is running as.

Let me know if you have any further questions.

-Ian
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

raX wrote:After you successfully compile:

1) Edit 'cactid.conf' so it points to your Cacti database.
2) Add a crontab entry like:

Code: Select all

*/5 * * * * iberry cd /var/www/html/cacti/cactid; ./cactid > /dev/null 2>&1
After you edit cactid.conf and before you add the crontab entry double check to make sure cactid actually runs and polls data. If you are getting permission related errors, make sure the files in your 'rra/' directory are writable by the user cactid is running as.

Let me know if you have any further questions.

-Ian
Hi Ian,
Thanks for assistances.
I wanna say about future of cacti.
I told u in http://www.raxnet.net/board/viewtopic.php?p=7478#7478
Have u any idea how can I use cactid and cactistoric? When I use cmd.php graph turns normal, 5 min average,. But when I use cactid, graph becomes like shown in figure. Any code in cactid can be change for this?

I have to ask a little question. Cactid and cmd.php do completely same things about update rrd and etc?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Have have never seen cactihistoric, what exactly does it do?

For the most part, cmd.php and cactid do the same thing. They just go about how they poll data a bit differently. My goal is to make cactid a replacement for cmd.php.

-Ian
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

From linkdown.org:
I started this project to add the historic feature to Cacti. If you are a RaXnet forum user you probably know this project as zoom_graph. With this add-on you can see what append a few days/weeks/months ago with a 5 minute accuracy. This release (0.8.2a) is built to be used with cacti-0.8.2a.
You must install this into cacti :)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests