From: ivan Date: Mon, 27 Dec 2010 00:04:44 +0000 (+0000) Subject: import torrus 1.0.9 X-Git-Tag: TORRUS_1_0_9~1 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=74e058c8a010ef6feb539248a550d0bb169c1e94 import torrus 1.0.9 --- diff --git a/torrus/AUTHORS b/torrus/AUTHORS new file mode 100644 index 000000000..a884ff265 --- /dev/null +++ b/torrus/AUTHORS @@ -0,0 +1,47 @@ +*************************************************** +Stanislav Sinyagin +Senior System Engineer, CCIE #5478 +K-Open GmbH +Switzerland +Tel. +41 79 407 0224 + +ssinyagin@yahoo.com +http://www.k-open.com +*************************************************** + +CREDITS: + + Chris Amley + Xylan switches SNMP discovery + + Scott Brooks + Atmel wireless devices SNMP discovery + + Aaron Bush + APC and HP vendor templates. + + Shawn Ferry + Many contributions in various parts. + + Marc Haber + Lots of bug reports and architecture ideas. + + Roman Hochuli + Bug reports and new feature ideas. + Vendor templates for Ascend and DOCSIS. + + Ian Holsman http://holsman.net + Adapted the bluerobot.com HTML layout design for Torrus. + + Gord Philpott + Numerous bug reports. + + Christian Schnidrig + Architecture ideas, interface improvements, other contributions. + + Jurij Smakov + Contributed in manpages creation. Maintainer of Debian port. + + Jon Nistor + Bug reports and contributions for JunOS, Cisco SCE and other + vendors discovery. diff --git a/torrus/COPYING b/torrus/COPYING new file mode 100644 index 000000000..d60c31a97 --- /dev/null +++ b/torrus/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/torrus/ChangeLog b/torrus/ChangeLog new file mode 100644 index 000000000..30543fe78 --- /dev/null +++ b/torrus/ChangeLog @@ -0,0 +1,2302 @@ +2010-10-24 Stanislav Sinyagin + + * NEWS: Release 1.0.9 + +2010-10-12 Stanislav Sinyagin + + * perllib/Torrus/CGI.pm: New URL parameter: 'v' is a synonym for 'view' + +2010-10-06 Stanislav Sinyagin + + * templates/html-incblocks.txt: 'cssoverlay' now must point to + an absolute URL + +2010-09-23 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): + New discovery parameter: CiscoIOS::enable-unrouted-vlan-interfaces + +2010-09-20 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/Jacarta.pm: + New discovery module for Jacarta iMeter (thanks to Roman Hochuli) + +2010-09-17 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm (initCollectorGlobals): + Refresh the SNMP maps after a configuration re-compile + +2010-08-31 Stanislav Sinyagin + + * performance optimizations: XML compiler runs 15-20% faster + +2010-08-16 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + Selector actions split: discards moved from NoErrorCounters to + NoDiscardCounters; + and from InErrorsMonitor/OutErrorsMonitor to + InDiscardsMonitor/OutDiscardsMonitor + + * perllib/Torrus/Collector.pm: collector_tokens database now depends + on DS configuration instance + +2010-08-13 Stanislav Sinyagin + + * perllib/Torrus/CGI.pm: Added host-based authentication + +2010-08-09 Stanislav Sinyagin + + * Updated discovery modules for Net::SNMP 6.0.0 compatibility + +2010-08-03 Stanislav Sinyagin + + * init.d/torrus.in: bugfix in RHEL compatibility. + Do "chkconfig --del torrus", install the new version into /etc/init.d, + then "chkconfig --add torrus", then "service torrus restart" + +2010-07-21 Stanislav Sinyagin + + * bin/snmpfailures.in: new utility for SNMP failures reporting + + * perllib/Torrus/Collector/SNMP.pm: SNMP failures stored in a database + +2010-06-12 Stanislav Sinyagin + + * bin/genlist.in: Added a list of all SNMP hosts + +2010-05-14 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CasaCMTS.pm: new discovery module + +2010-05-09 Stanislav Sinyagin + + * bin/nodeid.in: new command-line utility + + * configure.ac: new Perl module dependency: JSON + +2010-04-11 Stanislav Sinyagin + + * configs/torrus-config.pl: + replaced $Torrus::ApacheHandler::authorizeUsers with + $Torrus::CGI::authorizeUsers. + +2010-04-08 Jon Nistor + * perllib/Torrus/DevDiscover/Arbor_E.pm: + New parameter: Arbor_E::disable-e100-policymgmt, disable-e100-submgmt + Added policy management and subscriber information + +2010-04-07 Jon Nistor + + * perllib/Torrus/DevDiscover/Arbor_E.pm: + New parameter: Arbor_E::disable-e100-mem + Added memory usage per CPU for the e100 series devices + +2010-04-04 Stanislav Sinyagin + + * perllib/Torrus/ConfigTree.pm, + perllib/Torrus/ConfigTree/Writer.pm, + perllib/Torrus/CGI.pm: + New parameter: nodeid. It defines a new way of referring + to subtrees and leaves. + Also IF-MIB and Foundry discovery is updated. + +2010-03-30 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm: + Default snmp-max-msg-size is set back to 1470 + + * perllib/Torrus/DevDiscover/Foundry.pm: new discovery module + +2010-03-23 Stanislav Sinyagin + + * xmlconfig/generic/rfc2790.host-resources.xml: + [Bernhard Schmidt] Simplify the Uptime graph to display only Days + + * xmlconfig/vendor/ucd.ucd-snmp.xml: + [Bernhard Schmidt] make Block I/O datasources a COUNTER + correct display units for Memory + + * perllib/Torrus/DevDiscover/UcdSnmp.pm: + [Bernhard Schmidt] added ssCpuRawSoftIRQ + +2010-03-07 Stanislav Sinyagin + + * bin/torrus.fcgi.in: FastCGI support + + * templates/default-login.html: Added "remember me" + + * perllib/Torrus/ApacheHandler.pm: Changed to Torrus::CGI + + * perllib/Torrus/Apache2Handler.pm: Changed to Torrus::CGI. + Now incompatible with "SetHandler modperl" + + * perllib/Torrus/CGI.pm: New HTTP handler instead of two different + Apache handlers. + +2010-03-05 Stanislav Sinyagin + + * bin/flushmonitors.in: new utility + + * bin/compilexml.in: Dynamic tokenset members are preserved between + compilations + + * perllib/Torrus/ConfigTree.pm (tsetAddMember): Tokenset members + have now an indicated origin (monitor/static) + + * perllib/Torrus/Monitor.pm: Alarms are now persistent between + config re-compilations + +2010-02-21 Stanislav Sinyagin + + * perllib/Torrus/Renderer/HTML.pm: + New parameter: node-display-name. Now interface names are not + underscored + + +2010-02-18 Stanislav Sinyagin + + * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_multigraph): + new multigraph parameters: line-stack-X, line-alpha-X + +2010-02-10 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (discover): + Default snmp-max-msg-size is set to 65535 for SNMP v1 and v2 + +2010-02-07 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + new selector action: NotifyPolicy + +2010-02-02 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/ALU_Timetra.pm: + new discovery parameter: ALU_Timetra::full-ifdescr + +2010-01-27 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/ALU_Timetra.pm: new discovery module + +2010-01-24 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (discover): + snmp-max-msg-size is used now in discivery, not only in collector + +2009-10-28 Jon Nistor + + * perllib/Torrus/DevDiscover/Arista.pm (discover): + New discovery module: Arista Networks + +2009-05-31 Stanislav Sinyagin + + * perllib/Torrus/Renderer/RRDtool.pm: + new view parameters: + disable-legend, disable-title, disable-vertical-label + +2009-05-26 Jon Nistor + + * perllib/Torrus/DevDiscover/Arbor_E.pm (discover): + New discovery parameter: Arbor_E::disable-e30-hdd-logs, + Arbor_E::enable-e30-mempool + +2009-05-11 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/NetBotz.pm (discover): + Discovery parameters: NetBotz::temp-max, NetBotz::humi-max, + NetBotz::dew-max + +2009-05-10 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/NetBotz.pm: new discovery module + for NetBotz modular sensors + +2009-05-07 Jon Nistor + + * perllib/Torrus/DevDiscover/FTOS.pm + New discovery module for Force10 Networks devices + +2009-04-05 Stanislav Sinyagin + + * NEWS: Release 1.0.8 + +2008-11-29 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm (discover): + New discovery parameter: CiscoIOS::short-device-comment + +2008-11-06 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm (runCollector): + Number of SNMP sessions per snmp_dispatcher is limited to 100 + because of some strange bugs (found on SPARC/Solaris platform) + +2008-10-28 Jon Nistor + + * perllib/Torrus/DevDiscover/Liebert.pm: + New discovery module for Liebert HVAC systems + +2008-10-26 Stanislav Sinyagin + + * bin/srvderive.in: new utility that combines several services + and combines them as MAX or SUM + (sponsored by nexellent ag, www.nexellent.ch) + +2008-09-25 Stanislav Sinyagin + + * Added safe signal handlers to all components. Also Apache handlers + close the BDB environment at the end of each execution. + BDB should now be much more stable. + +2008-09-16 Jon Nistor + + * perllib/Torrus/DevDiscover/Arbor_E.pm: + New discovery module for Arbor E series devices + +2008-09-15 Stanislav Sinyagin + + * perllib/Torrus/Collector.pm: Now the collector cache is filled by + the compiler. This optimizes the collector startup. Need to re-compile + after upgrade. + +2008-09-13 Stanislav Sinyagin + + * bin/configsnapshot.in: Bugfix in root subtree parameters + * bin/configsnapshot.in: added parameter filtering option + +2008-09-10 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm: Filtered out EOBC and FIFO + virtual interfaces + + * xmlconfig/vendor/cisco.ios.mac-accounting.xml: + Bugfix in the RRD filename + +2008-08-07 Stanislav Sinyagin + + * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_opts): + View parameters can be overridden with URL + variables "Gstart", "Gend" and so on. + +2008-08-05 Stanislav Sinyagin + + * NEWS: Release 1.0.7 + +2008-08-04 Jon Nistor + + * perllib/Torrus/DevDiscover/CiscoIOS.pm (discover): + new discovery parameter: CiscoIOS::disable-vpdn-stats + +2008-07-23 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2670_DOCS_IF.pm (discover): + new discovery parameter: RFC2670_DOCS_IF::upstreams-only + +2008-06-20 Stanislav Sinyagin + + * Tree names can be specified in the External + Storage (Billing reports) + +2008-06-07 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: + New parameter: snmp-ignore-mib-errors + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + New parameter generated by IF-MIB: interface-comment + +2008-06-01 Stanislav Sinyagin + + * IPv6 support in devdiscover and in SNMP collector + +2008-05-22 Stanislav Sinyagin + + * bin/bdbinfo.in: BerkeleyDB version info utility + +2008-03-29 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + RFC2863_IF_MIB::external-serviceid now accepts host/interface notation + +2008-03-28 Stanislav Sinyagin + + * perllib/Torrus/SQL/Reports.pm (finalize): added SQL commit + +2008-03-16 Stanislav Sinyagin + + * bin/collector.in: Threads are now always initialized, + not only in daemon mode + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + New selectors: InBytesParameters, OutBytesParameters + + * perllib/Torrus/DevDiscover.pm (buildConfig): + New discovery parameter: include-files + +2008-01-12 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/JunOS.pm: Added interface filter to + exclude service interfaces + + * perllib/Torrus/DevDiscover.pm, perllib/Torrus/Collector/SNMP.pm: + snmp-max-msg-size, new parameter for SNMP session + +2007-12-09 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoSCE.pm: New discovery parameters: + CiscoSCE::disable-*** (Jon Nistor) + +2007-11-30 Stanislav Sinyagin + + * xmlconfig/defaults.xml: Default collector-timeoffset-step increased + from 30 to 60 seconds. 30 seconds is too short for too many + installations. + +2007-11-08 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + New selector action: RemoveInterface + +2007-09-30 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/JunOS.pm: Dramatic update by Jon Nistor + +2007-08-23 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/Symmetricom.pm: + New discovery module for Symmetricom NTP clock (Jon Nistor) + +2007-08-10 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm: + Removed BGP Advertized prefixes + Added the prefix limits to Accepted prefixes + + +2007-08-03 Stanislav Sinyagin + + * NEWS: Torrus release 1.0.6 + +2007-07-27 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: removed "reptoken" and + optimized the snmp arguments + +2007-06-16 Stanislav Sinyagin + + * bin/collector.in: Now multiple collector instances can run + in a single tree. Need to recompile all trees and re-start the + daemons. A new copy of init.d/torrus should be copied + in startup scripts directory. Also execute for every tree: + torrus si --tree=TREE --clear + + +2007-06-15 Stanislav Sinyagin + + * configure.ac: Perl 5.8.8 is required for threads + +2007-06-14 Stanislav Sinyagin + + * bin/genreport.in: New option: --all2tree + + * perllib/Torrus/DevDiscover/Alteon.pm: New discovery module + +2007-06-04 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm: Cisco CAR statistics + +2007-05-05 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: + fixed the bug for unreachable timeout + the target that receives noSuchObject is deleted from polling + +2007-05-04 Stanislav Sinyagin + + * perllib/Torrus/Collector/CDef.pm: Imported the CDEF collector + from Chrstian Schnidrig and adapted to multithreading. + + * perllib/Torrus/DevDiscover.pm: Adapted for global configuration. + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + New discovery parameter: RFC2863_IF_MIB::traffic-summaries + Currently summaries work only within single output file. + + +2007-04-12 Stanislav Sinyagin + + * perllib/Torrus/Renderer/HTML.pm: Search engine GUI + +2007-04-11 Stanislav Sinyagin + + * bin/buildsearchdb.in: The search DB builder (GUI is not ready yet) + + * perllib/Torrus/DevDiscover.pm: + New discovery param: show-recursive + + * templates/default-dir.html: Limit recursive view to + subtrees having show-recursive=yes + +2007-04-10 Stanislav Sinyagin + + * perllib/Torrus/ConfigTree.pm: + Moved the param properties to the XML config. + All trees need recompilation after this change. + +2007-04-05 Stanislav Sinyagin + + * perllib/Torrus/ConfigTree/XMLCompiler.pm (compile_subtrees): + Removed support for + +2007-03-23 Stanislav Sinyagin + + * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_graphline): + line-style line-color from the node params override thse + in the view params + +2007-03-18 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/JunOS.pm: Added per-CoS traffic statistics + +2007-03-16 Stanislav Sinyagin + + * perllib/Torrus/Apache2Handler.pm, perllib/Torrus/ApacheHandler.pm: + User login event in the apache error log + + * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm: + MAC accounting on subinterfaces + +2007-02-14 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm (discover): + Replaced CiscoIOS::disable-membuf-stats with + CiscoIOS::enable-membuf-stats. + Now cisco buffer stats are disabled by default + +2007-02-13 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: SNMP maps automatic refreshing + + * bin/devdiscover.in: Devdiscover now accepts multiple input files + +2007-02-09 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm: + New discovery param: template-registry-overlays + +2007-02-02 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoSCE.pm: + Added service counters and queue utilization + +2007-01-25 Stanislav Sinyagin + + * NEWS: Release 1.0.5 + +2007-01-23 Stanislav Sinyagin + + * configure.ac: Synchronized with Autoconf 2.60. + Now 2.60 is the minimum required version. + Changed docdir to pkgdocdir + +2007-01-10 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): + IOS XR support + +2007-01-05 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): + New discovery parameter: CiscoIOS::enable-vlan-interfaces + (discover): added Cisco BGP statistics + +2006-12-22 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/JunOS.pm: + New discovery module for Juniper + +2006-12-21 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm (discover): + New discovery parameter: CiscoIOS_MacAccounting::tokenset-members + +2006-12-05 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): + New discovery parameter: + RFC2863_IF_MIB::exclude-down-interfaces + + * bin/configinfo.in: Added the tree compilation timestamp + +2006-12-03 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: + SNMP mapping lookups are now asynchronous. + PDUs are rescheduled with delays + Not compatible with old cbQos plugin, needs tp-cisco-cbqos-1.4d + +2006-11-26 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: new SNMP parameters: + snmp-localaddr and snmp-localport + + +2006-11-23 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm: + New discovery parameter: + CiscoIOS_MacAccounting::external-serviceid + +2006-10-14 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + new discovery parameters: + RFC2863_IF_MIB::bandwidth-usage + RFC2863_IF_MIB::bandwidth-limits + +2006-10-08 Stanislav Sinyagin + + * perllib/Torrus/ConfigTree.pm (new): exclusivity lock: + only one compiler can run for a tree + +2006-09-29 Stanislav Sinyagin + + * xmlconfig/generic/rfc2863.if-mib.xml: added an overvew shortcut + for interface errors + + * perllib/Torrus/RPN.pm: IF accepts UNKN values + +2006-09-28 Stanislav Sinyagin + + * configure.ac: theads module version must be 1.41 or higher, + and threads::shared 1.03 or higher. + +2006-09-27 Stanislav Sinyagin + + * bin/rrddir2xml.in: New option: --filter + + * xmlconfig/generic/rfc2670.docsis-if.xml: + Added Frequency to upstream statictics monitoring. + Old upstream stats will be lost!! + The old templates file is + in xmlconfig/old/rfc2670.docsis-if.old.1.0.4.xml + +2006-09-26 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoSCE.pm: New discovery module + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + Improvements for persistent interface indexes + + * perllib/Torrus/DevDiscover/MotorolaBSR.pm: New discovery module + for Motorola CMTS (Riverdelta) + +2006-09-10 Stanislav Sinyagin + + * perllib/Torrus/Collector/RRDStorage.pm (storeData): + RRDQueue statistics are now set in the beginning of the cycle + +2006-08-10 Stanislav Sinyagin + + * perllib/Torrus/ConfigBuilder.pm (new): encoding changed from + UTF8 to UTF-8 + +2006-07-31 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoFirewall.pm (discover): + Interface names taken from ifName + +2006-07-24 Stanislav Sinyagin + + * setup_tools/check_perlthreading.pl: Quick test of multithreading + support + +2006-07-21 Stanislav Sinyagin + + * perllib/Torrus/Collector/RRDStorage.pm (updateRRD): + Added threading support: a background thread for RRD updates + +2006-07-20 Stanislav Sinyagin + + * bin/devdiscover.in: Added multithreading support + + * configure.ac: Multithreading checkup + + * NEWS: Torrus release 1.0.4 + +2006-05-17 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + RFC2863_IF_MIB::tokenset-members now accepts host names + and can be defined at the global level. + +2006-05-11 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + new discovery parameter: RFC2863_IF_MIB::noout + +2006-03-09 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + New discovery parameter: RFC2863_IF_MIB::subtree-comment + + * perllib/Torrus/Renderer/Frontpage.pm (renderUserLogin): + New config option: $Torrus::Renderer::lostPasswordURL + +2006-03-01 Stanislav Sinyagin + + * perllib/Torrus/Renderer/HTML.pm: + New config variable: $Torrus::Renderer::companyLogo + to display a logo instead of text + +2006-02-22 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm: 'comment' parameter is copied + from DDX to the host level. + +2006-02-21 Stanislav Sinyagin + + * perllib/Torrus/Monitor.pm: New monitor parameters: + display-rpn-expr display-format + (run_event_exec): New environment variable: TORRUS_DISPLAY_VALUE + +2006-02-15 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (discover): + New discovery parameter: suppress-legend + +2006-02-13 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + Complex matching expressions for subtree name selector + + * perllib/Torrus/DevDiscover/CiscoGeneric.pm (discover): + Cisco power supply monitoring + +2006-02-10 Stanislav Sinyagin + + * bin/action_notify.in: New monitor action + + * perllib/Torrus/Monitor.pm: + New monitor parameter: "severity" + + * perllib/Torrus/DevDiscover/CiscoIOS.pm: Cisco Docsis bundle + interfaces excluded from discovery + +2006-01-06 Stanislav Sinyagin + + * perllib/Torrus/RPN.pm: New RPM functions: INF, NEGINF + +2005-12-12 Stanislav Sinyagin + + * perllib/Torrus/RPN.pm: DUP and EXC accept undefined arguments now + +2005-12-07 Stanislav Sinyagin + + * perllib/Torrus/RPN.pm: New RPN function: NUM + +2005-11-28 Stanislav Sinyagin + + * bin/ttproclist.in: Two new functions: lc, uc + +2005-11-22 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: Added SNMPv3 support + +2005-10-19 Stanislav Sinyagin + + * bin/genreport.in: Report generator utility + +2005-10-17 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoVDSL.pm: + New discovery module for Cisco Catalyst LRE + +2005-10-14 Stanislav Sinyagin + + * templates/default-dir.html, templates/expanded-dir.html: + Alex Ustyancev's patches for aliased leaf nodes + + * perllib/Torrus/SQL.pm: New module dependency: DBIx::Sequence + +2005-10-06 Stanislav Sinyagin + + * perllib/Torrus/SQL.pm: new module dependencies: + DBIx::Abstract, DBI. + +2005-10-05 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoGeneric.pm: + added support for dual-CPU cisco routers (7301) + +2005-09-28 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/AlliedTelesyn_PBC18.pm: + new discovery module + +2005-09-02 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm: + New discovery parameter: define-tokensets + +2005-08-12 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): + Replaced $Torrus::DevDiscover::listAdminDownInterfaces + with parameter RFC2863_IF_MIB::list-admindown-interfaces + and $Torrus::DevDiscover::listNotPresentInterfaces + with RFC2863_IF_MIB::list-notpresent-interfaces + +2005-08-10 Stanislav Sinyagin + + * doc/extstorage.pod.in: Started documenting the External storage + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + New discovery parameter: RFC2863_IF_MIB::external-serviceid + + * xmlconfig/generic/rfc2863.if-mib.xml: Byte counters adapted for + External storage + + * perllib/Torrus/Collector.pm: Multiple storage types per token + + * perllib/Torrus/ConfigTree/Validator.pm (validateInstanceParams): + Enabled validation of list values + + * perllib/Torrus/Collector/ExtDBI.pm: Pluggable backend module for + External storage + + * perllib/Torrus/Collector/ExternalStorage.pm: + New collector storage type + +2005-08-02 Stanislav Sinyagin + + * NEWS: Release 1.0.3 + +2005-07-29 Stanislav Sinyagin + + * configure.ac: Patch Level 1: PERLINC configuration variable + +2005-07-27 Stanislav Sinyagin + + * NEWS: Release 1.0.2 + +2005-07-22 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (applySelectors): + Selectors format slightly changed: the type is passed into the methods + +2005-07-15 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (buildConfig): + New discovery parameter: disable-snmpcollector + + * bin/devdiscover.in: Preventing the bundle file update when + --limit is specified. + + * perllib/Torrus/Collector/SNMP.pm (callback): mapping reset after + host unreachable + + * configs/torrus-config.pl: + $Torrus::Collector::SNMP::unreachableTimeout set to 6 hours + + * perllib/Torrus/Renderer/HTML.pm: entered Date/time verification + New CPAN module required: + perl -MCPAN -e 'install Date::Parse' + +2005-07-14 Stanislav Sinyagin + + * templates/html-incblocks.txt: Added date setting dialog. + TODO: date format validation. + +2005-07-11 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + New discovery parameter: RFC2863_IF_MIB::only-interfaces + + * configure.ac: Now checking if user torrus exists + + * perllib/Torrus/DevDiscover/AxxessIT.pm: support for WANX/LANX modules + +2005-07-06 Stanislav Sinyagin + + * bin/rrddir2xml.in: New utility for generating XML from a directory + with RRD files + +2005-06-24 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm: [1.0.1pl2] - fixed bug + with deleting unreachable targets + +2005-06-21 Stanislav Sinyagin + + * configure.ac: 1.0.1 Patchlevel 1 + + * bin/action_snmpv1trap.in, bin/action_snmptrap.in: + added torrusMonitorDesc + + * sup/mibs/TORRUS-MIB.txt: new OID: torrusMonitorDesc + + * NEWS: release 1.0.1 + + * perllib/Torrus/SiteConfig.pm (verify): + $Torrus::Renderer::stylingProfileOverlay is now an absolute file name + + * xmlconfig/vendor/cisco.ios.docsis.xml: + Added Registered modems graph. WARNING: RRD structure changed + + * bin/devdiscover.in: New option: --fallback + + * perllib/Torrus/Collector/SNMP.pm (initTargetAttributes): + Target is deleted when SNMP map expansion fails + +2005-06-16 Stanislav Sinyagin + + * perllib/Torrus/Monitor.pm: sleep --delay minutes also after + recompiling + + * configs/torrus-config.pl: + $Torrus::Collector::SNMP::unreachableTimeout increased to 1900 + $Torrus::Collector::SNMP::unreachableRetryDelay increased to 600 + + * perllib/Torrus/Collector/SNMP.pm: + Better handling of SNMP errors. Delete all tokens for a host + if it is unreachable. + +2005-06-09 Stanislav Sinyagin + + * NEWS: Torrus release 1.0.0 + + * bin/monitor.in: New option: --delay + + * init.d/torrus.in: The init script reads its options from + initscript.conf and initscript.siteconf + +2005-06-08 Stanislav Sinyagin + + * bin/devdiscover.in: new CLI option: --forcebundle + + * perllib/Torrus/DevDiscover.pm: monitor-period and monitor-timeoffset + are now copied from DDX + + * bin/action_snmpv1trap.in, bin/action_snmptrap.in, + sup/mibs/TORRUS-MIB.txt: Added new SNMP variable: severity + +2005-06-02 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoIOS_MacAccounting.pm: + New discovery module for Cisco MAC accounting + +2005-05-30 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/BetterNetworks.pm: + new discovery module + + * bin/collector.in: new command line option: --runalways + +2005-05-27 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/MicrosoftWindows.pm: + per-interface RRD files named by MAC addresses, not interface name + +2005-05-25 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoGeneric.pm: enchanced memory + pools stats (line cards and VIP memory) + +2005-05-23 Stanislav Sinyagin + + * templates/html-incblocks.txt: + has-overview-subleaves replaced with has-overview-shortcuts, + with multiple overviews per subtree + +2005-05-20 Stanislav Sinyagin + + * templates/tset-list.html: Tokensets list now displays their sizes + +2005-05-18 Stanislav Sinyagin + + * bin/ttproclist.in: New utility for generating DDX files + +2005-05-17 Stanislav Sinyagin + + * perllib/Torrus/DataAccess.pm: improved performance by caching + +2005-05-13 Stanislav Sinyagin + + * xmlconfig/examples/docsis-monitors.xml: DOCSIS monitoring examples + + * perllib/Torrus/DevDiscover/RFC2670_DOCS_IF.pm: + Added DOCSIS-specific selector actions + +2005-05-12 Stanislav Sinyagin + + * perllib/Torrus/Collector/RRDStorage.pm (updateRRD): + $Torrus::Collector::RRDStorage::moveConflictRRD -- moving RRD files + with conflicting structure + +2005-05-11 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2670_DOCS_IF.pm: + Downstream utilization added, and the subtrees rearranged. + +2005-05-10 Stanislav Sinyagin + + * templates/default-rrd.html: Monitor names and comments displayed + on the leaf HTML + +2005-05-04 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoGeneric.pm: + replaced CiscoGeneric::sensor-monitor and + CiscoGeneric::sensor-monitor-regexp with CiscoSensor selector + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + RFC2863_IF_MIB::errors-monitor is no longer supported. + Replaced with appropriate selector action + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + Implemented IF-MIB selector actions - + InBytesMonitor, OutBytesMonitor, ErrorsMonitor, HoltWinters, + NoPacketCounters, NoErrorCounters, Parameters + +2005-05-02 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (applySelectors): + The infrastructure for object selectors + +2005-04-29 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/CiscoGeneric.pm: + New discovery parameters: CiscoGeneric::sensor-monitor, + CiscoGeneric::sensor-monitor-regexp + +2005-04-28 Stanislav Sinyagin + + * perllib/Torrus/Collector/SNMP.pm (runCollector): + SO_RCVBUF is set explicitly + +2005-04-09 Stanislav Sinyagin + + * perllib/Torrus/Renderer/RRDtool.pm (rrd_make_hrules): + hrule-legend-X is now a leaf parameter, not view + + * templates/default-recursivedir.html: Recursive directory view + +2005-04-08 Stanislav Sinyagin + + * bin/schedulerinfo.in: Timeline reports separate for monitors + and collectors + +2005-03-30 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/Paradyne.pm: + New discovery parameter: "Paradyne::slot-name" + +2005-03-22 Stanislav Sinyagin + + * configure.ac: New variables: plugwrapperdir, defrrddir + +2005-03-09 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (discover): Screening coli and + semicoli in legend text + +2005-03-08 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): + New device capability: 'interfaceIndexingManaged'. + New DDX parameters: 'RFC2863_IF_MIB::ifindex-map-hint' + and 'RFC2863_IF_MIB::subtree-name-hint'. + + * xmlconfig/generic/rfc2863.if-mib.xml: Moved "ifindex-table" + definition from snmp-defs to IF-MIB host template + + * perllib/Torrus/DevDiscover.pm (discover): + In the legend, replace ':' with '=' and ';' with ',' + +2005-03-05 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover.pm (oidBaseMatch): better OID comparison + +2005-02-28 Stanislav Sinyagin + + * perllib/Torrus/Renderer.pm (newCacheFileName): MD5 to generate + unique file names + +2005-02-18 Stanislav Sinyagin + + * configure.ac (also in all plugins): AM_INIT_AUTOMAKE(1.9) + instead of 1.6. The old version conflicted with plugins. + +2005-01-30 Stanislav Sinyagin + + * doc/Makefile.am: Variable substitution in doc files + + * doc/manpages/Makefile.am: Man sections configurable + + * perllib/Torrus/DevDiscover/CiscoIOS_Docsis.pm: + New discovery module for Cisco-specific DOCSIS statistics + +2005-01-21 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): + Moved the IF-MIB discovery from checkdevtype() to discover() + +2005-01-06 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/AxxessIT.pm: new discovery module + +2005-01-04 Stanislav Sinyagin + + * perllib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (checkdevtype): + Interface excluded when ifOperStatus=6 [notPresent] + +2004-12-27 Stanislav Sinyagin + + * bin/devdiscover.in (absXmlFilename): output file is placed in + siteXmlDir if the path is not absolute. $XMLCONFIG is still + supported for the sake of compatibility. + +2004-12-03 Stanislav Sinyagin + + * configure.ac: replaced --disable-modcheck with --enable-pkgonly + +2004-11-22 Stanislav Sinyagin + + * NEWS: Release 0.1.8 + * Started Torrus development + +2004-11-02 Stanislav Sinyagin + + * lib/Torrus/ConfigTree/Validator.pm: + New parameters: 'monitor-period', 'monitor-timeoffset' + + * lib/Torrus/Monitor.pm: Now monitor runs under standard Scheduler + +2004-10-25 Stanislav Sinyagin + + * lib/Torrus/Collector.pm: + Moved collector specific code from bin/collector.in. + +2004-10-24 Stanislav Sinyagin + + * bin/acledit.in: New privilege added: DisplayAdmInfo + + * lib/Torrus/Renderer/AdmInfo.pm, templates/adminfo.html: + First step to display administratove information. + +2004-10-13 Stanislav Sinyagin + + * bin/collector.in, bin/monitor.in: + Process name reflecting the commandline and status + +2004-10-04 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm (rrd_make_multigraph): + New multigraph parameter: disable-gprint-X + +2004-09-30 Stanislav Sinyagin + + * xmlconfig/generic/collector-periods.xml: + Changed rrd-create-rra + +2004-09-29 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/NetScreen.pm: + Changed the interface mapping from ifDescr to MAC address + +2004-09-22 Stanislav Sinyagin + + * examples/rrdup_notify.sh: collector failure notification script + +2004-09-20 Stanislav Sinyagin + + * lib/Torrus/Apache2Handler.pm: mod_perl 1.99_15 compatibility. + Replaced Apache::ParseFormData with libapreq2. + + * templates/html-incblocks.txt: Added "Up" navigation tab + +2004-09-02 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm: New parameter: graph-disable-gprint + +2004-08-27 Stanislav Sinyagin + + * templates/default-rrd.html: + Added link to web/plain/explain-rrdgraph.html + + * templates/html-incblocks.txt: Moved Top and Help menu to the top + of the page + +2004-08-20 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/CiscoIOS.pm (discover): + New discovery parameter: CiscoIOS::disable-ipsec-stats + +2004-08-16 Stanislav Sinyagin + + * templates/default-helptext.html: First draft of help window + + * bin/devdiscover.in: --snmpdebug option is no more hidden + +2004-08-13 Stanislav Sinyagin + + * xmlconfig/vendor/cisco.ios.xml: reorganized leaves + + * xmlconfig/generic/rfc2863.if-mib.xml: + Replaced the leaf names with user friendly ones. + The old template is in old/rfc2863.if-mib.old-0.1.7.xml + +2004-08-04 Stanislav Sinyagin + + * NEWS: Release 0.1.7 + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm: + New discovery parameter: RFC2863_IF_MIB::copy-params + + * lib/Torrus/DevDiscover.pm: new discovery parameter: host-copy-params + +2004-07-29 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/ATMEL.pm: New discocery module from Scott Brooks + +2004-07-28 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm (rrd_make_holtwinters): + New global variable: $Torrus::Renderer::hwGraphLegend + + * Disabled Holt-Winters in system performance and interface errors + +2004-07-27 Stanislav Sinyagin + + * Torrus Demo server opened: http://torrusdemo.tbw.ch + +2004-07-26 Stanislav Sinyagin + + * lib/Torrus/Collector.pm (setValue): DOLLAR and MOD in transform-value + +2004-07-20 Stanislav Sinyagin + + * bin/acledit.in: Added --force option + + * bin/monitor.in, bin/collector.in: umask changed to 0017 + +2004-07-19 Stanislav Sinyagin + + * doc/scalability.pod: Document finished + + * doc/vendorsupport.pod: Vendor and MIBs support document + +2004-07-13 Stanislav Sinyagin + + * xmlconfig/site-global.xml: New place for global parameters. + In existing installations, you need to change the line in + torrus-siteconfig.pl: + @Torrus::Global::xmlAlwaysIncludeFirst = + ( 'defaults.xml', 'site-global.xml' ); + +2004-07-12 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/NetApp.pm: new discovery module (Shawn) + +2004-07-09 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/CiscoIOS.pm: Added CISCO-IPSEC-FLOW-MONITOR-MIB + +2004-07-07 Stanislav Sinyagin + + * lib/Torrus/Monitor.pm (run_event_exec): + New environment variable: Torrus_VALUE + + * xmlconfig/defaults.xml: New view parameter: description + +2004-07-06 Stanislav Sinyagin + + * templates/default-login.html, + lib/Torrus/Renderer/Frontpage.pm (renderUserLogin), + lib/Torrus/Apache2Handler.pm (handler), + lib/Torrus/ApacheHandler.pm (handler): URL parameters + (token, path, and view) are remembered during login + +2004-06-30 Stanislav Sinyagin + + * lib/Torrus/ACL.pm (hasPrivilege): Wildcard ACL object (*) implemented + +2004-06-28 Stanislav Sinyagin + + * Log levels updated. Now info is always printed, and verbose means + verbose. + +2004-06-25 Stanislav Sinyagin + + * xmlconfig/defaults.xml: New view name: last24h-small + +2004-06-23 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + New discovery parameter: RFC2863_IF_MIB::errors-monitor + +2004-06-22 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + New discovery parameter: RFC2863_IF_MIB::exclude-interfaces + New discovery parameter: RFC2863_IF_MIB::tokenset-members + +2004-06-21 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/CiscoCatOS.pm (discover): New discovery + parameter: CiscoCatOS::suppress-noname-ports + +2004-06-16 Stanislav Sinyagin + + * configure.ac: For backward compatibility with autoconf 2.57, + AS_HELP_STRING is replaced with obsoleted AC_HELP_STRING. + Don't forget to change it back when 2.59 or later becomes mainstream. + +2004-06-15 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm (rrd_make_gprint): GPRINT implemented + + * bin/prepviews.in, bin/rrd_getdim.in: removed because no longer needed + + * doc/manpages/Makefile.am: commandref.pod to be replaced by manpages + (contrib from Jurij Smakov) + +2004-05-26 Stanislav Sinyagin + + * lib/Torrus/Collector.pm (setValue): transform-value parameter + is now expandable + + * doc/devdoc/wd.distributed.pod: New working draft document + +2004-05-24 Stanislav Sinyagin + + * webmux2.pl: Added support for mod_perl 1.99_12 (before it was 1.99_13 + only) + +2004-05-19 Stanislav Sinyagin + + * lib/Torrus/DevDiscover.pm: New parameter: custom-host-templates + +2004-05-16 Stanislav Sinyagin + + * lib/Torrus/Collector/SNMP.pm: New parameter: 'snmp-check-sysuptime' + + * bin/Makefile.am: rrd_hwreapply is moved to a separate + package (RRDman) + +2004-05-12 Stanislav Sinyagin + + * Makefile.am, bin/Makefile.am: removed mkroutercfg + + * templates/html-incblocks.txt: Removed image width hinting + +2004-05-05 Stanislav Sinyagin + + * lib/Torrus/SiteConfig.pm (verify): Minus sign allowed in tree names + +2004-05-03 Stanislav Sinyagin + + * NEWS: Release 0.1.6 + + * ../plugins/cbqos: first release of Cisco QoS monitoring plugin + + * bin/rrd_getdim.in: RRDtool 1.1.x compatibility improved + +2004-04-22 Stanislav Sinyagin + + * examples/onmsInterfaces.sh: Gustavo Torres' contribution for + OpenNMS integration + +2004-04-19 Stanislav Sinyagin + + * lib/Torrus/ConfigTree/XMLCompiler.pm: + New XML statements: setvar, iftrue, iffalse + +2004-04-15 Stanislav Sinyagin + + * lib/Torrus/RPN.pm (translate): New RPN function: MOD + + * xmlconfig/generic/rfc2790.host-resources.xml: More sophysticated + Uptime graph (Shawn) + +2004-04-14 Stanislav Sinyagin + + * templates/html-incblocks.txt: New items in HTML page top: siteInfo + and treeInfo. + + * lib/Torrus/Apache2Handler.pm: First alpha release of + mod_perl 2.0 handler. + + * doc/webintf.pod: It is recommended to Alias /torrus/plain + instead of just /torrus. + +2004-04-07 Stanislav Sinyagin + + * bin/schedulerinfo.in: New option: --clear + + * lib/Torrus/SchedulerInfo.pm, lib/Torrus/Scheduler.pm: reorganized + statistics collection + + * bin/schedulerinfo.in: Only nonzero statistics are shown in runtime + report + + * lib/Torrus/Scheduler.pm: reorganized statistics: late start increments + only when that happens. Runtime longer than period is also recorded + (sferry). + + * bin/collector.in: more verbosity in non-verbose mode (sferry) + + * init.torrus.in: gracefully waits for daemons to shut down (sferry) + +2004-04-06 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC1697_RDBMS.pm, + lib/Torrus/DevDiscover/OracleDatabase.pm: New discovery modules (sferry) + + * NEWS: Bugfix release 0.1.5bf2 + +2004-03-31 Stanislav Sinyagin + + * lib/Torrus/DB.pm (cursor): Bugfix for write access cursors + +2004-03-26 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm (rrd_make_cdef): + New @-functions in RPN references: AVERAGE MIN MAX LAST + + (rrd_make_multigraph): New multigraph parameter: ignore-views-X + + * lib/Torrus/DevDiscover/CiscoGeneric.pm (buildConfig): + New discovery parameter: CiscoGeneric::file-per-sensor + +2004-03-25 Stanislav Sinyagin + + * bin/compilexml.in: New commandline option: --noval + + * NEWS: Bugfix release 0.1.5bf1 + +2004-03-24 Stanislav Sinyagin + + * lib/Torrus/RPN.pm: now Math::BigFloat is always used for numbers + Perl 5.8.0 or higher is required: BigFloat implementation in 5.6.1 + is untested and hardly compatible + + * lib/Torrus/Collector.pm (run): $Torrus::Collector::needsConfigTree: + a new registry for those collectors needing access to configuration. + +2004-03-22 Stanislav Sinyagin + + * Implemented Cisco class-based QoS monitoring plugin + +2004-03-20 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm: More parameters to be expanded: + lower-limit normal-level upper-limit + +2004-03-19 Stanislav Sinyagin + + * bin/devdiscover.in: New option: --limit=regexp + +2004-03-17 Stanislav Sinyagin + + * NEWS: Release 0.1.5 + + * lib/Torrus/DB.pm (new): Unique DB environment log file per PID. + +2004-03-16 Stanislav Sinyagin + + * bin/devdiscover.in: new parameter: output-bundle + +2004-03-12 Stanislav Sinyagin + + * templates/overview-subleaves.html: New parameters: + overview-direct-link, overview-direct-link-view + +2004-03-09 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/UcdSnmp.pm, + lib/Torrus/DevDiscover/RFC2790_HOST_RESOURCES.pm, + xmlconfig/vendor/ucd.ucd-snmp.xml, + xmlconfig/generic/rfc2790.host-resources.xml: + Rearranged the host performance templates. + Fixed bug in Interrupts RRD. You need to + rm /var/snmpcollector/*ucd-context_interrupts.rrd + +2004-03-04 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm (render_rrgraph): + New configuration option: $Torrus::Renderer::ignoreDecorations + +2004-03-01 Stanislav Sinyagin + + * xmlconfig/generic/rfc2670.docsis-if.xml: Modified DOCSIS template + to include codewords statistics (data-file changed). + + * bin/monitor.in, bin/collector.in: Log rotation on SIGHUP + +2004-02-26 Stanislav Sinyagin + + * xmlconfig/generic/monitors.xml: New standard monitors and actions + + * xmlconfig/vendor/smokeping.xml: + (Shawn) Smokeping RRD files access templates + + * lib/Torrus/DevDiscover/NetScreen.pm: (Shawn) new discovery module + + * lib/Torrus/DevDiscover/CompaqCIM.pm: (Shawn) new discovery module + + * lib/Torrus/DevDiscover/MicrosoftWindows.pm: + (Shawn) added support for IIS HTTP and FTP stats + +2004-02-24 Stanislav Sinyagin + + * lib/Torrus/ConfigTree/Writer.pm (postProcessNodes): + Dispersed collector offset + +2004-02-23 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm (new), + lib/Torrus/ConfigTree/Writer.pm (finalize): + Dual configuration database implemented + + * lib/Torrus/ConfigTree.pm (setReady): ConfigurationReady + flag moved to other_config.db. + +2004-02-18 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm: view parameter "title" removed. + New node parameter: "graph-title" + +2004-02-16 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm (rrd_make_decorations): + Implemented back- and foreground decorations (Christian's Change 7, + modified) + +2004-02-14 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm (getNodeParam): Optimized nodepcache + structure + + * lib/Torrus/ConfigTree/Writer.pm (newToken): Next free token is + no longer stored in database + +2004-02-13 Stanislav Sinyagin + + * lib/Torrus/DevDiscover.pm (buildConfig): New parameter: host-aliases + + * lib/Torrus/Collector.pm (setValue): New parameter: transform-value + +2004-02-12 Stanislav Sinyagin + + * xmlconfig/snmp-defs.xml, xmlconfig/*/*.xml: data-file refers now + to system-id, instead of snmp-host. + + * lib/Torrus/DevDiscover.pm (buildConfig): symbolic-name is no longer + mandatory. New parameter: system-id. + +2004-02-11 Stanislav Sinyagin + + * lib/Torrus/DB.pm (new): DB internal errors are stored in + var/log/dbenv_errlog + +2004-02-05 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm (expandNodeParam): + $Torrus::ConfigTree::nodeParamHook: hook for custom parameter processing + +2004-02-03 Stanislav Sinyagin + + * lib/Torrus/Renderer/RRDtool.pm: Restructured the whole grapher. + +2004-02-02 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm: Split one big module into 4 smaller ones: + Torrus::Renderer, Torrus::Renderer::HTML, Torrus::Renderer::RRDtool, + Torrus::Renderer::Frontpage + + * lib/Torrus/DevDiscover.pm (discover): + New discovery parameter: only-devtypes + +2004-01-30 Stanislav Sinyagin + + * lib/Torrus/DevDiscover.pm (discover): + New discovery parameter: disable-devtypes + + * lib/Torrus/DevDiscover.pm (discover): + Better treatment for agents without "system" OIDs. + +2004-01-21 Stanislav Sinyagin + + * lib/Torrus/DevDiscover.pm (discover): Now snmp-oids-per-pdu may + be defined from discovery parameters. + + * bin/schedulerinfo.in: Scheduler runtime statistics report + +2004-01-20 Stanislav Sinyagin + + * lib/Torrus/Scheduler.pm: runtime statistics stored in a database + +2004-01-15 Stanislav Sinyagin + + * lib/Torrus/DevDiscover.pm (discover): + 'collector-period' and 'collector-timeoffset' can be specified in + devdiscover input + + * Makefile.am: Now DIST_REVISION file in the distribution + package tells the distribution revision date + + * lib/Torrus/Collector.pm: listTargets() is replaced with + listCollectorTargets() with collector type as argument + +2004-01-14 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + Split iftable-errors template into input and output + (some Cisco ATM aal5 interfaces dont have both in and out error + counters) + + * doc/devdoc/wd.gprint-and-cf-plot.pod: + New design draft from Christian Schnidrig + + * lib/Torrus/RPN.pm: Slight reorganisation and better fault control + + * doc/userguide.pod: New in Tips: Several Torrus instances on one server + +2004-01-13 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm (token), + lib/Torrus/ConfigTree/Writer.pm (setAlias), + lib/Torrus/DB.pm (getBestMatch): + Recursive alias expansion. New database: aliases.db. + configsnapshot is no more compatible with previous releases' database. + +2004-01-12 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm (getAliases): Improved logics for aliases. + Needs database recompilation. + +2004-01-09 Stanislav Sinyagin + + * bin/schedulerinfo.in: New utility for scheduler analysis + +2004-01-08 Stanislav Sinyagin + + * xmlconfig/old/rfc1213.xml: Moved from xmlconfig/generic/rfc1213.xml + + * templates/html-incblocks.txt: cssoverlay property + + * bin/configsnapshot.in: Ready for tests + + * lib/Torrus/DevDiscover/RFC2737_ENTITY_MIB.pm (discover): + Chassis desription is put into host-level comment + +2004-01-07 Stanislav Sinyagin + + * bin/configsnapshot.in: first step towards a snapshot utility + + * xmlconfig/vendor/cisco.generic.xml: + New template: cisco-temperature-sensor-fahrenheit + + * xmlconfig/generic/collector-periods.xml: Changed XFF the same way + as in snmp-defs.xml. + Added Holt-Winters parameters to 1-minute interval. + + * xmlconfig/snmp-defs.xml: Changed XFF in default RRAs: 1 missing + sample is allowed in half-hour average, and 1 missing hour + is allowed in daily average. + + * lib/Torrus/Collector/SNMP.pm (initTargetAttributes): + New parameter: snmp-object-type + +2004-01-06 Stanislav Sinyagin + + * xmlconfig/generic/rfc2662.adsl-line.xml: Reduced number of RRD files + + * xmlconfig/vendor/cisco.generic.xml: Moved buffer statistics into + a single RRD file + + * xmlconfig/generic/rfc2863.if-mib.xml: + Reorganized RRD data structure. Significantly reduced number of files. + +2004-01-05 Stanislav Sinyagin + + * bin/genlist.in: New utility for data listing + +2003-12-31 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC2737_ENTITY_MIB.pm: New discovery module + + * lib/Torrus/DevDiscover/CiscoGeneric.pm: CPU enties mapped against + ENTITY-MIB names + +2003-12-30 Stanislav Sinyagin + + * bin/devdiscover.in: $XMLCONFIG substitution + +2003-12-29 Stanislav Sinyagin + + * xmlconfig/generic/rfc2863.if-mib.xml: Moved ifindex-map to host level + +2003-12-28 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/CiscoGeneric.pm, + xmlconfig/vendor/cisco.generic.xml: Reorganized CPU and Memory + pool statistics. + + * lib/Torrus/DevDiscover/CiscoFirewall.pm: New discovery module + + * lib/Torrus/DevDiscover/F5BigIp.pm: New discovery module for + F5 BigIp Load Balancer + +2003-12-24 Stanislav Sinyagin + + * xmlconfig/old/snmp-defs.old-0.1.2.xml: Moved from generic/ to old/ + + * xmlconfig/old/rfc2863.if-mib.old-0.1.4.xml: Saved the file from + previous version. + +2003-12-22 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/Xylan.pm: New discovery module for + Alcatel (Xylan) OmniSwitch + + * lib/Torrus/DevDiscover/AscendMax.pm: New discovery module for + Ascend (Lucent) MAX + +2003-12-21 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/CiscoIOS.pm (checkdevtype): + Use CISCO-IMAGE-MIB::ciscoImageTable for more strict IOS-based + product detection + +2003-12-18 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + Vendor templates for interface counters taken from + @{$interface->{'vendor_templates'}} + + * lib/Torrus/DB.pm (new): Berkeley db-4.2 compatibility + +2003-12-17 Stanislav Sinyagin + + * xmlconfig/vendor/empire.systemedge.xml: Data structure and templates + changed for better flexibility and system support + + * bin/devdiscover.in, bin/genddx.in: + Output file is now controlled from DDX parameter 'output-file'. + +2003-12-15 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/MicrosoftWindows.pm: + Moved MicrosoftWindowsServer.pm to MicrosoftWindows + +2003-12-14 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/MicrosoftWindowsServer.pm: New discovery module + for Windows2000/XP SNMP agent + +2003-12-13 Stanislav Sinyagin + + * xmlconfig/generic/rfc2863.if-mib.xml: + Replaced $IFIDX with %ifindex-map% + + Split template iftable-discards into iftable-discards-in and + iftable-discards-out. For some devices, + /var/snmpcollector/*_discards.rrd need to be deleted, and + devdiscover re-launched + +2003-12-11 Stanislav Sinyagin + + * templates/default-tset.html, xmlconfig/generic/rfc2863.if-mib.xml: + New parameter: descriptive-nickname + +2003-12-10 Stanislav Sinyagin + + * NEWS: Release 0.1.4 + + * devdiscover-config.pl: Commented out "RFC2662_ADSL_LINE" and + "Paradyne" (need more testing) + +2003-12-08 Stanislav Sinyagin + + * templates/*, web/plain/*.css: more flexible CSS layout + +2003-12-04 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (do_render_rrdgraph): + New parameter: graph-rigid-boundaries + +2003-12-01 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): + New discovery option: RFC2863_IF_MIB::suppress-hc-counters + +2003-11-28 Stanislav Sinyagin + + * bin/devdiscover.in: now it accepts XML input only + + * bin/genddx.in: New utility for next-generation devdiscover + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + interface counters moved to a separate subtree + +2003-11-25 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (do_render_rrdgraph): + New parameter: graph-logarithmic + +2003-11-23 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/EmpireSystemedge.pm: new discovery module + +2003-11-22 Stanislav Sinyagin + + * lib/Torrus/DevDiscover.pm (clearCap): capability clearing needed for + Empire Sysedge + +2003-11-18 Stanislav Sinyagin + + * xmlconfig/generic/rfc2863.if-mib.xml: templates interface-counters + and hc-interface-counters removed + New templates: read-iftable-octets, read-ifxtable-hcoctets + +2003-11-11 Stanislav Sinyagin + + * web/plain/torrus.css: Increased maximum node name length to 25 symbols + + * lib/Torrus/DevDiscover/CiscoGeneric.pm: moved memory, cpu, and + temperature statistics to a common module, shared by IOS and CatOS + + * lib/Torrus/DevDiscover/CiscoCatOS.pm (discover): interface comments + are now derived from CISCO-STACK-MIB::portName + +2003-11-10 Stanislav Sinyagin + + * xmlsup/extract-skeleton.xsl: XSLT template for tree structure + extraction + + * bin/configinfo.in: New utility + + * bin/devdiscover.in: New options: --retries and --timeout + + * lib/Torrus/DevDiscover/CiscoCatOS.pm: Interface filters for CatOS + +2003-11-09 Stanislav Sinyagin + + * lib/Torrus/ConfigBuilder.pm (addStatistics): congfiguration statistics + + * lib/Torrus/DevDiscover/CiscoIOS.pm: Interface filters for IOS devices + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (discover): Implemented + generic interface filtering + +2003-11-07 Stanislav Sinyagin + + * xmlconfig/generic/rfc2863.if-mib.xml: rrd-create-max=1e15 for HC + packet and octets counters + + * lib/Torrus/DevDiscover/RFC2863_IF_MIB.pm (buildConfig): + New interface counters: iftable-discards + +2003-11-05 Stanislav Sinyagin + + * New devdiscover modules: "RFC2662_ADSL_LINE" and "Paradyne" + +2003-11-04 Stanislav Sinyagin + + * lib/Torrus/Collector/SNMP.pm (initTarget): + New parameter: snmp-oids-per-pdu + +2003-11-03 Stanislav Sinyagin + + * NEWS: Release 0.1.3 + + * doc/, doc/devdoc/: Documentation is reorganized. Developer + documentation is separated from User docs. + +2003-10-31 Stanislav Sinyagin + + * templates/overview-subleaves.html: Replacement for InOutBps. + New parameters: has-overview-subleaves, overview-subleave-name, + overview-shortcut-text, overview-shortcut-title, overview-page-title + +2003-10-30 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/CiscoIOS_SAA.pm: New discovery module + +2003-10-29 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (do_render_rrdgraph): New parameter: + rrd-scaling-base + (new): cache initialization optimized + +2003-10-28 Stanislav Sinyagin + + * doc/devdiscover_devguide.pod: new Device Discovery Developer's Guide + +2003-10-27 Stanislav Sinyagin + + * lib/Torrus/DevDiscover/RFC2790_HOST_RESOURCES.pm: + New Host resources MIB discovery module + +2003-10-26 Stanislav Sinyagin + + * examples/setmonitor.xupdate.xml: XUpdate technique to update + autogenerated files. Described in userguide.pod. + +2003-10-24 Stanislav Sinyagin + + * xmlconfig/generic/rfc2863.if-mib.xml: New names for interace + counter RRD files: host_intf_octets.rrd, host_intf_packets.rrd, etc. + + * xmlconfig/snmp-defs.xml: data-file and data-dir are no longer + defined in snmp-defaults. + + * xmlconfig/generic/rfc2863.if-mib.xml: Broke interface counter + templates into smaller parts. New counters template: "iftable-errors". + + * xmlconfig/snmp-defs.xml: Moved interface counters to + generic/rfc2863.if-mib.xml + +2003-10-21 Stanislav Sinyagin + + * New ACL user and group attribute: "modified" + +2003-10-20 Stanislav Sinyagin + + * lib/Torrus/DevDiscover.pm (genDataDir): data-dir hash implemented + + * bin/devdiscover.in: Default subtree is now /Routers. + Alternative device names may be given as host:devname + + * xmlconfig/: Vendor and generic templates from Shawn Ferry + +2003-10-19 Stanislav Sinyagin + + * Shawn Ferry's contribution on styling profiles, with recursive + color references + +2003-10-18 Stanislav Sinyagin + + * lib/Torrus/ConfigTree/XMLCompiler.pm (compile): directives + are now processed recursively, before any other processing. + +2003-10-17 Stanislav Sinyagin + + * xmlconfig/snmp-defs.xml: Replaced subtree /SNMP with template + Moved old version to generic/snmp-defs.old-0.1.2.xml + +2003-10-15 Stanislav Sinyagin + + * bin/devdiscover.in: First proof of concept version of + a new modular device discovery tool + +2003-10-14 Stanislav Sinyagin + + * NEWS: Release 0.1.2 + + * lib/Torrus/ConfigTree/Writer.pm (addChild): Nodes longer than 20 + characters are reported with warning. + +2003-10-13 Stanislav Sinyagin + + * xmlconfig: New vendor files: + vendor/ascend.max.xml, examples/ascend.max.xml, + generic/rfc2670.docsis-if.xml + + * doc/userguide.pod, + xmlconfig/examples/servers.data, xmlconfig/examples/servers.tmpl: + New approach in automatic config generation. + +2003-10-12 Stanislav Sinyagin + + * bin/mkroutercfg.in (retrieveSnmpData): VLAN interfaces are excluded + from the list of discovered interfaces. + +2003-10-09 Stanislav Sinyagin + + * lib/Torrus/ConfigTree/Writer.pm (propagateViewParams): Moved view + parameter inheritance from XML compiler to Writer post-processing + +2003-10-07 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (do_render_rrdgraph): New view parameters: + ignore-limits, ignore-lower-limit, ignore-upper-limit + + * bin/cleanup.in: Cronjob for cleaning up diskspace. + + * lib/Torrus/Renderer.pm (do_render_rrdgraph): New parameters: + graph-lower-limit, graph-upper-limit + +2003-10-06 Stanislav Sinyagin + + * styling/torrus-original.pl: Styling profiles implemented + +2003-10-04 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm: New parameter: vertical-label + +2003-09-30 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (do_render_rrdgraph): Added HRULE handling + +2003-09-29 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (render_html): Added current time in HTML output + +2003-09-18 Stanislav Sinyagin + + * lib/Torrus/Scheduler.pm: VmWare clock support + +2003-09-17 Stanislav Sinyagin + + * lib/Torrus/Monitor.pm (setAlarm): New parameter: monitor-action-target + +2003-09-14 Stanislav Sinyagin + + * NEWS: Release 0.1.1 + +2003-09-13 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm: + %Torrus::ConfigTree::expand_params now contains parameters for + expansion + + * lib/Torrus/ConfigTree/Writer.pm: + %Torrus::ConfigTree::Writer::remove_space now contains parameters + for space removal + + * lib/Torrus/Collector.pm (addTarget): New parameter: value-map + + * configure.ac: New configure variable: torrus_user. + torrus_var default value changed from root to torrus + +2003-09-09 Stanislav Sinyagin + + * init.torrus.in: New launcher for multi-tree support. + FreeBSD 5.1 gives weird error without "&" in launching command. + Needs testing on other systems. + +2003-09-07 Stanislav Sinyagin + + * Monitor event "throw" changed to "set" + +2003-09-05 Stanislav Sinyagin + + * lib/Torrus/ACL/Import.pm, lib/Torrus/ACL/Export.pm: ACL import/export + utilities + + * bin/aclfixup.in: Temporary utility to convert ACL database to + the new format. + + * lib/Torrus/ACL/Edit.pm: ACL Database structure changed: + added "uA:" lists + +2003-09-03 Stanislav Sinyagin + + * lib/Torrus/RPN.pm: Got use of use Math::BigFloat, as suggested by + Christian. + + * xmlconfig/snmp-defs.xml: Changed xff to 0.5, as recommended by + rodrigo.cunha at corp.vodafone.pt + + * lib/Torrus/DB.pm: Database handles are held in a pool and reused + +2003-09-02 Stanislav Sinyagin + + * Added user authentication: lib/Torrus/ACL*, bin/acledit, Apache handler + * Multiple trees support as described in Requirements 0.1 + +2003-08-26 Stanislav Sinyagin + + * lib/Torrus/Collector/SNMP.pm: Moved the validator parameters to + a separate module + +2003-08-07 Stanislav Sinyagin + + * xmlconfig/defaults.xml: Tokenset views expiry time + changed from 300 to 60 + + * lib/Torrus/Renderer.pm (checkAndClearCache): Renderer cache is + cleared at least once a day + + * webmux.pl: New Apache init script. DB environment is now + correctly destroyed + +2003-08-06 Stanislav Sinyagin + + * mibs/Torrus-MIB.txt: Added DS tree name to Monitor action exec + and helper programs + + * web/plain/torrus.css: Replaced
with display:block in current path + + * height-hint parameter is removed. + + * templates/routercfg.xml: Fixed the subtree deepness bug for + temperature sensors. + + * First steps towards version 0.1: Multiple trees and database + split are implemented. + +2003-08-04 Stanislav Sinyagin + + * NEWS: Release 0.0.20 + +2003-07-31 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm: added $Torrus::Renderer::rendererURL + and $Torrus::Renderer::plainURL + +2003-07-29 Stanislav Sinyagin + + * templates/html-incblocks.txt: Absolute URL for CSS stylesheet + + * lib/Torrus/Collector/SNMP.pm: multiple ports and SNMP communities + per IP address. + +2003-07-23 Stanislav Sinyagin + + * templates/routercfg.xml: moved snmp-community and other parameters + to a host-level subtree + +2003-07-17 Stanislav Sinyagin + + * SNMP Agent reload and unavailable handling + +2003-07-15 Stanislav Sinyagin + + * bin/mkroutercfg.in, templates/*, lib/Torrus/Renderer.pm: + Bugs item #747893 resolved. + +2003-07-02 Stanislav Sinyagin + + * bin/mkroutercfg.in (reportResults), templates/routercfg.xml: + Legend is now XML-escaped + +2003-07-01 Stanislav Sinyagin + + * NEWS: Release 0.0.19 + +2003-06-26 Stanislav Sinyagin + + * xmlconfig/snmp-defs.xml, lib/Torrus/Collector/RRDStorage.pm, + lib/Torrus/ConfigTree/Validator.pm: + typo fixed: rrd-create-heartbit changed to rrd-create-heartbeat + + * xmlconfig/snmp-defs.xml: as proposed by Christian Schnidrig, + rrd-create-heartbeat changed from 1800 to 500 + +2003-06-10 Stanislav Sinyagin + + * bin/mkroutercfg.in (reportResults), templates/routercfg.xml: + SNMP version bugfix + + * configure.ac: Now most of the directory names are configurable + +2003-05-18 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (render): + Bug #735753 (Christian Schnidrig) fixed + + * bin/mkroutercfg.in, templates/routercfg.xml: + Marc Haber's patch for deeper subtrees + + * torrus-config.pl: added @Torrus::ConfigTree::XMLCompiler::listparams + +2003-05-01 Stanislav Sinyagin + + * lib/Torrus/Collector/SNMP.pm: SNMP-specific config validator is + now within the module. + + * lib/Torrus/ConfigTree/Validator.pm: Additional validation + parameters are read from @Torrus::Validator::loadLeafValidators + + * lib/Torrus/Collector.pm: Collector modules + are loaded from @Torrus::Collector::loadModules + +2003-04-02 Stanislav Sinyagin + + * NEWS: Release 0.0.18 + +2003-03-31 Stanislav Sinyagin + + * xmlconfig/defaults.xml: New parameter: rrgraph-views + +2003-03-30 + + * xmlconfig/Makefile.am: Added Cisco MAC accounting + +2003-03-27 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm and temlates: reorganized Holt-Winters views + +2003-03-25 Stanislav Sinyagin + + * torrus-config.pl: Moved monitor parameters from siteconfig to + default config. + +2003-03-21 Stanislav Sinyagin + + * NEWS: Release 0.0.17 + + * web/plain/torrus-printer.css: Finalized the printer-friendly layout + +2003-03-17 Stanislav Sinyagin + + * init.torrus.in: now running under user "torrus" + +2003-03-15 Stanislav Sinyagin + + * configure.ac: Changed the group to "torrus"; init.torrus is + more universal + +2003-03-15 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm, lib/Torrus/ApacheHandler.pm: + optimized Renderer to reuse Template processor in mod_perl + +2003-03-15 Stanislav Sinyagin + + * web/plain/torrus.css: New HTML layout + +2003-03-11 Stanislav Sinyagin + + * xmlconfig/Makefile.am (dist_examples_DATA): Moved + apcups-example.xml to apc-ups.xml. Added hpux.xml + + * bin/rrd_getdim.in, bin/prepviews.in, xmlconfig/Makefile.am: + "make install prefix=/some/path" now works correctly. + + * lib/Bundle/Torrus.pm: Perl bundle for easy installation + +2003-03-04 Stanislav Sinyagin + + * NEWS: Release 0.0.16 + + * lib/Torrus/Renderer.pm (do_render_rrdgraph): Fixed TICK bug + + * xmlconfig/vendor/hp.hpux.xml: New definitions file from Aaron Bush + + * xmlconfig/vendor/apc.ups.xml: + * xmlconfig/examples/apcups-example.xml: Merged the several + templates into one. + +2003-03-03 Stanislav Sinyagin + + * Makefile.am: added torrus-config.dtd to distribution + + * xmlsup/torrus-config.dtd: The configuration DTD first cut + +2003-03-02 + + * Makefile.am (dist_mibs_DATA): Moved mibs from lib to share + +2003-03-01 Stanislav Sinyagin + + * bin/mkroutercfg.in (reportResults): Added vendor/cisco.ios.xml + chekup + + * xmlconfig/examples/apcups-defs.xml: moved to + xmlconfig/vendor/apc.ups.xml + + * xmlconfig/examples/snmp-view.xml: moved contents into + xmlconfig/vendor/cisco.ios.xml + + * xmlconfig/snmp-defs.xml: Moved Cisco specifics to + xmlconfig/vendor/cisco.ios.xml + + * xmlconfig/Makefile.am: snmp-defs.xml is not any more preserved + + * configure.ac, Makefile.am: added plugin functionality + +2003-02-27 Stanislav Sinyagin + + * lib/Torrus/Renderer.pm (render_html), + lib/Torrus/ApacheHandler.pm (handler), web/grapher.cgi.in: + Fixed the non-ASCII display problem. + Also XML-LibXML-1.54_3 is required. + +2003-02-26 Stanislav Sinyagin + + * NEWS: Release 0.0.15 + + * xmlconfig/examples/apcups-defs.xml: + * xmlconfig/examples/apcups-example.xml: Added APC UPS example + configurations + + * lib/Torrus/Collector/RRDStorage.pm (updateRRD): Reverted to + a more promiscious code, because the memory problem persists with + perl 5.8. + +2003-02-20 Stanislav Sinyagin + + * NEWS: Release 0.0.14 + +2003-02-10 Stanislav Sinyagin + + * lib/Torrus/ConfigTree/Writer.pm: fixed bug with parameter cache + +2003-01-29 Stanislav Sinyagin + + * bin/mkroutercfg.in: fixed the exit code bug + +2003-01-24 Stanislav Sinyagin + + * xmlconfig/Makefile.am: added xmlconfig/examples/snmp-view.xml + + * lib/Torrus/ConfigTree/XMLCompiler.pm, bin/compilexml.in: + added XML statement + +2003-01-20 Stanislav Sinyagin + + * NEWS: Release 0.0.13 + + * bin/compilexml.in, bin/collector.in, bin/monitor.in: + Added signal handlers for more graceful database closing. + +2003-01-13 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm: Now compiler waits for readers to finish. + +2003-01-08 Stanislav Sinyagin + + * lib/Torrus/ConfigTree.pm: implemented ConfigurationReady checkup + * lib/Torrus/ApacheHandler.pm, web/grapher.cgi.in: + more user friendly error reporting + +2003-01-05 Stanislav Sinyagin + + * xmlconfig/snmp-defs.xml: Added InOutBps leaf to the templates. + Affected files: xmlconfig/defaults.xml, templates/routercfg.xml, + templates/default-dir.html, templates/inout-leaves.html + +2003-01-03 Stanislav Sinyagin + + * xmlconfig/snmp-defs.xml: Added graph-legend parameters + +2003-01-02 Stanislav Sinyagin + + * xmlconfig/Makefile.am: moved XML examples to a separate directory + + * implemented 'rrd-multigraph' + + * changed ds-type RRDfile to rrd-file + +2002-09-10 Stanislav Sinyagin + + * Release 0.0.5 published. Everything except SNMP data collector + is ready to run. + +2002-08-12 Stanislav Sinyagin + + * Reorganized a lot of things. First cut of monitor is runnable. + +2002-07-19 Stanislav Sinyagin + + * Implemented Holt-Winters support + +2002-07-18 Stanislav Sinyagin + + * Reorganized ConfigTree and implemented tokens diff --git a/torrus/DIST_REVISION b/torrus/DIST_REVISION new file mode 100644 index 000000000..65629b084 --- /dev/null +++ b/torrus/DIST_REVISION @@ -0,0 +1 @@ +Sun Oct 24 15:06:45 CEST 2010 diff --git a/torrus/INSTALL b/torrus/INSTALL new file mode 100644 index 000000000..23e5f25d0 --- /dev/null +++ b/torrus/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/torrus/Makefile.am b/torrus/Makefile.am new file mode 100644 index 000000000..dcf276378 --- /dev/null +++ b/torrus/Makefile.am @@ -0,0 +1,109 @@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.am,v 1.1 2010-12-27 00:03:32 ivan Exp $ +# Stanislav Sinyagin +# + +SUBDIRS = . bin configs doc examples perllib sup xmlconfig + +EXTRA_DIST = \ + setup_tools/Bundle/Torrus.pm \ + setup_tools/replace_rrfw.sh \ + setup_tools/configure_fhs \ + setup_tools/check_perlthreading.pl + +noinst_SCRIPTS = \ + setup_tools/substvars.sh \ + setup_tools/mkvardir.sh \ + init.d/torrus + +tmpldir = @tmpldir@ +dist_tmpl_DATA = \ + templates/aclexport.xml \ + templates/adminfo.html \ + templates/default-chooser.html \ + templates/default-dir.html \ + templates/default-helptext.html \ + templates/default-login.html \ + templates/default-recursivedir.html \ + templates/default-rrd.html \ + templates/default-tset.html \ + templates/expanded-dir.html \ + templates/globalsearch.html \ + templates/overview-subleaves.html \ + templates/report-index.html \ + templates/report-monthly.html \ + templates/report-serviceid.html \ + templates/report-yearly.html \ + templates/search.html \ + templates/html-incblocks.txt \ + templates/tset-list.html \ + templates/email-alarm.txt + + + +scriptsdir = @scriptsdir@ +dist_scripts_DATA = scripts/rrdup_notify.sh + +xmlscriptsdir = @scriptsdir@/xml +dist_xmlscripts_DATA = scripts/xml/extract-skeleton.xsl + + +discoverydir = @sitedir@/discovery +dist_discovery_DATA = discovery/README + +mkvardir=@abs_top_builddir@/setup_tools/mkvardir.sh + +install-data-local: + @echo Testing if prefix has changed during make + test "$(prefix)" = "@prefix@" + $(mkvardir) $(DESTDIR)$(dbhome) + $(mkvardir) $(DESTDIR)$(cachedir) + $(mkvardir) $(DESTDIR)$(piddir) + $(mkvardir) $(DESTDIR)$(reportsdir) + $(mkvardir) $(DESTDIR)$(logdir) + $(mkvardir) $(DESTDIR)$(sesstordir) + $(mkvardir) $(DESTDIR)$(seslockdir) + $(mkinstalldirs) $(DESTDIR)$(tmpluserdir) + $(mkinstalldirs) $(DESTDIR)$(plugtorruscfgdir) + $(mkinstalldirs) $(DESTDIR)$(plugdevdisccfgdir) + $(mkinstalldirs) $(DESTDIR)$(plugwrapperdir) + +HTMLDIR = @abs_top_builddir@/../htdocs + +htdocs: + cd doc; make htdocs + @for f in $(dist_mibs_DATA); do \ + f2=$(HTMLDIR)/`basename $$f`; \ + if test ! -f $$f2 -o $$f -nt $$f2; then \ + echo "cp $$f $$f2"; \ + cp $$f $$f2; \ + fi; \ + done + +UPLOADPATH = \ + ssinyagin,torrus@web.sourceforge.net:/home/groups/t/to/torrus/htdocs/devel + +upload: dist + scp $(distdir).tar.gz TODO $(UPLOADPATH) + +todoup: + scp TODO $(UPLOADPATH) + +dist-hook: + date >DIST_REVISION + cp DIST_REVISION $(distdir)/ diff --git a/torrus/Makefile.in b/torrus/Makefile.in new file mode 100644 index 000000000..1ff1d5245 --- /dev/null +++ b/torrus/Makefile.in @@ -0,0 +1,808 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.in,v 1.1 2010-12-27 00:03:32 ivan Exp $ +# Stanislav Sinyagin +# + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = README $(am__configure_deps) $(dist_discovery_DATA) \ + $(dist_scripts_DATA) $(dist_tmpl_DATA) $(dist_xmlscripts_DATA) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/configure $(top_srcdir)/init.d/torrus.in \ + $(top_srcdir)/setup_tools/mkvardir.sh.in \ + $(top_srcdir)/setup_tools/substvars.sh.in AUTHORS COPYING \ + ChangeLog INSTALL NEWS TODO conftools/config.guess \ + conftools/config.sub conftools/install-sh conftools/missing +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = setup_tools/substvars.sh setup_tools/mkvardir.sh \ + init.d/torrus +SCRIPTS = $(noinst_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(discoverydir)" \ + "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(tmpldir)" \ + "$(DESTDIR)$(xmlscriptsdir)" +dist_discoveryDATA_INSTALL = $(INSTALL_DATA) +dist_scriptsDATA_INSTALL = $(INSTALL_DATA) +dist_tmplDATA_INSTALL = $(INSTALL_DATA) +dist_xmlscriptsDATA_INSTALL = $(INSTALL_DATA) +DATA = $(dist_discovery_DATA) $(dist_scripts_DATA) $(dist_tmpl_DATA) \ + $(dist_xmlscripts_DATA) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +FIND = @FIND@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KILL = @KILL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERLINC = @PERLINC@ +POD2MAN = @POD2MAN@ +POD2MAN_PRESENT_FALSE = @POD2MAN_PRESENT_FALSE@ +POD2MAN_PRESENT_TRUE = @POD2MAN_PRESENT_TRUE@ +POD2TEXT = @POD2TEXT@ +POD2TEXT_PRESENT_FALSE = @POD2TEXT_PRESENT_FALSE@ +POD2TEXT_PRESENT_TRUE = @POD2TEXT_PRESENT_TRUE@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLEEP = @SLEEP@ +STRIP = @STRIP@ +SU = @SU@ +VERSION = @VERSION@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +cachedir = @cachedir@ +cfgdefdir = @cfgdefdir@ +datadir = @datadir@ +dbhome = @dbhome@ +defrrddir = @defrrddir@ +distxmldir = @distxmldir@ +enable_pkgonly = @enable_pkgonly@ +enable_varperm = @enable_varperm@ +exec_prefix = @exec_prefix@ +exmpdir = @exmpdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mansec_misc = @mansec_misc@ +mansec_usercmd = @mansec_usercmd@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +perlithreads = @perlithreads@ +perllibdir = @perllibdir@ +perllibdirs = @perllibdirs@ +piddir = @piddir@ +pkgbindir = @pkgbindir@ +pkgdocdir = @pkgdocdir@ +pkghome = @pkghome@ +plugdevdisccfgdir = @plugdevdisccfgdir@ +pluginsdir = @pluginsdir@ +plugtorruscfgdir = @plugtorruscfgdir@ +plugwrapperdir = @plugwrapperdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +reportsdir = @reportsdir@ +sbindir = @sbindir@ +scriptsdir = @scriptsdir@ +seslockdir = @seslockdir@ +sesstordir = @sesstordir@ +sharedstatedir = @sharedstatedir@ +siteconfdir = @siteconfdir@ +sitedir = @sitedir@ +sitexmldir = @sitexmldir@ +supdir = @supdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +tmpldir = @tmpldir@ +tmpluserdir = @tmpluserdir@ +torrus_user = @torrus_user@ +var_group = @var_group@ +var_mode = @var_mode@ +var_user = @var_user@ +varprefix = @varprefix@ +webplaindir = @webplaindir@ +webscriptsdir = @webscriptsdir@ +wrapperdir = @wrapperdir@ +SUBDIRS = . bin configs doc examples perllib sup xmlconfig +EXTRA_DIST = \ + setup_tools/Bundle/Torrus.pm \ + setup_tools/replace_rrfw.sh \ + setup_tools/configure_fhs \ + setup_tools/check_perlthreading.pl + +noinst_SCRIPTS = \ + setup_tools/substvars.sh \ + setup_tools/mkvardir.sh \ + init.d/torrus + +dist_tmpl_DATA = \ + templates/aclexport.xml \ + templates/adminfo.html \ + templates/default-chooser.html \ + templates/default-dir.html \ + templates/default-helptext.html \ + templates/default-login.html \ + templates/default-recursivedir.html \ + templates/default-rrd.html \ + templates/default-tset.html \ + templates/expanded-dir.html \ + templates/globalsearch.html \ + templates/overview-subleaves.html \ + templates/report-index.html \ + templates/report-monthly.html \ + templates/report-serviceid.html \ + templates/report-yearly.html \ + templates/search.html \ + templates/html-incblocks.txt \ + templates/tset-list.html \ + templates/email-alarm.txt + +dist_scripts_DATA = scripts/rrdup_notify.sh +xmlscriptsdir = @scriptsdir@/xml +dist_xmlscripts_DATA = scripts/xml/extract-skeleton.xsl +discoverydir = @sitedir@/discovery +dist_discovery_DATA = discovery/README +mkvardir = @abs_top_builddir@/setup_tools/mkvardir.sh +HTMLDIR = @abs_top_builddir@/../htdocs +UPLOADPATH = \ + ssinyagin,torrus@web.sourceforge.net:/home/groups/t/to/torrus/htdocs/devel + +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +setup_tools/substvars.sh: $(top_builddir)/config.status $(top_srcdir)/setup_tools/substvars.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +setup_tools/mkvardir.sh: $(top_builddir)/config.status $(top_srcdir)/setup_tools/mkvardir.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +init.d/torrus: $(top_builddir)/config.status $(top_srcdir)/init.d/torrus.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +uninstall-info-am: +install-dist_discoveryDATA: $(dist_discovery_DATA) + @$(NORMAL_INSTALL) + test -z "$(discoverydir)" || $(mkdir_p) "$(DESTDIR)$(discoverydir)" + @list='$(dist_discovery_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_discoveryDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(discoverydir)/$$f'"; \ + $(dist_discoveryDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(discoverydir)/$$f"; \ + done + +uninstall-dist_discoveryDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_discovery_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(discoverydir)/$$f'"; \ + rm -f "$(DESTDIR)$(discoverydir)/$$f"; \ + done +install-dist_scriptsDATA: $(dist_scripts_DATA) + @$(NORMAL_INSTALL) + test -z "$(scriptsdir)" || $(mkdir_p) "$(DESTDIR)$(scriptsdir)" + @list='$(dist_scripts_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_scriptsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(scriptsdir)/$$f'"; \ + $(dist_scriptsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(scriptsdir)/$$f"; \ + done + +uninstall-dist_scriptsDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_scripts_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(scriptsdir)/$$f'"; \ + rm -f "$(DESTDIR)$(scriptsdir)/$$f"; \ + done +install-dist_tmplDATA: $(dist_tmpl_DATA) + @$(NORMAL_INSTALL) + test -z "$(tmpldir)" || $(mkdir_p) "$(DESTDIR)$(tmpldir)" + @list='$(dist_tmpl_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_tmplDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tmpldir)/$$f'"; \ + $(dist_tmplDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tmpldir)/$$f"; \ + done + +uninstall-dist_tmplDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_tmpl_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(tmpldir)/$$f'"; \ + rm -f "$(DESTDIR)$(tmpldir)/$$f"; \ + done +install-dist_xmlscriptsDATA: $(dist_xmlscripts_DATA) + @$(NORMAL_INSTALL) + test -z "$(xmlscriptsdir)" || $(mkdir_p) "$(DESTDIR)$(xmlscriptsdir)" + @list='$(dist_xmlscripts_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_xmlscriptsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(xmlscriptsdir)/$$f'"; \ + $(dist_xmlscriptsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(xmlscriptsdir)/$$f"; \ + done + +uninstall-dist_xmlscriptsDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_xmlscripts_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(xmlscriptsdir)/$$f'"; \ + rm -f "$(DESTDIR)$(xmlscriptsdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/conftools $(distdir)/discovery $(distdir)/init.d $(distdir)/scripts $(distdir)/scripts/xml $(distdir)/setup_tools $(distdir)/setup_tools/Bundle $(distdir)/templates + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(discoverydir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(tmpldir)" "$(DESTDIR)$(xmlscriptsdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-data-local install-dist_discoveryDATA \ + install-dist_scriptsDATA install-dist_tmplDATA \ + install-dist_xmlscriptsDATA + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-dist_discoveryDATA uninstall-dist_scriptsDATA \ + uninstall-dist_tmplDATA uninstall-dist_xmlscriptsDATA \ + uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-recursive distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-dist_discoveryDATA \ + install-dist_scriptsDATA install-dist_tmplDATA \ + install-dist_xmlscriptsDATA install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-dist_discoveryDATA \ + uninstall-dist_scriptsDATA uninstall-dist_tmplDATA \ + uninstall-dist_xmlscriptsDATA uninstall-info-am + + +install-data-local: + @echo Testing if prefix has changed during make + test "$(prefix)" = "@prefix@" + $(mkvardir) $(DESTDIR)$(dbhome) + $(mkvardir) $(DESTDIR)$(cachedir) + $(mkvardir) $(DESTDIR)$(piddir) + $(mkvardir) $(DESTDIR)$(reportsdir) + $(mkvardir) $(DESTDIR)$(logdir) + $(mkvardir) $(DESTDIR)$(sesstordir) + $(mkvardir) $(DESTDIR)$(seslockdir) + $(mkinstalldirs) $(DESTDIR)$(tmpluserdir) + $(mkinstalldirs) $(DESTDIR)$(plugtorruscfgdir) + $(mkinstalldirs) $(DESTDIR)$(plugdevdisccfgdir) + $(mkinstalldirs) $(DESTDIR)$(plugwrapperdir) + +htdocs: + cd doc; make htdocs + @for f in $(dist_mibs_DATA); do \ + f2=$(HTMLDIR)/`basename $$f`; \ + if test ! -f $$f2 -o $$f -nt $$f2; then \ + echo "cp $$f $$f2"; \ + cp $$f $$f2; \ + fi; \ + done + +upload: dist + scp $(distdir).tar.gz TODO $(UPLOADPATH) + +todoup: + scp TODO $(UPLOADPATH) + +dist-hook: + date >DIST_REVISION + cp DIST_REVISION $(distdir)/ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/torrus/NEWS b/torrus/NEWS new file mode 100644 index 000000000..354397f27 --- /dev/null +++ b/torrus/NEWS @@ -0,0 +1,320 @@ +24-OCT-2010: Torrus release 1.0.9 + +It is recommended to re-run discovery and compilation immediately after +upgrading from 1.0.8. + +In this release: + +-- WebUI handling is re-designed. FastCGI is supported with Apache + and Lighttpd. User authorization option has changed its name: + "$Torrus::CGI::authorizeUsers". Login page has now "remember me" checkbox. + Apache configuration statements for mod_perl have slightly changed. + Removed dependency: libapreq2 is no longer needed. + +-- New Perl module required by installer: JSON + +-- New discovery modules: Force10, NetBotz, Arista, ALU_Timetra, Foundry, + CasaCMTS, Jacarta. + +-- Support for semi-transparent lines and areas in multigraphs. + +-- Support for arbitrary names for subtrees and leaves (node-display-name + parameter). Now original interface names are displayed, without underscores. + +-- Monitor alarms are now preserved between config re-compilations. Also + dynamic tokenset members are preserved. A new utility: + "torrus flushmonitors" flushes old alarms. + +-- New parameter: nodeid. It is designed for easier integration of Torrus with + other OSS systems. See the "NodeID usage guidelines" document for more + details. + +-- Current SNMP failures are recorded in a database and displayed by + "torrus snmpfailures" utility. The output is in JSON format, so it's easy + to integrate into other alerting systems. + +-- RHEL compatibility: the old Init script did not stop the daemons properly + upon a system reboot. + +-- Compatibility with the newest version of Net::SNMP module. + +-- Host-based authentication: remote systems, such as customer self-care + portals, can retrieve graphs from Torrus WebUI. + +-- Performance optimizations: XML compiler runs 10-15% faster. + +-- Custom CSS styles must no longer reside in Torrus installation directory. + + + + +26-APR-2010: Torrus release 1.0.8bf01 + +Bugfix release. No new features or functionality. + +05-APR-2009: Torrus release 1.0.8 + +Note: a complete re-compile of the XML is required after upgrading. + +In this release: + +-- BerkeleyDB stability has significantly improved due to new signal handlers. + +-- View parameters can be overridden with URL variables "Gstart", + "Gend" and so on. + +-- Collector initialization time is improved by shifting some work + to the XML compiler. + +-- New command-line utility: srvderive. It combines several serviceIDs into + a single report by calculating their sum or maximum value + (sponsored by nexellent ag, www.nexellent.ch) + +-- A number of bugfixes and minor imprvements. + +-- Added SNMP discovery support for Arbor E series and Liebert HVAC + + +05-AUG-2008: Torrus release 1.0.7 + +In this release: + +-- Added and improved vendor support for Symmetricom, Juniper JunOS, + Cisco SCE, + +-- New discovery parameters, selectors and selector actions. + +-- Default value for "collector-timeoffset-step" increased from 30 to 60 + seconds. 30 seconds is too short for many installations. + +-- Support for PostgreSQL in reports generator. + +-- Support for IPv6 in SNMP discovery and collector. + +-- New collector plugin: "tp-rawexport" for plaintext export of collector data. + +-- Cisco QoS monitoring plugin "tp-cisco-cbqos" upgraded to version 1.6. + It fixes an old bug in RRD file naming, thus all the QoS-related RRD files + would have to be renamed or started from scratch. + +-- Other minor enhancements and bugfixes (see ChangeLog for details). + + +03-AUG-2007: Torrus release 1.0.6 + +In this release: + +-- All the trees need to be recompiled after Torrus upgrade. + +-- Search capability. The nodes can be searched within a tree or globally. + The search database needs to be updated with "torrus buildsearchdb" + utility. + +-- GUI improvements. Recursive view is restricted and is not offered + averywhere. Bugfix for Mozilla browser compatibility: now the graph + images are clickable. + +-- devdiscover accepts multiple DDX files. Combined with multithreading, + this improves the discovery performance even further. + +-- SNMP collector periodically refreshes the table mappings. This helps + for modular routers with online insertion and removal: the collector + does not need to be restarted after the physical configuration changes. + Also the OIDs that return noSuchObject are excluded from polling + immediately. + +-- New MIBs support: Cisco SCE per-service traffic statistics; Cisco CAR + statistics; Cisco Ethernet MAC accounting statistics now available on + subinterfaces; JunOS per-CoS stats; support for Alteon hardware. + +-- XML statement is no longer supported. Use the rrddir2xml + utility instead. + +-- The CDEF collector from Chrstian Schnidrig is integrated in the main + distribution. Devdiscover supports traffic summaries for multiple + interfaces. + +-- The report generator can generate HTML in any tree. Earlier it was + generating the reports only for the trees where data was collected. + This improvement allows to split the collecting and viewing trees. + +-- The installer allows multithreading for Perl version 5.8.8 or higher only. + Earlier versions are known for memory leaks in multithreaded operation. + +-- Multiple collector instances per tree. This improves the CPU utilization + for multi-CPU servers. See the torrus_collector manpage. + + + +25-JAN-2007: Torrus release 1.0.5 + +This is a major release with many new features. + +In this release: + +-- Bugfixes in SNMPv3 support + +-- Perl multithreading. If threads are supported by local Perl, + Devdiscover can perform parallel discoveries per output file. + Also the Collector runs a background thread for RRD updates. + +-- Improvement in SNMP collector initialization. Now the collector expands + the interface names and other maps asynchronously, which dramatically + reduces the initialization time for large installations. + Cisco QoS plugin needs an upgrade to version 1.4 or higher. + +-- New vendor support in SNMP discovery engine: + Motorola BSR CMTS (ex-Riverdelta), Cisco SCE, BGP prefix statistics for + Cisco IOS routers, Cisco IOS XR support. + +-- DOCSIS upstream statistics have changed the format, therefore + the old stats will be lost after upgrade. The stats now include the + US Frequency graphs. + +-- Interface statistics now contain "All Errors" tab with all error graphs + in one page. + +-- Interface traffic graphs may contain bandwidth utilization percentage + information (see RFC2863_IF_MIB::bandwidth-usage in SNMP Discovery + Guide). + +-- Cisco MAC accounting can also be used for billing reports. + + +20-JUL-2006: Torrus release 1.0.4 + +This is a major release with many new features. + +In this release: + +-- SNMP Version 3 support in Devdiscover and SNMP collector. + +-- Usage reports for billing. Including 95% percentile reports. + More details at http://torrus.org/reporting_setup.pod.html + +-- Various improvements in SNMP discovery engine and new equipment + vendor support + +-- Improved monitor notifications. New parameter: "severity" + and new action "action_notify". + +-- New torrus-siteconfig.pl variables to improve WebUI customization + + + +02-AUG-2005: Torrus release 1.0.3 + +This is a minor bugfix release. Unreachable device handling is improved, and +also there's a possibility to specify extra Perl library path in ./configure + + +27-JUL-2005: Torrus release 1.0.2 + +The new release requires one additional Perl module to be +installed: Date::Parse. You can install it from CPAN by using the command: + perl -MCPAN -e 'install Date::Parse' + +In this release: + +-- Unreachable SNMP devices handling has significantly improved. + The default unreachable timeout is set to 6 hours. + +-- Support for the new mod_perl 2.0 layout. + +-- New OID in TORRUS-MIB: torrusMonitorDesc, for easier processing of + SNMP traps. + +-- ./configure checks if the user "torrus" exists in the system + +-- New SNMP discovery parameters: + RFC2863_IF_MIB::only-interfaces + disable-snmpcollector + +-- On the graph page, it is now possible to choose the date for displaying + old statistics. + +-- The Cisco CPUs are now managed by devdiscover's selectors. + This allows you to add monitors to specific CPU graphs, and also add them + to a tokenset. + + +21-JUN-2005: Torrus release 1.0.1 + +In this release: + +-- SNMP errors are now handled better. See the User guide for more details. + +-- New command line option for monitor: --delay. The init script + launches the monitor with 20 minutes delay, to allow the collector + update RRD files before monitoring them. + +-- New devdiscover option: --fallback. It is useful in large production + environments when it's important to have a device in the web interface + even if it's turned off + +-- Cisco DOCSIS templates now include Total, Active, and Registered + modem quantities. RRD file structure has changed, so the graphs will + start anew. + +-- The meaning of $Torrus::Renderer::stylingProfileOverlay + has changed: now it refers to a file name. + + +10-JUN-2005: Torrus release 1.0.0 + +In this release, compared to RRFW release 0.1.8: + +-- New directory structure, with local configuration completely separated + from the distribution files + +-- Comand-line wrapper "torrus" for executing all commands, with short aliases + ("dd" for "devdiscover" etc.) + +-- Plugins may be easily added to existing installation + +-- Relative file names in DDX files searched in the right directories + +-- Discovery object selectors: the new way to customize the discovery results + +-- New discovery modules: + AxxessIT.pm: Cisco ONS 15300 SDH switches + CiscoIOS_Docsis.pm: Cisco IOS DOCSIS specifics: upstream utilization and + modem quantities + BetterNetworks.pm: BetterNetworks EthernetBox sensors (temperature, humidity + and so on) + CiscoIOS_MacAccounting.pm: Automated discovery for Cisco MAC accounting. + If applicable, MAC peers are associated with BGP peers. + +-- Discovery modules improvements: + IF-MIB indexing hints for unknown devices + Docsis downstream utilization + Selector actions for IF-MIB, Docsis, and temperature sensor objects + Line cards and modules memory stats for modular Ciscso routers + +-- Improved performance of monitor daemon + +-- extended example of DOCSIS monitors and 3-level alarms in + xmlconfig/examples/docsis-monitors.xml + +-- Renderer module improved for multi-CPU servers + +-- Web interface improvements: + Recursive directory view, + Monitor names and comments diaplayed, + Sizes of tokensets displayed + Multiple overviews possible for a subtree + +-- SO_RCVBUF is set explicitly in SNMP collector to sustain bursts of traffic + +-- RRD files automatically moved in case of conflicts + +-- ttproclist: the new utility for automating the DDX files generation + +-- action_snmptrap now sends an optional severity parameter + +-- New option for devdiscover: --forcebundle to write the bundle file + even if errors occur + +-- The init script is configurable by a separate configuration file. + It also launches the monitors with 20 minutes delay if monitors + are launched together with collectors diff --git a/torrus/README b/torrus/README new file mode 100644 index 000000000..ee9a2d616 --- /dev/null +++ b/torrus/README @@ -0,0 +1,10 @@ +Round Robin Database Framework + + http://sourceforge.net/projects/torrus + http://torrus.org + +For installation instructions, see doc/install.txt or convert doc/install.pod +into a format of your preference. + + +(C) 2002-2005, Stanislav Sinyagin diff --git a/torrus/TODO b/torrus/TODO new file mode 100644 index 000000000..e5f7b1030 --- /dev/null +++ b/torrus/TODO @@ -0,0 +1,161 @@ +Round Robin Database Framework + +To do now: + +-- index the parameters during compilation and add search function to UI +-- Update User Guide +-- Persistent maps in snmp collector +-- Multithreading in collector +-- Additive list parameters +-- New security model (access control within a tree) +-- New WebUI model +-- take the CF for graphing from view definition +-- implement new RPN functions: SORT, REV, TREND +-- Display docsIfDownstreamChannelTable docsIfUpstreamChannelTable in + DOCSIS chanel legends +-- validate %Torrus::SQL::connections +-- periodically refresh SNMP collector mappings +-- Modular structure in Monitor, with pluggable actions +-- in Monitor::run_event_exec, distinguish between monitor target and + action target +-- document selectors internals +-- fix the bug in recursive $def expansion +-- Move expandable parameters from ConfigTree.pm to XML config +-- dispersed timeoffsets for monitor +-- use Parallel::ForkManager in devdiscover +-- Set the daemon's log level by signal +-- Selector for Cisco CPU and memory buffer monitoring +-- Option to expand directory view by default +-- Traceroute plugin (Gustavo Torres) +-- CDef Collector plugin (Christian Schnidrig) +-- Optionally show Admin info when authentication disabled +-- RRD Renderer to take CF from the view definition +-- Do we need a separate directory for user-defined styling? +-- Startup script that verifies database consistency at server boot +-- Collector that reports the BerkeleyDB stats +-- Sysedge ntregperf discovery optimization (Shawn) +-- Check RRD DS name length limit (19 bytes) and variable name limit (29 bytes) +-- Better handling of SNMP timeouts in devdiscover +-- MS-SQL SNMP support? (Shawn) +-- Discovery profiles (router, server, etc.) to limit the number of probes +-- Per-tree styling profiles (CSS, color schemas, company name and URL) +-- Describe IF-MIB discovery internals in doc/devdoc/devdiscover.pod +-- New utility to verify the installation files consistency (see below) +-- rrd-create-max for interface counters tunable in vendor modules +-- Backup snapshot of dynamic data (monitor status etc.) +-- Relative path in alias definition +-- "Remember me" login screen option +-- Graph colouring by monitor action +-- Session history display +-- Track changes of XML configurations (XML::Diff, cvs-alike?) +-- Translate parameters in monitor comments +-- Show maximum value in the graph image comments + +Design work to do: + +-- Design draft for custom indexing and quering +-- Develop a Concept of 95th percentile monthly reports +-- Reports generation (monthly, weekly etc.) +-- Write working draft for "collector-copy" datasource type + +To do before Release 1.0.1: + +-- Implement monitor escalation (devdoc/wd.monitor-escalation.pod) +-- BUG: template may add children to a leaf +-- Add more documentation to the existing XML +-- Document HTML templates +-- Web interface for ACL editing +-- Date selector in Web interface +-- CSV data export (new Renderer type) +-- Syslog logging + +To do someday: + +-- Finish and test "RFC2662_ADSL_LINE" and "Paradyne" devdiscover modules +-- Backplane performance for Catalyst switches +-- VoIP dial peer statistics +-- Gradual highlighting for subtree listings +-- Tools for RRD files manipulation (adding/deleting DSes etc.) +-- Service uptime monitoring and reporting (devdoc/wd.uptime-mon.pod) +-- Distributed collector (devdoc/wd.distributed.pod) +-- Log files wraparound +-- Packaging for major OSes: RedHat, Debian, FreeBSD, Solaris, MacOS X (?) +-- rrdtool-1.1 font option (only after rrdtool 1.1.x is released) +-- navigation links to represent the network topology +-- Messaging (devdoc/wd.messaging.pod) +-- Tighter integration with OpenNMS and probably other systems +-- Several obscurity levels instead of hidden=yes/no + + +(C) 2002-2004, Stanislav Sinyagin + +$Id: TODO,v 1.1 2010-12-27 00:03:35 ivan Exp $ + +========================================================================== + +CC: rrfw-devel@lists.sourceforge.net, "Shawn Ferry" +From: "Shawn Ferry" +Subject: Re: [rrfw-devel] health check +Date: Mon, 15 Dec 2003 10:08:35 -0500 +To: "Stanislav Sinyagin" + +On Dec 15, 2003, at 9:56 AM, Stanislav Sinyagin wrote: + +> 'Morning Shawn, +> +> --- Shawn Ferry wrote: +>>> It might be also that this installation uses old version of +>>> RRFW::Collector::SNMP, +>>> or some buggy version of Net::SNMP. +>> +>> Something like that...When I installed 1.5d I did not stop and +>> restart the collector. It is much happier now. +>> +>> Can you check at each initialization that the versions of all +>> the supporting files is up to date? or maybe stash the modify time +>> of files that are loaded and check. +>> +>> Not an issue just a thought to try and prevent +>> other people from having the same silly problem. +> +> good idea. But I can check the files on disk only, it's not possible +> (not easy) to check if the running process is up to date. +> +> bin/configinfo already prints some versions information. +> +> Let's say, an utility called "bin/checkfiles", would do the following: +> +> -- for files that are simply copied by make install: verify md5 sum +> against that in distribution +> +> -- for files that are modified by make install: +> verify md5 sum against that calculated during make install +> +> -- optionally store and verify md5 sums of user files in +> share/rrfw/discovery and share/rrfw/xmlconfig, as well as +> *-siteconfig.pl +> +> Does someone know if there's already something alike in other software? + +Similar functionality exists in cfengine, but I don't think it is +applicable in this case. +Also tripwire. + +I am not so worried about knowing if the loaded version is up to date +based on a +stored version string. Although that was my original thought. + +I was thinking that the functionality of the "checkfiles" utility could +just be as you +suggest an md5 sum. Also, that md5 sum could be stored at +initialization for the libraries +used in any long running process. The next initialization after a +compile could verify +that the on disk sums have not changed. Possibly to reload, alert or +something. + +Shawn + +========================================================================== + + diff --git a/torrus/aclocal.m4 b/torrus/aclocal.m4 new file mode 100644 index 000000000..7a634b531 --- /dev/null +++ b/torrus/aclocal.m4 @@ -0,0 +1,574 @@ +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.9.6])]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 7 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/torrus/bin/Makefile.am b/torrus/bin/Makefile.am new file mode 100644 index 000000000..b6abf740d --- /dev/null +++ b/torrus/bin/Makefile.am @@ -0,0 +1,177 @@ + +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.am,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin +# + +SUBST = @abs_top_builddir@/setup_tools/substvars.sh + +pkgbindir = @pkgbindir@ +pkgbin_SCRIPTS = \ + acledit \ + action_notify \ + action_printemail \ + action_snmptrap \ + action_snmpv1trap \ + bdbinfo \ + buildsearchdb \ + cleanup \ + clearcache \ + collector \ + compilexml \ + configinfo \ + configsnapshot \ + devdiscover \ + flushmonitors \ + genddx \ + genlist \ + genreport \ + install_plugin \ + monitor \ + nodeid \ + rrddir2xml \ + schedulerinfo \ + snmpfailures \ + srvderive \ + torrus.fcgi \ + ttproclist + +wrapperdir = @wrapperdir@ +wrapper_SCRIPTS = \ + torrus + +CLEANFILES = $(pkgbin_SCRIPTS) $(wrapper_SCRIPTS) + +EXTRA_DIST = \ + acledit.in \ + action_notify.in \ + action_printemail.in \ + action_snmptrap.in \ + action_snmpv1trap.in \ + bdbinfo.in \ + buildsearchdb.in \ + clearcache.in \ + cleanup.in \ + collector.in \ + compilexml.in \ + configinfo.in \ + configsnapshot.in \ + devdiscover.in \ + flushmonitors.in \ + genddx.in \ + genlist.in \ + genreport.in \ + install_plugin.in \ + monitor.in \ + nodeid.in \ + rrddir2xml.in \ + schedulerinfo.in \ + snmpfailures.in \ + srvderive.in \ + torrus.fcgi.in \ + torrus.in \ + ttproclist.in + + +# Result of: +# ls -1 | egrep '^[a-z][^.]+$' | \ +# awk '{printf "%s: %s.in\n\t$(SUBST) %s.in > %s\n\n", $1, $1, $1, $1}' + +acledit: acledit.in + $(SUBST) acledit.in > acledit + +action_printemail: action_printemail.in + $(SUBST) action_printemail.in > action_printemail + +action_notify: action_notify.in + $(SUBST) action_notify.in > action_notify + +action_snmptrap: action_snmptrap.in + $(SUBST) action_snmptrap.in > action_snmptrap + +action_snmpv1trap: action_snmpv1trap.in + $(SUBST) action_snmpv1trap.in > action_snmpv1trap + +buildsearchdb: buildsearchdb.in + $(SUBST) buildsearchdb.in > buildsearchdb + +bdbinfo: bdbinfo.in + $(SUBST) bdbinfo.in > bdbinfo + +cleanup: cleanup.in + $(SUBST) cleanup.in > cleanup + +clearcache: clearcache.in + $(SUBST) clearcache.in > clearcache + +collector: collector.in + $(SUBST) collector.in > collector + +compilexml: compilexml.in + $(SUBST) compilexml.in > compilexml + +configinfo: configinfo.in + $(SUBST) configinfo.in > configinfo + +configsnapshot: configsnapshot.in + $(SUBST) configsnapshot.in > configsnapshot + +devdiscover: devdiscover.in + $(SUBST) devdiscover.in > devdiscover + +flushmonitors: flushmonitors.in + $(SUBST) flushmonitors.in > flushmonitors + +genddx: genddx.in + $(SUBST) genddx.in > genddx + +genlist: genlist.in + $(SUBST) genlist.in > genlist + +genreport: genreport.in + $(SUBST) genreport.in > genreport + +install_plugin: install_plugin.in + $(SUBST) install_plugin.in > install_plugin + +monitor: monitor.in + $(SUBST) monitor.in > monitor + +nodeid: nodeid.in + $(SUBST) nodeid.in > nodeid + +rrddir2xml: rrddir2xml.in + $(SUBST) rrddir2xml.in > rrddir2xml + +schedulerinfo: schedulerinfo.in + $(SUBST) schedulerinfo.in > schedulerinfo + +snmpfailures: snmpfailures.in + $(SUBST) snmpfailures.in > snmpfailures + +srvderive: srvderive.in + $(SUBST) srvderive.in > srvderive + +torrus: torrus.in + $(SUBST) torrus.in > torrus + +torrus.fcgi: torrus.fcgi.in + $(SUBST) torrus.fcgi.in > torrus.fcgi + +ttproclist: ttproclist.in + $(SUBST) ttproclist.in > ttproclist diff --git a/torrus/bin/Makefile.in b/torrus/bin/Makefile.in new file mode 100644 index 000000000..fb4aa2bfb --- /dev/null +++ b/torrus/bin/Makefile.in @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin +# + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = bin +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(pkgbindir)" "$(DESTDIR)$(wrapperdir)" +pkgbinSCRIPT_INSTALL = $(INSTALL_SCRIPT) +wrapperSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(pkgbin_SCRIPTS) $(wrapper_SCRIPTS) +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +FIND = @FIND@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KILL = @KILL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERLINC = @PERLINC@ +POD2MAN = @POD2MAN@ +POD2MAN_PRESENT_FALSE = @POD2MAN_PRESENT_FALSE@ +POD2MAN_PRESENT_TRUE = @POD2MAN_PRESENT_TRUE@ +POD2TEXT = @POD2TEXT@ +POD2TEXT_PRESENT_FALSE = @POD2TEXT_PRESENT_FALSE@ +POD2TEXT_PRESENT_TRUE = @POD2TEXT_PRESENT_TRUE@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLEEP = @SLEEP@ +STRIP = @STRIP@ +SU = @SU@ +VERSION = @VERSION@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +cachedir = @cachedir@ +cfgdefdir = @cfgdefdir@ +datadir = @datadir@ +dbhome = @dbhome@ +defrrddir = @defrrddir@ +distxmldir = @distxmldir@ +enable_pkgonly = @enable_pkgonly@ +enable_varperm = @enable_varperm@ +exec_prefix = @exec_prefix@ +exmpdir = @exmpdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mansec_misc = @mansec_misc@ +mansec_usercmd = @mansec_usercmd@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +perlithreads = @perlithreads@ +perllibdir = @perllibdir@ +perllibdirs = @perllibdirs@ +piddir = @piddir@ +pkgbindir = @pkgbindir@ +pkgdocdir = @pkgdocdir@ +pkghome = @pkghome@ +plugdevdisccfgdir = @plugdevdisccfgdir@ +pluginsdir = @pluginsdir@ +plugtorruscfgdir = @plugtorruscfgdir@ +plugwrapperdir = @plugwrapperdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +reportsdir = @reportsdir@ +sbindir = @sbindir@ +scriptsdir = @scriptsdir@ +seslockdir = @seslockdir@ +sesstordir = @sesstordir@ +sharedstatedir = @sharedstatedir@ +siteconfdir = @siteconfdir@ +sitedir = @sitedir@ +sitexmldir = @sitexmldir@ +supdir = @supdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +tmpldir = @tmpldir@ +tmpluserdir = @tmpluserdir@ +torrus_user = @torrus_user@ +var_group = @var_group@ +var_mode = @var_mode@ +var_user = @var_user@ +varprefix = @varprefix@ +webplaindir = @webplaindir@ +webscriptsdir = @webscriptsdir@ +wrapperdir = @wrapperdir@ +SUBST = @abs_top_builddir@/setup_tools/substvars.sh +pkgbin_SCRIPTS = \ + acledit \ + action_notify \ + action_printemail \ + action_snmptrap \ + action_snmpv1trap \ + bdbinfo \ + buildsearchdb \ + cleanup \ + clearcache \ + collector \ + compilexml \ + configinfo \ + configsnapshot \ + devdiscover \ + flushmonitors \ + genddx \ + genlist \ + genreport \ + install_plugin \ + monitor \ + nodeid \ + rrddir2xml \ + schedulerinfo \ + snmpfailures \ + srvderive \ + torrus.fcgi \ + ttproclist + +wrapper_SCRIPTS = \ + torrus + +CLEANFILES = $(pkgbin_SCRIPTS) $(wrapper_SCRIPTS) +EXTRA_DIST = \ + acledit.in \ + action_notify.in \ + action_printemail.in \ + action_snmptrap.in \ + action_snmpv1trap.in \ + bdbinfo.in \ + buildsearchdb.in \ + clearcache.in \ + cleanup.in \ + collector.in \ + compilexml.in \ + configinfo.in \ + configsnapshot.in \ + devdiscover.in \ + flushmonitors.in \ + genddx.in \ + genlist.in \ + genreport.in \ + install_plugin.in \ + monitor.in \ + nodeid.in \ + rrddir2xml.in \ + schedulerinfo.in \ + snmpfailures.in \ + srvderive.in \ + torrus.fcgi.in \ + torrus.in \ + ttproclist.in + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu bin/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-pkgbinSCRIPTS: $(pkgbin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(pkgbindir)" || $(mkdir_p) "$(DESTDIR)$(pkgbindir)" + @list='$(pkgbin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(pkgbinSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgbindir)/$$f'"; \ + $(pkgbinSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgbindir)/$$f"; \ + else :; fi; \ + done + +uninstall-pkgbinSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(pkgbin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(pkgbindir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgbindir)/$$f"; \ + done +install-wrapperSCRIPTS: $(wrapper_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(wrapperdir)" || $(mkdir_p) "$(DESTDIR)$(wrapperdir)" + @list='$(wrapper_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(wrapperSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(wrapperdir)/$$f'"; \ + $(wrapperSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(wrapperdir)/$$f"; \ + else :; fi; \ + done + +uninstall-wrapperSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(wrapper_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(wrapperdir)/$$f'"; \ + rm -f "$(DESTDIR)$(wrapperdir)/$$f"; \ + done +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(pkgbindir)" "$(DESTDIR)$(wrapperdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgbinSCRIPTS install-wrapperSCRIPTS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-pkgbinSCRIPTS \ + uninstall-wrapperSCRIPTS + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-pkgbinSCRIPTS install-strip install-wrapperSCRIPTS \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ + uninstall-pkgbinSCRIPTS uninstall-wrapperSCRIPTS + + +# Result of: +# ls -1 | egrep '^[a-z][^.]+$' | \ +# awk '{printf "%s: %s.in\n\t$(SUBST) %s.in > %s\n\n", $1, $1, $1, $1}' + +acledit: acledit.in + $(SUBST) acledit.in > acledit + +action_printemail: action_printemail.in + $(SUBST) action_printemail.in > action_printemail + +action_notify: action_notify.in + $(SUBST) action_notify.in > action_notify + +action_snmptrap: action_snmptrap.in + $(SUBST) action_snmptrap.in > action_snmptrap + +action_snmpv1trap: action_snmpv1trap.in + $(SUBST) action_snmpv1trap.in > action_snmpv1trap + +buildsearchdb: buildsearchdb.in + $(SUBST) buildsearchdb.in > buildsearchdb + +bdbinfo: bdbinfo.in + $(SUBST) bdbinfo.in > bdbinfo + +cleanup: cleanup.in + $(SUBST) cleanup.in > cleanup + +clearcache: clearcache.in + $(SUBST) clearcache.in > clearcache + +collector: collector.in + $(SUBST) collector.in > collector + +compilexml: compilexml.in + $(SUBST) compilexml.in > compilexml + +configinfo: configinfo.in + $(SUBST) configinfo.in > configinfo + +configsnapshot: configsnapshot.in + $(SUBST) configsnapshot.in > configsnapshot + +devdiscover: devdiscover.in + $(SUBST) devdiscover.in > devdiscover + +flushmonitors: flushmonitors.in + $(SUBST) flushmonitors.in > flushmonitors + +genddx: genddx.in + $(SUBST) genddx.in > genddx + +genlist: genlist.in + $(SUBST) genlist.in > genlist + +genreport: genreport.in + $(SUBST) genreport.in > genreport + +install_plugin: install_plugin.in + $(SUBST) install_plugin.in > install_plugin + +monitor: monitor.in + $(SUBST) monitor.in > monitor + +nodeid: nodeid.in + $(SUBST) nodeid.in > nodeid + +rrddir2xml: rrddir2xml.in + $(SUBST) rrddir2xml.in > rrddir2xml + +schedulerinfo: schedulerinfo.in + $(SUBST) schedulerinfo.in > schedulerinfo + +snmpfailures: snmpfailures.in + $(SUBST) snmpfailures.in > snmpfailures + +srvderive: srvderive.in + $(SUBST) srvderive.in > srvderive + +torrus: torrus.in + $(SUBST) torrus.in > torrus + +torrus.fcgi: torrus.fcgi.in + $(SUBST) torrus.fcgi.in > torrus.fcgi + +ttproclist: ttproclist.in + $(SUBST) ttproclist.in > ttproclist +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/torrus/bin/acledit.in b/torrus/bin/acledit.in new file mode 100644 index 000000000..725d3b5eb --- /dev/null +++ b/torrus/bin/acledit.in @@ -0,0 +1,432 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: acledit.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; + +use Torrus::Log; +use Torrus::ACL::Edit; +use Torrus::SiteConfig; + +exit(1) if not Torrus::SiteConfig::verify(); + +our %knownPrivileges = + ( 'DisplayTree' => 'tree', + 'DisplayAdmInfo' => 'tree', + 'DisplayReports' => 'tree', + 'GlobalSearch' => 'global' ); + +our @addgroups; +our @delgroups; +our @modgroups; + +our @permitprivs; +our @denyprivs; +our @forobjects; + +our $adduser; +our $addhost; +our $deluser; +our $moduser; +our @addtogroups; +our @delfromgroups; +our $password; +our $host_password; +our $commonname; +our $exportfile; +our $exporttemplate = "aclexport.xml"; +our $importfile; +our $clearconf; + +our @showgroups; +our @showusers; +our $listall; + +our $force; +our $debug; +our $verbose; +our $help_needed; + +my $ok = GetOptions ('addgroup=s' => \@addgroups, + 'delgroup=s' => \@delgroups, + 'modgroup=s' => \@modgroups, + 'permit=s' => \@permitprivs, + 'deny=s' => \@denyprivs, + 'for=s' => \@forobjects, + 'adduser=s' => \$adduser, + 'addhost=s' => \$addhost, + 'deluser=s' => \$deluser, + 'moduser=s' => \$moduser, + 'addtogroup=s' => \@addtogroups, + 'delfromgroup=s' => \@delfromgroups, + 'password=s' => \$password, + 'hostpassword=s' => \$host_password, + 'cn=s' => \$commonname, + 'export=s' => \$exportfile, + 'template=s' => \$exporttemplate, + 'import=s' => \$importfile, + 'clear' => \$clearconf, + 'showgroup=s' => \@showgroups, + 'showuser=s' => \@showusers, + 'list' => \$listall, + 'force' => \$force, + 'debug' => \$debug, + 'verbose' => \$verbose, + 'help' => \$help_needed); + +if( not $ok or $help_needed or scalar(@ARGV) > 0 or + ( @addgroups ? 1:0 ) + ( @delgroups ? 1:0 ) + ( @modgroups ? 1:0 ) > 1 or + ( ( @permitprivs or @denyprivs ) and not @forobjects ) or + ( $adduser ? 1:0 ) + ( $deluser ? 1:0 ) + ( $moduser ? 1:0 ) > 1 or + ( ( @addtogroups or @delfromgroups or + length($password) > 0 or + length($host_password) > 0 or + length($commonname) > 0 ) and + ( length($adduser) + length($addhost) + length($moduser) == 0 ) ) ) +{ + print STDERR "Usage: $0 [options...]\n", + "Group Options:\n", + " --addgroup=GROUP add group\n", + " --delgroup=GROUP delete group\n", + " --modgroup=GROUP modify group\n", + " --permit=PRIVILEGE add privilege to group(s)\n", + " --deny=PRIVILEGE revoke privilege from group(s)\n", + " --for=TREE subject of privilege or '*'\n", + " --force change privilege for non-existent object\n", + " --showgroup=GROUP display group details\n", + "User Options:\n", + " --adduser=UID add new user\n", + " --deluser=UID delete user\n", + " --moduser=UID modify user\n", + " --addtogroup=GROUP add user to group(s)\n", + " --delfromgroup=GROUP delete user from group(s)\n", + " --password=PASSWORD set the user password\n", + " --hostpassword=PASSWORD set the host password (UID must be a host)\n", + " --cn=\"John Smith\" set the user common name\n", + " --showuser=USER display user details\n", + "General Options:\n", + " --export=FILE export ACL config to a file\n", + " --template=NAME [aclexport.xml] export template \n", + " --import=FILE import ACL config from a file\n", + " --clear delete ALL user and privileges configuration\n", + " --list list all users and groups they belong to\n", + " --debug set the log level to debug\n", + " --verbose set the log level to verbose\n", + " --help this help message\n\n", + "Privileges:\n", + " DisplayTree see the datasources for a tree\n", + " DisplayAdmInfo see the administrative info for a tree\n", + " DisplayReports see the administrative info for a tree\n", + " GlobalSearch search globally for '*'\n"; + exit 1; +} + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +# We set the signal handlers, but we actually don't react on +# signals, because the acledit is a fast utility +&Torrus::DB::setSafeSignalHandlers(); + +Verbose(sprintf("Torrus version %s", '@VERSION@')); + +my $aclEdit = new Torrus::ACL::Edit; + +if( $ok and $exportfile ) +{ + $ok = $aclEdit->exportACL( $exportfile, $exporttemplate ) ? $ok:0; +} + +if( $ok and $clearconf ) +{ + $ok = $aclEdit->clearConfig() ? $ok:0; +} + +if( @delgroups ) +{ + $ok = $aclEdit->deleteGroups( @delgroups ) ? $ok:0; +} + +if( @addgroups ) +{ + $ok = $aclEdit->addGroups( @addgroups ) ? $ok:0; +} + +if( @addgroups or @modgroups ) +{ + my $groups = [ @addgroups, @modgroups ]; + if( @permitprivs ) + { + $ok = setupPrivileges( $aclEdit, \@permitprivs, + $groups, \@forobjects, 1 ) ? $ok:0; + } + if( @denyprivs ) + { + $ok = setupPrivileges( $aclEdit, \@denyprivs, + $groups, \@forobjects, 0 ) ? $ok:0; + } +} + + +my $attrValues = {}; +my $uid; + +if( $commonname ) +{ + $attrValues->{'cn'} = $commonname; +} + +if( $adduser ) +{ + $uid = $adduser; + $ok = $aclEdit->addUser( $uid, $attrValues ) ? $ok:0; +} +elsif( $addhost ) +{ + $uid = $addhost; + $uid =~ s/\W/_/g; + $ok = $aclEdit->addUser( $uid, $attrValues ) ? $ok:0; +} + +elsif( $moduser ) +{ + $uid = $moduser; + if( scalar( keys %{$attrValues} ) ) + { + $ok = $aclEdit->setUserAttributes( $uid, $attrValues ) ? $ok:0; + } +} +elsif( $deluser ) +{ + $ok = $aclEdit->deleteUser( $deluser ) ? $ok:0; +} + +if( $uid ) +{ + if( $password ) + { + $ok = $aclEdit->setPassword( $uid, $password ) ? $ok:0; + } + elsif( $host_password ) + { + $ok = $aclEdit->setPassword( $uid, + $uid . '//' . $host_password ) ? $ok:0; + } +} + +if( $uid and scalar( @addtogroups ) ) +{ + $ok = $aclEdit->addUserToGroups( $uid, @addtogroups ) ? $ok:0; +} + +if( $uid and scalar( @delfromgroups ) ) +{ + $ok = $aclEdit->delUserFromGroups( $uid, @delfromgroups ) ? $ok:0; +} + +if( $ok and $importfile ) +{ + $ok = $aclEdit->importACL( $importfile ) ? $ok:0; +} + +if( $listall ) +{ + @showusers = $aclEdit->listUsers(); + @showgroups = $aclEdit->listGroups(); +} + +my %showGroupsHash; + +if( @showgroups ) +{ + foreach my $group ( @showgroups ) + { + if( $aclEdit->groupExists( $group ) ) + { + $showGroupsHash{$group} = 1; + } + else + { + Error('No such group: ' . $group); $ok = 0; + } + } +} + +if( @showusers ) +{ + foreach my $uid ( sort @showusers ) + { + if( $aclEdit->userExists( $uid ) ) + { + printf("User: %s (%s)\n", + $uid, $aclEdit->userAttribute( $uid, 'cn' ) ); + foreach my $group ( sort $aclEdit->memberOf( $uid ) ) + { + printf("Member of: %s\n", $group); + $showGroupsHash{$group} = 1; + } + + if( $verbose or $debug ) + { + printf("Modified: %s\n", + $aclEdit->userAttribute( $uid, 'modified' ) ); + } + printf ("\n"); + } + else + { + Error('No such user: ' . $uid); $ok = 0; + } + } +} + +if( %showGroupsHash ) +{ + foreach my $group ( sort keys %showGroupsHash ) + { + printf("Group: %s\n", $group); + + my $privs = $aclEdit->listPrivileges( $group ); + foreach my $object ( sort keys %{$privs} ) + { + foreach my $priv ( sort keys %{$privs->{$object}} ) + { + printf("Has privilege \"%s\" for %s \"%s\"\n", $priv, + $knownPrivileges{$priv}, $object); + } + } + + foreach my $uid ( sort @{$aclEdit->listGroupMembers( $group )} ) + { + printf("Member: %s\n", $uid); + } + + if( $verbose or $debug ) + { + printf("Modified: %s\n", + $aclEdit->groupAttribute( $group, 'modified' ) ); + } + + printf ("\n"); + } +} + +if( not $ok ) +{ + Warn('acledit exited with errors'); +} +exit( $ok ? 0:1 ); + +sub setupPrivileges +{ + my $aclEdtit = shift; + my $privs = shift; + my $groups = shift; + my $objects = shift; + my $permit = shift; + + my $ok = 1; + foreach my $priv ( @{$privs} ) + { + if( defined( $knownPrivileges{$priv} ) ) + { + if( $knownPrivileges{$priv} eq 'tree' ) + { + foreach my $obj ( @{$objects} ) + { + if( $obj eq '*' or + Torrus::SiteConfig::treeExists( $obj ) or $force ) + { + foreach my $group ( @{$groups} ) + { + if( $permit ) + { + $ok = $aclEdit-> + setPrivilege( $group, $obj, + $priv ) ? $ok:0; + } + else + { + $ok = $aclEdit-> + clearPrivilege( $group, $obj, + $priv ) ? $ok:0; + } + } + } + else + { + Error('No such tree: ' . $obj); $ok = 0; + } + } + } + elsif( $knownPrivileges{$priv} eq 'global' ) + { + foreach my $obj ( @{$objects} ) + { + if( $obj ne '*' ) + { + Error("Privilege GlobalSearch should be for '*'"); + $ok = 0; + } + } + + if( $ok ) + { + foreach my $group ( @{$groups} ) + { + if( $permit ) + { + $ok = $aclEdit-> + setPrivilege( $group, '*', $priv ) ? $ok:0; + } + else + { + $ok = $aclEdit-> + clearPrivilege( $group, '*', $priv ) ? $ok:0; + } + } + } + } + } + else + { + Error('Unknown privilege name: ' . $priv); $ok = 0; + } + } + return $ok; +} + + + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/action_notify.in b/torrus/bin/action_notify.in new file mode 100644 index 000000000..a01b5486a --- /dev/null +++ b/torrus/bin/action_notify.in @@ -0,0 +1,96 @@ +#!@PERL@ +# Copyright (C) 2006 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: action_notify.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +# We need this for $Torrus::Global::templateDirs +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Date::Format; + +use Torrus::Log; + +require '@notify_siteconfig_pl@'; + +if( not $ENV{'TORRUS_TREE'} ) +{ + print STDERR ("Torrus environment variables missing. This program ", + "must be run from Torrus Monitor\n"); + exit 1; +} + +our $now = time(); +our $nowHour = time2str('%H', $now); +our $nowWeekday = time2str('%w', $now); + +my $severity = $ENV{'TORRUS_SEVERITY'}; +my $ok = 1; + +foreach my $policy ( keys %Torrus::Notify::policies ) +{ + if( &{$Torrus::Notify::policies{$policy}{'match'}} ) + { + Debug('Notification policy matched: ' . $policy); + + my @targets = (); + my $levels = $Torrus::Notify::policies{$policy}{'severity'}; + + foreach my $level ( sort {$a <=>$b} keys %{$levels} ) + { + if( $severity >= $level ) + { + push( @targets, @{$levels->{$level}} ); + } + } + + if( isDebug() ) + { + Debug('Selected notification targets: ' . join(' ', @targets)); + } + + foreach my $target ( @targets ) + { + my($protocol, $arg) = split(':', $target); + if( defined( $Torrus::Notify::programs{$protocol} ) ) + { + $ENV{'ARG1'} = $arg; + my $status = system( $Torrus::Notify::programs{$protocol} ); + delete $ENV{'ARG1'}; + + if( $status != 0 ) + { + Error('The command "' . + $Torrus::Notify::programs{$protocol} . + '" returned error code ' . $status); + $ok = 0; + } + } + } + } +} + +exit( $ok ? 0:1 ); + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/action_printemail.in b/torrus/bin/action_printemail.in new file mode 100644 index 000000000..416147b85 --- /dev/null +++ b/torrus/bin/action_printemail.in @@ -0,0 +1,83 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: action_printemail.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + +# We need this for $Torrus::Global::templateDirs +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Template; +use Getopt::Long; + +require '@email_siteconfig_pl@'; + +if( not $ENV{'TORRUS_TREE'} ) +{ + print STDERR ("Torrus environment variables missing. This program ", + "must be run from Torrus Monitor\n"); + exit 1; +} + + +my $ok = GetOptions( 'url=s' => \$Torrus::Email::url, + 'template=s' => \$Torrus::Email::template ); + +if( not $ok ) +{ + print STDERR ("Error parsing options\n"); + exit 1; +} + +my $tt = new Template(INCLUDE_PATH => $Torrus::Global::templateDirs); + +my $vars = +{ + 'tree' => $ENV{'TORRUS_TREE'}, + 'token' => $ENV{'TORRUS_TOKEN'}, + 'path' => $ENV{'TORRUS_NODEPATH'}, + 'nickname' => $ENV{'TORRUS_NICKNAME'}, + 'url' => $Torrus::Email::url . '/' . + $ENV{'TORRUS_TREE'} . '?token='.$ENV{'TORRUS_TOKEN'}, + 'ncomment' => $ENV{'TORRUS_NCOMMENT'}, + 'npcomment' => $ENV{'TORRUS_NPCOMMENT'}, + 'event' => $ENV{'TORRUS_EVENT'}, + 'monitor' => $ENV{'TORRUS_MONITOR'}, + 'mcomment' => $ENV{'TORRUS_MCOMMENT'}, + 'severity' => $ENV{'TORRUS_SEVERITY'}, + 'timestamp' => scalar(localtime($ENV{'TORRUS_TSTAMP'})), + 'value' => $ENV{'TORRUS_VALUE'}, + 'dispvalue' => $ENV{'TORRUS_DISPLAY_VALUE'}, + 'env' => sub { return $ENV{$_[0]} } +}; + +my $result = $tt->process($Torrus::Email::template, $vars); + +if( not $result ) +{ + print STDERR "Error while processing template: ".$tt->error()."\n"; +} + +exit( $result ? 0:1 ); + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/action_snmptrap.in b/torrus/bin/action_snmptrap.in new file mode 100644 index 000000000..c2e9c20bb --- /dev/null +++ b/torrus/bin/action_snmptrap.in @@ -0,0 +1,183 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: action_snmptrap.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +# SNMP v2c trap +# See Torrus-MIB.txt for reference + +use strict; +use Net::SNMP qw(:ALL); +use Getopt::Long; + +require '@snmptrap_siteconfig_pl@'; + +if( not $ENV{'TORRUS_TOKEN'} ) +{ + print STDERR ("Torrus environment variables missing. This program ", + "must be run from Torrus Monitor\n"); + exit 1; +} + +my @hosts; +my $severity; + +my $ok = GetOptions( 'host=s' => \@hosts, + 'community=s' => \$Torrus::Snmptrap::community, + 'port=i' => \$Torrus::Snmptrap::port, + 'severity=i' => \$severity ); + +if( not $ok ) +{ + print STDERR ("Error parsing options\n"); + exit 1; +} + +if( scalar(@hosts) > 0 ) +{ + @Torrus::Snmptrap::hosts = @hosts; +} + +my $oid_prefix = '.1.3.6.1.4.1.14697.1.1.1'; + +my %event_type = ( 'set' => 1, + 'repeat' => 2, + 'clear' => 3, + 'forget' => 4 + ); + +my @varbindlist = ( $oid_prefix . '.1', + INTEGER32, 1, + + $oid_prefix . '.2', + OCTET_STRING, $ENV{'TORRUS_TOKEN'}, + + $oid_prefix . '.3', + OCTET_STRING, $ENV{'TORRUS_MONITOR'}, + + $oid_prefix . '.4', + INTEGER, $event_type{$ENV{'TORRUS_EVENT'}}, + + $oid_prefix . '.5', + OCTET_STRING, $ENV{'TORRUS_NODEPATH'}, + + $oid_prefix . '.6', + OCTET_STRING, snmp_dateandtime( $ENV{'TORRUS_TSTAMP'} ), + + $oid_prefix . '.7', + OCTET_STRING, $ENV{'TORRUS_TREE'}, + + $oid_prefix . '.9', + OCTET_STRING, $ENV{'TORRUS_MCOMMENT'} + ); + +if( defined( $severity ) ) +{ + push( @varbindlist, + $oid_prefix . '.8', + INTEGER32, $severity ); +} + + +foreach my $host ( @Torrus::Snmptrap::hosts ) +{ + my( $session, $error ) = + Net::SNMP->session( -hostname => $host, + -community => $Torrus::Snmptrap::community, + -port => $Torrus::Snmptrap::port, + -version => 2 + ); + + if( not defined($session) ) + { + printf STDERR ("Error opening SNMP trap session: %s.\n", $error); + exit 1; + } + + + my $result = + $session->snmpv2_trap( -varbindlist => \@varbindlist ); + + if( not $result ) + { + printf STDERR ("Error sending SNMP trap: %s.\n", $session->error()); + } + + $session->close(); +} + +# Converts UNIX time to DateAndTime from SNMPv2-TC +# Currently timezone is not handled. + +# DateAndTime ::= TEXTUAL-CONVENTION +# DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" +# STATUS current +# DESCRIPTION +# "A date-time specification. +# +# field octets contents range +# ----- ------ -------- ----- +# 1 1-2 year* 0..65536 +# 2 3 month 1..12 +# 3 4 day 1..31 +# 4 5 hour 0..23 +# 5 6 minutes 0..59 +# 6 7 seconds 0..60 +# (use 60 for leap-second) +# 7 8 deci-seconds 0..9 +# 8 9 direction from UTC '+' / '-' +# 9 10 hours from UTC* 0..13 +# 10 11 minutes from UTC 0..59 +# +# * Notes: +# - the value of year is in network-byte order +# - daylight saving time in New Zealand is +13 +# +# For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be +# displayed as: +# +# 1992-5-26,13:30:15.0,-4:0 +# +# Note that if only local time is known, then timezone +# information (fields 8-10) is not present." +# SYNTAX OCTET STRING (SIZE (8 | 11)) + +sub snmp_dateandtime +{ + my $thetime = shift; + + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime( $thetime ); + + my $result = pack('nC6', + $year + 1900, + $mon + 1, + $mday, + $hour, + $min, + $sec, + 0); + return $result; +} + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/action_snmpv1trap.in b/torrus/bin/action_snmpv1trap.in new file mode 100644 index 000000000..02ec14a31 --- /dev/null +++ b/torrus/bin/action_snmpv1trap.in @@ -0,0 +1,134 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: action_snmpv1trap.in,v 1.1 2010-12-27 00:04:02 ivan Exp $ +# Stanislav Sinyagin + +# Obsoleted and not used SNMP v1 trap script. +# Version 2c is preferred one. + + +use strict; +use Net::SNMP qw(:ALL); +use Getopt::Long; + +require '@snmptrap_siteconfig_pl@'; + +# SNMP Enterprise. Needed for SNMP v1 trap. +# See http://www.iana.org/assignments/enterprise-numbers for reference +$Torrus::Snmptrap::enterprise = '1.3.6.1.4.1.14697.1.1.1'; + + +if( not $ENV{'TORRUS_TOKEN'} ) +{ + print STDERR ("Torrus environment variables missing. This program ", + "must be run from Torrus Monitor\n"); + exit 1; +} + +my @hosts; +my $severity; + +my $ok = GetOptions( 'host=s' => \@hosts, + 'community=s' => \$Torrus::Snmptrap::community, + 'port=i' => \$Torrus::Snmptrap::port, + 'enterprise' => \$Torrus::Snmptrap::enterprise, + 'severity=i' => \$severity ); + +if( not $ok ) +{ + print STDERR ("Error parsing options\n"); + exit 1; +} + +if( scalar(@hosts) > 0 ) +{ + @Torrus::Snmptrap::hosts = @hosts; +} + +my %specifictrap = ( 'set' => 1, + 'repeat' => 2, + 'clear' => 3, + 'forget' => 4 + ); + +my @varbindlist = ( $Torrus::Snmptrap::enterprise . '.2', + OCTET_STRING, $ENV{'TORRUS_TOKEN'}, + + $Torrus::Snmptrap::enterprise . '.5', + OCTET_STRING, $ENV{'TORRUS_NODEPATH'}, + + $Torrus::Snmptrap::enterprise . '.3', + OCTET_STRING, $ENV{'TORRUS_MONITOR'}, + + $Torrus::Snmptrap::enterprise . '.4', + OCTET_STRING, $ENV{'TORRUS_EVENT'}, + + $Torrus::Snmptrap::enterprise . '.6', + OCTET_STRING, scalar(localtime($ENV{'TORRUS_TSTAMP'})), + + $Torrus::Snmptrap::enterprise . '.7', + OCTET_STRING, $ENV{'TORRUS_TREE'}, + + $Torrus::Snmptrap::enterprise . '.9', + OCTET_STRING, $ENV{'TORRUS_MCOMMENT'} + ); + +if( defined( $severity ) ) +{ + push( @varbindlist, + $Torrus::Snmptrap::enterprise . '.8', + INTEGER32, $severity ); +} + +foreach my $host ( @Torrus::Snmptrap::hosts ) +{ + my( $session, $error ) = + Net::SNMP->session( -hostname => $host, + -community => $Torrus::Snmptrap::community, + -port => $Torrus::Snmptrap::port + ); + + if( not defined($session) ) + { + printf STDERR ("Error opening SNMP trap session: %s.\n", $error); + exit 1; + } + + + my $result = + $session->trap( -enterprise => $Torrus::Snmptrap::enterprise, + -generictrap => ENTERPRISE_SPECIFIC, + -specifictrap => $specifictrap{$ENV{'TORRUS_EVENT'}}, + -timestamp => $ENV{'TORRUS_UPTIME'} * 100, + -varbindlist => \@varbindlist + ); + + if( not $result ) + { + printf STDERR ("Error sending SNMP trap: %s.\n", $session->error()); + } + + $session->close(); +} + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/bdbinfo.in b/torrus/bin/bdbinfo.in new file mode 100644 index 000000000..c5628acbf --- /dev/null +++ b/torrus/bin/bdbinfo.in @@ -0,0 +1,38 @@ +#!@PERL@ -w +# Copyright (C) 2002-2008 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: bdbinfo.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use BerkeleyDB; + + +printf("MAJOR: %d\n", DB_VERSION_MAJOR); +printf("MINOR: %d\n", DB_VERSION_MINOR); +printf("PATCH: %d\n", DB_VERSION_PATCH); +printf("STRING: %s\n", DB_VERSION_STRING); + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/buildsearchdb.in b/torrus/bin/buildsearchdb.in new file mode 100644 index 000000000..19c1ea8ff --- /dev/null +++ b/torrus/bin/buildsearchdb.in @@ -0,0 +1,200 @@ +#!@PERL@ -w +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: buildsearchdb.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; + +use Torrus::ConfigTree; +use Torrus::Search; +use Torrus::SiteConfig; +use Torrus::Log; + +exit(1) if not Torrus::SiteConfig::verify(); + +my @trees; +my $build_global; +my $all_trees; + +my $verbose; +my $help_needed; + +my $ok = GetOptions ('tree=s' => \@trees, + 'all' => \$all_trees, + 'global' => \$build_global, + 'verbose' => \$verbose, + 'help' => \$help_needed); + +if( not $ok or not (scalar(@trees) or $all_trees or $build_global) or + $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME rebuild search DB for a tree\n", + " --all rebuild search DB for all trees\n", + " --global rebuild global search DB\n", + " --verbose print extra information\n", + " --help this help message\n"; + exit 1; +} + +if( $build_global ) +{ + $all_trees = 1; +} + +if( $all_trees ) +{ + @trees = Torrus::SiteConfig::listTreeNames(); +} + +if( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +&Torrus::DB::setSafeSignalHandlers(); + +Verbose(sprintf('Torrus version %s', '@VERSION@')); + +my $search = new Torrus::Search( -WriteAccess => 1 ); + +if( $build_global ) +{ + $search->openGlobal(); +} + +foreach my $tree ( @trees ) +{ + if( not Torrus::SiteConfig::treeExists( $tree ) ) + { + Error("Tree named \"" . $tree . "\" does not exist"); + exit(1); + } + + &Torrus::DB::checkInterrupted(); + + my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); + if( not defined($config_tree) ) + { + print("Configuration is not ready\n"); + exit(1); + } + + Verbose("Processing the tree: $tree"); + + $search->openTree( $tree ); + + walkSubtree( $config_tree, $search, $config_tree->token('/') ); + + $search->closeTree( $tree ); + $config_tree = undef; +} + +exit(0); + + +sub walkSubtree +{ + my $config_tree = shift; + my $search = shift; + my $ptoken = shift; + + my $tree = $config_tree->treeName(); + + foreach my $token ( $config_tree->getChildren( $ptoken ) ) + { + &Torrus::DB::checkInterrupted(); + + if( $config_tree->isSubtree( $token ) ) + { + walkSubtree( $config_tree, $search, $token ); + } + + my $isSearchable = + $config_tree->getNodeParam( $token, 'searchable', 1 ); + if( defined( $isSearchable ) and $isSearchable eq 'yes' ) + { + my $path = $config_tree->path( $token ); + + my $nodeName = $config_tree->nodeName( $path ); + splitAndStore( $tree, $nodeName, $path ); + + my $params = $config_tree->getParams( $token, 1 ); + while( my( $param, $value ) = each %{$params} ) + { + if( $config_tree->getParamProperty( $param, 'search' ) ) + { + splitAndStore( $tree, $value, $path, $param ); + } + } + } + } +} + + +sub splitAndStore +{ + my $tree = shift; + my $value = shift; + my $path = shift; + my $param = shift; + + if( length( $value ) > 0 ) + { + # split the value into words + my @words = split( /\W+/ms, $value ); + if( scalar( @words ) > 0 ) + { + foreach my $word ( @words ) + { + if( length( $word ) > 1 ) + { + $search->storeKeyword( $tree, $word, $path, $param ); + + # Split the word by underscores and minus + my @subwords = split( /_+/, $word ); + if( scalar( @subwords ) > 1 ) + { + foreach my $subword ( @subwords ) + { + if( length( $subword ) > 1 ) + { + $search->storeKeyword( $tree, + $subword, + $path, + $param ); + } + } + } + } + } + } + } +} + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/cleanup.in b/torrus/bin/cleanup.in new file mode 100644 index 000000000..bc4f69fba --- /dev/null +++ b/torrus/bin/cleanup.in @@ -0,0 +1,32 @@ +#!@SHELL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: cleanup.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin +# + +# How soon the sessions expire +EXPIRE=60 + +@FIND@ @sesstordir@ -type f -mtime +$EXPIRE -exec @RM@ '{}' ';' +@FIND@ @seslockdir@ -type f -mtime +$EXPIRE -exec @RM@ '{}' ';' + +# Local Variables: +# mode: shell-script +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/clearcache.in b/torrus/bin/clearcache.in new file mode 100644 index 000000000..a3c0365d9 --- /dev/null +++ b/torrus/bin/clearcache.in @@ -0,0 +1,40 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: clearcache.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use Torrus::Log; + +use Torrus::Renderer; + +&Torrus::DB::setSafeSignalHandlers(); + +my $renderer = new Torrus::Renderer; +$renderer->clearcache(); +undef $renderer; + +Info('Renderer cache cleared'); +exit 0; + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/collector.in b/torrus/bin/collector.in new file mode 100644 index 000000000..e682fadc8 --- /dev/null +++ b/torrus/bin/collector.in @@ -0,0 +1,205 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: collector.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Proc::Daemon; +use Getopt::Long; + +use Torrus::Log; +use Torrus::ConfigTree; +use Torrus::Collector; +use Torrus::SiteConfig; + +$| = 1; + +exit(1) if not Torrus::SiteConfig::verify(); + +my $tree; +my $instance; +my $nodaemon; +my $runonce; +my $runalways; +my $debug; +my $verbose; +my $help_needed; + +# Derive the process name from the command line +my $process_name = $0; +$process_name =~ s/^.*\/([^\/]+)$/$1/; +$process_name .= ' ' . join(' ', @ARGV); + +my $ok = GetOptions ('tree=s' => \$tree, + 'instance=i' => \$instance, + 'nodaemon' => \$nodaemon, + 'runonce' => \$runonce, + 'runalways' => \$runalways, + 'debug' => \$debug, + 'verbose' => \$verbose, + 'help' => \$help_needed); + +if( not $ok or not $tree or $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME tree name\n", + " --instance=N instance number for multiple collectors per tree\n", + " --nodaemon do not fork daemon and log to STDERR\n", + " --runonce run one time and exit. Implies --nodaemon\n", + " --runalways continue running if no collectors defined\n", + " --debug set the log level to debug\n", + " --verbose set the log level to info\n", + " --help this help message\n"; + exit 1; +} + +if( not Torrus::SiteConfig::mayRunCollector( $tree ) ) +{ + Error('Tree ' . $tree . ' is not configured to run collector'); + exit 1; +} + +my $nInstances = Torrus::SiteConfig::collectorInstances( $tree ); + +if( $nInstances > 1 and not defined( $instance ) ) +{ + Error('--instance option is missing'); + exit 1; +} + +if( not defined( $instance ) ) +{ + $instance = 0; +} + +if( $instance >= $nInstances ) +{ + Error('Invalid instance number. Allowed from 0 to ' . ($nInstances-1)); + exit 1; +} + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +my $logfile = + $Torrus::Global::logDir . '/collector.' . $tree . '_' . $instance . '.log'; +my $pidfile; + +my $rotateLogs = sub +{ + Info('Caught SIGHUP. Reopening log file'); + close( STDERR ); + open( STDERR, ">>$logfile" ); + $| = 1; +}; + +if( not $nodaemon and not $runonce ) +{ + my $pidfilename = + $Torrus::Global::pidDir . '/collector.' . + $tree . '_' . $instance . '.pid'; + + if( -r $pidfilename ) + { + Error("Another collector daemon is running, pid=", + `cat $pidfilename`); + exit 1; + } + + &Proc::Daemon::Init(); + umask 0017; # Proc::Daemon::Init sets the mask to all-writable + + $SIG{'HUP'} = $rotateLogs; + + # At this point, we cannot tell anyone if "open" fails + open(STDERR, ">>$logfile"); + + $pidfile = $pidfilename; + + if( open( PID, ">$pidfile" ) ) + { + printf PID ( "%d", $$ ); + close PID; + } + else + { + Error("Cannot open $pidfile for writing: $!"); + } +} + + +Torrus::Collector::initThreads(); + +&Torrus::DB::setSafeSignalHandlers(); + + +Info(sprintf("Torrus version %s", '@VERSION@')); +Info(sprintf("%s started for tree %s, instance #%d", $0, $tree, $instance)); +Debug(sprintf("Process ID %d", $$)); + +my %options = + ( + '-ProcessName' => $process_name, + '-Tree' => $tree, + '-Instance' => $instance + ); + +if( $runonce ) +{ + $options{'-RunOnce'} = 1; +} +if( $runalways ) +{ + $options{'-RunAlways'} = 1; +} + + +my $scheduler = new Torrus::CollectorScheduler( %options ); +$scheduler->run(); + +if( not $options{'-RunOnce'} ) +{ + Error("Collector process exited: nothing to collect"); + unlink $pidfile; +} + +exit; + + +END +{ + if( defined($pidfile) and -r $pidfile ) + { + unlink $pidfile; + } +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/compilexml.in b/torrus/bin/compilexml.in new file mode 100644 index 000000000..56bbada0a --- /dev/null +++ b/torrus/bin/compilexml.in @@ -0,0 +1,207 @@ +#!@PERL@ -w +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: compilexml.in,v 1.1 2010-12-27 00:04:00 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use Getopt::Long; +use strict; + +use Torrus::ConfigTree::XMLCompiler; +use Torrus::SiteConfig; +use Torrus::Log; + +exit(1) if not Torrus::SiteConfig::verify(); + +our @trees; +our $all_trees; +our $no_ds; +our $no_validation; +our $force; + +our $debug; +our $verbose; +our $help_needed; + +my $ok = GetOptions ('tree=s' => \@trees, + 'all' => \$all_trees, + 'nods' => \$no_ds, + 'noval' => \$no_validation, + 'force' => \$force, + 'debug' => \$debug, + 'verbose' => \$verbose, + 'help' => \$help_needed); + +if( not $ok or not (scalar(@trees) or $all_trees) or + $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME tree name(s) to compile\n", + " --all compile all trees\n", + " --nods compile non-datasource configuration only\n", + " --noval disable parameter validation\n", + " --force force the compiler even if anoother " . + "compiler process is probably running\n", + " --debug set the log level to debug\n", + " --verbose set the log level to info\n", + " --help this help message\n"; + exit 1; +} + +if( $all_trees ) +{ + @trees = Torrus::SiteConfig::listTreeNames(); +} + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + + +&Torrus::DB::setSafeSignalHandlers(); + +Verbose(sprintf('Torrus version %s', '@VERSION@')); + +our $global_ok = 1; + +foreach my $tree ( @trees ) +{ + if( not Torrus::SiteConfig::treeExists( $tree ) ) + { + Error("Tree named \"" . $tree . "\" does not exist"); + exit(1); + } + + &Torrus::DB::checkInterrupted(); + + Verbose("Compiling tree: $tree"); + + my $ok = 1; + my $compiler = + new Torrus::ConfigTree::XMLCompiler( -TreeName => $tree, + -NoDSRebuild => $no_ds, + -ForceWriter => $force ); + if( not defined( $compiler ) ) + { + Error('Cannot initialize compiler for tree ' . $tree . '. Exiting'); + Error('If you are sure there are no other compiler processes ' . + 'running, use the --force option'); + $global_ok = 0; + last; + } + + my @xmlFiles = @Torrus::Global::xmlAlwaysIncludeFirst; + push( @xmlFiles, Torrus::SiteConfig::listXmlFiles( $tree ) ); + push( @xmlFiles, @Torrus::Global::xmlAlwaysIncludeLast ); + + foreach my $xmlfile ( @xmlFiles ) + { + if( not $compiler->compile( $xmlfile ) ) + { + Error($xmlfile . ' compiled with errors'); $ok = 0; + } + } + + if( not $ok ) + { + Error("Errors found during XML compilation in the tree named \"" . + $tree . "\""); + $global_ok = 0; + last; + } + + Verbose('Data post-processing...'); + if( not $compiler->postProcess() ) + { + Error('Errors found during post-processing'); + $ok = 0; + } + + if( $no_validation ) + { + Verbose('Skipping data validation...'); + } + else + { + Verbose('Data validation...'); + if( not $compiler->validate() ) + { + Error('Errors found during validation process'); + $ok = 0; + } + } + + &Torrus::DB::checkInterrupted(); + + # Preserve the dynamic tokenset members + if( not $compiler->{'first_time_created'} ) + { + my $oldConfig = new Torrus::ConfigTree( -TreeName => $tree ); + if( defined( $oldConfig ) ) + { + foreach my $ts ( $oldConfig->getTsets() ) + { + if( $compiler->tsetExists( $ts ) ) + { + foreach my $member ( $oldConfig->tsetMembers( $ts ) ) + { + my $origin = $oldConfig->tsetMembers( $ts, $member ); + if( defined( $origin ) and $origin ne 'static' ) + { + my $path = $oldConfig->path($member); + if( $compiler->nodeExists( $path ) ) + { + my $token = $compiler->token( $path ); + $compiler->tsetAddMember + ( $ts, $token, $origin ); + Verbose('Preserved dynamic tokenset member: ' . + $path . ' in ' . $ts); + } + } + } + } + } + } + + undef $oldConfig; + } + + &Torrus::DB::checkInterrupted(); + + $compiler->finalize( $ok ); + undef $compiler; + &Torrus::DB::cleanupEnvironment(); + + $global_ok = $ok ? $global_ok:0; +} + +exit($global_ok ? 0:1); + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/configinfo.in b/torrus/bin/configinfo.in new file mode 100644 index 000000000..1b985f88c --- /dev/null +++ b/torrus/bin/configinfo.in @@ -0,0 +1,166 @@ +#!@PERL@ -w +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: configinfo.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use BerkeleyDB; + +use Torrus::ConfigTree; +use Torrus::TimeStamp; +use Torrus::SiteConfig; +use Torrus::Log; + +exit(1) if not Torrus::SiteConfig::verify(); + +&Torrus::DB::setSafeSignalHandlers(); + +Torrus::TimeStamp::init(); + +my @tree_names = Torrus::SiteConfig::listTreeNames(); + + +printf("Torrus version %s\n", '@VERSION@'); +printf("%s\n", DB_VERSION_STRING); +printf("BerkeleyDB.pm version %s\n", $BerkeleyDB::VERSION); +printf("\n"); + +printf("Datasource trees: %d\n", scalar( @tree_names ) ); +printf("Tree names: %s\n", join(', ', @tree_names) ); +printf("\n"); + +foreach my $tree ( @tree_names ) +{ + &Torrus::DB::checkInterrupted(); + + printf("Tree: %s\n", $tree ); + + my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); + if( not defined($config_tree) ) + { + print("Configuration is not ready\n"); + } + else + { + my $stats = {}; + foreach my $name ( 'leaves', 'collectorLeaves', 'monitorLeaves', + 'holtwintersLeaves', 'subtrees', + 'maxSubtreePath', 'maxSubtreeSize', 'views', + 'monitors', 'actions', 'compiled' ) + { + $stats->{$name} = 0; + } + + collectStats( $config_tree, $stats ); + collectOtherStats( $config_tree, $stats ); + + printf("Leaves: %d\n", $stats->{'leaves'} ); + printf("Collector leaves: %d\n", $stats->{'collectorLeaves'} ); + printf("Monitor leaves: %d\n", $stats->{'monitorLeaves'} ); + printf("Holt-Winters leaves: %d\n", $stats->{'holtwintersLeaves'} ); + printf("Subtrees: %d\n", $stats->{'subtrees'} ); + printf("Largest subtree: %s\n", $stats->{'maxSubtreePath'} ); + printf("Largest subtree size: %d\n", $stats->{'maxSubtreeSize'} ); + printf("Views: %d\n", $stats->{'views'} ); + printf("Monitors: %d\n", $stats->{'monitors'} ); + printf("Actions: %d\n", $stats->{'actions'} ); + printf("Last compiled: %s\n", + scalar(localtime($stats->{'compiled'}))); + printf("\n"); + } +} + + +sub collectStats +{ + my $config_tree = shift; + my $stats = shift; + my $token = shift; + + &Torrus::DB::checkInterrupted(); + + if( not defined( $token ) ) + { + $token = $config_tree->token('/'); + } + + my @children = $config_tree->getChildren( $token ); + + my $nChildren = scalar( @children ); + if( not defined( $stats->{'maxSubtreeSize'} ) or + $stats->{'maxSubtreeSize'} < $nChildren ) + { + $stats->{'maxSubtreeSize'} = $nChildren; + $stats->{'maxSubtreePath'} = $config_tree->path( $token ); + } + + foreach my $ctoken ( @children ) + { + if( $config_tree->isSubtree( $ctoken ) ) + { + $stats->{'subtrees'}++; + collectStats( $config_tree, $stats, $ctoken ); + } + elsif( $config_tree->isLeaf( $ctoken ) ) + { + $stats->{'leaves'}++; + if( $config_tree->getNodeParam( $ctoken, 'ds-type' ) + eq 'collector' ) + { + $stats->{'collectorLeaves'}++; + } + if( defined( $config_tree->getNodeParam( $ctoken, 'monitor' ) ) ) + { + $stats->{'monitorLeaves'}++; + } + my $val = $config_tree->getNodeParam( $ctoken, 'rrd-hwpredict' ); + if( defined( $val ) and $val eq 'enabled' ) + { + $stats->{'holtwintersLeaves'}++; + } + } + } +} + + +sub collectOtherStats +{ + my $config_tree = shift; + my $stats = shift; + + my $n = scalar( $config_tree->getViewNames() ); + $stats->{'views'} = $n if defined( $n ); + + $n = scalar( $config_tree->getMonitorNames() ); + $stats->{'monitors'} = $n if defined( $n ); + + $n = scalar( $config_tree->getActionNames() ); + $stats->{'actions'} = $n if defined( $n ); + + $n = $config_tree->getTimestamp(); + $stats->{'compiled'} = $n if defined( $n ); +} + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/configsnapshot.in b/torrus/bin/configsnapshot.in new file mode 100644 index 000000000..dc79e5bdb --- /dev/null +++ b/torrus/bin/configsnapshot.in @@ -0,0 +1,332 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: configsnapshot.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; + +use Torrus::Log; +use Torrus::ConfigTree; +use Torrus::SiteConfig; +use Torrus::ConfigBuilder; + +exit(1) if not Torrus::SiteConfig::verify(); + +my $tree; +my $help_needed; +my $verbose = 0; + +my $outfile = 'snapshot.xml'; + +my $filter_param; +my $filter_value; +my $filter_op = '='; + +my $creator = "Torrus version @VERSION@\n" . + "This file was generated by command:\n" . + $0 . " \\\n"; +foreach my $arg ( @ARGV ) +{ + if( $arg =~ /^--/ ) + { + $creator .= ' ' . $arg . ' '; + } + else + { + $creator .= "\'" . $arg . "\'\\\n"; + } +} +$creator .= "\nOn " . scalar(localtime(time)); + +my $ok = GetOptions('tree=s' => \$tree, + 'out=s' => \$outfile, + 'param=s' => \$filter_param, + 'value=s' => \$filter_value, + 'op=s' => \$filter_op, + 'verbose' => \$verbose, + 'help' => \$help_needed); + +if( not $ok or not $tree or $help_needed or + ( defined($filter_param) + defined($filter_value) == 1 ) or + ( $filter_op ne '=' and $filter_op ne 'eq' and $filter_op ne 're' ) or + scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME tree name\n", + " --out=filename output file [".$outfile."]\n", + " --param=PARAM --value=VALUE \n", + " filter the output by leaves with specified value\n", + " --op=OP filter operation [=|eq|re], default: [=]\n", + " --verbose print extra information\n", + " --help this help message\n"; + exit 1; +} + +if( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +if( not Torrus::SiteConfig::treeExists( $tree ) ) +{ + Error('Tree ' . $tree . ' does not exist'); + exit 1; +} + +&Torrus::DB::setSafeSignalHandlers(); + +my $config_tree = new Torrus::ConfigTree( -TreeName => $tree, -Wait => 1 ); +if( not defined( $config_tree ) ) +{ + exit 1; +} + + +my $filter_match = sub {return $_[0] == $filter_value}; + +if(defined($filter_param)) +{ + if( $filter_op eq 'eq' ) + { + $filter_match = sub {return $_[0] eq $filter_value}; + } + elsif( $filter_op eq 're' ) + { + $filter_match = sub {return $_[0] =~ $filter_value}; + } +} + + + +my $cb = new Torrus::ConfigBuilder; + +$cb->addCreatorInfo( $creator ); + +# We don't collect views, since they are in defaults.xml which is always +# included + +collect_monitors( $config_tree, $cb ); +collect_tokensets( $config_tree, $cb ); +collect_definitions( $config_tree, $cb ); +collect_datasources( $config_tree, $cb ); + +my $ok = $cb->toFile( $outfile ); +if( $ok ) +{ + Verbose('Wrote ' . $outfile); +} +else +{ + Error('Cannot write ' . $outfile . ': ' . $!); +} + +exit($ok ? 0:1); + +sub collect_monitors +{ + my $config_tree = shift; + my $cb = shift; + + my $monitorsNode = $cb->startMonitors(); + + foreach my $action ( $config_tree->getActionNames() ) + { + &Torrus::DB::checkInterrupted(); + + my $params = $config_tree->getParams( $action ); + $cb->addMonitorAction( $monitorsNode, $action, $params ); + } + + foreach my $monitor ( $config_tree->getMonitorNames() ) + { + &Torrus::DB::checkInterrupted(); + + my $params = $config_tree->getParams( $monitor ); + $cb->addMonitor( $monitorsNode, $monitor, $params ); + } +} + +sub collect_tokensets +{ + my $config_tree = shift; + my $cb = shift; + + my $tsetsNode = $cb->startTokensets(); + + foreach my $tset ( $config_tree->getTsets() ) + { + &Torrus::DB::checkInterrupted(); + + my $params = $config_tree->getParams( $tset ); + my $name = $tset; + $name =~ s/^S//; + $cb->addTokenset( $tsetsNode, $name, $params ); + } +} + + +sub collect_definitions +{ + my $config_tree = shift; + my $cb = shift; + + my $definitionsNode = $cb->startDefinitions(); + + foreach my $defName ( sort $config_tree->getDefinitionNames() ) + { + &Torrus::DB::checkInterrupted(); + + my $value = $config_tree->getDefinition( $defName ); + $cb->addDefinition( $definitionsNode, $defName, $value ); + } + + my $propsNode = $cb->startParamProps(); + my $props = $config_tree->getParamProperties(); + + &Torrus::DB::checkInterrupted(); + + foreach my $prop ( sort keys %{$props} ) + { + foreach my $param ( sort keys %{$props->{$prop}} ) + { + $cb->addParamProp( $propsNode, $param, $prop, + $props->{$prop}{$param} ); + } + } +} + + +my %filterTokens; + + +sub collect_datasources +{ + my $config_tree = shift; + my $cb = shift; + + my $topNode = $cb->getTopSubtree(); + my $topToken = $config_tree->token('/'); + + my $params = prepare_params( $config_tree, $topToken ); + $cb->addParams( $topNode, $params ); + + if( defined($filter_param) ) + { + $filterTokens{$topToken} = apply_filter( $config_tree, $topToken ); + } + + collect_subtrees( $config_tree, $cb, $topToken, $topNode ); +} + + + +sub apply_filter +{ + my $config_tree = shift; + my $token = shift; + + $filterTokens{$token} = 0; + + foreach my $ctoken ( $config_tree->getChildren( $token ) ) + { + &Torrus::DB::checkInterrupted(); + + if( $config_tree->isSubtree( $ctoken ) ) + { + $filterTokens{$token} += apply_filter( $config_tree, $ctoken ); + } + elsif( $config_tree->isLeaf( $ctoken ) ) + { + my $val = $config_tree->getNodeParam( $ctoken, $filter_param ); + if( defined($val) and &{$filter_match}($val) ) + { + $filterTokens{$ctoken} = 1; + $filterTokens{$token}++; + } + } + } + + return $filterTokens{$token}; +} + + + +sub collect_subtrees +{ + my $config_tree = shift; + my $cb = shift; + my $token = shift; + my $parentNode = shift; + + foreach my $ctoken ( $config_tree->getChildren( $token ) ) + { + &Torrus::DB::checkInterrupted(); + + if( not defined($filter_param) or $filterTokens{$ctoken} ) + { + my $childName = + $config_tree->nodeName( $config_tree->path($ctoken) ); + my $params = prepare_params( $config_tree, $ctoken ); + + if( $config_tree->isSubtree( $ctoken ) ) + { + my $subtreeNode = + $cb->addSubtree( $parentNode, $childName, $params ); + collect_subtrees( $config_tree, $cb, $ctoken, $subtreeNode ); + } + elsif( $config_tree->isLeaf( $ctoken ) ) + { + $cb->addLeaf( $parentNode, $childName, $params ); + } + + foreach my $aliasToken ( $config_tree->getAliases( $ctoken ) ) + { + $cb->addAlias( $parentNode, + $config_tree->path( $aliasToken ) ); + } + } + } +} + + +sub prepare_params +{ + my $config_tree = shift; + my $token = shift; + + my $params = $config_tree->getParams( $token, 1 ); + + # Remove linebreaks + while( my( $param, $value ) = each %{$params} ) + { + $value =~ s/\s+/ /gm; + $params->{$param} = $value; + } + + return $params; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/devdiscover.in b/torrus/bin/devdiscover.in new file mode 100644 index 000000000..f11372308 --- /dev/null +++ b/torrus/bin/devdiscover.in @@ -0,0 +1,619 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: devdiscover.in,v 1.1 2010-12-27 00:04:02 ivan Exp $ +# Stanislav Sinyagin + +# Collect the router information and create the XML file + +BEGIN { require '@devdiscover_config_pl@'; } + +use strict; +use Getopt::Long; +use XML::LibXML; + +use Torrus::Log; +use Torrus::DevDiscover; +use Torrus::ConfigBuilder; + +$| = 1; + +my @infiles; +my $makedirs; +my $limitre; +my $forcebundle; +my $fallback; +my $workerThreads = 0; + +# Hidden parameter for debugging +my $snmpdebug = 0; +my $debug = 0; +my $verbose = 0; + +my %formatsSupported = ( '1.0' => 1 ); + + +my $creator = "Torrus version @VERSION@\n" . + "This file was generated by command:\n" . + $0 . " \\\n"; +foreach my $arg ( @ARGV ) +{ + if( $arg =~ /^--/ ) + { + $creator .= ' ' . $arg . ' '; + } + else + { + $creator .= "\'" . $arg . "\'\\\n"; + } +} +$creator .= "\n On " . scalar(localtime(time)); + +my $ok = GetOptions( + 'in=s' => \@infiles, + 'mkdir' => \$makedirs, + 'limit=s' => \$limitre, + 'forcebundle' => \$forcebundle, + 'fallback=i' => \$fallback, + 'threads=i' => \$workerThreads, + 'snmpdebug' => \$snmpdebug, + 'verbose' => \$verbose, + 'debug' => \$debug + ); +if( $ok and scalar( @ARGV ) > 0 ) +{ + push( @infiles, @ARGV ); +} + +if( not $ok or scalar(@infiles) == 0 or + ($workerThreads > 1 and not $Torrus::Global::threadsEnabled ) ) +{ + print STDERR "Usage: $0 --in=filename.ddx options... [ddx files]\n", + "Options:\n", + " --in=filename.ddx discovery instructions XML file(s)\n", + " --mkdir create data-dir directories\n", + " --limit=regexp limit the discovery by output files\n", + " --forcebundle always write the bundle file\n", + " --fallback=integer maximum age of XML file to fall back to\n", + " --threads=integer number of parallel discovery threads\n", + " --verbose print extra information\n", + " --debug print debugging information\n", + " --snmpdebug print SNMP protocol details\n", + "\n"; + if( not $Torrus::Global::threadsEnabled ) + { + print STDERR "Multithreading is NOT SUPPORTED by current " . + "perl interpreter\n"; + } + + exit 1; +} + +if( $snmpdebug ) +{ + $Net::SNMP::Transport::UDP::DEBUG = 1; + $Net::SNMP::Message::DEBUG = 1; + $Net::SNMP::MessageProcessing::DEBUG = 1; + $Net::SNMP::Dispatcher::DEBUG = 1; +} + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +my $everythingsOk = 1; +my $perOutfileHostParams = {}; +my %outputBundles; + +foreach my $infile ( @infiles ) +{ + if( not -r $infile ) + { + my $altfile = $Torrus::Global::discoveryDir . $infile; + if( not -r $altfile ) + { + Error('Cannot find file ' . $infile . + ' neither in current directory nor in ' . + $Torrus::Global::discoveryDir); + exit 1; + } + else + { + $infile = $altfile; + } + } + + Verbose('Processing ' . $infile); + + my $parser = new XML::LibXML; + my $doc; + eval { $doc = $parser->parse_file( $infile ); }; + if( $@ ) + { + Error("Failed to parse $infile: $@"); + exit 1; + } + + my $root = $doc->documentElement(); + if( $root->nodeName() ne 'snmp-discovery' ) + { + Error('XML root element is not "snmp-discovery" in ' . $infile); + exit 1; + } + + my $format_version = + (($root->getElementsByTagName('file-info'))[0]-> + getElementsByTagName('format-version'))[0]->textContent(); + + $format_version =~ s/\s//g; + + if( not $format_version or not $formatsSupported{$format_version} ) + { + Error('Invalid format or format version not supported: ' . $infile); + exit 1; + } + + my $globalParams = parseParams( $root ); + + + # Parse the body of the XML + + foreach my $hostNode ( $root->getChildrenByTagName('host') ) + { + my $hostParams = parseParams( $hostNode, $globalParams ); + normalizeParams( $hostParams ); + + my $outfile = $hostParams->{'output-file'}; + if( not exists($perOutfileHostParams->{$outfile}) ) + { + $perOutfileHostParams->{$outfile} = []; + } + push( @{$perOutfileHostParams->{$outfile}}, $hostParams ); + + my $outBundles = $hostParams->{'output-bundle'}; + if( length( $outBundles ) > 0 ) + { + foreach my $bundleName ( split( /\s*,\s*/, $outBundles ) ) + { + $bundleName = absXmlFilename( $bundleName ); + $outputBundles{$bundleName}{ relXmlFilename($outfile) } = 1; + } + } + } +} + + +# Start discovery +my $jobQueue; +my $bundleDeletionQueue; +my $confBuildSemaphore; + +if( $workerThreads > 1 ) +{ + require threads; + require threads::shared; + require Thread::Queue; + require Thread::Semaphore; + + threads::shared::share( \$everythingsOk ); + + $jobQueue = new Thread::Queue; + $bundleDeletionQueue = new Thread::Queue; + $confBuildSemaphore = new Thread::Semaphore; + + # Enqueue the output filenames + foreach my $outfile ( sort keys %{$perOutfileHostParams} ) + { + if( not matchLimitRe( $outfile ) ) + { + next; + } + + $jobQueue->enqueue( $outfile ); + } + + # Start the worker threads + my @workers; + foreach my $i ( 1..$workerThreads ) + { + push( @workers, threads->create( \&discoveryThread ) ); + } + + # Wait for workers to finish the jobs + while( my $thr = shift( @workers ) ) + { + my $tid = $thr->tid(); + $thr->join(); + Debug('Cleaning up thread #' . $tid); + undef $thr; + } + + # Process the files to be excluded from bundles + + if( not $everythingsOk ) + { + my $outfile; + while( defined( $outfile = $bundleDeletionQueue->dequeue_nb() ) ) + { + removeFromBundle( $outfile ); + } + } +} +else +{ + # Single-thread operation + + foreach my $outfile ( sort keys %{$perOutfileHostParams} ) + { + if( not matchLimitRe( $outfile ) ) + { + next; + } + + if( not doDiscover( $outfile ) ) + { + removeFromBundle( $outfile ); + } + } +} + +# Discovery finished, do the bundles + +if( scalar( keys %outputBundles ) > 0 ) +{ + if( defined( $limitre ) ) + { + Warn('Cannot write bundles with --limit option specified. ' . + 'Bundle files remain unchanged'); + } + elsif( $everythingsOk ) + { + foreach my $bundleName ( sort keys %outputBundles ) + { + my $cb = new Torrus::ConfigBuilder; + + $cb->addCreatorInfo( $creator ); + + foreach my $bundleMember + ( sort keys %{$outputBundles{$bundleName}} ) + { + $cb->addFileInclusion( $bundleMember ); + } + + my $ok = $cb->toFile( $bundleName ); + if( $ok ) + { + Verbose('Wrote bundle to ' . $bundleName); + } + else + { + Error('Cannot write bundle to ' . $bundleName . ': ' . $!); + $everythingsOk = 0; + } + } + } + else + { + Error('Skipping bundles generation because of errors'); + } +} + + +exit($everythingsOk ? 0:1); + + +sub parseParams +{ + my $parentNode = shift; + my $paramhash = shift; + + # Clone the parameters hash + my $ret = {}; + if( $paramhash ) + { + while( my($key, $val) = each %{$paramhash} ) + { + $ret->{$key} = $val; + } + } + + foreach my $paramNode ( $parentNode->getChildrenByTagName('param') ) + { + my $param = $paramNode->getAttribute('name'); + my $value = $paramNode->getAttribute('value'); + + if( not $param ) + { + Error("Parameter without name"); + exit 1; + } + + if( not defined( $value ) ) + { + $value = $paramNode->textContent(); + } + + # Remove spaces in the head and tail. + $value =~ s/^\s+//; + $value =~ s/\s+$//; + + $ret->{$param} = $value; + } + return $ret; +} + + +sub normalizeParams +{ + my $params = shift; + + if( not defined( $params->{'output-file'} ) ) + { + Warn('output-file parameter is not defined. Using routers.xml'); + $params->{'output-file'} = 'routers.xml'; + } + else + { + $params->{'output-file'} = absXmlFilename( $params->{'output-file'} ); + } + + if( defined( $params->{'host-subtree'} ) ) + { + my $subtree = $params->{'host-subtree'}; + + if( $subtree !~ /^\/[0-9A-Za-z_\-\.\/]*$/ or + $subtree =~ /\.\./ ) + { + Error("Invalid format for subtree name: " . $subtree); + exit 1; + } + } + + if( defined( $params->{'snmp-community'} ) ) + { + # Remove any possible Unicode character treatment + $params->{'snmp-community'} = + pack( 'A*', $params->{'snmp-community'} ); + } +} + + +# Replaces $XMLCONFIG with the XML root directory +sub absXmlFilename +{ + my $filename = shift; + + my $subst = '$XMLCONFIG'; + my $offset = index( $filename, $subst ); + if( $offset >= 0 ) + { + my $len = length( $subst ); + substr( $filename, $offset, $len ) = $Torrus::Global::siteXmlDir; + } + else + { + if( $filename !~ /^\// ) + { + $filename = $Torrus::Global::siteXmlDir . '/' . $filename; + } + } + return $filename; +} + + +# Removes XML root directory from path +sub relXmlFilename +{ + my $filename = shift; + + my $subst = $Torrus::Global::siteXmlDir; + my $len = length( $subst ); + + if( $filename =~ /^\// ) + { + my $offset = index( $filename, $subst ); + if( $offset == 0 ) + { + $filename = substr( $filename, $len ); + # we don't know if xmldir has a trailing slash + $filename =~ s/^\///; + } + } + return $filename; +} + + +sub matchLimitRe +{ + my $filename = shift; + + if( defined( $limitre ) ) + { + $filename =~ s/^.*\///; + + if( $filename !~ $limitre ) + { + return 0; + } + } + + return 1; +} + + +# Pick up next available outfile until the job queue is empty + +sub discoveryThread +{ + Torrus::Log::setTID( threads->tid() ); + Debug('Started thread #' . threads->tid()); + my $outfile; + while( defined( $outfile = $jobQueue->dequeue_nb() )) + { + if( not doDiscover( $outfile ) ) + { + $bundleDeletionQueue->enqueue( $outfile ); + } + } + Debug('Finished thread #' . threads->tid()); +} + + + +sub doDiscover +{ + my $outfile = shift; + + Verbose('Preparing to write ' . $outfile); + + my $dd = new Torrus::DevDiscover; + my $ok = 1; + + foreach my $hostParams ( @{$perOutfileHostParams->{$outfile}} ) + { + $ok = $dd->discover( $hostParams ); + + if( not $ok ) + { + Error($outfile . ' was not written because of errors'); + $everythingsOk = 0; + last; + } + } + + if( $ok ) + { + # LibXML2 is not thread-safe, so we create the XML files + # one at a time + if( $workerThreads > 1 ) + { + $confBuildSemaphore->down(); + } + + my $cb = new Torrus::ConfigBuilder; + + $cb->addCreatorInfo( $creator ); + + $dd->buildConfig( $cb ); + $cb->addRequiredFiles(); + $cb->addStatistics(); + + $ok = $cb->toFile( $outfile ); + if( $ok ) + { + Verbose('Wrote ' . $outfile); + } + else + { + Error('Cannot write ' . $outfile . ': ' . $!); + $everythingsOk = 0; + } + + if( $workerThreads > 1 ) + { + $confBuildSemaphore->up(); + } + } + + if( $makedirs ) + { + if( $everythingsOk ) + { + # Not sure if these calls are reentrant + if( $workerThreads > 1 ) + { + $confBuildSemaphore->down(); + } + + my ($login,$pass,$uid,$gid) = getpwnam('@torrus_user@') + or die "Cannot get user details for @torrus_user@"; + + foreach my $dir ( $dd->listDataDirs() ) + { + if( not -d $dir ) + { + Debug('Creating directory: ' . $dir); + mkdir( $dir ) or + Error('Cannot create directory: ' . + $dir . ': ' . $!); + chown( $uid, $gid, $dir ) or + Error('Cannot change ownership for ' . + $dir . ': ' . $!); + chmod( 02755, $dir ) or + Error('Cannot chmod 02755 for ' . + $dir . ': ' . $!); + } + } + + if( $workerThreads > 1 ) + { + $confBuildSemaphore->up(); + } + } + else + { + Error('Skipping mkdir because of errors'); + } + } + + return $ok; +} + + +sub removeFromBundle +{ + my $outfile = shift; + + my $relname = relXmlFilename($outfile); + + my $removeFromBundle = 1; + + if( $forcebundle ) + { + if( defined( $fallback ) and + -e $outfile and -M $outfile <= $fallback ) + { + Warn('Falling back to the old version of ' . $relname); + $removeFromBundle = 0; + } + $everythingsOk = 1; + } + + if( $removeFromBundle ) + { + foreach my $bundleName ( sort keys %outputBundles ) + { + if( exists( $outputBundles{$bundleName}{$relname} ) ) + { + delete $outputBundles{$bundleName}{$relname}; + Warn('Bundle ' . $bundleName . ' will not have ' . + $relname . ' included because of errors'); + } + } + } +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/flushmonitors.in b/torrus/bin/flushmonitors.in new file mode 100644 index 000000000..6c01269ac --- /dev/null +++ b/torrus/bin/flushmonitors.in @@ -0,0 +1,143 @@ +#!@PERL@ -w +# Copyright (C) 2010 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: flushmonitors.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use Getopt::Long; +use strict; + +use Torrus::SiteConfig; +use Torrus::ConfigTree; +use Torrus::Log; + +exit(1) if not Torrus::SiteConfig::verify(); + +our @trees; +our $all_trees; + +our $debug; +our $verbose; +our $help_needed; + +my $ok = GetOptions ('tree=s' => \@trees, + 'all' => \$all_trees, + 'debug' => \$debug, + 'verbose' => \$verbose, + 'help' => \$help_needed); + +if( not $ok or not (scalar(@trees) or $all_trees) or + $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "The utility flushes all monitor alarms and dynamic tokenset members\n", + "Options:\n", + " --tree=NAME tree name(s) to flush\n", + " --all flush all trees\n", + " --debug set the log level to debug\n", + " --verbose set the log level to info\n", + " --help this help message\n"; + exit 1; +} + +if( $all_trees ) +{ + @trees = Torrus::SiteConfig::listTreeNames(); +} + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + + +&Torrus::DB::setSafeSignalHandlers(); + +Verbose(sprintf('Torrus version %s', '@VERSION@')); + +foreach my $tree ( @trees ) +{ + if( not Torrus::SiteConfig::treeExists( $tree ) ) + { + Error("Tree named \"" . $tree . "\" does not exist"); + exit(1); + } + + &Torrus::DB::checkInterrupted(); + + Verbose("Flushing alarms and tokensets for the tree: $tree"); + + my $config_tree = new Torrus::ConfigTree( -TreeName => $tree, + -Wait => 1 ); + if( not defined( $config_tree ) ) + { + next; + } + + my $db = new Torrus::DB('monitor_alarms', + -Subdir => $tree, + -WriteAccess => 1); + + + my $cursor = $db->cursor(-Write => 1); + while( my ($key, $timers) = $db->next($cursor) ) + { + Debug('Deleting alarm: ' . $key); + $db->c_del( $cursor ); + + } + undef $cursor; + undef $db; + + &Torrus::DB::checkInterrupted(); + + my @members; + foreach my $ts ( $config_tree->getTsets() ) + { + Debug('Processing tokenset: ' . $ts); + + foreach my $member ( $config_tree->tsetMembers( $ts ) ) + { + my $origin = $config_tree->tsetMembers( $ts, $member ); + + if( not defined( $origin ) or $origin ne 'static' ) + { + my $path = $config_tree->path($member); + $config_tree->tsetDelMember($ts, $member); + Verbose('deleted ' . $path . ' from tokenset: ' . $ts); + } + } + } + + undef $config_tree; + &Torrus::DB::cleanupEnvironment(); +} + +exit; + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/genddx.in b/torrus/bin/genddx.in new file mode 100644 index 000000000..6e3464e66 --- /dev/null +++ b/torrus/bin/genddx.in @@ -0,0 +1,255 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: genddx.in,v 1.1 2010-12-27 00:04:00 ivan Exp $ +# Stanislav Sinyagin + +# Generate the SNMP discovery instructions XML file out of plaintext +# list of hosts. + +BEGIN { require '@devdiscover_config_pl@'; } + +use strict; +use Getopt::Long; +use XML::LibXML; + +use Torrus::Log; + +our $outFormatVersion = '1.0'; + +our @hosts = (); +our $hostfile; + +our %globalParams = + ( + 'output-file' => 'routers.xml', + 'domain-name' => '', + 'host-subtree' => '/Routers', + 'snmp-port' => '161', + 'snmp-community' => 'public', + 'snmp-version' => '2c', + 'snmp-timeout' => 10, + 'snmp-retries' => 2, + 'rrd-hwpredict' => 0, + 'data-dir' => '@defrrddir@', + ); + +our $outfile = 'routers.ddx'; + + +my $creator = "Torrus version @VERSION@\n" . + "This file was generated by command:\n" . + $0 . " \\\n"; +foreach my $arg ( @ARGV ) +{ + if( $arg =~ /^--/ ) + { + $creator .= ' ' . $arg . ' '; + } + else + { + $creator .= "\'" . $arg . "\'\\\n"; + } +} +$creator .= "\nOn " . scalar(localtime(time)); + +my $ok = GetOptions( + 'host=s' => \@hosts, + 'hostfile=s' => \$hostfile, + 'out=s' => \$outfile, + 'discout=s' => \$globalParams{'output-file'}, + 'domain=s' => \$globalParams{'domain-name'}, + 'version=s' => \$globalParams{'snmp-version'}, + 'community=s' => \$globalParams{'snmp-community'}, + 'port=i' => \$globalParams{'snmp-port'}, + 'timeout=i' => \$globalParams{'snmp-timeout'}, + 'retries=i' => \$globalParams{'snmp-retries'}, + 'subtree=s' => \$globalParams{'host-subtree'}, + 'holtwinters' => \$globalParams{'rrd-hwpredict'}, + 'datadir=s' => \$globalParams{'data-dir'}, + ); + +if( not $ok or + ( not $hostfile and scalar(@hosts) == 0 ) or + scalar( @ARGV ) > 0 ) +{ + print STDERR "Generate devdiscover XML configuration\n"; + + print STDERR "Usage: $0 options...\n", + "Options:\n", + " --host=hostname router hostname\n", + " --hostfile=filename space-separated router hostnames file\n", + " --out=filename output file [".$outfile."]\n", + + " --discout=filename discovery output file\n", + " [", $globalParams{'output-file'}, "]\n", + + " --domain=domain optional DNS domain name\n", + + " --version=v SNMP version [", + $globalParams{'snmp-version'}, "]\n", + + " --community=string SNMP read community [", + $globalParams{'snmp-community'}, "]\n", + + " --port=number SNMP port [", + $globalParams{'snmp-port'}, "]\n", + + " --retries=number SNMP retries [", + $globalParams{'snmp-retries'}, "]\n", + + " --timeout=number SNMP timeout [", + $globalParams{'snmp-timeout'}, "]\n", + + " --subtree=string Subtree name [", + $globalParams{'host-subtree'}, "]\n", + + " --datadir=path data-dir parameter [", + $globalParams{'data-dir'}, "]\n", + + " --holtwinters Enable Holt-Winters analysis\n", + "\n", + "Host names may be of form \"host:devname\" where devname is a symbolic\n", + "device name.\n", + "Output file is placed into " . $Torrus::Global::discoveryDir, + "\n if no path is given.\n"; + exit 1; +} + +# Place the output file in discovery directory if the path is not given +if( $outfile !~ /\// ) +{ + $outfile = $Torrus::Global::discoveryDir . '/' . $outfile; +} + +# Convert flags from true/false to yes/no +foreach my $param ( 'rrd-hwpredict' ) +{ + if( $globalParams{$param} ) + { + $globalParams{$param} = 'yes'; + } + else + { + $globalParams{$param} = 'no'; + } +} + +if( $globalParams{'host-subtree'} !~ /^\/[0-9A-Za-z_\-\.\/]*$/ or + $globalParams{'host-subtree'} =~ /\.\./ ) +{ + Error("Invalid format for subtree name: " . $globalParams{'host-subtree'}); + exit 1; +} + +if( defined $hostfile ) +{ + if( not open(HOSTS, $hostfile) ) + { + print STDERR "Cannot open $hostfile: $!"; + exit 1; + } + while() + { + s/^\s+//; + s/\s+$//; + push( @hosts, split( /\s+/ ) ); + } +} + +# Create XML DOM + +my $doc = XML::LibXML->createDocument( "1.0", "UTF-8" ); +my $root = $doc->createElement('snmp-discovery'); +$doc->setDocumentElement( $root ); + +{ + my $fileInfoNode = $doc->createElement('file-info'); + $root->appendChild( $fileInfoNode ); + + my $formatNode = $doc->createElement('format-version'); + $formatNode->appendText( $outFormatVersion ); + $fileInfoNode->appendChild( $formatNode ); +} + +{ + my $creatorNode = $doc->createElement('creator-info'); + $creatorNode->appendText( $creator ); + $root->appendChild( $creatorNode ); +} + +createParamsDom( \%globalParams, $doc, $root ); + + +foreach my $host ( @hosts ) +{ + my $devname = $host; + if( $host =~ /([^:]+):(.+)/ ) + { + $host = $1; + $devname = $2; + } + + my $hostNode = $doc->createElement('host'); + $root->appendChild( $hostNode ); + + my %hostParams = ( 'snmp-host' => $host ); + if( $devname ne $host ) + { + $hostParams{'symbolic-name'} = $devname; + } + + createParamsDom( \%hostParams, $doc, $hostNode ); +} + +my $ok = $doc->toFile( $outfile, 2 ); +if( $ok ) +{ + print STDERR ("Wrote $outfile\n"); +} +else +{ + print STDERR ("Cannot write $outfile: $!\n"); +} + + +exit($ok ? 0:1); + + +sub createParamsDom +{ + my $params = shift; + my $doc = shift; + my $parentNode = shift; + + foreach my $param ( sort keys %{$params} ) + { + my $paramNode = $doc->createElement('param'); + $paramNode->setAttribute( 'name', $param ); + $paramNode->setAttribute( 'value', $params->{$param} ); + $parentNode->appendChild( $paramNode ); + } +} + + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/genlist.in b/torrus/bin/genlist.in new file mode 100644 index 000000000..2b79fc126 --- /dev/null +++ b/torrus/bin/genlist.in @@ -0,0 +1,197 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: genlist.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; + +use Torrus::Log; +use Torrus::ConfigTree; +use Torrus::SiteConfig; + +exit(1) if not Torrus::SiteConfig::verify(); + +my $tree; +my $initPath = '/'; +my $listWhat = 'rrdfiles'; +my $selectType = 'all'; + +my $help_needed; + +my %listingsSupported = + ( + 'rrdfiles' => { + 'collector' => 1, + 'readonly' => 1, + 'all' => 1, + }, + + 'snmphosts' => { + 'collector' => 1, + }, + ); + +my $ok = GetOptions ('tree=s' => \$tree, + 'path=s' => \$initPath, + 'what=s' => \$listWhat, + 'type=s' => \$selectType, + 'help' => \$help_needed); + +if( not $ok or not $tree or $help_needed or + not $listingsSupported{$listWhat}{$selectType} or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME tree name\n", + " --path=/PATH [".$initPath."] subtree name\n", + " --what=WHAT [".$listWhat."] what to list\n", + " Supported listings:\n", + " rrdfiles List RRD file paths\n", + " snmphosts List SNMP hosts\n", + " --type=TYPE [".$selectType."] selection type\n", + " Supported types:\n", + " collector Collector leaves\n", + " readonly Read-only leaves\n", + " all All of above\n", + " --help this help message\n"; + exit 1; +} + + +if( not Torrus::SiteConfig::treeExists( $tree ) ) +{ + Error('Tree ' . $tree . ' does not exist'); + exit 1; +} + +&Torrus::DB::setSafeSignalHandlers(); + +my $config_tree = new Torrus::ConfigTree( -TreeName => $tree, -Wait => 1 ); +if( not defined( $config_tree ) ) +{ + exit 1; +} + +my $initToken = $config_tree->token( $initPath ); +if( not defined( $initToken ) ) +{ + Error('No such subtree: ' . $initPath); + exit 1; +} + +my $listing = {}; + +my $listParams = {}; +if( $selectType eq 'all' ) +{ + foreach my $type ( keys %{$listingsSupported{$listWhat}} ) + { + if( $type ne 'all' ) + { + $listParams->{$type} = 1; + } + } +} +else +{ + $listParams->{$selectType} = 1; +} + +pickup_data( $config_tree, $initToken, $listing, $listWhat, $listParams ); + +foreach my $item ( sort keys %{$listing} ) +{ + print $item, "\n"; +} + +exit 0; + +sub pickup_data +{ + my $config_tree = shift; + my $token = shift; + my $listing = shift; + my $listWhat = shift; + my $listParams = shift; + + foreach my $ctoken ( $config_tree->getChildren( $token ) ) + { + &Torrus::DB::checkInterrupted(); + + if( $config_tree->isSubtree( $ctoken ) ) + { + pickup_data( $config_tree, $ctoken, + $listing, $listWhat, $listParams ); + } + elsif( $config_tree->isLeaf( $ctoken ) ) + { + if( $listWhat eq 'rrdfiles' and + ( + ( + $listParams->{'collector'} and + $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq + 'collector' and + $config_tree->getNodeParam( $ctoken, 'storage-type' ) eq + 'rrd' + ) or + ( + $listParams->{'readonly'} and + $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq + 'rrd-file' and + $config_tree->getNodeParam( $ctoken, 'leaf-type' ) eq + 'rrd-def' + ) + ) + ) + { + my $datafile = + $config_tree->getNodeParam( $ctoken, 'data-file' ); + my $datadir = + $config_tree->getNodeParam( $ctoken, 'data-dir' ); + $listing->{$datadir . '/' . $datafile} = 1; + } + elsif( $listWhat eq 'snmphosts' and + $listParams->{'collector'} and + $config_tree->getNodeParam( $ctoken, 'ds-type' ) eq + 'collector' ) + { + my $host = + $config_tree->getNodeParam( $ctoken, 'snmp-host' ); + my $oid = + $config_tree->getNodeParam( $ctoken, 'snmp-object' ); + + if( defined( $host ) and length( $host ) > 0 and + defined( $oid ) and length( $oid ) > 0 ) + { + $listing->{$host} = 1; + } + } + } + } +} + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/genreport.in b/torrus/bin/genreport.in new file mode 100644 index 000000000..6d21b4878 --- /dev/null +++ b/torrus/bin/genreport.in @@ -0,0 +1,181 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: genreport.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +# Collect the router information and create the XML file + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; + +use Torrus::Log; +use Torrus::ReportOutput::HTML; +use Torrus::SiteConfig; + +my $report; +my $date; +my $time = '00:00'; +my $genhtml; +my @trees; +my $all2tree; + +my $debug = 0; +my $verbose = 0; + +my $ok = GetOptions( + 'report=s' => \$report, + 'date=s' => \$date, + 'time=s' => \$time, + 'genhtml' => \$genhtml, + 'tree=s' => \@trees, + 'all2tree=s' => \$all2tree, + 'verbose' => \$verbose, + 'debug' => \$debug + ); + +if( $report and not defined($Torrus::ReportGenerator::modules{$report}) ) +{ + print STDERR "Unknown report name: ", $report, "\n\n"; + $ok = 0; +} + +if( not $ok or (not $report and not $genhtml) or + ($report and not $date) or + ($genhtml and scalar(@trees) > 0 and $all2tree) or + scalar( @ARGV ) > 0 ) +{ + print STDERR + "Usage: $0 --report=ReportName --date=YYYY-MM-DD | ", + "--genhtml options...\n"; + print STDERR "Options:\n", + " --report=ReportName Report name.\n", + " --date=YYYY-MM-DD Report start date. ", + "For monthly reports, 1st day in a month.\n", + " --time=hh:mm Report start time. Ignored for monthly reports\n", + " --genhtml Generate HTML output from the database\n", + " --tree=TREE Generate HTML for a given tree only\n", + " --all2tree=TREE Generate reports for all service IDs and place\n", + " into the given tree (excludes the option --tree)\n", + " --verbose print extra information\n", + " --debug print debugging information\n", + "\n", + "Report names supported:\n"; + + foreach my $rep ( sort keys %Torrus::ReportGenerator::modules ) + { + print STDERR " ", $rep, "\n"; + } + print STDERR "\n"; + + exit 1; +} + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +&Torrus::DB::setSafeSignalHandlers(); + +if( $report ) +{ + my $class = $Torrus::ReportGenerator::modules{$report}; + eval( 'require ' . $class ); + die( $@ ) if $@; + + my $generator = $class->new({ + 'Name' => $report, + 'Date' => $date, + 'Time' => $time}); + + if( defined( $generator ) ) + { + $generator->generate(); + } + else + { + $ok = 0; + } +} + +if( $genhtml ) +{ + if( $all2tree ) + { + push( @trees, $all2tree ); + } + + if( scalar( @trees ) == 0 ) + { + @trees = Torrus::SiteConfig::listTreeNames(); + } + else + { + foreach my $tree ( @trees ) + { + if( not Torrus::SiteConfig::treeExists( $tree ) ) + { + Error('Tree ' . $tree . ' does not exist'); + $ok = 0; + } + } + } + + if( $ok ) + { + foreach my $tree ( @trees ) + { + &Torrus::DB::checkInterrupted(); + + Verbose('Generating HTML report for tree ' . $tree); + + my $options = {'Tree' => $tree}; + + if( length( $all2tree ) > 0 ) + { + $options->{'All_Service_IDs'} = 1; + } + + my $out = new Torrus::ReportOutput::HTML( $options ); + + if( $out->init() ) + { + $ok = $out->generate() ? $ok:0; + } + else + { + $ok = 0; + } + } + } +} + +exit($ok ? 0:1); + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/install_plugin.in b/torrus/bin/install_plugin.in new file mode 100644 index 000000000..31b44e730 --- /dev/null +++ b/torrus/bin/install_plugin.in @@ -0,0 +1,51 @@ +#!@SHELL@ +# Copyright (C) 2004 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: install_plugin.in,v 1.1 2010-12-27 00:04:00 ivan Exp $ +# Stanislav Sinyagin +# + +# Torrus plugin installation utility + +plugin=$1 +shift + +if test -z "$plugin"; then + echo "Usage: $0 plugin_dir [options...]" 1>&2 + exit 1 +fi + +if test ! -d $plugin; then + echo "No such directory: $plugin" 1>&2 + exit 1 +fi + +echo Installing Torrus plugin from $plugin + +cd $plugin +eval './configure '`cat @cfgdefdir@/instvars`' '$@ || exit 1 +make || exit 1 +make install || exit 1 + +echo Plugin installation finished + + +# Local Variables: +# mode: shell-script +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/monitor.in b/torrus/bin/monitor.in new file mode 100644 index 000000000..c8579997b --- /dev/null +++ b/torrus/bin/monitor.in @@ -0,0 +1,176 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: monitor.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Proc::Daemon; +use Getopt::Long; + +use Torrus::Log; +use Torrus::Monitor; +use Torrus::SiteConfig; + +exit(1) if not Torrus::SiteConfig::verify(); + +our $tree; +our $nodaemon; +our $runonce; +our $delay = 0; +our $debug; +our $verbose; +our $help_needed; + +# Derive the process name from the command line +our $process_name = $0; +$process_name =~ s/^.*\/([^\/]+)$/$1/; +$process_name .= ' ' . join(' ', @ARGV); + + +my $ok = GetOptions ('tree=s' => \$tree, + 'nodaemon' => \$nodaemon, + 'runonce' => \$runonce, + 'delay=i' => \$delay, + 'debug' => \$debug, + 'verbose' => \$verbose, + 'help' => \$help_needed); + +if( not $ok or not $tree or $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME tree name\n", + " --nodaemon do not fork daemon and log to STDERR\n", + " --runonce run one time and exit. Implies --nodaemon\n", + " --delay delay the start of the first cycle, minutes\n", + " --debug set the log level to debug\n", + " --verbose set the log level to info\n", + " --help this help message\n"; + exit 1; +} + +if( not Torrus::SiteConfig::mayRunMonitor( $tree ) ) +{ + Error('Tree ' . $tree . ' is not configured to run monitor'); + exit 1; +} + + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +my $logfile = $Torrus::Global::logDir . '/monitor.' . $tree . '.log'; +my $pidfile; + +my $rotateLogs = sub +{ + Info('Caught SIGHUP. Reopening log file'); + close( STDERR ); + open( STDERR, ">>$logfile" ); +}; + +if( not $nodaemon and not $runonce ) +{ + my $pidfilename = + $Torrus::Global::pidDir . '/monitor.' . $tree . '.pid'; + + if( -r $pidfilename ) + { + Error("Another monitor daemon is running, pid=", + `cat $pidfilename`); + exit 1; + } + + &Proc::Daemon::Init(); + umask 0017; # Proc::Daemon::Init sets the mask to all-writable + + $SIG{'HUP'} = $rotateLogs; + + # At this point, we cannot tell anyone if "open" fails + open(STDERR, ">>$logfile"); + + $pidfile = $pidfilename; + + if( open( PID, ">$pidfile" ) ) + { + printf PID ( "%d", $$ ); + close PID; + } + else + { + Error("Cannot open $pidfile for writing: $!"); + } +} + +Info(sprintf("Torrus version %s", '@VERSION@')); +Info(sprintf("%s started for tree %s", $0, $tree)); +Debug(sprintf("Process ID %d", $$)); + +if( $delay > 0 ) +{ + Info(sprintf('Delaying for %d minutes', $delay)); + sleep($delay * 60); +} + +&Torrus::DB::setSafeSignalHandlers(); + +my %options = + ( + '-ProcessName' => $process_name, + '-Tree' => $tree, + '-Delay' => $delay + ); +if( $runonce ) +{ + $options{'-RunOnce'} = 1; +} + +my $scheduler = new Torrus::MonitorScheduler( %options ); +$scheduler->run(); + +if( not $options{'-RunOnce'} ) +{ + Error("Monitor process exited: nothing to collect"); + unlink $pidfile; +} + +exit; + + +END +{ + if( defined($pidfile) and -r $pidfile ) + { + unlink $pidfile; + } +} + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/nodeid.in b/torrus/bin/nodeid.in new file mode 100644 index 000000000..b362a955b --- /dev/null +++ b/torrus/bin/nodeid.in @@ -0,0 +1,252 @@ +#!@PERL@ -w +# Copyright (C) 2010 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: nodeid.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; +use JSON; +use File::Copy; + +use Torrus::ConfigTree; +use Torrus::SiteConfig; +use Torrus::Renderer; +use Torrus::Log; + +exit(1) if not Torrus::SiteConfig::verify(); + + +my %commands = + ('info' => \&do_info, + 'search' => \&do_search, + 'render' => \&do_render); + + + +my $tree; +my $cmd; + +my $nodeid; +my $print_details; +my $search_prefix; +my $search_substring; +my $render_view; +my $render_out; + + +my $help_needed; + + +my $ok = GetOptions('tree=s' => \$tree, + 'cmd=s' => \$cmd, + 'nodeid=s' => \$nodeid, + 'details' => \$print_details, + 'prefix=s' => \$search_prefix, + 'substring=s' => \$search_substring, + 'view=s' => \$render_view, + 'out=s' => \$render_out, + 'help' => \$help_needed); + +if( not $ok or + not $tree or not $cmd or not $commands{$cmd} or + ( ($cmd eq 'info' or $cmd eq 'render') and not $nodeid ) or + ( $cmd eq 'search' and not ($search_prefix or $search_substring) ) or + $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME --cmd=CMD [options...]\n", + "Options:\n", + " --tree=NAME tree name\n", + " --cmd=CMD Command (info|search|render)\n", + " --nodeid=NODEID nodeid (mandatory for info and render)\n", + " --details print nodeid details (valid with info and search)\n", + " --prefix=STR search prefix\n", + " --substring=STR search substring\n", + " --view=VIEW render view (optional)\n", + " --out=FILE render output\n", + " --help this help message\n"; + exit 1; +} + + +if( not Torrus::SiteConfig::treeExists( $tree ) ) +{ + Error('Tree ' . $tree . ' does not exist'); + exit 1; +} + + +&Torrus::DB::setSafeSignalHandlers(); + +{ + my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); + if( not defined($config_tree) ) + { + Error("Configuration is not ready"); + exit 1; + } + + if( $cmd eq 'info' or $cmd eq 'render' ) + { + my $token = $config_tree->getNodeByNodeid($nodeid); + if( not defined( $token ) ) + { + Error('nodeid not found: ' . $nodeid); + exit(1); + } + + if( $cmd eq 'info' ) + { + print_nodeid($config_tree, [$token], $print_details); + } + else + { + render_node($config_tree, $token, $render_view, $render_out); + } + } + elsif( $cmd eq 'search' ) + { + my $results; + if( defined($search_prefix) ) + { + $results = $config_tree->searchNodeidPrefix($search_prefix); + } + else + { + $results = $config_tree->searchNodeidSubstring($search_substring); + } + + if( defined( $results ) and scalar(@{$results}) > 0 ) + { + my $tokens = []; + # results are pairs [nodeid,token] + foreach my $res ( @{$results} ) + { + push(@{$tokens}, $res->[1]); + } + print_nodeid($config_tree, $tokens, $print_details); + } + else + { + print STDERR "Nothing found\n"; + exit(1); + } + } + else + { + printf STDERR ("Unknown command: %s\n", $cmd); + exit(1); + } +} + +exit(0); + + +sub print_nodeid +{ + my $config_tree = shift; + my $tokens = shift; + my $details = shift; + + my $json = new JSON; + $json->pretty(); + $json->canonical(); + + my @all; + + foreach my $token ( @{$tokens} ) + { + my $info = { + 'nodeid' => $config_tree->getNodeParam($token, 'nodeid', 1), + }; + + if( $details ) + { + $info->{'path'} = $config_tree->path($token); + $info->{'is_leaf'} = $config_tree->isLeaf($token) ? 1:0; + $info->{'tree'} = $config_tree->treeName(); + if( $info->{'is_leaf'} ) + { + my $dsType = $config_tree->getNodeParam( $token, 'ds-type' ); + $info->{'param:ds-type'} = $dsType; + if( $dsType eq 'collector' ) + { + foreach my $param + ('collector-type', 'collector-period', + 'storage-type', 'data-file', 'data-dir', 'rrd-ds', + 'ext-service-id', + 'snmp-host', 'domain-name', 'snmp-object') + { + my $val = $config_tree->getNodeParam($token, $param); + + if( defined( $val ) ) + { + $info->{'param:' . $param} = $val; + } + } + } + } + } + + push(@all, $info); + } + + print $json->encode(\@all); +} + + + +sub render_node +{ + my $config_tree = shift; + my $token = shift; + my $view = shift; + my $out = shift; + + my $r = new Torrus::Renderer; + + my($fname, $mimetype) = $r->render($config_tree, $token, $view); + + if( defined($out) ) + { + if( not copy( $fname, $out ) ) + { + printf STDERR ("Failed to write to %s: %s\n", $out, $!); + exit(1); + } + + $fname = $out; + } + + my $json = new JSON; + $json->pretty(); + + print $json->encode({'Content-type' => $mimetype, + 'Filename' => $fname}); +} + + + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/rrddir2xml.in b/torrus/bin/rrddir2xml.in new file mode 100644 index 000000000..c82fcf871 --- /dev/null +++ b/torrus/bin/rrddir2xml.in @@ -0,0 +1,311 @@ +#!@PERL@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: rrddir2xml.in,v 1.1 2010-12-27 00:04:01 ivan Exp $ +# Stanislav Sinyagin + +# Generate Torrus XML configuration from a directory containing RRD files +# + +BEGIN { require '@devdiscover_config_pl@'; } + +use strict; +use Getopt::Long; +use IO::Dir; +use Fcntl qw(:mode); +use RRDs; + +use Torrus::ConfigBuilder; +use Torrus::Log; + + +my $creator = "Torrus version @VERSION@\n" . + "This file was generated by command:\n" . + $0 . " \\\n"; +foreach my $arg ( @ARGV ) +{ + if( $arg =~ /^--/ ) + { + $creator .= ' ' . $arg . ' '; + } + else + { + $creator .= "\'" . $arg . "\'\\\n"; + } +} +$creator .= "\nOn " . scalar(localtime(time)); + + +my $indir; +my $recursive = 0; +my $filter = '.*'; +my $outfile = 'rrddir.xml'; +my $topsubtree = '/'; +my $splitexpr = '_+'; +my $levels = 2; +my $hwpredict = 0; +my $comment; +my $debug = 0; +my $verbose = 0; + + +my $ok = GetOptions( + 'dir=s' => \$indir, + 'recursive' => \$recursive, + 'filter=s' => \$filter, + 'out=s' => \$outfile, + 'subtree=s' => \$topsubtree, + 'split=s' => \$splitexpr, + 'levels=i' => \$levels, + 'comment=s' => \$comment, + 'holtwinters' => \$hwpredict, + 'verbose' => \$verbose, + 'debug' => \$debug + ); + +if( not $ok or not $indir or scalar( @ARGV ) > 0 ) +{ + print STDERR + "Generate Torrus XML configuration from a directory with RRD files\n"; + + print STDERR "Usage: $0 --dir=path options...\n", + "Options:\n", + " --dir=path directory to read RRD files from\n", + " --recursive read the directories recursively\n", + " --filter=re filter RE for file and directory names\n", + " --out=filename output file [".$outfile."]\n", + " --subtree=subtree XML config subtree [".$topsubtree."]\n", + " --split=regexp regexp to split file names [".$splitexpr."]\n", + " --levels=integer no. of subtree levels [".$levels."]\n", + " --comment=text top subtree comment\n", + " --holtwinters enable Holt-Winters boundaries diaplay\n", + " --verbose print extra information\n", + " --debug print debugging information\n"; + + exit 1; +} + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + +if( not -d $indir ) +{ + Error('No such directory: ' . $indir); + exit 1; +} + +if( $indir !~ /^\// ) +{ + Error('Input directory must be an absolute path: ' . $indir); + exit 1; +} + +# remove trailing slash from $indir +$indir =~ s/\/$//; + +if( $topsubtree !~ /^\/[0-9A-Za-z_\-\.\/]*$/ or + $topsubtree =~ /\.\./ ) +{ + Error("Invalid format for subtree name: " . $topsubtree); + exit 1; +} + + +if( $outfile !~ /^\// ) +{ + $outfile = $Torrus::Global::siteXmlDir . '/' . $outfile; +} + +my %rrdinfos; +read_rrd_dir( \%rrdinfos, $indir, $filter, $recursive ); + +Verbose(sprintf('Found %d RRD files', scalar( keys( %rrdinfos ) ) )); + +my $cb = new Torrus::ConfigBuilder; +$cb->addCreatorInfo( $creator ); + +# Chop the first and last slashes +my $path = $topsubtree; +$path =~ s/^\///; +$path =~ s/\/$//; + +# generate subtree path XML +my $topSubtreeNode = undef; +foreach my $subtreeName ( split( '/', $path ) ) +{ + $topSubtreeNode = $cb->addSubtree( $topSubtreeNode, $subtreeName ); +} + +if( length( $comment ) > 0 ) +{ + $cb->addParam( $topSubtreeNode, 'comment', $comment ); +} + +foreach my $rrdfile ( sort keys %rrdinfos ) +{ + my @nameparts = split( $splitexpr, $rrdfile, $levels ); + + my $subtreeNode = $topSubtreeNode; + foreach my $subtreeName ( @nameparts ) + { + $subtreeNode = $cb->addSubtree( $subtreeNode, $subtreeName ); + } + + my $info = $rrdinfos{$rrdfile}; + + my $legend = + 'Directory:' . $info->{'dir'} . ';' . + 'File:' . $rrdfile . ';'; + + $cb->addParam( $subtreeNode, 'legend', $legend ); + + my %dsnames; + my $this_rrd_hwpredict = 0; + + foreach my $prop ( keys %{$info->{'rrdinfo'}} ) + { + if( $prop =~ /^ds\[(\S+)\]\./o ) + { + $dsnames{$1} = 1; + } + else + { + if( $prop =~ /^rra\[\d+\]\.cf/o and + $info->{'rrdinfo'}->{$prop} eq 'FAILURES' ) + { + $this_rrd_hwpredict = 1; + } + } + } + + if( not $hwpredict ) + { + $this_rrd_hwpredict = 0; + } + + foreach my $dsname ( sort keys %dsnames ) + { + my $dslegend = $legend . 'DS:' . $dsname . ';Type:' . + $info->{'rrdinfo'}->{'ds['.$dsname.'].type'}; + + my $params = { + 'legend' => $dslegend, + 'ds-type' => 'rrd-file', + 'leaf-type' => 'rrd-def', + 'rrd-cf' => 'AVERAGE', + 'data-file' => $rrdfile, + 'data-dir' => $info->{'dir'}, + 'rrd-ds' => $dsname, + 'rrd-hwpredict' => ($this_rrd_hwpredict ? 'enabled':'disabled') + }; + + $cb->addLeaf( $subtreeNode, $dsname, $params ); + } +} + +my $ok = $cb->toFile( $outfile ); +if( $ok ) +{ + Verbose('Wrote ' . $outfile); +} +else +{ + Error('Cannot write ' . $outfile . ': ' . $!); +} + +exit( $ok ? 0:1); + + + +sub read_rrd_dir +{ + my $infos = shift; + my $indir = shift; + my $filter = shift; + my $recursive = shift; + + Debug('Reading directory: ' . $indir); + + my @subdirs; + + my %dir; + tie( %dir, 'IO::Dir', $indir ); + + foreach my $file ( keys %dir ) + { + if( $file =~ /^\./ or $file !~ $filter ) + { + Debug('Skipping ' . $file); + next; + } + + my $mode = $dir{$file}->mode(); + if( S_ISDIR( $mode ) ) + { + Debug($file . ' is a directory'); + push( @subdirs, $file ); + } + elsif( S_ISREG( $mode ) ) + { + Debug($file . ' is a regular file'); + if( defined( $infos->{$file} ) ) + { + Warn("Duplicate file name: $file"); + } + else + { + my $fullname = $indir . '/' . $file; + my $rrdinfo = RRDs::info( $fullname ); + my $err = RRDs::error(); + if( $err ) + { + Verbose($fullname . ' is not an RRD file'); + } + else + { + Debug('Found RRD file: ' . $file); + $infos->{$file}->{'fullname'} = $fullname; + $infos->{$file}->{'dir'} = $indir; + $infos->{$file}->{'rrdinfo'} = $rrdinfo; + } + } + } + } + + untie %dir; + + if( $recursive and scalar( @subdirs ) > 0 ) + { + foreach my $subdir ( @subdirs ) + { + read_rrd_dir( $infos, $indir . '/' . $subdir, + $filter, $recursive ); + } + } +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/schedulerinfo.in b/torrus/bin/schedulerinfo.in new file mode 100644 index 000000000..42515b014 --- /dev/null +++ b/torrus/bin/schedulerinfo.in @@ -0,0 +1,454 @@ +#!@PERL@ -w +# Copyright (C) 2003 Stanislav Sinyagin +# Copyright (C) 2003 Christian Schnidrig +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: schedulerinfo.in,v 1.1 2010-12-27 00:04:00 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; + +use Torrus::ConfigTree; +use Torrus::SiteConfig; +use Torrus::SchedulerInfo; +use Torrus::Log; + +exit(1) if not Torrus::SiteConfig::verify(); + +my $tree; +my $report_config; +my $report_runtime; +my $clear_treestats; + +my $help_needed; + + +my $ok = GetOptions('tree=s' => \$tree, + 'config' => \$report_config, + 'runtime' => \$report_runtime, + 'clear' => \$clear_treestats, + 'help' => \$help_needed); + +if( not $ok or + not $tree or + not ( $report_config or $report_runtime or $clear_treestats ) or + $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME tree name\n", + " --config report scheduler configuration\n", + " --runtime report scheduler runtime statistics\n", + " --clear clear scheduler statistics for specific tree\n", + " --help this help message\n"; + exit 1; +} + + +if( not Torrus::SiteConfig::treeExists( $tree ) ) +{ + Error('Tree ' . $tree . ' does not exist'); + exit 1; +} + + +&Torrus::DB::setSafeSignalHandlers(); + +if( $clear_treestats ) +{ + my $stats = new Torrus::SchedulerInfo( -Tree => $tree, -WriteAccess => 1 ); + $stats->clearAll(); + print STDERR "Statistics cleared for tree $tree\n"; + exit 0; +} + +thickLine(); +printf("Torrus version %s\n", '@VERSION@'); +printf("Datasources tree: %s\n", $tree); +printf("Date: %s\n\n", scalar( localtime( time() ) ) ); + +if( $report_config ) +{ + my $config_tree = new Torrus::ConfigTree( -TreeName => $tree ); + if( not defined($config_tree) ) + { + Error("Configuration is not ready"); + exit 1; + } + + my $stats = { 'collectorLeaves' => {}, 'monitorLeaves' => 0 }; + + collectStats( $config_tree, $stats ); + + thickLine(); + printf("Scheduler configuration report\n\n"); + + foreach my $instance ( sort {$a<=>$b} keys %{$stats->{'collectorLeaves'}} ) + { + printf("Collector leaves for instance #%d: %d\n", + $instance, + $stats->{'collectorLeaves'}{$instance}); + } + + printf("Total monitor leaves: %d\n\n", $stats->{'monitorLeaves'}); + + printf("Scheduled leaves by type:\n"); + + foreach my $type ( sort keys %{$stats->{'leavesPerType'}} ) + { + printf(" %10s %-10d\n", $type, + $stats->{'leavesPerType'}{$type}); + } + printf("\n"); + + foreach my $instance ( sort {$a<=>$b} keys %{$stats->{'collectorLeaves'}} ) + { + if( $stats->{'collectorLeaves'}{$instance} > 0 ) + { + &Torrus::DB::checkInterrupted(); + + printf("Collector execution timeline for instance #%d:\n", + $instance); + reportTimeline( $stats->{'collectorSchedule'}{$instance} ); + } + } + + if( $stats->{'monitorLeaves'} > 0 ) + { + printf("Monitor execution timeline:\n"); + reportTimeline( $stats->{'monitorSchedule'} ); + } +} + +if( $report_runtime ) +{ + my @reportFormats = + ( + { 'label' => 'Running Time', + 'varname' => 'RunningTime' }, + + { 'label' => 'Late Start', + 'varname' => 'LateStart' }, + + { 'label' => 'Too Long', + 'varname' => 'TooLong' }, + + { 'label' => 'RRD Queue', + 'varname' => 'RRDQueue' }, + + { 'label' => 'Raw Queue', + 'varname' => 'RawQueue' } + + ); + + my @counterFormats = + ( + { 'label' => 'running cycles passed', + 'varname' => 'NTimesRunningTime' }, + + { 'label' => 'late starts', + 'varname' => 'NTimesLateStart' }, + + { 'label' => 'too long runs', + 'varname' => 'NTimesTooLong' }, + + { 'label' => 'overrun periods', + 'varname' => 'CountOverrunPeriods' }, + + { 'label' => 'missed periods', + 'varname' => 'CountMissedPeriods' } + ); + + my $sInfo = new Torrus::SchedulerInfo( '-Tree' => $tree ); + exit(1) if not defined( $sInfo ); + + my $stats = $sInfo->readStats(); + + thickLine(); + printf("Scheduler runtime report\n\n"); + + my $periodicTasks = {}; + foreach my $taskId ( keys %{$stats} ) + { + my ($type, $taskName, $instance, $period, $offset) = + split( ':', $taskId ); + if( $type eq 'P' ) + { + $periodicTasks->{$taskName}{$instance}{$period}{$offset} = $taskId; + } + } + + foreach my $taskName ( sort keys %{$periodicTasks} ) + { + foreach my $instance ( sort {$a<=>$b} + keys %{$periodicTasks->{$taskName}} ) + { + foreach my $period + ( sort {$a<=>$b} + keys %{$periodicTasks->{$taskName}{$instance}} ) + { + foreach my $offset + ( sort {$a<=>$b} + keys %{$periodicTasks->{$taskName}{$instance}{$period}} ) + { + &Torrus::DB::checkInterrupted(); + + my $taskId = + $periodicTasks->{$taskName}{$instance}{ + $period}{$offset}; + my $ref = $stats->{$taskId}; + + printf("Task: %s, Instance: %d, " . + "Period: %d seconds, Offset: %d seconds\n", + $taskName, $instance, $period, $offset); + + foreach my $format ( @counterFormats ) + { + if( defined( $ref->{$format->{'varname'}} ) ) + { + printf("%5d %s\n", + $ref->{$format->{'varname'}}, + $format->{'label'} ); + } + } + + thinLine(); + printf("%-15s%-10s%-10s%-10s%-10s\n", + '', 'Min', 'Max', 'Average', 'Exp Average'); + + foreach my $format ( @reportFormats ) + { + my $varname = $format->{'varname'}; + if( defined( $ref->{'Min' . $varname} ) ) + { + printf("%-15s%-10d%-10d%-10.1f%-10.1f\n", + $format->{'label'}, + $ref->{'Min' . $varname}, + $ref->{'Max' . $varname}, + $ref->{'Avg' . $varname}, + $ref->{'ExpAvg' . $varname}); + } + } + + thinLine(); + printf("\n"); + } + } + } + } +} + +thickLine(); +exit 0; + + +sub collectStats +{ + my $config_tree = shift; + my $stats = shift; + my $token = shift; + + if( not defined( $token ) ) + { + $token = $config_tree->token('/'); + } + + my @children = $config_tree->getChildren( $token ); + + foreach my $ctoken ( @children ) + { + &Torrus::DB::checkInterrupted(); + + if( $config_tree->isSubtree( $ctoken ) ) + { + collectStats( $config_tree, $stats, $ctoken ); + } + elsif( $config_tree->isLeaf( $ctoken ) ) + { + if( $config_tree->getNodeParam( $ctoken, 'ds-type' ) + eq 'collector' ) + { + my $instance = + $config_tree->getNodeParam + ( $ctoken, 'collector-instance' ); + + $stats->{'collectorLeaves'}{$instance}++; + + my $type = 'c:' . + $config_tree->getNodeParam( $ctoken, 'collector-type' ); + + my $period = + $config_tree->getNodeParam( $ctoken, 'collector-period' ); + $period = int( $period ); # make sure we're talking integers + + my $offset = $config_tree-> + getNodeParam( $ctoken, 'collector-timeoffset' ); + + $stats->{'leavesPerType'}{$type}++; + $stats->{'collectorSchedule'}{$instance}{$period}{ + $offset}{$type}++; + } + + if( defined( $config_tree->getNodeParam( $ctoken, 'monitor' ) ) ) + { + $stats->{'monitorLeaves'}++; + my $type = 'monitor'; + + my $period = + $config_tree->getNodeParam( $ctoken, 'monitor-period' ); + $period = int( $period ); # make sure we're talking integers + + my $offset = $config_tree-> + getNodeParam( $ctoken, 'monitor-timeoffset' ); + $offset = int($offset) % $period; + + $stats->{'leavesPerType'}{$type}++; + $stats->{'monitorSchedule'}{$period}{$offset}{$type}++; + } + } + } +} + + +# caluclate and print the schedule +sub reportTimeline +{ + my $schedule = shift; + + # calculate the common period length (least common multiple) + my $lcm = 0; + foreach my $period ( keys %{$schedule} ) + { + my $a = $period; + my $b = $lcm; + my $c; + if( $b == 0 ) + { + $lcm = $a; + } + else + { + if( $a < $b ) + { + my $tmp = $b; + $b = $a; + $a = $tmp; + } + while( $b != 0 ) + { + $c = $a % $b; + $a = $b; + $b = $c; + } + $lcm = $lcm * $period / $a; + } + } + + printf("Least common period: %d seconds\n", $lcm); + + # populate the common period + my %cp; + my $chunks = 0; + foreach my $period ( keys %{$schedule} ) + { + foreach my $offset ( keys %{$schedule->{$period}} ) + { + $chunks++; + foreach my $type ( keys %{$schedule->{$period}{$offset}} ) + { + for( my $i = 0; $i < ($lcm / $period); $i++ ) + { + $cp{$i * $period + $offset}{'col'}{$type} += + $schedule->{$period}{$offset}{$type}; + } + } + } + } + printf("Number of chunks: %d \n\n", $chunks ); + + # calculate interval lengths + + my $previous; + my $first; + foreach my $time ( sort { $a <=> $b } keys %cp ) + { + if( not defined($first) ) + { + $first = $time; + } + else + { + $cp{$previous}{'endtime'} = $time; + } + $previous = $time; + } + $cp{$previous}{'endtime'} = $lcm + $first; + + # print results + + thinLine(); + printf("%-10s%-10s%-20s%-10s\n", + 'Offset', 'Interval', 'Type', 'Data'); + printf("%-10s%-10s%-20s%-10s\n", + '(sec)', '(sec)', '', 'sources'); + thinLine(); + + foreach my $time ( sort { $a <=> $b } keys %cp ) + { + foreach my $type ( keys %{$cp{$time}{'col'}} ) + { + printf("%-10d%-10d%-20s%-10d\n", + $time, + $cp{$time}{'endtime'} - $time, + $type, + $cp{$time}{'col'}{$type} ); + } + } + thinLine(); + printf("\n"); +} + + +sub thickLine +{ + foreach my $i ( 1..75 ) + { + print '='; + } + print "\n"; +} + +sub thinLine +{ + foreach my $i ( 1..70 ) + { + print '-'; + } + print "\n"; +} + + + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/snmpfailures.in b/torrus/bin/snmpfailures.in new file mode 100644 index 000000000..f46cc2d4c --- /dev/null +++ b/torrus/bin/snmpfailures.in @@ -0,0 +1,98 @@ +#!@PERL@ -w +# Copyright (C) 2010 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: snmpfailures.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use Getopt::Long; +use JSON; + +use Torrus::SiteConfig; +use Torrus::DB; +use Torrus::Log; +use Torrus::SNMP_Failures; + +exit(1) if not Torrus::SiteConfig::verify(); + + +my $tree; +my $print_details; + +my $help_needed; + + +my $ok = GetOptions('tree=s' => \$tree, + 'details' => \$print_details, + 'help' => \$help_needed); + +if( not $ok or not $tree or + $help_needed or scalar(@ARGV) > 0 ) +{ + print STDERR "Usage: $0 --tree=NAME [options...]\n", + "Options:\n", + " --tree=NAME tree name\n", + " --details print failure details\n", + " --help this help message\n"; + exit 1; +} + + +if( not Torrus::SiteConfig::treeExists( $tree ) ) +{ + Error('Tree ' . $tree . ' does not exist'); + exit 1; +} + + +my $out = {}; + +&Torrus::DB::setSafeSignalHandlers(); + +my $nInstances = Torrus::SiteConfig::collectorInstances( $tree ); +for( my $instance = 0; $instance < $nInstances; $instance++ ) +{ + my $db_failures = new Torrus::SNMP_Failures( -Tree => $tree, + -Instance => $instance ); + + if( not defined( $db_failures ) ) + { + exit(1); + } + + + $db_failures->read( $out, -details => $print_details ); + undef $db_failures; +} + + +my $json = new JSON; +$json->canonical(); +$json->pretty(); +print $json->encode($out); + + +exit(0); + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/srvderive.in b/torrus/bin/srvderive.in new file mode 100644 index 000000000..17749170c --- /dev/null +++ b/torrus/bin/srvderive.in @@ -0,0 +1,371 @@ +#!@PERL@ +# Copyright (C) 2008 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: srvderive.in,v 1.1 2010-12-27 00:04:02 ivan Exp $ +# Stanislav Sinyagin + +# Combine SUM or MAX from several service IDs and create a new one + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use POSIX qw(floor); +use Getopt::Long; +use Date::Parse; +use Date::Format; +use Math::BigFloat; + +use Torrus::Log; +use Torrus::ServiceID; +use Torrus::SQL::SrvExport; + +my $startdate; +my $enddate; +my $onemonth; + +my $function; +my @input; +my $output; + +my $step = 300; + +my $debug; +my $verbose; +my $help_needed; + +my %known_functions = ('MAX' => \&function_max, 'SUM' => \&function_sum); + + +my $ok = GetOptions( + 'start=s' => \$startdate, + 'end=s' => \$enddate, + 'month' => \$onemonth, + 'func=s' => \$function, + 'in=s' => \@input, + 'out=s' => \$output, + 'step=i' => \$step, + 'verbose' => \$verbose, + 'debug' => \$debug, + 'help' => \$help_needed, + ); + +if( $help_needed or not $ok or (not $startdate) or + (defined($enddate) + defined($onemonth) != 1) or + not $function or + (scalar(@input) < 2 and scalar( @ARGV ) < 2) or + not $output ) +{ + print STDERR "Usage: $0 TIMESPAN OUTPUT FUNCTION SOURCES...\n\n", + "TIMESPAN:\n", + " --start=YYYY-MM-DD [mandatory] Start date\n", + " --month [optional] Calendar month timespan\n", + " --end=YYYY-MM-DD [optional] Next day after the timespan end\n", + " Either --month or --end option must be defined\n\n", + "OUTPUT:\n", + " --out=SERVICEID [mandatory] Output Service ID\n\n", + "FUNCTION:\n", + " --func=MAX|SUM [mandatory] Aggregation function\n\n", + "SOURCES:\n", + " Either --in=SERVICEID, or Service ID names as command line ", + "arguments.\n", + " Minimum 2 sources required\n\n", + "Options:\n", + " --step=N [300] service data interval\n", + " --verbose print extra information\n", + " --debug print debugging information\n", + " --help print usage information\n", + "\n"; + + exit 1; +} + +push(@input, @ARGV); + +if( not defined($known_functions{$function}) ) +{ + printf STDERR ("Unknown function: %s. Must be onne of: %s\n", + $function, join(', ', sort keys %known_functions)); + exit 1; +} + + + +if( $debug ) +{ + Torrus::Log::setLevel('debug'); +} +elsif( $verbose ) +{ + Torrus::Log::setLevel('verbose'); +} + + +my $starttime = str2time( $startdate ); +if( not defined($starttime) ) +{ + Error('Cannot parse start date: ' . $startdate); + exit 1; +} + +# Canonize the date +$startdate = time2str('%Y-%m-%d', $starttime); + +my $endtime; + +if( defined($enddate) ) +{ + $endtime = str2time( $startdate ); + if( not defined($endtime) ) + { + Error('Cannot parse end date: ' . $enddate); + exit 1; + } + + if( $endtime < $starttime ) + { + Error('End date is earlier than start date'); + exit 1; + } +} +else +{ + # Calculate +1 calendar month + + my ($ss,$mm,$hh,$day,$month,$year,$zone) = + strptime( $startdate ); + $year += 1900; + $month++; + $day++; + + my $endyear = $year; + my $endmonth = $month + 1; + + if( $endmonth > 12 ) + { + $endmonth = 1; + $endyear++; + } + + $endtime = str2time( sprintf('%.4d-%.2d-%.2d', + $endyear, $endmonth, $day) ); + if( not defined($endtime) ) + { + # oops, it was past the end of the month + $day++; + $endmonth++; + if( $endmonth > 12 ) + { + $endmonth = 1; + $endyear++; + } + + $endtime = str2time( sprintf('%.4d-%.2d-%.2d', + $endyear, $endmonth, $day) ); + + if( not defined($endtime) ) + { + Error('Cannot determine the end date'); + exit 1; + } + } +} + +# Canonize the date +$enddate = time2str('%Y-%m-%d', $endtime); + + +Verbose('Start time: ', scalar(localtime($starttime))); +Verbose('End time: ', scalar(localtime($endtime))); + +my $srvExp = Torrus::SQL::SrvExport->new(); +if( not defined( $srvExp ) ) +{ + Error('Cannot connect to the SQL database'); + exit 1; +} + +my $srvIDs = $srvExp->getServiceIDs(); + +foreach my $serviceid ( @input ) +{ + if( not grep {$serviceid eq $_} @{$srvIDs} ) + { + Error('Input service ID not found in the database: ' . $serviceid); + exit 1; + } +} + +&Torrus::DB::setSafeSignalHandlers(); + +# Check if the output ServiceID exists in the local database +# The database contains only IDs generated from datasource trees. + +my $srvIDParams = new Torrus::ServiceID(); +if( $srvIDParams->idExists( $output ) ) +{ + Error('Output service ID was previously created from Torrus ' . + 'datasource tree. Cannot override it: ' . $output); + exit 1; +} +&Torrus::DB::cleanupEnvironment(); +&Torrus::DB::setUnsafeSignalHandlers(); + + +my %in_data; + +foreach my $serviceid ( @input ) +{ + $in_data{$serviceid} = + $srvExp->getIntervalData( $startdate, $enddate, $serviceid ); + + Verbose(sprintf('Loaded %d rows of data for %s', + scalar( @{$in_data{$serviceid}} ), + $serviceid)); +} + +my $n_points = floor( ($endtime - $starttime) / $step ); + +my %aligned_data; + +foreach my $serviceid ( @input ) +{ + my @aligned = (); + $#aligned = $n_points; + + # Fill in the aligned array. For each interval by modulo(step), + # we take the sum of values that get into that interval + + foreach my $row ( @{$in_data{$serviceid}} ) + { + my $rowtime = str2time( $row->{'srv_date'} . 'T' . + $row->{'srv_time'} ); + + my $pos = floor( ($rowtime - $starttime) / $step ); + my $value = Math::BigFloat->new( $row->{'value'} ); + if( $value->is_nan() ) + { + $value->bzero(); + } + + if( not defined($aligned[$pos])) + { + $aligned[$pos] = $value; + } + else + { + $aligned[$pos]->badd($value); + } + } + + $aligned_data{$serviceid} = \@aligned; +} + +Verbose(sprintf('Aligned data into %d intervals', $n_points)); + +# Store the derived data +my $dbh = Torrus::SQL::SrvExport->dbh(); +if( not defined( $dbh ) ) +{ + Error('Lost SQL connection'); + exit 1; +} + +my $sth = $dbh->prepare( Torrus::SQL::SrvExport->sqlInsertStatement() ); +if( not defined( $sth ) ) +{ + Error('Error preparing the SQL statement: ' . $dbh->errstr); +} + + + +for( my $pos = 0; $pos < $n_points; $pos++ ) +{ + my @args; + foreach my $serviceid ( @input ) + { + my $val = $aligned_data{$serviceid}->[$pos]; + if( defined( $val ) ) + { + push( @args, $val ); + } + } + + if( scalar( @args ) > 0 ) + { + my $value = &{$known_functions{$function}}(@args); + + my $timestamp = $starttime + $pos * $step; + my $datestr = time2str('%Y-%m-%d', $timestamp); + my $timestr = time2str('%H:%M:%S', $timestamp); + + if( isDebug() ) + { + Debug('Updating SQL database: ' . + join(', ', $datestr, $timestr, + $output, $value, $step )); + } + + if( not $sth->execute( $datestr, $timestr, + $output, $value, $step ) ) + { + Error('Error executing SQL: ' . $dbh->errstr); + exit 1; + } + } +} + +Verbose('Database update finished'); + +exit($ok ? 0:1); + + +sub function_max +{ + my $value = Math::BigFloat->new(); + $value->binf('-'); + + foreach my $a ( @_ ) + { + if( $value->bcmp($a) < 0 ) + { + $value = Math::BigFloat->new($a); + } + } + + return $value; +} + + +sub function_sum +{ + my $value = Math::BigFloat->new(0); + + foreach my $a ( @_ ) + { + $value->badd($a); + } + + return $value; +} + + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/torrus.fcgi.in b/torrus/bin/torrus.fcgi.in new file mode 100644 index 000000000..fc6ee41a2 --- /dev/null +++ b/torrus/bin/torrus.fcgi.in @@ -0,0 +1,50 @@ +#!@PERL@ -w +# Copyright (C) 2010 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: torrus.fcgi.in,v 1.1 2010-12-27 00:04:02 ivan Exp $ +# Stanislav Sinyagin + +# FastCGI handler +# Can be used as alternative to mod_perl in Apache +# Can also be used with lighttpd + + +BEGIN { require '@torrus_config_pl@'; } + +use strict; +use CGI::Fast; +use Torrus::Log; +use Torrus::CGI; + + +if( $Torrus::Renderer::globalDebug ) +{ + &Torrus::Log::setLevel('debug'); +} + + +while( my $q = new CGI::Fast ) +{ + Torrus::CGI->process($q); +} + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/torrus.in b/torrus/bin/torrus.in new file mode 100644 index 000000000..7c5118c2c --- /dev/null +++ b/torrus/bin/torrus.in @@ -0,0 +1,76 @@ +#!@SHELL@ +# Copyright (C) 2004 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: torrus.in,v 1.1 2010-12-27 00:04:00 ivan Exp $ +# Stanislav Sinyagin +# + +# CLI wrapper for Torrus utilities + +cmd=$1 + +commands="acl=acledit acledit=acledit \ + bs=buildsearchdb buildsearchdb=buildsearchdb \ + cleanup=cleanup \ + clc=clearcache clearcache=clearcache \ + collector=collector \ + compile=compilexml compilexml=compilexml \ + configinfo=configinfo ci=configinfo \ + snapshot=configsnapshot configsnapshot=configsnapshot \ + dd=devdiscover discover=devdiscover devdiscover=devdiscover \ + fm=flushmonitors flushmonitors=flushmonitors \ + genddx=genddx \ + genlist=genlist \ + genreport=genreport report=genreport \ + install_plugin=install_plugin \ + monitor=monitor \ + nodeid=nodeid ni=nodeid \ + rrddir=rrddir2xml rrddir2xml=rrddir2xml \ + schedulerinfo=schedulerinfo si=schedulerinfo \ + snmpfailures=snmpfailures failures=snmpfailures \ + srvderive=srvderive derive=srvderive \ + ttproclist=ttproclist" + +for f in `ls -1 @plugwrapperdir@`; do + . @plugwrapperdir@/${f} +done + +for pair in ${commands}; do + eval execcmd_${pair} +done + +eval expanded_cmd='${execcmd_'${cmd}'}' + + +if test ${expanded_cmd:-no} = no; then + echo "Usage: $0 cmd [options...]" 1>&2 + echo " cmd is one of:" 1>&2 + for pair in ${commands}; do + eval `echo ${pair} | sed -e 's/=.*//' -e 's/^/a=/'` + echo " "${a} + done +else + shift + @pkgbindir@/${expanded_cmd} "$@" +fi + + +# Local Variables: +# mode: shell-script +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/bin/ttproclist.in b/torrus/bin/ttproclist.in new file mode 100644 index 000000000..614cdd618 --- /dev/null +++ b/torrus/bin/ttproclist.in @@ -0,0 +1,135 @@ +#!@PERL@ +# Copyright (C) 2005 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: ttproclist.in,v 1.1 2010-12-27 00:04:03 ivan Exp $ +# Stanislav Sinyagin + + +use strict; +use Template; +use Getopt::Long; + +my $template; +my $outfile; +my $nodelist; +my $parameters; + + +my $creator = "Torrus version @VERSION@\n" . + "This file was generated by command:\n" . + $0 . " \\\n"; +foreach my $arg ( @ARGV ) +{ + if( $arg =~ /^--/ ) + { + $creator .= ' ' . $arg . ' '; + } + else + { + $creator .= "\'" . $arg . "\'\\\n"; + } +} +$creator .= "\nOn " . scalar(localtime(time)); + + +my $ok = GetOptions( 'tmpl=s' => \$template, + 'out=s' => \$outfile, + 'nodes=s' => \$nodelist, + 'param=s' => \$parameters ); + +if( not $ok or not $template or not $outfile or not $nodelist) +{ + print STDERR "Process a template with a nodelist\n\n"; + + print STDERR "Usage: $0 options...\n", + "Mandatory options:\n", + " --tmpl=filename template file name\n", + " --out=filename output file\n", + " --nodes=filename file with nodes\n", + "Options:\n", + " --param=NAME:VALUE,NAME:VALUE... parameters passed to template\n"; + exit 1; +} + +my @rawnodes; + +if( not open( NODES, $nodelist ) ) +{ + print STDERR "Cannot open $nodelist: $!\n"; + exit 1; +} +while() +{ + s/^\s+//; + s/\s+$//; + push( @rawnodes, split( /\s+/ ) ); +} +close( NODES ); + +my %nodes; +foreach my $node ( @rawnodes ) +{ + my $symname = $node; + if( $node =~ /([^:]+):(.+)/ ) + { + $node = $1; + $symname = $2; + } + + $nodes{$node} = $symname; +} + +my %params; +if( defined( $parameters ) ) +{ + foreach my $pair ( split( '\s*,\s*', $parameters ) ) + { + my ($name, $val) = split( '\s*:\s*', $pair ); + $params{$name} = $val; + } +} + +my $tt = new Template( INCLUDE_PATH => '@tmpluserdir@', + ABSOLUTE => 1, + RELATIVE => 1, + TRIM => 1 ); + +my $vars = +{ + 'nodes' => \%nodes, + 'param' => \%params, + 'nodesfile' => $nodelist, + 'creator' => $creator, + 'lc' => sub{ return lc $_[0] }, + 'uc' => sub{ return uc $_[0] } +}; + +my $result = $tt->process($template, $vars, $outfile); + +if( not $result ) +{ + print STDERR "Error while processing template: ".$tt->error()."\n"; +} + +exit( $result ? 0:1 ); + + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/configs/Makefile.am b/torrus/configs/Makefile.am new file mode 100644 index 000000000..2b10a7cb0 --- /dev/null +++ b/torrus/configs/Makefile.am @@ -0,0 +1,52 @@ + +# Copyright (C) 2004 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.am,v 1.1 2010-12-27 00:04:41 ivan Exp $ +# Stanislav Sinyagin +# + +EXTRA_DIST = \ + devdiscover-config.pl \ + devdiscover-siteconfig.pl \ + email-siteconfig.pl \ + initscript.conf \ + notify-siteconfig.pl \ + snmptrap-siteconfig.pl \ + torrus-config.pl \ + torrus-siteconfig.pl \ + webmux.pl \ + webmux2.pl + +DISTCLEANFILES = instvars + +instvarsdir = $(cfgdefdir) +nodist_instvars_DATA = instvars + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(cfgdefdir) $(DESTDIR)$(siteconfdir) + for f in initscript.conf devdiscover-config.pl torrus-config.pl \ + webmux.pl webmux2.pl; do \ + @abs_top_builddir@/setup_tools/substvars.sh $$f > \ + $(DESTDIR)$(cfgdefdir)/$$f; \ + done + for f in devdiscover-siteconfig.pl email-siteconfig.pl \ + notify-siteconfig.pl \ + snmptrap-siteconfig.pl torrus-siteconfig.pl; do \ + if test ! -r $(DESTDIR)$(siteconfdir)/$$f; then \ + $(INSTALL_DATA) $$f $(DESTDIR)$(siteconfdir)/$$f; \ + fi \ + done diff --git a/torrus/configs/Makefile.in b/torrus/configs/Makefile.in new file mode 100644 index 000000000..a3c979e7c --- /dev/null +++ b/torrus/configs/Makefile.in @@ -0,0 +1,399 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2004 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.in,v 1.1 2010-12-27 00:04:41 ivan Exp $ +# Stanislav Sinyagin +# + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = configs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(instvarsdir)" +nodist_instvarsDATA_INSTALL = $(INSTALL_DATA) +DATA = $(nodist_instvars_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +FIND = @FIND@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KILL = @KILL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERLINC = @PERLINC@ +POD2MAN = @POD2MAN@ +POD2MAN_PRESENT_FALSE = @POD2MAN_PRESENT_FALSE@ +POD2MAN_PRESENT_TRUE = @POD2MAN_PRESENT_TRUE@ +POD2TEXT = @POD2TEXT@ +POD2TEXT_PRESENT_FALSE = @POD2TEXT_PRESENT_FALSE@ +POD2TEXT_PRESENT_TRUE = @POD2TEXT_PRESENT_TRUE@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLEEP = @SLEEP@ +STRIP = @STRIP@ +SU = @SU@ +VERSION = @VERSION@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +cachedir = @cachedir@ +cfgdefdir = @cfgdefdir@ +datadir = @datadir@ +dbhome = @dbhome@ +defrrddir = @defrrddir@ +distxmldir = @distxmldir@ +enable_pkgonly = @enable_pkgonly@ +enable_varperm = @enable_varperm@ +exec_prefix = @exec_prefix@ +exmpdir = @exmpdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mansec_misc = @mansec_misc@ +mansec_usercmd = @mansec_usercmd@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +perlithreads = @perlithreads@ +perllibdir = @perllibdir@ +perllibdirs = @perllibdirs@ +piddir = @piddir@ +pkgbindir = @pkgbindir@ +pkgdocdir = @pkgdocdir@ +pkghome = @pkghome@ +plugdevdisccfgdir = @plugdevdisccfgdir@ +pluginsdir = @pluginsdir@ +plugtorruscfgdir = @plugtorruscfgdir@ +plugwrapperdir = @plugwrapperdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +reportsdir = @reportsdir@ +sbindir = @sbindir@ +scriptsdir = @scriptsdir@ +seslockdir = @seslockdir@ +sesstordir = @sesstordir@ +sharedstatedir = @sharedstatedir@ +siteconfdir = @siteconfdir@ +sitedir = @sitedir@ +sitexmldir = @sitexmldir@ +supdir = @supdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +tmpldir = @tmpldir@ +tmpluserdir = @tmpluserdir@ +torrus_user = @torrus_user@ +var_group = @var_group@ +var_mode = @var_mode@ +var_user = @var_user@ +varprefix = @varprefix@ +webplaindir = @webplaindir@ +webscriptsdir = @webscriptsdir@ +wrapperdir = @wrapperdir@ +EXTRA_DIST = \ + devdiscover-config.pl \ + devdiscover-siteconfig.pl \ + email-siteconfig.pl \ + initscript.conf \ + notify-siteconfig.pl \ + snmptrap-siteconfig.pl \ + torrus-config.pl \ + torrus-siteconfig.pl \ + webmux.pl \ + webmux2.pl + +DISTCLEANFILES = instvars +instvarsdir = $(cfgdefdir) +nodist_instvars_DATA = instvars +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu configs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu configs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +uninstall-info-am: +install-nodist_instvarsDATA: $(nodist_instvars_DATA) + @$(NORMAL_INSTALL) + test -z "$(instvarsdir)" || $(mkdir_p) "$(DESTDIR)$(instvarsdir)" + @list='$(nodist_instvars_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(nodist_instvarsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(instvarsdir)/$$f'"; \ + $(nodist_instvarsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(instvarsdir)/$$f"; \ + done + +uninstall-nodist_instvarsDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_instvars_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(instvarsdir)/$$f'"; \ + rm -f "$(DESTDIR)$(instvarsdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(instvarsdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-data-local install-nodist_instvarsDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-nodist_instvarsDATA + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-data-local install-exec install-exec-am install-info \ + install-info-am install-man install-nodist_instvarsDATA \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am uninstall-nodist_instvarsDATA + + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(cfgdefdir) $(DESTDIR)$(siteconfdir) + for f in initscript.conf devdiscover-config.pl torrus-config.pl \ + webmux.pl webmux2.pl; do \ + @abs_top_builddir@/setup_tools/substvars.sh $$f > \ + $(DESTDIR)$(cfgdefdir)/$$f; \ + done + for f in devdiscover-siteconfig.pl email-siteconfig.pl \ + notify-siteconfig.pl \ + snmptrap-siteconfig.pl torrus-siteconfig.pl; do \ + if test ! -r $(DESTDIR)$(siteconfdir)/$$f; then \ + $(INSTALL_DATA) $$f $(DESTDIR)$(siteconfdir)/$$f; \ + fi \ + done +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/torrus/configs/devdiscover-config.pl b/torrus/configs/devdiscover-config.pl new file mode 100644 index 000000000..34c6dd22e --- /dev/null +++ b/torrus/configs/devdiscover-config.pl @@ -0,0 +1,1430 @@ +# Copyright (C) 2003 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: devdiscover-config.pl,v 1.1 2010-12-27 00:04:42 ivan Exp $ +# Stanislav Sinyagin + + +# DO NOT EDIT THIS FILE! + +# Torrus Device Discovery local configuration. +# Put all your local settings into devdiscover-siteconfig.pl + +use lib(@perllibdirs@); + +$Torrus::Global::version = '@VERSION@'; +$Torrus::Global::discoveryDir = '@sitedir@/discovery/'; +$Torrus::Global::siteXmlDir = '@sitexmldir@'; + +$Torrus::Global::threadsEnabled = '@perlithreads@'; + +$Torrus::DevDiscover::timeFormat = '%d-%m-%Y %H:%M'; + + +@Torrus::DevDiscover::loadModules = + ( + 'Torrus::DevDiscover::RFC1628_UPS_MIB', + 'Torrus::DevDiscover::RFC1657_BGP4_MIB', + 'Torrus::DevDiscover::RFC2011_IP_MIB', + 'Torrus::DevDiscover::RFC2863_IF_MIB', + 'Torrus::DevDiscover::RFC2662_ADSL_LINE', # needs testing + 'Torrus::DevDiscover::RFC2670_DOCS_IF', + 'Torrus::DevDiscover::RFC2737_ENTITY_MIB', + 'Torrus::DevDiscover::RFC2790_HOST_RESOURCES', + 'Torrus::DevDiscover::Alteon', + 'Torrus::DevDiscover::ALU_Timetra', + 'Torrus::DevDiscover::AlliedTelesyn_PBC18', + 'Torrus::DevDiscover::Apple_AE', + 'Torrus::DevDiscover::Arbor_E', + 'Torrus::DevDiscover::Arista', + 'Torrus::DevDiscover::AscendMax', + 'Torrus::DevDiscover::ATMEL', + 'Torrus::DevDiscover::AxxessIT', + 'Torrus::DevDiscover::BetterNetworks', + 'Torrus::DevDiscover::CasaCMTS', + 'Torrus::DevDiscover::CiscoCatOS', + 'Torrus::DevDiscover::CiscoFirewall', + 'Torrus::DevDiscover::CiscoGeneric', + 'Torrus::DevDiscover::CiscoIOS', + 'Torrus::DevDiscover::CiscoIOS_Docsis', + 'Torrus::DevDiscover::CiscoIOS_MacAccounting', + 'Torrus::DevDiscover::CiscoIOS_SAA', + 'Torrus::DevDiscover::CiscoSCE', + 'Torrus::DevDiscover::CiscoVDSL', + 'Torrus::DevDiscover::CompaqCIM', + 'Torrus::DevDiscover::EmpireSystemedge', + 'Torrus::DevDiscover::F5BigIp', + 'Torrus::DevDiscover::Foundry', + 'Torrus::DevDiscover::FTOS', + 'Torrus::DevDiscover::Jacarta', + 'Torrus::DevDiscover::JunOS', + 'Torrus::DevDiscover::Liebert', + 'Torrus::DevDiscover::MicrosoftWindows', + 'Torrus::DevDiscover::MotorolaBSR', + 'Torrus::DevDiscover::NetApp', + 'Torrus::DevDiscover::NetScreen', + 'Torrus::DevDiscover::NetBotz', + 'Torrus::DevDiscover::OracleDatabase', + 'Torrus::DevDiscover::Paradyne', # needs testing + 'Torrus::DevDiscover::RFC1697_RDBMS', + 'Torrus::DevDiscover::Symmetricom', + 'Torrus::DevDiscover::UcdSnmp', + 'Torrus::DevDiscover::Xylan' + ); + + + +# Template name and source file for each template referenced in discovery +# modules + +%Torrus::ConfigBuilder::templateRegistry = + ( + #### SNMP defaults + '::holt-winters-defaults' => { + 'name' => 'holt-winters-defaults', + 'source' => 'snmp-defs.xml' + }, + '::snmp-defaults' => { + 'name' => 'snmp-defaults', + 'source' => 'snmp-defs.xml' + }, + '::viewonly-defaults' => { + 'name' => 'viewonly-defaults', + 'source' => 'snmp-defs.xml' + }, + + #### CDef Collector defaults + '::cdef-collector-defaults' => { + 'name' => 'cdef-collector-defaults', + 'source' => 'cdef-collector-defs.xml' + }, + + #### UPS-MIB + 'RFC1628_UPS_MIB::battery-subtree' => { + 'name' => 'battery-subtree', + 'source' => 'generic/rfc1628.ups.xml' + }, + 'RFC1628_UPS_MIB::ups-input-subtree' => { + 'name' => 'ups-input-subtree', + 'source' => 'generic/rfc1628.ups.xml' + }, + 'RFC1628_UPS::ups-input-leaf' => { + 'name' => 'ups-input-leaf', + 'source' => 'generic/rfc1628.ups.xml' + }, + 'RFC1628_UPS_MIB::ups-output-subtree' => { + 'name' => 'ups-output-subtree', + 'source' => 'generic/rfc1628.ups.xml' + }, + 'RFC1628_UPS::ups-output-leaf' => { + 'name' => 'ups-output-leaf', + 'source' => 'generic/rfc1628.ups.xml' + }, + 'RFC1628_UPS_MIB::ups-bypass-subtree' => { + 'name' => 'ups-bypass-subtree', + 'source' => 'generic/rfc1628.ups.xml' + }, + 'RFC1628_UPS::ups-bypass-leaf' => { + 'name' => 'ups-bypass-leaf', + 'source' => 'generic/rfc1628.ups.xml' + }, + + #### IF-MIB + 'RFC2863_IF_MIB::rfc2863-ifmib-hostlevel' => { + 'name' => 'rfc2863-ifmib-hostlevel', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::rfc2863-ifmib-subtree' => { + 'name' => 'rfc2863-ifmib-subtree', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::iftable-octets' => { + 'name' => 'iftable-octets', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::iftable-ucast-packets' => { + 'name' => 'iftable-ucast-packets', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::iftable-discards-in' => { + 'name' => 'iftable-discards-in', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::iftable-discards-out' => { + 'name' => 'iftable-discards-out', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::iftable-errors-in' => { + 'name' => 'iftable-errors-in', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::iftable-errors-out' => { + 'name' => 'iftable-errors-out', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::ifxtable-hcoctets' => { + 'name' => 'ifxtable-hcoctets', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::ifxtable-hcucast-packets' => { + 'name' => 'ifxtable-hcucast-packets', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + 'RFC2863_IF_MIB::interface-bandwidth-usage' => { + 'name' => 'interface-bandwidth-usage', + 'source' => 'generic/rfc2863.if-mib.xml' + }, + + #### RDBMS MIB + 'RFC1697_RDBMS::rdbms-dbtable' => { + 'name' => 'rdbms-dbtable', + 'source' => 'generic/rfc1697.rdbms.xml', + }, + + #### DOCSIS MIB + 'RFC2670_DOCS_IF::docsis-downstream-subtree' => { + 'name' => 'docsis-downstream-subtree', + 'source' => 'generic/rfc2670.docsis-if.xml' + }, + 'RFC2670_DOCS_IF::docsis-downstream-util' => { + 'name' => 'docsis-downstream-util', + 'source' => 'generic/rfc2670.docsis-if.xml' + }, + 'RFC2670_DOCS_IF::docsis-upstream-subtree' => { + 'name' => 'docsis-upstream-subtree', + 'source' => 'generic/rfc2670.docsis-if.xml' + }, + 'RFC2670_DOCS_IF::docsis-upstream-stats' => { + 'name' => 'docsis-upstream-stats', + 'source' => 'generic/rfc2670.docsis-if.xml' + }, + + #### RFC2790_HOST_RESOURCES + 'RFC2790_HOST_RESOURCES::hr-system-performance-subtree' => { + 'name' => 'hr-system-performance-subtree', + 'source' => 'generic/rfc2790.host-resources.xml' + }, + 'RFC2790_HOST_RESOURCES::hr-system-uptime' => { + 'name' => 'hr-system-uptime', + 'source' => 'generic/rfc2790.host-resources.xml' + }, + 'RFC2790_HOST_RESOURCES::hr-system-num-users' => { + 'name' => 'hr-system-num-users', + 'source' => 'generic/rfc2790.host-resources.xml' + }, + 'RFC2790_HOST_RESOURCES::hr-system-processes' => { + 'name' => 'hr-system-processes', + 'source' => 'generic/rfc2790.host-resources.xml' + }, + 'RFC2790_HOST_RESOURCES::hr-storage-subtree' => { + 'name' => 'hr-storage-subtree', + 'source' => 'generic/rfc2790.host-resources.xml' + }, + 'RFC2790_HOST_RESOURCES::hr-storage-usage' => { + 'name' => 'hr-storage-usage', + 'source' => 'generic/rfc2790.host-resources.xml' + }, + + #### ADSL-LINE-MIB + 'RFC2662_ADSL_LINE::adsl-line-interface' => { + 'name' => 'adsl-line-interface', + 'source' => 'generic/rfc2662.adsl-line.xml' + }, + + #### Alteon application switches + 'Alteon::alteon-cpu' => { + 'name' => 'alteon-cpu', + 'source' => 'vendor/alteon.xml' + }, + 'Alteon::alteon-mem' => { + 'name' => 'alteon-mem', + 'source' => 'vendor/alteon.xml' + }, + 'Alteon::alteon-packets' => { + 'name' => 'alteon-packets', + 'source' => 'vendor/alteon.xml' + }, + 'Alteon::alteon-sensor' => { + 'name' => 'alteon-sensor', + 'source' => 'vendor/alteon.xml' + }, + 'Alteon::alteon-vserver-subtree' => { + 'name' => 'alteon-vserver-subtree', + 'source' => 'vendor/alteon.xml' + }, + 'Alteon::alteon-vserver' => { + 'name' => 'alteon-vserver', + 'source' => 'vendor/alteon.xml' + }, + 'Alteon::alteon-maint-subtree' => { + 'name' => 'alteon-maint-subtree', + 'source' => 'vendor/alteon.xml' + }, + 'Alteon::alteon-maint' => { + 'name' => 'alteon-maint', + 'source' => 'vendor/alteon.xml' + }, + + #### Alcatel-Lucent ESS and SR + 'ALU_Timetra::alu-timetra-customer' => { + 'name' => 'alu-timetra-customer', + 'source' => 'vendor/alu-timetra.xml' + }, + 'ALU_Timetra::alu-timetra-sap' => { + 'name' => 'alu-timetra-sap', + 'source' => 'vendor/alu-timetra.xml' + }, + + #### Apple Airport Extreme + 'Apple_AE::ae-wireless-clients-subtree' => { + 'name' => 'ae-wireless-clients-subtree', + 'source' => 'vendor/apple.ae.xml' + }, + 'Apple_AE::ae-wireless-clients-leaf' => { + 'name' => 'ae-wireless-clients-leaf', + 'source' => 'vendor/apple.ae.xml' + }, + 'Apple_AE::ae-global-stats' => { + 'name' => 'ae-global-stats', + 'source' => 'vendor/apple.ae.xml' + }, + + #### Arbor Networks E Series + 'Arbor_E::arbor-bundle-subtree' => { + 'name' => 'arbor-bundle-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-bundle' => { + 'name' => 'arbor-bundle', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-bundle-deny' => { + 'name' => 'arbor-bundle-deny', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-bundle-pktsize' => { + 'name' => 'arbor-bundle-pktsize', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-bundle-ratelimit' => { + 'name' => 'arbor-bundle-ratelimit', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-bundle-subcount' => { + 'name' => 'arbor-bundle-subcount', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-flowlkup-subtree' => { + 'name' => 'arbor-flowlkup-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-flowlkup' => { + 'name' => 'arbor-flowlkup', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::arbor-flowlkup-leaf' => { + 'name' => 'arbor-flowlkup-leaf', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-buffers' => { + 'name' => 'e30-buffers', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-bundle-subtree' => { + 'name' => 'e30-bundle-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-bundle' => { + 'name' => 'e30-bundle', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-bundle-deny' => { + 'name' => 'e30-bundle-deny', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-bundle-ratelimit' => { + 'name' => 'e30-bundle-ratelimit', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-cpu' => { + 'name' => 'e30-cpu', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-fwdTable' => { + 'name' => 'e30-fwdTable', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-fwdTable-login' => { + 'name' => 'e30-fwdTable-login', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-hdd-subtree' => { + 'name' => 'e30-hdd-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-hdd' => { + 'name' => 'e30-hdd', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-hdd-errors' => { + 'name' => 'e30-hdd-errors', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-hdd-logs' => { + 'name' => 'e30-hdd-logs', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-l2tp-subtree' => { + 'name' => 'e30-l2tp-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-l2tp' => { + 'name' => 'e30-l2tp', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-l2tp-secure-endpoints-subtree' => { + 'name' => 'e30-l2tp-secure-endpoints-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-l2tp-secure-endpoints-leaf' => { + 'name' => 'e30-l2tp-secure-endpoints-leaf', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-mem' => { + 'name' => 'e30-mem', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-mempool-subtree' => { + 'name' => 'e30-mempool-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-mempool' => { + 'name' => 'e30-mempool', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e30-slowpath' => { + 'name' => 'e30-slowpath', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-cpu-subtree' => { + 'name' => 'e100-cpu-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-cpu' => { + 'name' => 'e100-cpu', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-hdd-subtree' => { + 'name' => 'e100-hdd-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-hdd' => { + 'name' => 'e100-hdd', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-mem-subtree' => { + 'name' => 'e100-mem-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-mem' => { + 'name' => 'e100-mem', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-policymgmt' => { + 'name' => 'e100-policymgmt', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-submgmt-subtree' => { + 'name' => 'e100-submgmt-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-submgmt-state-subtree' => { + 'name' => 'e100-submgmt-state-subtree', + 'source' => 'vendor/arbor_e.xml' + }, + 'Arbor_E::e100-submgmt-state' => { + 'name' => 'e100-submgmt-state', + 'source' => 'vendor/arbor_e.xml' + }, + + #### ATMEL smartbridges + 'ATMEL::atmel-device-subtree' => { + 'name' => 'atmel-device-subtree', + 'source' => 'vendor/atmel.xml' + }, + 'ATMEL::atmel-accesspoint-stats' => { + 'name' => 'atmel-accesspoint-stats', + 'source' => 'vendor/atmel.xml' + }, + 'ATMEL::atmel-client-stats' => { + 'name' => 'atmel-client-stats', + 'source' => 'vendor/atmel.xml' + }, + + #### AscendMax + 'AscendMax::ascend-totalcalls' => { + 'name' => 'ascend-totalcalls', + 'source' => 'vendor/ascend.max.xml' + }, + 'AscendMax::ascend-line-stats' => { + 'name' => 'ascend-line-stats', + 'source' => 'vendor/ascend.max.xml' + }, + + #### BetterNetworks + 'BetterNetworks::betternetworks-sensor' => { + 'name' => 'betternetworks-sensor', + 'source' => 'vendor/betternetworks.xml' + }, + + #### CASA Systems CMTS + 'CasaCMTS::casa-docsis-mac-subtree' => { + 'name' => 'casa-docsis-mac-subtree', + 'source' => 'vendor/casa-cmts.xml' + }, + 'CasaCMTS::casa-docsis-mac-util' => { + 'name' => 'casa-docsis-mac-util', + 'source' => 'vendor/casa-cmts.xml' + }, + 'CasaCMTS::casa-docsis-upstream-util' => { + 'name' => 'casa-docsis-upstream-util', + 'source' => 'vendor/casa-cmts.xml' + }, + 'CasaCMTS::casa-docsis-downstream-util' => { + 'name' => 'casa-docsis-downstream-util', + 'source' => 'vendor/casa-cmts.xml' + }, + + #### Cisco + 'CiscoGeneric::cisco-cpu' => { + 'name' => 'cisco-cpu', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-cpu-revised' => { + 'name' => 'cisco-cpu-revised', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-cpu-usage-subtree' => { + 'name' => 'cisco-cpu-usage-subtree', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::old-cisco-cpu' => { + 'name' => 'old-cisco-cpu', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::old-cisco-mempool' => { + 'name' => 'cisco-mempool', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-mempool' => { + 'name' => 'cisco-mempool', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-enh-mempool' => { + 'name' => 'cisco-enh-mempool', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-memusage-subtree' => { + 'name' => 'cisco-memusage-subtree', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-temperature-subtree' => { + 'name' => 'cisco-temperature-subtree', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-temperature-sensor' => { + 'name' => 'cisco-temperature-sensor', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-temperature-sensor-fahrenheit' => { + 'name' => 'cisco-temperature-sensor-fahrenheit', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoGeneric::cisco-power-supply' => { + 'name' => 'cisco-power-supply', + 'source' => 'vendor/cisco.generic.xml' + }, + 'CiscoIOS::cisco-interface-counters' => { + 'name' => 'cisco-interface-counters', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS::old-cisco-memory-buffers' => { + 'name' => 'old-cisco-memory-buffers', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS::cisco-ipsec-flow-globals' => { + 'name' => 'cisco-ipsec-flow-globals', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS::cisco-bgp' => { + 'name' => 'cisco-bgp', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS::cisco-car-subtree' => { + 'name' => 'cisco-car-subtree', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS::cisco-car' => { + 'name' => 'cisco-car', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS::cisco-vpdn-subtree' => { + 'name' => 'cisco-vpdn-subtree', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS::cisco-vpdn-leaf' => { + 'name' => 'cisco-vpdn-leaf', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS_Docsis::cisco-docsis-mac-subtree' => { + 'name' => 'cisco-docsis-mac-subtree', + 'source' => 'vendor/cisco.ios.docsis.xml' + }, + 'CiscoIOS_Docsis::cisco-docsis-mac-util' => { + 'name' => 'cisco-docsis-mac-util', + 'source' => 'vendor/cisco.ios.docsis.xml' + }, + 'CiscoIOS_Docsis::cisco-docsis-upstream-util' => { + 'name' => 'cisco-docsis-upstream-util', + 'source' => 'vendor/cisco.ios.docsis.xml' + }, + 'CiscoIOS_MacAccounting::cisco-macacc-subtree' => { + 'name' => 'cisco-macacc-subtree', + 'source' => 'vendor/cisco.ios.mac-accounting.xml' + }, + 'CiscoIOS_MacAccounting::cisco-macacc' => { + 'name' => 'cisco-macacc', + 'source' => 'vendor/cisco.ios.mac-accounting.xml' + }, + 'CiscoIOS_SAA::cisco-saa-subtree' => { + 'name' => 'cisco-saa-subtree', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoIOS_SAA::cisco-rtt-echo-subtree' => { + 'name' => 'cisco-rtt-echo-subtree', + 'source' => 'vendor/cisco.ios.xml' + }, + 'CiscoFirewall::cisco-firewall-subtree' => { + 'name' => 'cisco-firewall-subtree', + 'source' => 'vendor/cisco.firewall.xml', + }, + 'CiscoFirewall::events' => { + 'name' => 'cisco-firewall-events-delta', + 'source' => 'vendor/cisco.firewall.xml', + }, + 'CiscoFirewall::connections' => { + 'name' => 'cisco-firewall-connections', + 'source' => 'vendor/cisco.firewall.xml', + }, + + 'CiscoSCE::cisco-sce-disk' => { + 'name' => 'cisco-sce-disk', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-subscribers' => { + 'name' => 'cisco-sce-subscribers', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-tp-subtree' => { + 'name' => 'cisco-sce-tp-subtree', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-tp' => { + 'name' => 'cisco-sce-tp', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-rdr' => { + 'name' => 'cisco-sce-rdr', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-rdr-category' => { + 'name' => 'cisco-sce-rdr-category', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-rdr-category-subtree' => { + 'name' => 'cisco-sce-rdr-category-subtree', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-queues-subtree' => { + 'name' => 'cisco-sce-queues-subtree', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-gc-subtree' => { + 'name' => 'cisco-sce-gc-subtree', + 'source' => 'vendor/cisco.sce.xml', + }, + 'CiscoSCE::cisco-sce-gcounter' => { + 'name' => 'cisco-sce-gcounter', + 'source' => 'vendor/cisco.sce.xml', + }, + + 'CiscoVDSL::cvdsl-subtree' => { + 'name' => 'cvdsl-subtree', + 'source' => 'vendor/cisco.vdsl-line.xml', + }, + 'CiscoVDSL::cvdsl-interface' => { + 'name' => 'cvdsl-interface', + 'source' => 'vendor/cisco.vdsl-line.xml', + }, + + ### Compaq Insite Manager + 'CompaqCIM::cpq-cim-temperature-sensor' => { + 'name' => 'cpq-cim-temperature-sensor', + 'source' => 'vendor/compaq.cim.xml', + }, + 'CompaqCIM::cpq-cim-corr-mem-errs' => { + 'name' => 'cpq-cim-corr-mem-errs', + 'source' => 'vendor/compaq.cim.xml', + }, + + #### Empire Sysedge + 'EmpireSystemedge::sysedge_opmode' => { + 'name' => 'sysedge_opmode', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-memory' => { + 'name' => 'empire-memory', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swap-counters-nt' => { + 'name' => 'empire-swap-counters-nt', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swap-counters-nt40Intel' => { + 'name' => 'empire-swap-counters-nt40Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swap-counters-nt50Intel' => { + 'name' => 'empire-swap-counters-nt50Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swap-counters-unix' => { + 'name' => 'empire-swap-counters-unix', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swap-counters-solarisSparc' => { + 'name' => 'empire-swap-counters-solarisSparc', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swap-counters-aix5RS6000' => { + 'name' => 'empire-swap-counters-aix5RS6000', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swap-counters-linuxIntel' => { + 'name' => 'empire-swap-counters-linuxIntel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-performance' => { + 'name' => 'empire-performance', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-device-subtree' => { + 'name' => 'empire-device-subtree', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-device' => { + 'name' => 'empire-device', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-load' => { + 'name' => 'empire-load', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-subtree' => { + 'name' => 'empire-cpu-subtree', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-nt' => { + 'name' => 'empire-cpu-nt', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-nt40Intel' => { + 'name' => 'empire-cpu-nt40Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-nt50Intel' => { + 'name' => 'empire-cpu-nt50Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-unix' => { + 'name' => 'empire-cpu-unix', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-solarisSparc' => { + 'name' => 'empire-cpu-solarisSparc', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-aix5RS6000' => { + 'name' => 'empire-cpu-aix5RS6000', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-linuxIntel' => { + 'name' => 'empire-cpu-linuxIntel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-nt' => { + 'name' => 'empire-total-cpu-nt', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-nt40Intel' => { + 'name' => 'empire-total-cpu-nt40Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-nt50Intel' => { + 'name' => 'empire-total-cpu-nt50Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-unix' => { + 'name' => 'empire-total-cpu-unix', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-solarisSparc' => { + 'name' => 'empire-total-cpu-solarisSparc', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-aix5RS6000' => { + 'name' => 'empire-total-cpu-aix5RS6000', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-linuxIntel' => { + 'name' => 'empire-total-cpu-linuxIntel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-raw-unix' => { + 'name' => 'empire-cpu-raw-unix', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-raw-solarisSparc' => { + 'name' => 'empire-cpu-raw-solarisSparc', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-raw-aix5RS6000' => { + 'name' => 'empire-cpu-raw-aix5RS6000', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-raw-linuxIntel' => { + 'name' => 'empire-cpu-raw-linuxIntel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-raw-nt' => { + 'name' => 'empire-cpu-raw-nt', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-raw-nt40Intel' => { + 'name' => 'empire-cpu-raw-nt40Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-cpu-raw-nt50Intel' => { + 'name' => 'empire-cpu-raw-nt50Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-raw-nt' => { + 'name' => 'empire-total-cpu-raw-nt', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-raw-nt40Intel' => { + 'name' => 'empire-total-cpu-raw-nt40Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-raw-nt50Intel' => { + 'name' => 'empire-total-cpu-raw-nt50Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-raw-unix' => { + 'name' => 'empire-total-cpu-raw-unix', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-raw-solarisSparc' => { + 'name' => 'empire-total-cpu-raw-solarisSparc', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-raw-aix5RS6000' => { + 'name' => 'empire-total-cpu-raw-aix5RS6000', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-total-cpu-raw-linuxIntel' => { + 'name' => 'empire-total-cpu-raw-linuxIntel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-counters-nt' => { + 'name' => 'empire-counters-nt', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-counters-nt40Intel' => { + 'name' => 'empire-counters-nt40Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-counters-nt50Intel' => { + 'name' => 'empire-counters-nt50Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-counters-unix' => { + 'name' => 'empire-counters-unix', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-counters-solarisSparc' => { + 'name' => 'empire-counters-solarisSparc', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-counters-aix5RS6000' => { + 'name' => 'empire-counters-aix5RS6000', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-counters-linuxIntel' => { + 'name' => 'empire-counters-linuxIntel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-runq' => { + 'name' => 'empire-runq', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-diskwait' => { + 'name' => 'empire-diskwait', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-pagewait' => { + 'name' => 'empire-pagewait', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-swapactive' => { + 'name' => 'empire-swapactive', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-sleepactive' => { + 'name' => 'empire-sleepactive', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-subtree' => { + 'name' => 'empire-disk-stats-subtree', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-unix' => { + 'name' => 'empire-disk-stats-unix', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-solarisSparc' => { + 'name' => 'empire-disk-stats-solarisSparc', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-aix5RS6000' => { + 'name' => 'empire-disk-stats-aix5RS6000', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-linuxIntel' => { + 'name' => 'empire-disk-stats-linuxIntel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-nt' => { + 'name' => 'empire-disk-stats-nt', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-nt40Intel' => { + 'name' => 'empire-disk-stats-nt40Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + 'EmpireSystemedge::empire-disk-stats-nt50Intel' => { + 'name' => 'empire-disk-stats-nt50Intel', + 'source' => 'vendor/empire.systemedge.xml', + }, + + #### MicrosoftWindows + 'MicrosoftWindows::microsoft-iis-ftp-stats' => { + 'name' => 'microsoft-iis-ftp-stats', + 'source' => 'vendor/microsoft.windows.xml', + }, + 'MicrosoftWindows::microsoft-iis-http-stats' => { + 'name' => 'microsoft-iis-http-stats', + 'source' => 'vendor/microsoft.windows.xml', + }, + + #### Motorola BSR + 'MotorolaBSR::motorola-bsr-docsis-upstream-util' => { + 'name' => 'motorola-bsr-docsis-upstream-util', + 'source' => 'vendor/motorola.bsr.xml', + }, + + #### F5 BigIp + 'F5BigIp::BigIp_4.x' => { + 'name' => 'BigIp_4.x', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_virtualServer' => { + 'name' => 'BigIp_4.x_virtualServer', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_virtualServer-connrate-overview' => { + 'name' => 'BigIp_4.x_virtualServer-connrate-overview', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_virtualServer-actvconn-overview' => { + 'name' => 'BigIp_4.x_virtualServer-connrate-overview', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_pool-actvconn-overview' => { + 'name' => 'BigIp_4.x_pool-actvconn-overview', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_pool' => { + 'name' => 'BigIp_4.x_pool', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_poolMember-actvconn-overview' => { + 'name' => 'BigIp_4.x_poolMember-actvconn-overview', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_poolMember' => { + 'name' => 'BigIp_4.x_poolMember', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_sslProxy_Global' => { + 'name' => 'BigIp_4.x_sslProxy_Global', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_sslProxy-currconn-overview' => { + 'name' => 'BigIp_4.x_sslProxy-currconn-overview', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_4.x_sslProxy' => { + 'name' => 'BigIp_4.x_sslProxy', + 'source' => 'vendor/f5.bigip.xml', + }, + 'F5BigIp::BigIp_3.x' => { + 'name' => 'BigIp_3.x', + 'source' => 'vendor/f5.bigip.xml', + }, + + ##### Foundry/Brocade + 'Foundry::fdry-chass-temperature' => { + 'name' => 'fdry-chass-temperature', + 'source' => 'vendor/foundry.xml', + }, + 'Foundry::fdry-board-overview' => { + 'name' => 'fdry-board-overview', + 'source' => 'vendor/foundry.xml', + }, + 'Foundry::fdry-board-subtree' => { + 'name' => 'fdry-board-subtree', + 'source' => 'vendor/foundry.xml', + }, + 'Foundry::fdry-board-memstats' => { + 'name' => 'fdry-board-memstats', + 'source' => 'vendor/foundry.xml', + }, + 'Foundry::fdry-board-cpustats' => { + 'name' => 'fdry-board-cpustats', + 'source' => 'vendor/foundry.xml', + }, + 'Foundry::fdry-board-tempstats' => { + 'name' => 'fdry-board-tempstats', + 'source' => 'vendor/foundry.xml', + }, + 'Foundry::fdry-board-temp-sensor-halfcelsius' => { + 'name' => 'fdry-board-temp-sensor-halfcelsius', + 'source' => 'vendor/foundry.xml', + }, + + ##### Force10 networks (by Jon Nistor) + 'FTOS::ftos-cpu-subtree' => { + 'name' => 'ftos-cpu-subtree', + 'source' => 'vendor/ftos.xml', + }, + 'FTOS::ftos-cpu' => { + 'name' => 'ftos-cpu', + 'source' => 'vendor/ftos.xml', + }, + 'FTOS::ftos-power-supply-leaf' => { + 'name' => 'ftos-power-supply-leaf', + 'source' => 'vendor/ftos.xml', + }, + 'FTOS::ftos-temperature-subtree' => { + 'name' => 'ftos-temperature-subtree', + 'source' => 'vendor/ftos.xml', + }, + 'FTOS::ftos-temperature-sensor' => { + 'name' => 'ftos-temperature-sensor', + 'source' => 'vendor/ftos.xml', + }, + 'FTOS::ftos-temperature-sensor-fahrenheit' => { + 'name' => 'ftos-temperature-sensor-fahrenheit', + 'source' => 'vendor/ftos.xml', + }, + + #### Jacarta + 'Jacarta::imeter-amps-sensor' => { + 'name' => 'imeter-amps-sensor', + 'source' => 'vendor/jacarta.xml', + }, + 'Jacarta::imeter-humi-sensor' => { + 'name' => 'imeter-humi-sensor', + 'source' => 'vendor/jacarta.xml', + }, + 'Jacarta::imeter-temp-sensor' => { + 'name' => 'imeter-temp-sensor', + 'source' => 'vendor/jacarta.xml', + }, + + ##### Juniper JunOS (by Jon Nistor) + 'JunOS::junos-cos-subtree' => { + 'name' => 'junos-cos-subtree', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-cos-subtree-interface' => { + 'name' => 'junos-cos-subtree-interface', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-cos-leaf' => { + 'name' => 'junos-cos-leaf', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-cos-red' => { + 'name' => 'junos-cos-red', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-cos-tail' => { + 'name' => 'junos-cos-tail', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-cpu-subtree' => { + 'name' => 'junos-cpu-subtree', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-cpu' => { + 'name' => 'junos-cpu', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-firewall-subtree' => { + 'name' => 'junos-firewall-subtree', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-firewall-filter-subtree' => { + 'name' => 'junos-firewall-filter-subtree', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-firewall-filter' => { + 'name' => 'junos-firewall-filter', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-firewall-filter-counter' => { + 'name' => 'junos-firewall-filter-counter', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-firewall-filter-policer' => { + 'name' => 'junos-firewall-filter-policer', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-memory-subtree' => { + 'name' => 'junos-memory-subtree', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-memory' => { + 'name' => 'junos-memory', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-rpf-subtree' => { + 'name' => 'junos-rpf-subtree', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-rpf' => { + 'name' => 'junos-rpf', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-temperature-subtree' => { + 'name' => 'junos-temperature-subtree', + 'source' => 'vendor/junos.xml', + }, + 'JunOS::junos-temperature-sensor' => { + 'name' => 'junos-temperature-sensor', + 'source' => 'vendor/junos.xml', + }, + + + ##### Liebert + 'Liebert::humidity-sensor' => { + 'name' => 'humidity-sensor', + 'source' => 'vendor/liebert.xml', + }, + 'Liebert::humidity-subtree' => { + 'name' => 'humidity-subtree', + 'source' => 'vendor/liebert.xml', + }, + 'Liebert::state-subtree' => { + 'name' => 'state-subtree', + 'source' => 'vendor/liebert.xml', + }, + 'Liebert::state-capacity' => { + 'name' => 'state-capacity', + 'source' => 'vendor/liebert.xml', + }, + 'Liebert::temperature-subtree' => { + 'name' => 'temperature-subtree', + 'source' => 'vendor/liebert.xml', + }, + 'Liebert::temperature-sensor' => { + 'name' => 'temperature-sensor', + 'source' => 'vendor/liebert.xml', + }, + 'Liebert::temperature-sensor-fahrenheit' => { + 'name' => 'temperature-sensor-fahrenheit', + 'source' => 'vendor/liebert.xml', + }, + + + ##### Ucd Snmp + 'UcdSnmp::ucdsnmp-memory-real' => { + 'name' => 'ucdsnmp-memory-real', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-memory-swap' => { + 'name' => 'ucdsnmp-memory-swap', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-blockio' => { + 'name' => 'ucdsnmp-blockio', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-raw-interrupts' => { + 'name' => 'ucdsnmp-raw-interrupts', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-user-multi' => { + 'name' => 'ucdsnmp-cpu-user-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-user' => { + 'name' => 'ucdsnmp-cpu-user', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-system-multi' => { + 'name' => 'ucdsnmp-cpu-system-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-system' => { + 'name' => 'ucdsnmp-cpu-system', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-wait-multi' => { + 'name' => 'ucdsnmp-cpu-wait-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-wait' => { + 'name' => 'ucdsnmp-cpu-wait', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-kernel-multi' => { + 'name' => 'ucdsnmp-cpu-kernel-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-kernel' => { + 'name' => 'ucdsnmp-cpu-kernel', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-idle-multi' => { + 'name' => 'ucdsnmp-cpu-idle-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-idle' => { + 'name' => 'ucdsnmp-cpu-idle', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-nice-multi' => { + 'name' => 'ucdsnmp-cpu-nice-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-nice' => { + 'name' => 'ucdsnmp-cpu-nice', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-interrupts-multi' => { + 'name' => 'ucdsnmp-cpu-interrupts-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-softirq' => { + 'name' => 'ucdsnmp-cpu-softirq', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-softirq-multi' => { + 'name' => 'ucdsnmp-cpu-softirq-multi', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-cpu-interrupts' => { + 'name' => 'ucdsnmp-cpu-interrupts', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + 'UcdSnmp::ucdsnmp-load-average' => { + 'name' => 'ucdsnmp-load-average', + 'source' => 'vendor/ucd.ucd-snmp.xml', + }, + + #### NetApp (Network Appliance) + 'NetApp::CPU' => { + 'name' => 'netapp-cpu', + 'source' => 'vendor/netapp.filer.xml', + }, + 'NetApp::misc' => { + 'name' => 'netapp-misc', + 'source' => 'vendor/netapp.filer.xml', + }, + 'NetApp::nfsv2' => { + 'name' => 'netapp-nfsv2', + 'source' => 'vendor/netapp.filer.xml', + }, + 'NetApp::nfsv3' => { + 'name' => 'netapp-nfsv3', + 'source' => 'vendor/netapp.filer.xml', + }, + 'NetApp::cifs' => { + 'name' => 'netapp-cifs', + 'source' => 'vendor/netapp.filer.xml', + }, + + #### NetBotz + 'NetBotz::netbotz-temp-sensor' => { + 'name' => 'netbotz-temp-sensor', + 'source' => 'vendor/netbotz.xml', + }, + 'NetBotz::netbotz-humi-sensor' => { + 'name' => 'netbotz-humi-sensor', + 'source' => 'vendor/netbotz.xml', + }, + 'NetBotz::netbotz-dew-sensor' => { + 'name' => 'netbotz-dew-sensor', + 'source' => 'vendor/netbotz.xml', + }, + 'NetBotz::netbotz-audio-sensor' => { + 'name' => 'netbotz-audio-sensor', + 'source' => 'vendor/netbotz.xml', + }, + 'NetBotz::netbotz-air-sensor' => { + 'name' => 'netbotz-air-sensor', + 'source' => 'vendor/netbotz.xml', + }, + 'NetBotz::netbotz-door-sensor' => { + 'name' => 'netbotz-door-sensor', + 'source' => 'vendor/netbotz.xml', + }, + + #### NetScreen + 'NetScreen::netscreen-cpu-stats' => { + 'name' => 'netscreen-cpu-stats', + 'source' => 'vendor/netscreen.xml', + }, + 'NetScreen::netscreen-memory-stats' => { + 'name' => 'netscreen-memory-stats', + 'source' => 'vendor/netscreen.xml', + }, + 'NetScreen::netscreen-sessions-stats' => { + 'name' => 'netscreen-sessions-stats', + 'source' => 'vendor/netscreen.xml', + }, + + #### OracleDatabase + 'OracleDatabase::Sys' => { + 'name' => 'oracle-database-sys', + 'source' => 'vendor/oracle.database.xml', + }, + 'OracleDatabase::CacheSum' => { + 'name' => 'oracle-cache-sum', + 'source' => 'vendor/oracle.database.xml', + }, + 'OracleDatabase::SGA' => { + 'name' => 'oracle-sga', + 'source' => 'vendor/oracle.database.xml', + }, + 'OracleDatabase::table-space' => { + 'name' => 'oracle-table-space', + 'source' => 'vendor/oracle.database.xml', + }, + 'OracleDatabase::data-file' => { + 'name' => 'oracle-data-file', + 'source' => 'vendor/oracle.database.xml', + }, + 'OracleDatabase::library-cache' => { + 'name' => 'oracle-library-cache', + 'source' => 'vendor/oracle.database.xml', + }, + + #### Paradyne + 'Paradyne::paradyne-xdsl-interface' => { + 'name' => 'paradyne-xdsl-interface', + 'source' => 'vendor/paradyne.xdsl.xml' + }, + + #### Symmetricom + 'Symmetricom::ntp-stats' => { + 'name' => 'ntp-stats', + 'source' => 'vendor/symmetricom.xml' + }, + ); + +########################## +# Common parameters + +# If true, data-dir would be hashed across a number of subdirectories +# Only concatenation of hostname and domain name is hashed. +$Torrus::DevDiscover::hashDataDirEnabled = 0; + +# Format for hashed data-dir subdirectory name. The argument is a number +# from 0 to bucketSize-1. +$Torrus::DevDiscover::hashDataDirFormat = '%.2X'; + +# How many hashed data-dir subdirectories are used. +$Torrus::DevDiscover::hashDataDirBucketSize = 256; + + +########################## +# RFC2790_HOST_RESOURCES parameters + +# The top level of the Host Resources Storage graph, percentage +$Torrus::DevDiscover::RFC2790_HOST_RESOURCES::storageGraphTop = 105; + +# Where to draw the hi-mark line in Host Resources Storage, percentage +$Torrus::DevDiscover::RFC2790_HOST_RESOURCES::storageHiMark = 100; + + +########################## +# EmpireSystemedge parameters + +# The top level of the Host Resources Storage graph, percentage +$Torrus::DevDiscover::EmpireSystemedge::storageGraphTop = 105; + +# Where to draw the hi-mark line in Empire Storage, percentage +$Torrus::DevDiscover::EmpireSystemedge::storageHiMark = 100; + + +########################## +# CiscoIOS parameters + +# For mkroutercfg compatibility, set this to 1 +$Torrus::DevDiscover::CiscoIOS::useCiscoInterfaceCounters = 0; + + + +# Read plugin configurations +{ + my $dir = '@plugdevdisccfgdir@'; + opendir(CFGDIR, $dir) or die("Cannot open directory $dir: $!"); + my @files = grep { !/^\./ } readdir(CFGDIR); + closedir( CFGDIR ); + foreach my $file ( @files ) + { + require $dir . '/' . $file; + } +} + + +require '@devdiscover_siteconfig_pl@'; + +1; diff --git a/torrus/configs/devdiscover-siteconfig.pl b/torrus/configs/devdiscover-siteconfig.pl new file mode 100644 index 000000000..421a5a602 --- /dev/null +++ b/torrus/configs/devdiscover-siteconfig.pl @@ -0,0 +1,4 @@ +# Torrus Device Discovery Site config. Put all your site specifics here. + + +1; diff --git a/torrus/configs/email-siteconfig.pl b/torrus/configs/email-siteconfig.pl new file mode 100644 index 000000000..74a82e5a1 --- /dev/null +++ b/torrus/configs/email-siteconfig.pl @@ -0,0 +1,16 @@ +# Torrus Email notifications configuration. Put all your site specifics here. + +# The URL where the user can browse the datasources +$Torrus::Email::url = 'http://localhost/torrus'; + +# Filename within templates directory which will be used +# for e-mail notification +$Torrus::Email::template = 'email-alarm.txt'; + +1; + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/configs/initscript.conf b/torrus/configs/initscript.conf new file mode 100644 index 000000000..775247930 --- /dev/null +++ b/torrus/configs/initscript.conf @@ -0,0 +1,31 @@ +# Torrus init script configuration +# You can override any value in @siteconfdir@/initscript.siteconf + +# If we perform su @torrus_user@ +TORRUS_CHANGE_UID=yes + +# How many times we sleep and wait for processes to finish +TORRUS_KILL_COUNT=9 + +# How much we sleep each time and wait for processes to finish +TORRUS_KILL_SLEEP=10 + +# Command-line options for collector and monitor daemons +TORRUS_CMDOPTS="" + +# When collector and monitor are executed together, +# let the monitor sleep 20 minutes and wait for some data +# to be collected +TORRUS_MONITOR_DELAY="--delay=20" + +# Place for collector commandline options, such as --runalways +TORRUS_COLLECTOR_CMDOPTS="" + + + + +# Local Variables: +# mode: shell-script +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/configs/notify-siteconfig.pl b/torrus/configs/notify-siteconfig.pl new file mode 100644 index 000000000..5eaee6faa --- /dev/null +++ b/torrus/configs/notify-siteconfig.pl @@ -0,0 +1,31 @@ + +%Torrus::Notify::programs = + ( + 'mailto' => '$TORRUS_BIN/action_printemail | /usr/bin/mail $ARG1', + 'page' => '/usr/bin/echo $TORRUS_NODEPATH:$TORRUS_MONITOR ' . + '>> /tmp/monitor.$ARG1.log' + ); + +%Torrus::Notify::policies = + ( + 'CUST_A' => { + 'match' => sub { $ENV{'TORRUS_P_notify_policy'} eq 'A' }, + 'severity' => { + '3' => [ 'mailto:aaa@domain.com', + 'mailto:bbb@domain.com' ], + '5' => [ 'page:1234', 'mailto:boss@domain.com' ] } } ); + + + + +# Torrus::Log::setLevel('debug'); + + + +1; + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/configs/snmptrap-siteconfig.pl b/torrus/configs/snmptrap-siteconfig.pl new file mode 100644 index 000000000..27fbb1d11 --- /dev/null +++ b/torrus/configs/snmptrap-siteconfig.pl @@ -0,0 +1,19 @@ +# Torrus SNMP Trap configuration. Put all your site specifics here. + +# Hosts that will receive traps +@Torrus::Snmptrap::hosts = qw( localhost ); + +# SNMP community for trap sending +$Torrus::Snmptrap::community = 'public'; + +# SNMP trap port. +$Torrus::Snmptrap::port = 162; + + +1; + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/configs/torrus-config.pl b/torrus/configs/torrus-config.pl new file mode 100644 index 000000000..b93c5dac9 --- /dev/null +++ b/torrus/configs/torrus-config.pl @@ -0,0 +1,377 @@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: torrus-config.pl,v 1.1 2010-12-27 00:04:40 ivan Exp $ +# Stanislav Sinyagin + + +# DO NOT EDIT THIS FILE! + +# Torrus local configuration. +# Put all your local settings into torrus-siteconfig.pl + +use lib(@perllibdirs@); + +$Torrus::Global::version = '@VERSION@'; +$Torrus::Global::cfgDefsDir = '@cfgdefdir@'; +$Torrus::Global::cfgSiteDir = '@siteconfdir@'; +$Torrus::Global::pkgbindir = '@pkgbindir@'; +$Torrus::Global::dbHome = '@dbhome@'; +$Torrus::Global::templateDirs = ['@tmpldir@', '@tmpluserdir@']; +$Torrus::Global::stylingDir = '@styldir@'; +$Torrus::Global::cacheDir = '@cachedir@'; +$Torrus::Global::pidDir = '@piddir@'; +$Torrus::Global::logDir = '@logdir@'; +$Torrus::Global::reportsDir = '@reportsdir@'; +$Torrus::Global::sesStoreDir = '@sesstordir@'; +$Torrus::Global::sesLockDir = '@seslockdir@'; +$Torrus::Global::webPlainDir = '@webplaindir@'; + +@Torrus::Global::xmlDirs = ('@distxmldir@', '@sitexmldir@'); + +$Torrus::Global::threadsEnabled = '@perlithreads@'; + +$Torrus::DB::dbSub = 'sub'; + +# How long we can wait till the configuration is ready, in seconds +$Torrus::Global::ConfigReadyTimeout = 1800; + +# How often we check if the configuration is ready, in seconds +$Torrus::Global::ConfigReadyRetryPeriod = 30; + +# How long the compiler waits till readers finish, in seconds +$Torrus::Global::ConfigReadersWaitTimeout = 180; + +# How often compiler checks for readers to finish +$Torrus::Global::ConfigReadersWaitPeriod = 5; + +# How much the timestamps can differ in one RRD file, in seconds +$Torrus::Global::RRDTimestampTolerance = 15; + +# SO_RCVBUF, the receiving buffer size of the SNMP collector socket. +# Should be large enough to sustain the traffic bursts, and should be +# within limits incurred by local OS and kernel settings. +# Check your system manuals and the results of network statistics. +# +# On Solaris, the maximum buffer size is 256k, and it is configurable +# via "/usr/sbin/ndd /dev/udp udp_max_buf ", +# and the statistics are shown in udpInOverflows of "netstat -s -P ip" output. +# +# On FreeBSD, the statistics can be obtained via "netstat -s -p udp". +# The maximum socket buffer can be changed via +# "sysctl kern.ipc.maxsockbuf=", and default is 256k. +# On startup, the OS reads these settings from /etc/sysctl.conf +# +# On Linux (FC2), the default limit is 131071, and it can be changed +# by "sysctl -w net.core.rmem_max=". On startup, the OS reads these +# settings from /etc/sysctl.conf +# +$Torrus::Collector::SNMP::RxBuffer = 131071; + +# The time period after which we give up to reach the host being unreachable +$Torrus::Collector::SNMP::unreachableTimeout = 21600; # 6 hours + +# For unreachable host, we retry SNMP query not earlier than this +$Torrus::Collector::SNMP::unreachableRetryDelay = 600; # 10 min + +# Variables that define the SNMP map refreshing. +# The maps (e.g. ifDescr=>ifIndex mapping) are stored in the collector +# process and are not automatically refreshed after recompiling. +# They refresh only when the SNMP agent is rebooted or at periodic intervals +# defined below. For SNMPv1 agents, periodic refreshing is disabled +# because of performance impact. +# +# Refresh SNMP maps every 5 to 7 hours +$Torrus::Collector::SNMP::mapsRefreshPeriod = 18000; +$Torrus::Collector::SNMP::mapsRefreshRandom = 0.40; + +# After configuration re-compiling, update the maps. +# Do it randomly and spread the load evenly between 0 and 30 minutes. +$Torrus::Collector::SNMP::mapsUpdateInterval = 1800; + + +# Wait 10min between refresh checkups +$Torrus::Collector::SNMP::mapsExpireCheckPeriod = 600; + +# There is a strange bug that with more than 400 sessions per SNMP +# dispatcher some requests are not sent at all +$Torrus::Collector::SNMP::maxSessionsPerDispatcher = 100; + +# When enabled, the collector starts a background thread that +# writes to RRD files +$Torrus::Collector::RRDStorage::useThreads = $Torrus::Global::threadsEnabled; + +# How many unwritten updates are allowed to stay in the queue +$Torrus::Collector::RRDStorage::thrQueueLimit = 1000000; + +# The following errors are caused by changes in the device configurations, +# when the collector tries to store data in a RRD file, but the +# structure of the file is no longer suitable: +# Datasource exists in RRD file, but is not updated +# Datasource being updated does not exist +# Set this variable to true if you want these RRD files automatically moved. +# The current date is appended to the filename, and the file +# is moved to another directory or renamed. +$Torrus::Collector::RRDStorage::moveConflictRRD = 0; + + +# The path where conflicted RRD files would be moved. This directory +# should exist, be writable by Torrus daemon user, and in most OSes +# it must reside in the same filesystem as the original files. +# When undefined, the files are renamed within their original directory. +$Torrus::Collector::RRDStorage::conflictRRDPath = undef; + +# Sleep interval when scheduler initialization failed (i.e. configuration +# reading timeout) +$Torrus::Scheduler::failedInitSleep = 1800; + +# When positive, the scheduler will sleep in small intervals. +# Use this when the system clock is not reliable, like in VmWare +$Torrus::Scheduler::maxSleepTime = 0; + +# Set this to true when the system clock is not reliable, like in VmWare +$Torrus::Scheduler::ignoreClockSkew = 0; + +# Exponential decay parameter (alpha) for Scheduler statistics averages: +# +# Xnew = alpha * Xmes + (1-alpha) * Xprev +# Xnew: new calculated average +# Xmes: measured value +# Xprev: old calculated average +# +# Alpha defines how many previous measurements composite the average: +# alpha = 1.0 - exp( log(1-TotalWeight)/NPoints ) +# TotalWeight: the weight of NPoints measurements +# NPoints: number of measurements +# 0.63 corresponds to TotalWeight=0.95 and NPoints=3 (95% of average is from +# last three datapoints +# +$Torrus::Scheduler::statsExpDecayAlpha = 0.63; + +# Monitor alarms may become orphaned if the configuration changes +# in the middle of an event. Events older than this time are cleaned up +# default: 2 weeks +$Torrus::Monitor::alarmTimeout = 1209600; + +# The default CSS stylesheet and other details for HTML output. +# These settings may optionally be overwritten by the styling profile below. +# Additional CSS overlay may be specified with 'cssoverlay' property, +# It should point to an absolute URL. +# for example: +# $Torrus::Renderer::styling{'default'}{'cssoverlay'} = '/mystyle.css'; +# +%Torrus::Renderer::styling = + ( 'default' => {'stylesheet' => 'torrus.css'}, + 'printer' => {'stylesheet' => 'torrus-printer.css'}, + 'report' => {'stylesheet' => 'torrus-report.css'} + ); + +# Color schema for RRDtool graph. It can be extended by setting +# $Torrus::Renderer::stylingProfileOverlay. The overlay should +# be an absolute file name. You can use $Torrus::Global::cfgSiteDir +# to refer to the site configs path. +$Torrus::Renderer::stylingProfile = 'torrus-schema'; + +# Top level URI +$Torrus::Renderer::rendererURL = '/torrus'; + +# Trailing slash is important! +$Torrus::Renderer::plainURL = '/torrus/plain/'; + +# The small piece of text in the corner of the HTML output. +$Torrus::Renderer::companyName = 'Your company name'; + +# The URL to use for that piece of text +$Torrus::Renderer::companyURL = 'http://torrus.sf.net'; + +# The URL of your company logo which will be displayed instead of +# companyName +# $Torrus::Renderer::companyLogo = 'http://domain.com/logo.png'; + +# Another piece of text on the right to the company name +$Torrus::Renderer::siteInfo = undef; + +# URL to be shown on the login page for lost password +# You have to implement that yourself +# $Torrus::Renderer::lostPasswordURL = 'http://domain.com/lostpw.cgi'; + +# The time format to print in HTML +$Torrus::Renderer::timeFormat = '%d-%m-%Y %H:%M'; + +# Exception characters for URI::Escape +# By default, slash (/) is escaped, and we don't really want it +$Torrus::Renderer::uriEscapeExceptions = '^A-Za-z0-9-._~/:'; + +# The page that lets you choose the tree from the list +$Torrus::Renderer::Chooser::mimeType = 'text/html; charset=UTF-8'; +$Torrus::Renderer::Chooser::expires = '300'; +$Torrus::Renderer::Chooser::template = 'default-chooser.html'; +$Torrus::Renderer::Chooser::searchTemplate = 'globalsearch.html'; + +# We clean the renderer cache at least once a day +$Torrus::Renderer::cacheMaxAge = 86400; + +# Some RRDtool versions may report errors on decorations +$Torrus::Renderer::ignoreDecorations = 0; + +# This enables full Apache handler debugging +$Torrus::Renderer::globalDebug = 0; + +# When true, Holt-Winters boundaries and failures are described in the +# graph legend +$Torrus::Renderer::hwGraphLegend = 0; + +# When true, users may view service usage reports (requires SQL connection) +$Torrus::Renderer::displayReports = 0; + +# Allow tree searching. The search DB should be built with buildsearchdb +$Torrus::Renderer::searchEnabled = 1; + +# Allow global searching across the trees. If the user authentication +# is enabled, the user should have rights DisplayTree and GlobalSearch for '*' +$Torrus::Renderer::globalSearchEnabled = 1; + + +# Modules that Collector will use for collecting and storing data. +@Torrus::Collector::loadModules = + ( 'Torrus::Collector::SNMP', + 'Torrus::Collector::CDef', + 'Torrus::Collector::RRDStorage' ); + +# Configurable part of Validator +@Torrus::Validator::loadLeafValidators = + ( 'Torrus::Collector::SNMP_Params', + 'Torrus::Collector::CDef_Params' ); + +# Configurable part of AdmInfo renderer +@Torrus::Renderer::loadAdmInfo = + ( 'Torrus::Collector::SNMP_Params', + 'Torrus::Collector::CDef_Params' ); + +# Parameters that are comma-separated values +@Torrus::ConfigTree::XMLCompiler::listparams = (); + +# XML files to be compiled first for every tree +@Torrus::Global::xmlAlwaysIncludeFirst = (); + +# XML files to be compiled after the tree files, but before the files +# included with XML directive +@Torrus::Global::xmlAlwaysIncludeLast = (); + +# Do we need Web user authentication/authorization ? +$Torrus::CGI::authorizeUsers = 1; + +# User authentication method may be changed locally +$Torrus::ACL::userAuthModule = 'Torrus::ACL::AuthLocalMD5'; + +# Minimum allowed password length +$Torrus::ACL::minPasswordLength = 6; + +# The login page +$Torrus::Renderer::LoginScreen::mimeType = 'text/html; charset=UTF-8'; +$Torrus::Renderer::LoginScreen::template = 'default-login.html'; + +#### +#### SQL connections configuration +# For a given Perl class and an optional subtype, +# the connection attributes are derived in the following order: +# 'Default', 'Default/[subtype]', '[Class]', '[Class]/[subtype]', +# 'All/[subtype]'. +# For a simple setup, the default attributes are usually defined for +# 'Default' key. +# The key attributes are: 'dsn', 'username', and 'password'. +%Torrus::SQL::connections = + ('Default' => {'dsn' => 'DBI:mysql:database=torrus;host=localhost', + 'username' => 'torrus', + 'password' => 'torrus'} + ); + +#### +#### ExternalStorage collector module initialization. +# In order to enable External storage, add these lines to torrus-siteconfig.pl: +# push(@Torrus::Collector::loadModules, 'Torrus::Collector::ExternalStorage'); +# + +# Other configuration available: + +# Maximum age for backlog in case of unavailable storage. +# We stop recording new data when maxage is reached. Default: 24h +$Torrus::Collector::ExternalStorage::backlogMaxAge = 86400; + +# How often we retry to contact an unreachable external storage. Default: 10min +$Torrus::Collector::ExternalStorage::unavailableRetry = 600; + +# Backend engine for External storage +$Torrus::Collector::ExternalStorage::backend = 'Torrus::Collector::ExtDBI'; + +# SQL table configuration for collector's external storage +$Torrus::SQL::SrvExport::tableName = 'srvexport'; +%Torrus::SQL::SrvExport::columns = + ('srv_date' => 'srv_date', + 'srv_time' => 'srv_time', + 'serviceid' => 'serviceid', + 'value' => 'value', + 'intvl' => 'intvl'); + +# Optional SQL connection subtype for Collector export +# $Torrus::Collector::ExtDBI::subtype + + +# SQL table configuration for Reports +$Torrus::SQL::Reports::tableName = 'reports'; +%Torrus::SQL::Reports::columns = + ('id' => 'id', + 'rep_date' => 'rep_date', + 'rep_time' => 'rep_time', + 'reportname' => 'reportname', + 'iscomplete' => 'iscomplete'); + +$Torrus::SQL::ReportFields::tableName = 'reportfields'; +%Torrus::SQL::ReportFields::columns = + ('id' => 'id', + 'rep_id' => 'rep_id', + 'name' => 'name', + 'serviceid' => 'serviceid', + 'value' => 'value', + 'units' => 'units'); + +%Torrus::ReportGenerator::modules = + ( 'MonthlyUsage' => 'Torrus::ReportGenerator::MonthlySrvUsage' ); + + +%Torrus::ReportOutput::HTML::templates = + ( 'index' => 'report-index.html', + 'serviceid' => 'report-serviceid.html', + 'monthly' => 'report-monthly.html', + 'yearly' => 'report-yearly.html'); + +# Read plugin configurations +{ + my $dir = '@plugtorruscfgdir@'; + opendir(CFGDIR, $dir) or die("Cannot open directory $dir: $!"); + my @files = grep { !/^\./ } readdir(CFGDIR); + closedir( CFGDIR ); + foreach my $file ( @files ) + { + require $dir . '/' . $file; + } +} + + + +require '@torrus_siteconfig_pl@'; + +1; diff --git a/torrus/configs/torrus-siteconfig.pl b/torrus/configs/torrus-siteconfig.pl new file mode 100644 index 000000000..ed51c1730 --- /dev/null +++ b/torrus/configs/torrus-siteconfig.pl @@ -0,0 +1,21 @@ +# Torrus Site config. Put all your site specifics here. +# You need to stop and start Apache server every time you change this file. + +@Torrus::Global::xmlAlwaysIncludeFirst = ( 'defaults.xml', 'site-global.xml' ); + +%Torrus::Global::treeConfig = + ( + 'main' => { + 'description' => 'The main tree', + 'info' => 'some tree', + 'xmlfiles' => [qw(routers.xml)], + 'run' => { 'collector' => 1, 'monitor' => 0 } } + ); + +# Customizable look in the HTML page top +# $Torrus::Renderer::companyName = 'Your company name'; +# $Torrus::Renderer::companyURL = 'http://torrus.sf.net'; +# $Torrus::Renderer::siteInfo = `hostname`; + + +1; diff --git a/torrus/configs/webmux.pl b/torrus/configs/webmux.pl new file mode 100644 index 000000000..cfda1cd85 --- /dev/null +++ b/torrus/configs/webmux.pl @@ -0,0 +1,38 @@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: webmux.pl,v 1.1 2010-12-27 00:04:41 ivan Exp $ +# Stanislav Sinyagin + +# Apache mod_perl initialisation + +BEGIN { require '@torrus_config_pl@'; } + +use Torrus::DB; +use Torrus::ApacheHandler; + +if( $Torrus::Renderer::globalDebug ) +{ + &Torrus::Log::setLevel('debug'); +} + +Apache->server->register_cleanup( sub { + my $r = shift; + Torrus::DB::cleanupEnvironment(); +}); + + +1; diff --git a/torrus/configs/webmux2.pl b/torrus/configs/webmux2.pl new file mode 100644 index 000000000..55f2baece --- /dev/null +++ b/torrus/configs/webmux2.pl @@ -0,0 +1,74 @@ +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: webmux2.pl,v 1.1 2010-12-27 00:04:42 ivan Exp $ +# Stanislav Sinyagin + +# Apache mod_perl initialisation + +BEGIN { require '@torrus_config_pl@'; } + +use Apache2::ServerUtil; +use mod_perl2; + +use Torrus::Log; +use Torrus::DB; + +# Probably we need MPM-specific Code here +# http://perl.apache.org/docs/2.0/user/coding/coding.html + +# Tested with prefork MPM only. +# Threaded MPMs will not work because RRDtool is RRDs.pm is not +# currently thread safe + + +sub child_exit_handler +{ + my( $child_pool, $s ) = @_; + Debug('Torrus child exit handler executed'); + Torrus::DB::cleanupEnvironment(); +} + + +if( $Torrus::Renderer::globalDebug ) +{ + &Torrus::Log::setLevel('debug'); +} + +my $ok = 1; +my $s = Apache2::ServerUtil->server(); + +# Apache::Server::is_perl_option_enabled is implemented since +# mod_perl2-1.99r13, but many installations still use mod_perl2-1.99r12 +if( $mod_perl::VERSION > 1.9912 and + not $s->is_perl_option_enabled('ChildExit') ) +{ + $ok = 0; + $s->log_error('ChildExit must be enabled for proper cleanup'); +} +else +{ + $s->push_handlers( 'ChildExit' => \&child_exit_handler ); +} + + +$ok; + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# perl-indent-level: 4 +# End: diff --git a/torrus/configure b/torrus/configure new file mode 100755 index 000000000..53dcc818f --- /dev/null +++ b/torrus/configure @@ -0,0 +1,3709 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59 for torrus 1.0.9. +# +# Report bugs to . +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME='torrus' +PACKAGE_TARNAME='torrus' +PACKAGE_VERSION='1.0.9' +PACKAGE_STRING='torrus 1.0.9' +PACKAGE_BUGREPORT='ssinyagin@users.sourceforge.net' + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar PERL SU KILL SED FIND RM SLEEP POD2TEXT POD2TEXT_PRESENT_TRUE POD2TEXT_PRESENT_FALSE POD2MAN POD2MAN_PRESENT_TRUE POD2MAN_PRESENT_FALSE enable_pkgonly PERLINC perllibdirs perlithreads torrus_user var_user var_group var_mode enable_varperm pkghome pkgbindir cfgdefdir pkgdocdir exmpdir perllibdir pluginsdir plugtorruscfgdir plugdevdisccfgdir plugwrapperdir scriptsdir supdir webplaindir webscriptsdir tmpldir distxmldir sitedir siteconfdir tmpluserdir sitexmldir logdir piddir varprefix cachedir dbhome reportsdir seslockdir sesstordir wrapperdir mansec_usercmd mansec_misc defrrddir LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_PERLINC_set=${PERLINC+set} +ac_env_PERLINC_value=$PERLINC +ac_cv_env_PERLINC_set=${PERLINC+set} +ac_cv_env_PERLINC_value=$PERLINC +ac_env_torrus_user_set=${torrus_user+set} +ac_env_torrus_user_value=$torrus_user +ac_cv_env_torrus_user_set=${torrus_user+set} +ac_cv_env_torrus_user_value=$torrus_user +ac_env_var_user_set=${var_user+set} +ac_env_var_user_value=$var_user +ac_cv_env_var_user_set=${var_user+set} +ac_cv_env_var_user_value=$var_user +ac_env_var_group_set=${var_group+set} +ac_env_var_group_value=$var_group +ac_cv_env_var_group_set=${var_group+set} +ac_cv_env_var_group_value=$var_group +ac_env_var_mode_set=${var_mode+set} +ac_env_var_mode_value=$var_mode +ac_cv_env_var_mode_set=${var_mode+set} +ac_cv_env_var_mode_value=$var_mode +ac_env_pkghome_set=${pkghome+set} +ac_env_pkghome_value=$pkghome +ac_cv_env_pkghome_set=${pkghome+set} +ac_cv_env_pkghome_value=$pkghome +ac_env_pkgbindir_set=${pkgbindir+set} +ac_env_pkgbindir_value=$pkgbindir +ac_cv_env_pkgbindir_set=${pkgbindir+set} +ac_cv_env_pkgbindir_value=$pkgbindir +ac_env_cfgdefdir_set=${cfgdefdir+set} +ac_env_cfgdefdir_value=$cfgdefdir +ac_cv_env_cfgdefdir_set=${cfgdefdir+set} +ac_cv_env_cfgdefdir_value=$cfgdefdir +ac_env_pkgdocdir_set=${pkgdocdir+set} +ac_env_pkgdocdir_value=$pkgdocdir +ac_cv_env_pkgdocdir_set=${pkgdocdir+set} +ac_cv_env_pkgdocdir_value=$pkgdocdir +ac_env_exmpdir_set=${exmpdir+set} +ac_env_exmpdir_value=$exmpdir +ac_cv_env_exmpdir_set=${exmpdir+set} +ac_cv_env_exmpdir_value=$exmpdir +ac_env_perllibdir_set=${perllibdir+set} +ac_env_perllibdir_value=$perllibdir +ac_cv_env_perllibdir_set=${perllibdir+set} +ac_cv_env_perllibdir_value=$perllibdir +ac_env_pluginsdir_set=${pluginsdir+set} +ac_env_pluginsdir_value=$pluginsdir +ac_cv_env_pluginsdir_set=${pluginsdir+set} +ac_cv_env_pluginsdir_value=$pluginsdir +ac_env_plugtorruscfgdir_set=${plugtorruscfgdir+set} +ac_env_plugtorruscfgdir_value=$plugtorruscfgdir +ac_cv_env_plugtorruscfgdir_set=${plugtorruscfgdir+set} +ac_cv_env_plugtorruscfgdir_value=$plugtorruscfgdir +ac_env_plugdevdisccfgdir_set=${plugdevdisccfgdir+set} +ac_env_plugdevdisccfgdir_value=$plugdevdisccfgdir +ac_cv_env_plugdevdisccfgdir_set=${plugdevdisccfgdir+set} +ac_cv_env_plugdevdisccfgdir_value=$plugdevdisccfgdir +ac_env_plugwrapperdir_set=${plugwrapperdir+set} +ac_env_plugwrapperdir_value=$plugwrapperdir +ac_cv_env_plugwrapperdir_set=${plugwrapperdir+set} +ac_cv_env_plugwrapperdir_value=$plugwrapperdir +ac_env_scriptsdir_set=${scriptsdir+set} +ac_env_scriptsdir_value=$scriptsdir +ac_cv_env_scriptsdir_set=${scriptsdir+set} +ac_cv_env_scriptsdir_value=$scriptsdir +ac_env_supdir_set=${supdir+set} +ac_env_supdir_value=$supdir +ac_cv_env_supdir_set=${supdir+set} +ac_cv_env_supdir_value=$supdir +ac_env_webplaindir_set=${webplaindir+set} +ac_env_webplaindir_value=$webplaindir +ac_cv_env_webplaindir_set=${webplaindir+set} +ac_cv_env_webplaindir_value=$webplaindir +ac_env_webscriptsdir_set=${webscriptsdir+set} +ac_env_webscriptsdir_value=$webscriptsdir +ac_cv_env_webscriptsdir_set=${webscriptsdir+set} +ac_cv_env_webscriptsdir_value=$webscriptsdir +ac_env_tmpldir_set=${tmpldir+set} +ac_env_tmpldir_value=$tmpldir +ac_cv_env_tmpldir_set=${tmpldir+set} +ac_cv_env_tmpldir_value=$tmpldir +ac_env_distxmldir_set=${distxmldir+set} +ac_env_distxmldir_value=$distxmldir +ac_cv_env_distxmldir_set=${distxmldir+set} +ac_cv_env_distxmldir_value=$distxmldir +ac_env_sitedir_set=${sitedir+set} +ac_env_sitedir_value=$sitedir +ac_cv_env_sitedir_set=${sitedir+set} +ac_cv_env_sitedir_value=$sitedir +ac_env_siteconfdir_set=${siteconfdir+set} +ac_env_siteconfdir_value=$siteconfdir +ac_cv_env_siteconfdir_set=${siteconfdir+set} +ac_cv_env_siteconfdir_value=$siteconfdir +ac_env_tmpluserdir_set=${tmpluserdir+set} +ac_env_tmpluserdir_value=$tmpluserdir +ac_cv_env_tmpluserdir_set=${tmpluserdir+set} +ac_cv_env_tmpluserdir_value=$tmpluserdir +ac_env_sitexmldir_set=${sitexmldir+set} +ac_env_sitexmldir_value=$sitexmldir +ac_cv_env_sitexmldir_set=${sitexmldir+set} +ac_cv_env_sitexmldir_value=$sitexmldir +ac_env_logdir_set=${logdir+set} +ac_env_logdir_value=$logdir +ac_cv_env_logdir_set=${logdir+set} +ac_cv_env_logdir_value=$logdir +ac_env_piddir_set=${piddir+set} +ac_env_piddir_value=$piddir +ac_cv_env_piddir_set=${piddir+set} +ac_cv_env_piddir_value=$piddir +ac_env_varprefix_set=${varprefix+set} +ac_env_varprefix_value=$varprefix +ac_cv_env_varprefix_set=${varprefix+set} +ac_cv_env_varprefix_value=$varprefix +ac_env_cachedir_set=${cachedir+set} +ac_env_cachedir_value=$cachedir +ac_cv_env_cachedir_set=${cachedir+set} +ac_cv_env_cachedir_value=$cachedir +ac_env_dbhome_set=${dbhome+set} +ac_env_dbhome_value=$dbhome +ac_cv_env_dbhome_set=${dbhome+set} +ac_cv_env_dbhome_value=$dbhome +ac_env_reportsdir_set=${reportsdir+set} +ac_env_reportsdir_value=$reportsdir +ac_cv_env_reportsdir_set=${reportsdir+set} +ac_cv_env_reportsdir_value=$reportsdir +ac_env_seslockdir_set=${seslockdir+set} +ac_env_seslockdir_value=$seslockdir +ac_cv_env_seslockdir_set=${seslockdir+set} +ac_cv_env_seslockdir_value=$seslockdir +ac_env_sesstordir_set=${sesstordir+set} +ac_env_sesstordir_value=$sesstordir +ac_cv_env_sesstordir_set=${sesstordir+set} +ac_cv_env_sesstordir_value=$sesstordir +ac_env_wrapperdir_set=${wrapperdir+set} +ac_env_wrapperdir_value=$wrapperdir +ac_cv_env_wrapperdir_set=${wrapperdir+set} +ac_cv_env_wrapperdir_value=$wrapperdir +ac_env_mansec_usercmd_set=${mansec_usercmd+set} +ac_env_mansec_usercmd_value=$mansec_usercmd +ac_cv_env_mansec_usercmd_set=${mansec_usercmd+set} +ac_cv_env_mansec_usercmd_value=$mansec_usercmd +ac_env_mansec_misc_set=${mansec_misc+set} +ac_env_mansec_misc_value=$mansec_misc +ac_cv_env_mansec_misc_set=${mansec_misc+set} +ac_cv_env_mansec_misc_value=$mansec_misc +ac_env_defrrddir_set=${defrrddir+set} +ac_env_defrrddir_value=$defrrddir +ac_cv_env_defrrddir_set=${defrrddir+set} +ac_cv_env_defrrddir_value=$defrrddir + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures torrus 1.0.9 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of torrus 1.0.9:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-pkgonly Skip all checking + --disable-threads Disable Perl threads usage + --disable-varperm Disable db and cache access rights tuning + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-rrdtool=DIR RRDTool location + +Some influential environment variables: + PERLINC [] Additional space-separated Perl library paths + torrus_user [torrus] UID to run the daemons + var_user [TORRUS_USER] Owner of db and cache directories + var_group [torrus] Group of db and cache directories + var_mode [775] Mode of db and cache directories + pkghome [PREFIX/torrus] Place for Torrus static files + pkgbindir [PKGHOME/bin] Torrus executables + cfgdefdir [PKGHOME/conf_defaults] torrus-config.pl and others + pkgdocdir [PKGHOME/doc] Documentation files + exmpdir [PKGHOME/examples] Examples + perllibdir [PKGHOME/perllib] Torrus Perl libraries + pluginsdir [PKGHOME/plugins] Plugin configurations + plugtorruscfgdir + [PLUGINSDIR/torrus-config] + plugdevdisccfgdir + [PLUGINSDIR/devdiscover-config] + plugwrapperdir + [PLUGINSDIR/wrapper] + scriptsdir [PKGHOME/scripts] Script files + supdir [PKGHOME/sup] Supplementary files + webplaindir [SUPDIR/webplain] Web interface plain files path + webscriptsdir + [SUPDIR/webscripts] Directory for optional web scripts + tmpldir [PKGHOME/templates] Template files + distxmldir [PKGHOME/xmlconfig] Distribution XML config files + sitedir [SYSCONFDIR/torrus] Site configuration files + siteconfdir [SITEDIR/conf] Site configuration files + tmpluserdir [SITEDIR/templates] User-defined Template files + sitexmldir [SITEDIR/xmlconfig] Site XML configs + logdir [/var/log/torrus] Log files + piddir [/var/run/torrus] PID files + varprefix [/var/torrus] Common prefix for runtime data + cachedir [VARPREFIX/cache] Renderer cache + dbhome [VARPREFIX/db] Berkeley DB files + reportsdir [VARPREFIX/reports] Reports output + seslockdir [VARPREFIX/session_data/lock] Web session locks + sesstordir [VARPREFIX/session_data/store] Web session storage + wrapperdir [BINDIR] CLI wrapper + mansec_usercmd + [1] User commands man section + mansec_misc [7] Miscellaneous man section + defrrddir [/srv/torrus/collector_rrd] Default RRD storage path + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF +torrus configure 1.0.9 +generated by GNU Autoconf 2.59 + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by torrus $as_me 1.0.9, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ac_aux_dir= +for ac_dir in conftools $srcdir/conftools; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in conftools $srcdir/conftools" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in conftools $srcdir/conftools" >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +am__api_version="1.9" +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='torrus' + VERSION='1.0.9' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" + ;; +esac +fi +PERL=$ac_cv_path_PERL + +if test -n "$PERL"; then + echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +# Need this for init.torrus +# Extract the first word of "su", so it can be a program name with args. +set dummy su; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SU+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SU in + [\\/]* | ?:[\\/]*) + ac_cv_path_SU="$SU" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SU="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_SU" && ac_cv_path_SU="no" + ;; +esac +fi +SU=$ac_cv_path_SU + +if test -n "$SU"; then + echo "$as_me:$LINENO: result: $SU" >&5 +echo "${ECHO_T}$SU" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "kill", so it can be a program name with args. +set dummy kill; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_KILL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $KILL in + [\\/]* | ?:[\\/]*) + ac_cv_path_KILL="$KILL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_KILL" && ac_cv_path_KILL="no" + ;; +esac +fi +KILL=$ac_cv_path_KILL + +if test -n "$KILL"; then + echo "$as_me:$LINENO: result: $KILL" >&5 +echo "${ECHO_T}$KILL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SED in + [\\/]* | ?:[\\/]*) + ac_cv_path_SED="$SED" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_SED" && ac_cv_path_SED="no" + ;; +esac +fi +SED=$ac_cv_path_SED + +if test -n "$SED"; then + echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "find", so it can be a program name with args. +set dummy find; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_FIND+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $FIND in + [\\/]* | ?:[\\/]*) + ac_cv_path_FIND="$FIND" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="no" + ;; +esac +fi +FIND=$ac_cv_path_FIND + +if test -n "$FIND"; then + echo "$as_me:$LINENO: result: $FIND" >&5 +echo "${ECHO_T}$FIND" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_RM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RM in + [\\/]* | ?:[\\/]*) + ac_cv_path_RM="$RM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_RM" && ac_cv_path_RM="no" + ;; +esac +fi +RM=$ac_cv_path_RM + +if test -n "$RM"; then + echo "$as_me:$LINENO: result: $RM" >&5 +echo "${ECHO_T}$RM" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "sleep", so it can be a program name with args. +set dummy sleep; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SLEEP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SLEEP in + [\\/]* | ?:[\\/]*) + ac_cv_path_SLEEP="$SLEEP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SLEEP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_SLEEP" && ac_cv_path_SLEEP="no" + ;; +esac +fi +SLEEP=$ac_cv_path_SLEEP + +if test -n "$SLEEP"; then + echo "$as_me:$LINENO: result: $SLEEP" >&5 +echo "${ECHO_T}$SLEEP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +# This will generate doc pages from POD sources +# Extract the first word of "pod2text", so it can be a program name with args. +set dummy pod2text; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_POD2TEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $POD2TEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_POD2TEXT="$POD2TEXT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_POD2TEXT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_POD2TEXT" && ac_cv_path_POD2TEXT="no" + ;; +esac +fi +POD2TEXT=$ac_cv_path_POD2TEXT + +if test -n "$POD2TEXT"; then + echo "$as_me:$LINENO: result: $POD2TEXT" >&5 +echo "${ECHO_T}$POD2TEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +if test "$POD2TEXT" != no; then + POD2TEXT_PRESENT_TRUE= + POD2TEXT_PRESENT_FALSE='#' +else + POD2TEXT_PRESENT_TRUE='#' + POD2TEXT_PRESENT_FALSE= +fi + +# Extract the first word of "pod2man", so it can be a program name with args. +set dummy pod2man; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_POD2MAN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $POD2MAN in + [\\/]* | ?:[\\/]*) + ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="no" + ;; +esac +fi +POD2MAN=$ac_cv_path_POD2MAN + +if test -n "$POD2MAN"; then + echo "$as_me:$LINENO: result: $POD2MAN" >&5 +echo "${ECHO_T}$POD2MAN" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +if test "$POD2MAN" != no; then + POD2MAN_PRESENT_TRUE= + POD2MAN_PRESENT_FALSE='#' +else + POD2MAN_PRESENT_TRUE='#' + POD2MAN_PRESENT_FALSE= +fi + + +# Check whether --enable-pkgonly or --disable-pkgonly was given. +if test "${enable_pkgonly+set}" = set; then + enableval="$enable_pkgonly" + +fi; + + +# Check whether --enable-threads or --disable-threads was given. +if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + +fi; + +perllibdirs="\'\${perllibdir}\'" + +PERLOPTS= + +if test ! -z "$PERLINC"; then + for d in $PERLINC; do + PERLOPTS="${PERLOPTS} -I${d}" + perllibdirs=${perllibdirs}"\,\'"${d}"\'" + done +fi + +find_rrdtool () { + if ${PERL} -e 'use RRDs' 2>/dev/null; then :; else + if test "$enable_pkgonly" != yes; then + { echo "$as_me:$LINENO: RRDs.pm is not in default Perl search paths." >&5 +echo "$as_me: RRDs.pm is not in default Perl search paths." >&6;} + echo "$as_me:$LINENO: checking RRDtool in /usr/local/rrdtool*" >&5 +echo $ECHO_N "checking RRDtool in /usr/local/rrdtool*... $ECHO_C" >&6 + with_rrdtool=`ls -1dr /usr/local/rrdtool* | head -1` + if test -d $with_rrdtool; then + echo "$as_me:$LINENO: result: ${with_rrdtool}" >&5 +echo "${ECHO_T}${with_rrdtool}" >&6 + else + { { echo "$as_me:$LINENO: error: Cannot find RRDtool" >&5 +echo "$as_me: error: Cannot find RRDtool" >&2;} + { (exit 1); exit 1; }; } + fi + test_rrdtool + else + with_rrdtool="/usr/local/rrdtool" + fi + fi +} + +test_rrdtool () { + if test "$enable_pkgonly" != yes; then + if ${PERL} -I${with_rrdtool}/lib/perl -e 'use RRDs'; then :; else + { { echo "$as_me:$LINENO: error: Could not find RRDs perl module in ${with_rrdtool}" >&5 +echo "$as_me: error: Could not find RRDs perl module in ${with_rrdtool}" >&2;} + { (exit 1); exit 1; }; } + fi + fi + perllibdirs=${perllibdirs}"\,\'"${with_rrdtool}"/lib/perl/\'" +} + + +# Check whether --with-rrdtool or --without-rrdtool was given. +if test "${with_rrdtool+set}" = set; then + withval="$with_rrdtool" + test_rrdtool +else + find_rrdtool +fi; + +perllibdirs=${perllibdirs} + + + +# Check the necessary Perl modules + +if test "$enable_pkgonly" != yes; then + + for module in 'BerkeleyDB' 'XML::LibXML' 'Template' \ + 'Proc::Daemon' 'Net::SNMP' 'URI::Escape' 'Apache::Session' \ + 'Date::Parse' 'JSON' + do + echo "$as_me:$LINENO: checking presence of $module" >&5 +echo $ECHO_N "checking presence of $module... $ECHO_C" >&6 + if ${PERL} ${PERLOPTS} -e 'use '$module 2>/dev/null; then + echo "$as_me:$LINENO: result: Ok" >&5 +echo "${ECHO_T}Ok" >&6 + else + { { echo "$as_me:$LINENO: error: Perl cannot find $module" >&5 +echo "$as_me: error: Perl cannot find $module" >&2;} + { (exit 1); exit 1; }; }; + fi + done + +# Check if Perl threads can be used. +# Requirements are: perl 5.8.8 with threads compiled, +# threads ver. 1.41 or higher, threads::shared ver. 1.03 or higher + + perlithreads=1 + if test x"$enable_threads" = xno; then + perlithreads=0 + else + + echo "$as_me:$LINENO: checking if Perl version is 5.8.8 or higher" >&5 +echo $ECHO_N "checking if Perl version is 5.8.8 or higher... $ECHO_C" >&6 + if ${PERL} ${PERLOPTS} -e 'use 5.8.8' 2>/dev/null; then + echo "$as_me:$LINENO: result: Ok" >&5 +echo "${ECHO_T}Ok" >&6 + else + perlithreads=0 + fi + + if test ${perlithreads} -eq 1; then + echo "$as_me:$LINENO: checking threading support in Perl" >&5 +echo $ECHO_N "checking threading support in Perl... $ECHO_C" >&6 + if ${PERL} ${PERLOPTS} -e 'use threads' 2>/dev/null; then + echo "$as_me:$LINENO: result: Ok" >&5 +echo "${ECHO_T}Ok" >&6 + else + perlithreads=0 + fi + fi + + if test ${perlithreads} -eq 1; then + echo "$as_me:$LINENO: checking if threads module version is 1.41 or higher" >&5 +echo $ECHO_N "checking if threads module version is 1.41 or higher... $ECHO_C" >&6 + if ${PERL} ${PERLOPTS} -e \ + 'use threads; exit($threads::VERSION >= 1.41 ? 0:1)'; then + echo "$as_me:$LINENO: result: Ok" >&5 +echo "${ECHO_T}Ok" >&6 + else + perlithreads=0 + fi + fi + + if test ${perlithreads} -eq 1; then + echo "$as_me:$LINENO: checking if threads::shared module version is 1.03 or higher" >&5 +echo $ECHO_N "checking if threads::shared module version is 1.03 or higher... $ECHO_C" >&6 + if ${PERL} ${PERLOPTS} -e \ + 'use threads; use threads::shared; + exit($threads::shared::VERSION >= 1.03 ? 0:1)'; then + echo "$as_me:$LINENO: result: Ok" >&5 +echo "${ECHO_T}Ok" >&6 + else + perlithreads=0 + fi + fi + + if test ${perlithreads} -eq 0; then + echo "$as_me:$LINENO: result: No. Multithreading will not be used." >&5 +echo "${ECHO_T}No. Multithreading will not be used." >&6 + fi + + fi + perlithreads=${perlithreads} + +fi + + +if test -z "$torrus_user"; then + torrus_user=torrus; fi + +if test "$enable_pkgonly" != yes; then + echo "$as_me:$LINENO: checking if user ${torrus_user} exists" >&5 +echo $ECHO_N "checking if user ${torrus_user} exists... $ECHO_C" >&6 + torrus_check_file=torrus_usercheck_$$ + torrus_check_error=no + if ! touch ${torrus_check_file}; then + { { echo "$as_me:$LINENO: error: Cannot create ${torrus_check_file}" >&5 +echo "$as_me: error: Cannot create ${torrus_check_file}" >&2;} + { (exit 1); exit 1; }; } + elif ! chown ${torrus_user} ${torrus_check_file}; then + torrus_check_error=yes + fi + rm -f ${torrus_check_file} + if test ${torrus_check_error} = yes; then + { { echo "$as_me:$LINENO: error: User ${torrus_user} does not exist" >&5 +echo "$as_me: error: User ${torrus_user} does not exist" >&2;} + { (exit 1); exit 1; }; } + else + echo "$as_me:$LINENO: result: Ok" >&5 +echo "${ECHO_T}Ok" >&6 + fi +fi + + +# Set the var/db and var/cache ownership + + + + + +# Check whether --enable-varperm or --disable-varperm was given. +if test "${enable_varperm+set}" = set; then + enableval="$enable_varperm" + +else + enable_varperm="yes" +fi; + + + +if test -z "$pkghome"; then + pkghome='${prefix}/torrus'; fi + + +if test -z "$pkgbindir"; then + pkgbindir='${pkghome}/bin'; fi + + +if test -z "$cfgdefdir"; then + cfgdefdir='${pkghome}/conf_defaults'; fi + + +if test -z "$pkgdocdir"; then + pkgdocdir='${pkghome}/doc'; fi + + +if test -z "$exmpdir"; then + exmpdir='${pkghome}/examples'; fi + + +if test -z "$perllibdir"; then + perllibdir='${pkghome}/perllib'; fi + + +if test -z "$pluginsdir"; then + pluginsdir='${pkghome}/plugins'; fi + + +if test -z "$plugtorruscfgdir"; then + plugtorruscfgdir='${pluginsdir}/torrus-config'; fi + + +if test -z "$plugdevdisccfgdir"; then + plugdevdisccfgdir='${pluginsdir}/devdiscover-config'; fi + + +if test -z "$plugwrapperdir"; then + plugwrapperdir='${pluginsdir}/wrapper'; fi + + + +if test -z "$scriptsdir"; then + scriptsdir='${pkghome}/scripts'; fi + + +if test -z "$supdir"; then + supdir='${pkghome}/sup'; fi + + +if test -z "$webplaindir"; then + webplaindir='${supdir}/webplain'; fi + + +if test -z "$webscriptsdir"; then + webscriptsdir='${supdir}/webscripts'; fi + + +if test -z "$tmpldir"; then + tmpldir='${pkghome}/templates'; fi + + +if test -z "$distxmldir"; then + distxmldir='${pkghome}/xmlconfig'; fi + + +if test -z "$sitedir"; then + sitedir='${sysconfdir}/torrus'; fi + + +if test -z "$siteconfdir"; then + siteconfdir='${sitedir}/conf'; fi + + +if test -z "$tmpluserdir"; then + tmpluserdir='${sitedir}/templates'; fi + + +if test -z "$sitexmldir"; then + sitexmldir='${sitedir}/xmlconfig'; fi + + +if test -z "$logdir"; then + logdir='/var/log/torrus'; fi + + +if test -z "$piddir"; then + piddir='/var/run/torrus'; fi + + +if test -z "$varprefix"; then + varprefix='/var/torrus'; fi + + +if test -z "$cachedir"; then + cachedir='${varprefix}/cache'; fi + + +if test -z "$dbhome"; then + dbhome='${varprefix}/db'; fi + + +if test -z "$reportsdir"; then + reportsdir='${varprefix}/reports'; fi + + +if test -z "$seslockdir"; then + seslockdir='${varprefix}/session_data/lock'; fi + + +if test -z "$sesstordir"; then + sesstordir='${varprefix}/session_data/store'; fi + + +if test -z "$wrapperdir"; then + wrapperdir='${bindir}'; fi + + +if test -z "$mansec_usercmd"; then + mansec_usercmd='1'; fi + + +if test -z "$mansec_misc"; then + mansec_misc='7'; fi + + +if test -z "$defrrddir"; then + defrrddir='/srv/torrus/collector_rrd'; fi + + + ac_config_files="$ac_config_files Makefile bin/Makefile configs/Makefile" + + ac_config_files="$ac_config_files doc/Makefile doc/manpages/Makefile" + + ac_config_files="$ac_config_files examples/Makefile perllib/Makefile" + + ac_config_files="$ac_config_files sup/Makefile xmlconfig/Makefile" + + + ac_config_files="$ac_config_files setup_tools/substvars.sh" + + ac_config_files="$ac_config_files setup_tools/mkvardir.sh" + + ac_config_files="$ac_config_files init.d/torrus" + + + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${POD2TEXT_PRESENT_TRUE}" && test -z "${POD2TEXT_PRESENT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"POD2TEXT_PRESENT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"POD2TEXT_PRESENT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${POD2MAN_PRESENT_TRUE}" && test -z "${POD2MAN_PRESENT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"POD2MAN_PRESENT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"POD2MAN_PRESENT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by torrus $as_me 1.0.9, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +torrus config.status 1.0.9 +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; + "configs/Makefile" ) CONFIG_FILES="$CONFIG_FILES configs/Makefile" ;; + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/manpages/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/manpages/Makefile" ;; + "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "perllib/Makefile" ) CONFIG_FILES="$CONFIG_FILES perllib/Makefile" ;; + "sup/Makefile" ) CONFIG_FILES="$CONFIG_FILES sup/Makefile" ;; + "xmlconfig/Makefile" ) CONFIG_FILES="$CONFIG_FILES xmlconfig/Makefile" ;; + "setup_tools/substvars.sh" ) CONFIG_FILES="$CONFIG_FILES setup_tools/substvars.sh" ;; + "setup_tools/mkvardir.sh" ) CONFIG_FILES="$CONFIG_FILES setup_tools/mkvardir.sh" ;; + "init.d/torrus" ) CONFIG_FILES="$CONFIG_FILES init.d/torrus" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t +s,@PERL@,$PERL,;t t +s,@SU@,$SU,;t t +s,@KILL@,$KILL,;t t +s,@SED@,$SED,;t t +s,@FIND@,$FIND,;t t +s,@RM@,$RM,;t t +s,@SLEEP@,$SLEEP,;t t +s,@POD2TEXT@,$POD2TEXT,;t t +s,@POD2TEXT_PRESENT_TRUE@,$POD2TEXT_PRESENT_TRUE,;t t +s,@POD2TEXT_PRESENT_FALSE@,$POD2TEXT_PRESENT_FALSE,;t t +s,@POD2MAN@,$POD2MAN,;t t +s,@POD2MAN_PRESENT_TRUE@,$POD2MAN_PRESENT_TRUE,;t t +s,@POD2MAN_PRESENT_FALSE@,$POD2MAN_PRESENT_FALSE,;t t +s,@enable_pkgonly@,$enable_pkgonly,;t t +s,@PERLINC@,$PERLINC,;t t +s,@perllibdirs@,$perllibdirs,;t t +s,@perlithreads@,$perlithreads,;t t +s,@torrus_user@,$torrus_user,;t t +s,@var_user@,$var_user,;t t +s,@var_group@,$var_group,;t t +s,@var_mode@,$var_mode,;t t +s,@enable_varperm@,$enable_varperm,;t t +s,@pkghome@,$pkghome,;t t +s,@pkgbindir@,$pkgbindir,;t t +s,@cfgdefdir@,$cfgdefdir,;t t +s,@pkgdocdir@,$pkgdocdir,;t t +s,@exmpdir@,$exmpdir,;t t +s,@perllibdir@,$perllibdir,;t t +s,@pluginsdir@,$pluginsdir,;t t +s,@plugtorruscfgdir@,$plugtorruscfgdir,;t t +s,@plugdevdisccfgdir@,$plugdevdisccfgdir,;t t +s,@plugwrapperdir@,$plugwrapperdir,;t t +s,@scriptsdir@,$scriptsdir,;t t +s,@supdir@,$supdir,;t t +s,@webplaindir@,$webplaindir,;t t +s,@webscriptsdir@,$webscriptsdir,;t t +s,@tmpldir@,$tmpldir,;t t +s,@distxmldir@,$distxmldir,;t t +s,@sitedir@,$sitedir,;t t +s,@siteconfdir@,$siteconfdir,;t t +s,@tmpluserdir@,$tmpluserdir,;t t +s,@sitexmldir@,$sitexmldir,;t t +s,@logdir@,$logdir,;t t +s,@piddir@,$piddir,;t t +s,@varprefix@,$varprefix,;t t +s,@cachedir@,$cachedir,;t t +s,@dbhome@,$dbhome,;t t +s,@reportsdir@,$reportsdir,;t t +s,@seslockdir@,$seslockdir,;t t +s,@sesstordir@,$sesstordir,;t t +s,@wrapperdir@,$wrapperdir,;t t +s,@mansec_usercmd@,$mansec_usercmd,;t t +s,@mansec_misc@,$mansec_misc,;t t +s,@defrrddir@,$defrrddir,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + + # Run the commands associated with the file. + case $ac_file in + setup_tools/substvars.sh ) chmod +x setup_tools/substvars.sh ;; + setup_tools/mkvardir.sh ) chmod +x setup_tools/mkvardir.sh ;; + init.d/torrus ) chmod +x init.d/torrus ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +VARSAVE=configs/instvars +echo creating $VARSAVE +rm -f $VARSAVE +for VAR in $ac_subst_vars; do + case ${VAR} in + DEFS | PACKAGE* | INSTALL* | VERSION | ACLOCAL | AUTO* | MAKEINFO |\ + install_sh | AM* | am* | ac* | ECHO* | build* | host* | target* |\ + CYG* | PATH_SEPARATOR | AWK | STRIP | mkdir* |\ + perllibdirs ) + ;; + *) + eval 'VAL=${'$VAR'}' + echo ${VAR}=\'${VAL}\' >>$VARSAVE + ;; + esac +done diff --git a/torrus/configure.ac b/torrus/configure.ac new file mode 100644 index 000000000..f137c0444 --- /dev/null +++ b/torrus/configure.ac @@ -0,0 +1,363 @@ +# Copyright (C) 2002-2010 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: configure.ac,v 1.1 2010-12-27 00:03:31 ivan Exp $ +# Stanislav Sinyagin +# + + +AC_INIT([torrus],[1.0.9],[ssinyagin@users.sourceforge.net]) +AC_PREREQ([2.59]) +AC_CONFIG_AUX_DIR(conftools) +AC_CANONICAL_HOST +AM_INIT_AUTOMAKE(1.9) + +AC_PATH_PROG(PERL, perl, no) + +# Need this for init.torrus +AC_PATH_PROG(SU, su, no) +AC_PATH_PROG(KILL, kill, no) +AC_PATH_PROG(SED, sed, no) +AC_PATH_PROG(FIND, find, no) +AC_PATH_PROG(RM, rm, no) +AC_PATH_PROG(SLEEP, sleep, no) + + +# This will generate doc pages from POD sources +AC_PATH_PROG(POD2TEXT, pod2text, no) +AM_CONDITIONAL([POD2TEXT_PRESENT], [test "$POD2TEXT" != no]) +AC_PATH_PROG(POD2MAN, pod2man, no) +AM_CONDITIONAL([POD2MAN_PRESENT], [test "$POD2MAN" != no]) + +AC_ARG_ENABLE(pkgonly, + [AC_HELP_STRING([--enable-pkgonly], + [Skip all checking])]) +AC_SUBST(enable_pkgonly) + +AC_ARG_ENABLE(threads, + [AC_HELP_STRING([--disable-threads], + [Disable Perl threads usage])]) + +perllibdirs="\'\${perllibdir}\'" + +PERLOPTS= +AC_ARG_VAR(PERLINC, [[] Additional space-separated Perl library paths]) +if test ! -z "$PERLINC"; then + for d in $PERLINC; do + PERLOPTS="${PERLOPTS} -I${d}" + perllibdirs=${perllibdirs}"\,\'"${d}"\'" + done +fi + +find_rrdtool () { + if ${PERL} -e 'use RRDs' 2>/dev/null; then :; else + if test "$enable_pkgonly" != yes; then + AC_MSG_NOTICE([RRDs.pm is not in default Perl search paths.]) + AC_MSG_CHECKING([RRDtool in /usr/local/rrdtool*]) + with_rrdtool=`ls -1dr /usr/local/rrdtool* | head -1` + if test -d $with_rrdtool; then + AC_MSG_RESULT([${with_rrdtool}]) + else + AC_MSG_ERROR([Cannot find RRDtool]) + fi + test_rrdtool + else + with_rrdtool="/usr/local/rrdtool" + fi + fi +} + +test_rrdtool () { + if test "$enable_pkgonly" != yes; then + if ${PERL} -I${with_rrdtool}/lib/perl -e 'use RRDs'; then :; else + AC_MSG_ERROR([Could not find RRDs perl module in ${with_rrdtool}]) + fi + fi + perllibdirs=${perllibdirs}"\,\'"${with_rrdtool}"/lib/perl/\'" +} + +AC_ARG_WITH(rrdtool, + [AC_HELP_STRING(--with-rrdtool=DIR,RRDTool location)], + test_rrdtool, find_rrdtool) + +AC_SUBST(perllibdirs, [${perllibdirs}]) + + +# Check the necessary Perl modules + +if test "$enable_pkgonly" != yes; then + + for module in 'BerkeleyDB' 'XML::LibXML' 'Template' \ + 'Proc::Daemon' 'Net::SNMP' 'URI::Escape' 'Apache::Session' \ + 'Date::Parse' 'JSON' + do + AC_MSG_CHECKING([presence of $module]) + if ${PERL} ${PERLOPTS} -e 'use '$module 2>/dev/null; then + AC_MSG_RESULT([Ok]) + else + AC_MSG_ERROR([Perl cannot find $module]); + fi + done + +# Check if Perl threads can be used. +# Requirements are: perl 5.8.8 with threads compiled, +# threads ver. 1.41 or higher, threads::shared ver. 1.03 or higher + + perlithreads=1 + if test x"$enable_threads" = xno; then + perlithreads=0 + else + + AC_MSG_CHECKING([if Perl version is 5.8.8 or higher]) + if ${PERL} ${PERLOPTS} -e 'use 5.8.8' 2>/dev/null; then + AC_MSG_RESULT([Ok]) + else + perlithreads=0 + fi + + if test ${perlithreads} -eq 1; then + AC_MSG_CHECKING([threading support in Perl]) + if ${PERL} ${PERLOPTS} -e 'use threads' 2>/dev/null; then + AC_MSG_RESULT([Ok]) + else + perlithreads=0 + fi + fi + + if test ${perlithreads} -eq 1; then + AC_MSG_CHECKING([if threads module version is 1.41 or higher]) + if ${PERL} ${PERLOPTS} -e \ + 'use threads; exit($threads::VERSION >= 1.41 ? 0:1)'; then + AC_MSG_RESULT([Ok]) + else + perlithreads=0 + fi + fi + + if test ${perlithreads} -eq 1; then + AC_MSG_CHECKING([if threads::shared module version is 1.03 or higher]) + if ${PERL} ${PERLOPTS} -e \ + 'use threads; use threads::shared; + exit($threads::shared::VERSION >= 1.03 ? 0:1)'; then + AC_MSG_RESULT([Ok]) + else + perlithreads=0 + fi + fi + + if test ${perlithreads} -eq 0; then + AC_MSG_RESULT([No. Multithreading will not be used.]) + fi + + fi + AC_SUBST(perlithreads, [${perlithreads}]) +fi + +AC_ARG_VAR(torrus_user, [[torrus] UID to run the daemons]) +if test -z "$torrus_user"; then + torrus_user=torrus; fi + +if test "$enable_pkgonly" != yes; then + AC_MSG_CHECKING([if user ${torrus_user} exists]) + torrus_check_file=torrus_usercheck_$$ + torrus_check_error=no + if ! touch ${torrus_check_file}; then + AC_MSG_ERROR([Cannot create ${torrus_check_file}]) + elif ! chown ${torrus_user} ${torrus_check_file}; then + torrus_check_error=yes + fi + rm -f ${torrus_check_file} + if test ${torrus_check_error} = yes; then + AC_MSG_ERROR([User ${torrus_user} does not exist]) + else + AC_MSG_RESULT([Ok]) + fi +fi + + +# Set the var/db and var/cache ownership + +AC_ARG_VAR(var_user, [[TORRUS_USER] Owner of db and cache directories]) +AC_ARG_VAR(var_group, [[torrus] Group of db and cache directories]) +AC_ARG_VAR(var_mode, [[775] Mode of db and cache directories]) + +AC_ARG_ENABLE(varperm, + [AC_HELP_STRING(--disable-varperm, + Disable db and cache access rights tuning)], + [], + [enable_varperm="yes"]) +AC_SUBST(enable_varperm) + +AC_ARG_VAR(pkghome, [[PREFIX/torrus] Place for Torrus static files]) +if test -z "$pkghome"; then + pkghome='${prefix}/torrus'; fi + +AC_ARG_VAR(pkgbindir, [[PKGHOME/bin] Torrus executables]) +if test -z "$pkgbindir"; then + pkgbindir='${pkghome}/bin'; fi + +AC_ARG_VAR(cfgdefdir, [[PKGHOME/conf_defaults] torrus-config.pl and others]) +if test -z "$cfgdefdir"; then + cfgdefdir='${pkghome}/conf_defaults'; fi + +AC_ARG_VAR(pkgdocdir, [[PKGHOME/doc] Documentation files]) +if test -z "$pkgdocdir"; then + pkgdocdir='${pkghome}/doc'; fi + +AC_ARG_VAR(exmpdir, [[PKGHOME/examples] Examples]) +if test -z "$exmpdir"; then + exmpdir='${pkghome}/examples'; fi + +AC_ARG_VAR(perllibdir, [[PKGHOME/perllib] Torrus Perl libraries]) +if test -z "$perllibdir"; then + perllibdir='${pkghome}/perllib'; fi + +AC_ARG_VAR(pluginsdir, [[PKGHOME/plugins] Plugin configurations]) +if test -z "$pluginsdir"; then + pluginsdir='${pkghome}/plugins'; fi + +AC_ARG_VAR(plugtorruscfgdir, [[PLUGINSDIR/torrus-config]]) +if test -z "$plugtorruscfgdir"; then + plugtorruscfgdir='${pluginsdir}/torrus-config'; fi + +AC_ARG_VAR(plugdevdisccfgdir, [[PLUGINSDIR/devdiscover-config]]) +if test -z "$plugdevdisccfgdir"; then + plugdevdisccfgdir='${pluginsdir}/devdiscover-config'; fi + +AC_ARG_VAR(plugwrapperdir, [[PLUGINSDIR/wrapper]]) +if test -z "$plugwrapperdir"; then + plugwrapperdir='${pluginsdir}/wrapper'; fi + + +AC_ARG_VAR(scriptsdir, [[PKGHOME/scripts] Script files]) +if test -z "$scriptsdir"; then + scriptsdir='${pkghome}/scripts'; fi + +AC_ARG_VAR(supdir, [[PKGHOME/sup] Supplementary files]) +if test -z "$supdir"; then + supdir='${pkghome}/sup'; fi + +AC_ARG_VAR(webplaindir, [[SUPDIR/webplain] Web interface plain files path]) +if test -z "$webplaindir"; then + webplaindir='${supdir}/webplain'; fi + +AC_ARG_VAR(webscriptsdir, + [[SUPDIR/webscripts] Directory for optional web scripts]) +if test -z "$webscriptsdir"; then + webscriptsdir='${supdir}/webscripts'; fi + +AC_ARG_VAR(tmpldir, [[PKGHOME/templates] Template files]) +if test -z "$tmpldir"; then + tmpldir='${pkghome}/templates'; fi + +AC_ARG_VAR(distxmldir, [[PKGHOME/xmlconfig] Distribution XML config files]) +if test -z "$distxmldir"; then + distxmldir='${pkghome}/xmlconfig'; fi + +AC_ARG_VAR(sitedir, [[SYSCONFDIR/torrus] Site configuration files]) +if test -z "$sitedir"; then + sitedir='${sysconfdir}/torrus'; fi + +AC_ARG_VAR(siteconfdir, [[SITEDIR/conf] Site configuration files]) +if test -z "$siteconfdir"; then + siteconfdir='${sitedir}/conf'; fi + +AC_ARG_VAR(tmpluserdir, [[SITEDIR/templates] User-defined Template files]) +if test -z "$tmpluserdir"; then + tmpluserdir='${sitedir}/templates'; fi + +AC_ARG_VAR(sitexmldir, [[SITEDIR/xmlconfig] Site XML configs]) +if test -z "$sitexmldir"; then + sitexmldir='${sitedir}/xmlconfig'; fi + +AC_ARG_VAR(logdir, [[/var/log/torrus] Log files]) +if test -z "$logdir"; then + logdir='/var/log/torrus'; fi + +AC_ARG_VAR(piddir, [[/var/run/torrus] PID files]) +if test -z "$piddir"; then + piddir='/var/run/torrus'; fi + +AC_ARG_VAR(varprefix, [[/var/torrus] Common prefix for runtime data]) +if test -z "$varprefix"; then + varprefix='/var/torrus'; fi + +AC_ARG_VAR(cachedir, [[VARPREFIX/cache] Renderer cache]) +if test -z "$cachedir"; then + cachedir='${varprefix}/cache'; fi + +AC_ARG_VAR(dbhome, [[VARPREFIX/db] Berkeley DB files]) +if test -z "$dbhome"; then + dbhome='${varprefix}/db'; fi + +AC_ARG_VAR(reportsdir, [[VARPREFIX/reports] Reports output]) +if test -z "$reportsdir"; then + reportsdir='${varprefix}/reports'; fi + +AC_ARG_VAR(seslockdir, [[VARPREFIX/session_data/lock] Web session locks]) +if test -z "$seslockdir"; then + seslockdir='${varprefix}/session_data/lock'; fi + +AC_ARG_VAR(sesstordir, [[VARPREFIX/session_data/store] Web session storage]) +if test -z "$sesstordir"; then + sesstordir='${varprefix}/session_data/store'; fi + +AC_ARG_VAR(wrapperdir, [[BINDIR] CLI wrapper]) +if test -z "$wrapperdir"; then + wrapperdir='${bindir}'; fi + +AC_ARG_VAR(mansec_usercmd, [[1] User commands man section]) +if test -z "$mansec_usercmd"; then + mansec_usercmd='1'; fi + +AC_ARG_VAR(mansec_misc, [[7] Miscellaneous man section]) +if test -z "$mansec_misc"; then + mansec_misc='7'; fi + +AC_ARG_VAR(defrrddir, [[/srv/torrus/collector_rrd] Default RRD storage path]) +if test -z "$defrrddir"; then + defrrddir='/srv/torrus/collector_rrd'; fi + + +AC_CONFIG_FILES([Makefile bin/Makefile configs/Makefile]) +AC_CONFIG_FILES([doc/Makefile doc/manpages/Makefile]) +AC_CONFIG_FILES([examples/Makefile perllib/Makefile]) +AC_CONFIG_FILES([sup/Makefile xmlconfig/Makefile]) + +AC_CONFIG_FILES([setup_tools/substvars.sh],[chmod +x setup_tools/substvars.sh]) +AC_CONFIG_FILES([setup_tools/mkvardir.sh], [chmod +x setup_tools/mkvardir.sh]) +AC_CONFIG_FILES([init.d/torrus], [chmod +x init.d/torrus]) + +AC_SUBST(VERSION) + +AC_OUTPUT + +VARSAVE=configs/instvars +echo creating $VARSAVE +rm -f $VARSAVE +for VAR in $ac_subst_vars; do + case ${VAR} in + DEFS | PACKAGE* | INSTALL* | VERSION | ACLOCAL | AUTO* | MAKEINFO |\ + install_sh | AM* | am* | ac* | ECHO* | build* | host* | target* |\ + CYG* | PATH_SEPARATOR | AWK | STRIP | mkdir* |\ + perllibdirs ) + ;; + *) + eval 'VAL=${'$VAR'}' + echo ${VAR}=\'${VAL}\' >>$VARSAVE + ;; + esac +done diff --git a/torrus/conftools/config.guess b/torrus/conftools/config.guess new file mode 100755 index 000000000..917bbc50f --- /dev/null +++ b/torrus/conftools/config.guess @@ -0,0 +1,1463 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-07-08' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/torrus/conftools/config.sub b/torrus/conftools/config.sub new file mode 100755 index 000000000..1c366dfde --- /dev/null +++ b/torrus/conftools/config.sub @@ -0,0 +1,1579 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-07-08' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ms1 \ + | msp430 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m32c) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | ms1-* \ + | msp430-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + m32c-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/torrus/conftools/install-sh b/torrus/conftools/install-sh new file mode 100755 index 000000000..4d4a9519e --- /dev/null +++ b/torrus/conftools/install-sh @@ -0,0 +1,323 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2005-05-14.22 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/torrus/conftools/missing b/torrus/conftools/missing new file mode 100755 index 000000000..894e786e1 --- /dev/null +++ b/torrus/conftools/missing @@ -0,0 +1,360 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2005-06-08.21 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case "$1" in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/torrus/discovery/README b/torrus/discovery/README new file mode 100644 index 000000000..7218d9ef1 --- /dev/null +++ b/torrus/discovery/README @@ -0,0 +1,5 @@ +This directory is a typical place for SNMP device discovery instruction +files. + +The discovery instruction files may be generated by "genddx" utility. +They are used as the input for "devdiscover" utility. diff --git a/torrus/doc/Makefile.am b/torrus/doc/Makefile.am new file mode 100644 index 000000000..336762e20 --- /dev/null +++ b/torrus/doc/Makefile.am @@ -0,0 +1,105 @@ + +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.am,v 1.1 2010-12-27 00:04:32 ivan Exp $ +# Stanislav Sinyagin +# + +SUBDIRS = . manpages + +SUBST = @abs_top_builddir@/setup_tools/substvars.sh + +CLEANFILES = $(POD_FILES) $(nodist_pkgdoc_DATA) +EXTRA_DIST = $(SRCPOD) + +SRCPOD = \ + install.pod.in \ + nodeid_usage.pod.in \ + reporting_setup.pod.in \ + rpnexpr.pod.in \ + rrfw_torrus_migration.pod.in \ + scalability.pod.in \ + snmpdiscovery.pod.in \ + stylingprofile.pod.in \ + userguide.pod.in \ + vendorsupport.pod.in \ + webintf.pod.in \ + xmlconfig.pod.in + +POD_FILES = \ + install.pod \ + nodeid_usage.pod \ + reporting_setup.pod \ + rpnexpr.pod \ + rrfw_torrus_migration.pod \ + scalability.pod \ + snmpdiscovery.pod \ + stylingprofile.pod \ + userguide.pod \ + vendorsupport.pod \ + webintf.pod \ + xmlconfig.pod + + +pkgdocdir = @pkgdocdir@ + +if POD2TEXT_PRESENT +nodist_pkgdoc_DATA = \ + install.txt \ + nodeid_usage.txt \ + reporting_setup.txt \ + rpnexpr.txt \ + rrfw_torrus_migration.txt \ + scalability.txt \ + snmpdiscovery.txt \ + stylingprofile.txt \ + userguide.txt \ + vendorsupport.txt \ + webintf.txt \ + xmlconfig.txt +endif + +devdocdir = $(pkgdocdir)/devdoc + +dist_devdoc_DATA = \ + devdoc/architecture.pod \ + devdoc/devdiscover.pod \ + devdoc/progstyle.pod \ + devdoc/reqs.0.0.pod \ + devdoc/reqs.0.1.pod \ + devdoc/torrus_roadmap.pod \ + devdoc/wd.distributed.pod \ + devdoc/wd.messaging.pod \ + devdoc/wd.monitor-escalation.pod \ + devdoc/wd.uptime-mon.pod + +SUFFIXES = .pod.in .pod .txt + +.PRECIOUS: $(POD_FILES) + +.pod.in.pod: + $(SUBST) $< > $@ + +if POD2TEXT_PRESENT +.pod.txt: + $(POD2TEXT) $< > $@ +endif + +htdocs: $(POD_FILES) + cd manpages; make pods + HTMLDIR=@abs_top_builddir@/../htdocs $(SHELL) mkhtdocs.sh + diff --git a/torrus/doc/Makefile.in b/torrus/doc/Makefile.in new file mode 100644 index 000000000..6c768bbfd --- /dev/null +++ b/torrus/doc/Makefile.in @@ -0,0 +1,620 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2002 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: Makefile.in,v 1.1 2010-12-27 00:04:31 ivan Exp $ +# Stanislav Sinyagin +# + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(dist_devdoc_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(devdocdir)" "$(DESTDIR)$(pkgdocdir)" +dist_devdocDATA_INSTALL = $(INSTALL_DATA) +nodist_pkgdocDATA_INSTALL = $(INSTALL_DATA) +DATA = $(dist_devdoc_DATA) $(nodist_pkgdoc_DATA) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +FIND = @FIND@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KILL = @KILL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERLINC = @PERLINC@ +POD2MAN = @POD2MAN@ +POD2MAN_PRESENT_FALSE = @POD2MAN_PRESENT_FALSE@ +POD2MAN_PRESENT_TRUE = @POD2MAN_PRESENT_TRUE@ +POD2TEXT = @POD2TEXT@ +POD2TEXT_PRESENT_FALSE = @POD2TEXT_PRESENT_FALSE@ +POD2TEXT_PRESENT_TRUE = @POD2TEXT_PRESENT_TRUE@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLEEP = @SLEEP@ +STRIP = @STRIP@ +SU = @SU@ +VERSION = @VERSION@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +cachedir = @cachedir@ +cfgdefdir = @cfgdefdir@ +datadir = @datadir@ +dbhome = @dbhome@ +defrrddir = @defrrddir@ +distxmldir = @distxmldir@ +enable_pkgonly = @enable_pkgonly@ +enable_varperm = @enable_varperm@ +exec_prefix = @exec_prefix@ +exmpdir = @exmpdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mansec_misc = @mansec_misc@ +mansec_usercmd = @mansec_usercmd@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +perlithreads = @perlithreads@ +perllibdir = @perllibdir@ +perllibdirs = @perllibdirs@ +piddir = @piddir@ +pkgbindir = @pkgbindir@ +pkgdocdir = @pkgdocdir@ +pkghome = @pkghome@ +plugdevdisccfgdir = @plugdevdisccfgdir@ +pluginsdir = @pluginsdir@ +plugtorruscfgdir = @plugtorruscfgdir@ +plugwrapperdir = @plugwrapperdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +reportsdir = @reportsdir@ +sbindir = @sbindir@ +scriptsdir = @scriptsdir@ +seslockdir = @seslockdir@ +sesstordir = @sesstordir@ +sharedstatedir = @sharedstatedir@ +siteconfdir = @siteconfdir@ +sitedir = @sitedir@ +sitexmldir = @sitexmldir@ +supdir = @supdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +tmpldir = @tmpldir@ +tmpluserdir = @tmpluserdir@ +torrus_user = @torrus_user@ +var_group = @var_group@ +var_mode = @var_mode@ +var_user = @var_user@ +varprefix = @varprefix@ +webplaindir = @webplaindir@ +webscriptsdir = @webscriptsdir@ +wrapperdir = @wrapperdir@ +SUBDIRS = . manpages +SUBST = @abs_top_builddir@/setup_tools/substvars.sh +CLEANFILES = $(POD_FILES) $(nodist_pkgdoc_DATA) +EXTRA_DIST = $(SRCPOD) +SRCPOD = \ + install.pod.in \ + nodeid_usage.pod.in \ + reporting_setup.pod.in \ + rpnexpr.pod.in \ + rrfw_torrus_migration.pod.in \ + scalability.pod.in \ + snmpdiscovery.pod.in \ + stylingprofile.pod.in \ + userguide.pod.in \ + vendorsupport.pod.in \ + webintf.pod.in \ + xmlconfig.pod.in + +POD_FILES = \ + install.pod \ + nodeid_usage.pod \ + reporting_setup.pod \ + rpnexpr.pod \ + rrfw_torrus_migration.pod \ + scalability.pod \ + snmpdiscovery.pod \ + stylingprofile.pod \ + userguide.pod \ + vendorsupport.pod \ + webintf.pod \ + xmlconfig.pod + +@POD2TEXT_PRESENT_TRUE@nodist_pkgdoc_DATA = \ +@POD2TEXT_PRESENT_TRUE@ install.txt \ +@POD2TEXT_PRESENT_TRUE@ nodeid_usage.txt \ +@POD2TEXT_PRESENT_TRUE@ reporting_setup.txt \ +@POD2TEXT_PRESENT_TRUE@ rpnexpr.txt \ +@POD2TEXT_PRESENT_TRUE@ rrfw_torrus_migration.txt \ +@POD2TEXT_PRESENT_TRUE@ scalability.txt \ +@POD2TEXT_PRESENT_TRUE@ snmpdiscovery.txt \ +@POD2TEXT_PRESENT_TRUE@ stylingprofile.txt \ +@POD2TEXT_PRESENT_TRUE@ userguide.txt \ +@POD2TEXT_PRESENT_TRUE@ vendorsupport.txt \ +@POD2TEXT_PRESENT_TRUE@ webintf.txt \ +@POD2TEXT_PRESENT_TRUE@ xmlconfig.txt + +devdocdir = $(pkgdocdir)/devdoc +dist_devdoc_DATA = \ + devdoc/architecture.pod \ + devdoc/devdiscover.pod \ + devdoc/progstyle.pod \ + devdoc/reqs.0.0.pod \ + devdoc/reqs.0.1.pod \ + devdoc/torrus_roadmap.pod \ + devdoc/wd.distributed.pod \ + devdoc/wd.messaging.pod \ + devdoc/wd.monitor-escalation.pod \ + devdoc/wd.uptime-mon.pod + +SUFFIXES = .pod.in .pod .txt +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .pod.in .pod .txt +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +uninstall-info-am: +install-dist_devdocDATA: $(dist_devdoc_DATA) + @$(NORMAL_INSTALL) + test -z "$(devdocdir)" || $(mkdir_p) "$(DESTDIR)$(devdocdir)" + @list='$(dist_devdoc_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_devdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(devdocdir)/$$f'"; \ + $(dist_devdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(devdocdir)/$$f"; \ + done + +uninstall-dist_devdocDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_devdoc_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(devdocdir)/$$f'"; \ + rm -f "$(DESTDIR)$(devdocdir)/$$f"; \ + done +install-nodist_pkgdocDATA: $(nodist_pkgdoc_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdocdir)" || $(mkdir_p) "$(DESTDIR)$(pkgdocdir)" + @list='$(nodist_pkgdoc_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(nodist_pkgdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdocdir)/$$f'"; \ + $(nodist_pkgdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdocdir)/$$f"; \ + done + +uninstall-nodist_pkgdocDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkgdoc_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgdocdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgdocdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/devdoc + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(devdocdir)" "$(DESTDIR)$(pkgdocdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-dist_devdocDATA install-nodist_pkgdocDATA + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-dist_devdocDATA uninstall-info-am \ + uninstall-nodist_pkgdocDATA + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-recursive ctags ctags-recursive \ + distclean distclean-generic distclean-recursive distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am \ + install-dist_devdocDATA install-exec install-exec-am \ + install-info install-info-am install-man \ + install-nodist_pkgdocDATA install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-dist_devdocDATA uninstall-info-am \ + uninstall-nodist_pkgdocDATA + + +.PRECIOUS: $(POD_FILES) + +.pod.in.pod: + $(SUBST) $< > $@ + +@POD2TEXT_PRESENT_TRUE@.pod.txt: +@POD2TEXT_PRESENT_TRUE@ $(POD2TEXT) $< > $@ + +htdocs: $(POD_FILES) + cd manpages; make pods + HTMLDIR=@abs_top_builddir@/../htdocs $(SHELL) mkhtdocs.sh +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/torrus/doc/devdoc/architecture.pod b/torrus/doc/devdoc/architecture.pod new file mode 100644 index 000000000..4cf9c9ccb --- /dev/null +++ b/torrus/doc/devdoc/architecture.pod @@ -0,0 +1,511 @@ +# architecture.pod: The Torrus internals +# Copyright (C) 2002-2005 Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: architecture.pod,v 1.1 2010-12-27 00:04:37 ivan Exp $ +# Stanislav Sinyagin +# +# + +=head1 Torrus Framework Architecture + +=head2 Configuration Processing + +The XML configuration is compiled into the database representation by +operator's manual request. + +The compiled version of configuration is not a one-to-one +representation of the XML version. All aliases and templates are +expanded. The backwards restoration of XML from the database +is available with the snapshot utility. + +Aliases are the way to represent the data in a more convenient format. +An alias can point to a subtree or a leaf, and it works similarly as +a symbolic link in a filesystem. + +A template defines a piece of configuration which can be used in +multiple places. Templates can be nested. + +The configuration can consist of several XML files. They will be +processed in the specified order. Each new file is treated as an additive +information to the existing tree. + +The XML configuration compiler validates all the mandatory parameters. + + +=head2 Database Architecture + +All runtime data is stored in +B database environment (http://www.sleepycat.com). + +The compiled version of the configuration XML is stored in +the B and B. +These databases have similar structure, and +B keeps all datasource-related information. +C and C stand for the productive instance number, +and have values of 0 or 1. +Current productive instance numbers are stored in B +database. + +For each datasource tree, the database files are resided in +Ftree_nameE> directory. + +The runtime modules access the configuration via C objects. + +Each datasource subtree or leaf is identified by a I. +A token is a short alphanumeric string, generated internally. +Two types of tokens are recognized: single tokens and token sets. + +Single token starts with letter I. The rest is made with decimal digts. + +Token set name starts with letter I. The rest is an arbitrary sequence of +word characters. + +The special token I is reserved for tokensets list. Also tokenset +parameters are inherited from this token's parameters. + +View and monitor names must be unique, and must +start with a lower case letter. + +B is a I database, with keys of form +Ctree_nameE> or Ctree_nameE>, and 0 or 1 as +values. Also the compiler adds an entry Ctree_nameE> +during the compilation time, in order to avoid two compiler processes +running at the same time on the same tree. + +B is a I database, with the keys and values +defined as follows: + +=over 4 + +=item * tp:EpathE -- EtokenE + +Gives the token correspondig to the given element name. + +=item * pt:EtokenE -- EpathE + +Gives the path name by the given token. + +=item * c:EtokenE -- EctokenE,... + +For given subtree, contains the list of child tokens separated by comma. + +=item * p:EtokenE -- EptokenE + +For given subtree or leaf, contains the parent token. + +=item * P:EtokenE:EpnameE -- EvalueE + +Contains the parameter value for specified leaf or subtree. +Each leaf or subtree inherits parameters from its parent. +Thus, we must climb up the tree in order to get the parameter's +value if not defined locally. + +=item * Pl:EtokenE -- EpnameE,... + +Contains the list of parameter names for specified leaf or subtree. + +=item * a:EtokenE -- EtokenE + +If this subtree or leaf is an alias, specifies the reference to the real node. + +=item * ar:EtokenE -- EtokenE,... + +Specifies all alias subtrees or leaves pointing to this token. + +=item * d:EnameE -- EvalueE + +Definition value for the given name + +=item * D: -- EnameE,EnameE,... + +List of all known definitions + +=item * n:EtokenE -- EtypeE + +Defines a node type. Type is a number with the following values: +0 for subtree, 1 for leaf, 2 for alias. + +=back + +B is a I database, with the keys and values +defined as follows: + +=over 4 + +=item * ConfigurationReady -- 1:0 + +When nonzero, the configuration is ready for usage. +Otherwise, the configuration status is undefined. + +=item * P:EnameE:EpnameE -- EvalueE + +Contains the parameter value for specified view, monitor or action. + +=item * Pl:EnameE -- EpnameE,... + +Contains the list of parameter names for specified view, +monitor, or action. + +=item * V: -- EvnameE,... + +Specifies comma-separated list of all views defined. + +=item * v:EtokenE -- EvnameE,... + +Specifies comma-separated list of view names for the path given. +The first view in the list is interpreted as default. + +=item * M: -- EmnameE,... + +Specifies comma-separated list of all monitor names defined + +=item * A: -- EanameE,... + +Comma-separated list of actions defined + +=back + + + + +B is a I database for storing the +datasource parameter properties, such as expandable, list parameters, +searchable, etc.: + +=over 4 + +=item * EpnameE:EpropertyE -- EvalueE + +=back + + + + + +B is a I database with alias paths as keys +and target tokens as values. It is used for quick alias expansion. + +B is a I database containing the token sets. +The keys and values are as follows: + +=over 4 + +=item * S: -- EtokensetE,... + +Keeps the list of all known token sets. + +=item * s:EtokensetE -- EtokenE,... + +For given tokenset, keeps its contents. + +=item * o:EtokensetE:EtokenE -- EoriginE + +Defines the origin of the member. Currently two types of origin are known: +C and C + +=back + +B is a I database containing the cached +node parameter values. The keys and values are as follows: + +=over 4 + +=item * EnameE:EpnameE -- EstatusEEvalueE + +Keeps the status and the value for a given token and parameter. +Status is a one-byte prefix, with values C for undefined parameter, and +C for a parameter with value. + +=back + + +B is a I database that stores the mapping between +NodeID values and tokens. Database keys are NodeID strings, and values +are tokens. One NodeID corresponds to maximum one token. + + + +B is a I database which contains the informaton +about active processes which read the configuration. The configuration +compiler waits until all readers finish using the current configuration +database. Process IDs are used as keys, and the values contain timestamps. + +B is a I database containing various kinds of +timestamps. The timestamp name is the key, and the number of seconds +since epoch is the value. + +B keeps the status information about the graphs +ready to display. Last known timestamp of the configuration is +compared with the actual one. When the actual timestamp +differs from known, the renderer cache is cleaned up. +This is a I database, with the following +keys and values: + +=over 4 + +=item * EtokenE:EvnameE -- + Et_renderE:Et_expiresE:EfilenameE:Emime_typeE + +For the leaf/subtree and view name given, specifies two timestamps: the +moment of last rendering and expiration time. The filename is automatically +generated unique name in the spool directory. The contents type is determined +by the MIME type. + +=back + +B is a I database used in order to avoid the +unneccessary configuration tree walk. The keys are the leaf tokens, and +the values are comma-separated monitor names. At each monitor invocation, +the confguration timestamp is compared against the last known, and the +cache database is rebuilt if needed. + +B is a I database that keeps alarm status information +from previous runs of Monitor, with the keys and values as follows: + +=over 4 + +=item * EmnameE:EpathE -- +Et_setE:Et_expiresE:EstatusE: +Et_last_changeE + +Key consists of the monitor name and leaf path. In the value, B +is the time when the alarm was raised. If two subsequent runs of Monitor +raise the same alarm, B does not change. B is the +timestamp that shows when it's still important to keep the entry after the +alarm is cleared. B is 1 if the alarm is active, and 0 otherwise. +B is the timestamp of last status change. + +When B is 1, the record is kept regardless of timestamps. +When B is 0, and the current time is more than B, +the record is not reliable and may be deleted by Monitor. + +=back + +B is a I database used in order to avoid the +unneccessary configuration tree walk. X is the collector instance number, and +Y is the datasource configuration instance number. +Keys and values are as follows: + +=over 4 + +=item * EtokenE -- EperiodE:EoffsetE + +For each leaf token, period and time offset values are stored. + +=back + + +B is a I database which stores the runtime +statistics of Scheduler tasks. Each key is of structure +BtasknameE:EperiodE:EoffsetE:EvariableE>, +and the value is a number representing the current value of the variable. +Depending on variable purpose, the number is floating point or integer. + + +B is a I database containing user details, passwords, +and group membership: + +=over 4 + +=item * ua:EuidE:EattrE -- EvalueE + +User attributes, such as C (Common name) or C, are stored +here. For each user, there is a record consisting of the attribute C, +with the value equal to the user identifier. + +=item * uA:EuidE -- EattrE, ... + +Comma-separated list of attribute names for the given user. + +=item * gm:EuidE -- EgroupE, ... + +For each user ID, stores the comma-separated list of groups it belongs to. + +=item * ga:EgroupE:EattrE -- EvalueE + +Group attributes, such as group description. + +=item * gA:EgroupE -- EattrE, ... + +Comma-separated list of attribute names for the given group. + +=item * G: -- EgroupE, ... + +List of all groups + +=back + + +B is a I database containing group privileges information: + +=over 4 + +=item * u:EgroupE:EobjectE:EprivilegeE -- 1 + +The entry exists if and only if the group members have this privilege +over the object given. Most common privilege is C, where +the object is the tree name. + +=back + + +B is a I database containing properties +for each Service ID (exported collector information, usually stored in +an SQL database): + +=over 4 + +=item * a: EserviceidE,... + +Lists all known service IDs + +=item * t:EtreeE -- EserviceidE,... + +Lists service IDs exported by a given datasource tree. + +=item * p:EserviceidE:EparamE -- EvalueE + +Parameter value for a given service ID. Mandatory parameters are: +C, C, C. Optional: C. + +=item * P:EserviceidE -- EparamE, ... + +List of parameter names for a service ID. + +=back + + +B is a I database with DB_DUP and DB_DUPSORT flags. +It contains the search strings for the given tree: + +=over 4 + +=item * EkeywordE -- EpathE[:EparamE] + +For a given keyword, refer to a path of a node that contains this word. +If the node name matches the keyword, the I element +is omitted. Otherwise it refers to the parameter that matches the keyword. + +=back + + + +B is a I database with DB_DUP and DB_DUPSORT flags. +It contains the search strings for all trees: + +=over 4 + +=item * EkeywordE -- EtreeE:EpathE[:EparamE] + +For a given keyword, refer to a path of a node that contains this word. +If the node name matches the keyword, the I element +is omitted. Otherwise it refers to the parameter that matches the keyword. + +=back + + +B is a I database containing SNMP collector +failures information for a given collector instance for a tree. + +=over 4 + +=item * c:EcounterE -- ENE + +A counter with a name. Known names: I, I. + + +=item * h:EhosthashE -- EfailureE:EtimestampE + +SNMP host failure information. Hosthash is a concatenation of hostname, UDP +port, and SNMP community, separated by "|". Known failures: I, +I. Timestamp is a UNIX time of the event. + +=item * m:EhosthashE -- EpathE:EtimestampE + +MIB failures (I, I, and I) +for a given host, with the tree path of their occurence and the UNIX timestamp. + +=item * M:EhosthashE -- ENE + +Count of MIB failures per SNMP host. + +=back + + + + + + + +=head2 Modular Structure + +The Torrus framework consists of several functional modules: + +=over 4 + +=item * Configuration management + +Once the configuration XML files get changed, the configuration compiler +should be run manually. This guarantees that the actual framework +configuration is changed only when the files are ready. + +The configuration management module provides access methods for +enumeration and enquery of the configuratin objects. + +=item * Data Collector module + +Collector program runs as a separate process for each datasource tree. +Upon startup, it first runs all registered collectors. After that, +the collectors are grouped depending on period and time offset, and launched +periodically at the moments defined by formula: + + time + period - (time mod period) + timeoffset + +The datasources are grouped by collector type. +For SNMP collector type, the datasources are grouped by host. +SNMP requests are sent in non-blocking mode (see Net::SNMP Perl module +manual). + +For each SNMP host, system uptime is verified. For RRD datasource types +"COUNTER", if the device reload is +detected, the corresponding RRD file is updated with "undefined" +value at the calculated moment of reload. + +=item * Data threshold monitoring + +This module performs the monitoring tasks periodically, based on each +monitored leaf schedule. +It checks the conditions for each leaf having a monitor. +In case of the alarm, it executes the action instructions synchronously. + +=item * Rendering module + +Upon a request, this module generates the graph and HTML files for the +requested view and its subviews. It first checks availability of +cached objects and avoids unneeded regeneration. It must be possible +to force the renderer to flush the cache. + +=item * Web interface module + +Web interface module passes the Renderer output to an HTTP client. + + +=back + +=head1 Author + +Copyright (c) 2002-2005 Stanislav Sinyagin ssinyagin@yahoo.com diff --git a/torrus/doc/devdoc/devdiscover.pod b/torrus/doc/devdoc/devdiscover.pod new file mode 100644 index 000000000..8386c1755 --- /dev/null +++ b/torrus/doc/devdoc/devdiscover.pod @@ -0,0 +1,296 @@ +# devdiscover.pod - Guide to devdiscover +# Copyright (C) 2003 Shawn Ferry, Stanislav Sinyagin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +# $Id: devdiscover.pod,v 1.1 2010-12-27 00:04:36 ivan Exp $ +# Shawn Ferry +# Stanislav Sinyagin +# + +=head1 Torrus SNMP Device Discovery Developer's Guide + +=head2 C overview + +C is an extensible, module based, SNMP device discovery +utility. It is intended to automatically generate Torrus configuration +files, based on SNMP discovery results and templates. + +See I for command usage and functionality overview. + +In general, C consists of the following files and functional +parts: + +=over 4 + +=item * C + +This file is installed as C in Torrus installation directory, +with certain variables substituted. The program provides all the commandline +functionality and options processing. Once the CLI options are processed and +verified, the control is passed to the C object. + +=item * C + +This Perl module is responsible for the SNMP discovery process organization: + +=over 8 + +=item * + +it registers the discovery modules; + +=item * + +establishes an SNMP session to the target host; + +=item * + +initiates a new C object for the target host; + +=item * + +stores the connection-specific parameters to the device object; + +=item * + +for each registered discovery module, executes C in +I order; + +=item * + +for those discovery modules which paid interest in this target host, +executes C in I order; + +=item * + +upon request from C, builds the configuration +XML tree, by calling C in I order for each +relevant discovery module for each target host. + +=back + +=item * C + +This Perl module is defined in F, and provides +the functionality to store the results of SNMP device discovery. + +=item * C + +This module is an encapsulation wrapper for XML configuration builder. +It provides methods for every element of Torrus configuration. + +=item * Discovery Modules + +These provide all the functionality for SNMP discovery. Normally +one module covers one MIB, or sometimes several vendor-specific MIBs, +and it is responsible for finding out the device details necessary +for Torrus configuration building. Usually a discovery module refers to one or +several I