[HOWTO] get versions for all needed programs (PHP, MySQL...)

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

[HOWTO] get versions for all needed programs (PHP, MySQL...)

Post by gandalf »

Sometimes you need to know what software versions you currently are running. Here's a tiny shell script that even works for me. Any enhancement is welcome:

Code: Select all

mysql cacti --user cactiuser --password=cactiuser-password < sql|tail -1 > ver
/var/www/html/cacti/cactid --version | head -1 >> ver
php --version >> ver
rrdtool |head -1 >> ver
mysql --version >> ver
gcc --version |head -1 >> ver
snmpd --version | head -2 >> ver
The first line delivers the version from the mysql database where sql is a litte sql:

Code: Select all

select * from version;
All version codes are put into the file ver.
The output may look like

Code: Select all

0.8.6g
CACTID 0.8.6f-rc12  Copyright 2002-2005 by The Cacti Group
PHP 4.3.9 (cgi) (built: Aug 17 2005 10:22:19)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
RRDtool 1.2.11  Copyright 1997-2005 by Tobias Oetiker <tobi@oetiker.ch> (patched for rrdtool resize)
mysql  Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i386)
gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1)
NET-SNMP version:  5.1.2
Reinhard
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Attached is a screenshot of 'info.php' which should be included as soon as a Windows version is made. It is meant to be referenced when submitting a bug report. Console version will follow after that.
Attachments
info.php screenshot
info.php screenshot
cacti_system5.png (69.97 KiB) Viewed 9890 times
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Well, this is by far the better solution. Are there special permissions needed to run this php script? How did you embed this into cacti?
Reinhard
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

No special permissions.

Just used the normal process for adding a page to Cacti. It should be included in an upcoming release, so you can check it out then...
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Post by Voiper99 »

I know this thread is quite old, but I was just wondering if there is anything similar for the Linux version of Cacti?
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Console => System Utilities => Technical Support
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Post by Voiper99 »

I have seen that page a million times but for some reason did not think to scroll down :( Thanks for the reply.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests