Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


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

 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12604
Location: Muenster, Germany

PostPosted: Mon Oct 03, 2005 4:54 am    Post subject: [HOWTO] get versions for all needed programs (PHP, MySQL...) Reply with quote

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:
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 * from version;

All version codes are put into the file ver.
The output may look like
Code:
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
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 543
Location: Canada

PostPosted: Mon Oct 03, 2005 12:59 pm    Post subject: Reply with quote

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.


cacti_system5.png
 Description:
info.php screenshot
 Filesize:  69.97 KB
 Viewed:  2441 Time(s)

cacti_system5.png


Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12604
Location: Muenster, Germany

PostPosted: Mon Oct 03, 2005 5:12 pm    Post subject: Reply with quote

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
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 543
Location: Canada

PostPosted: Tue Oct 04, 2005 8:17 am    Post subject: Reply with quote

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...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group