From blair at orcaware.com Sat Nov 9 12:22:39 2002 From: blair at orcaware.com (blair at orcaware.com) Date: Sat Nov 9 12:22:39 2002 Subject: [Orca-checkins] rev 151 - trunk/orca/contrib Message-ID: <200211092022.gA9KMaKV005521@orcaware.com> Author: blair Date: 2002-11-08 21:00:21 -0800 (Fri, 08 Nov 2002) New Revision: 151 Added: trunk/orca/contrib/orca_services/ Removed: trunk/orca/contrib/orcaservices/ Log: To prepare to load orca-0.27b3 into trunk/orca, perform 1 rename. * trunk/orca/contrib/orca_services: Renamed from trunk/orca/contrib/orcaservices. Copied: orca_services (from rev 150, trunk/orca/contrib/orcaservices) From blair at orcaware.com Sat Nov 9 12:23:09 2002 From: blair at orcaware.com (blair at orcaware.com) Date: Sat Nov 9 12:23:09 2002 Subject: [Orca-checkins] rev 152 - in trunk/orca: contrib/orca_services lib packages Message-ID: <200211092023.gA9KN6EF005549@orcaware.com> Author: blair Date: 2002-11-08 21:03:15 -0800 (Fri, 08 Nov 2002) New Revision: 152 Added: trunk/orca/contrib/orca_services/S99orca_services.sh.in trunk/orca/contrib/orca_services/orca_services.cfg.in trunk/orca/contrib/orca_services/orca_services.pl.in trunk/orca/contrib/orca_services/orca_services_running.pl.in trunk/orca/contrib/orca_services/restart_orca_services.sh.in trunk/orca/contrib/orca_services/start_orca_services.sh.in trunk/orca/contrib/orca_services/stop_orca_services.sh.in trunk/orca/lib/orca_logo.gif trunk/orca/lib/orca_logo.gif.hex trunk/orca/lib/rrdtool_logo.gif trunk/orca/lib/rrdtool_logo.gif.hex trunk/orca/packages/Digest-MD5-2.20/ trunk/orca/packages/Storable-2.05/ Removed: trunk/orca/contrib/orca_services/S99orcaservices.sh.in trunk/orca/contrib/orca_services/orcaservices.cfg.in trunk/orca/contrib/orca_services/orcaservices.pl.in trunk/orca/contrib/orca_services/orcaservices_running.pl.in trunk/orca/contrib/orca_services/restart_orcaservices.sh.in trunk/orca/contrib/orca_services/start_orcaservices.sh.in trunk/orca/contrib/orca_services/stop_orcaservices.sh.in trunk/orca/lib/orca.gif trunk/orca/lib/orca.gif.hex trunk/orca/lib/rrdtool.gif trunk/orca/lib/rrdtool.gif.hex trunk/orca/packages/Digest-MD5-2.16/ trunk/orca/packages/Storable-1.0.13/ Log: To prepare to load orca-0.27b3 into trunk/orca, perform 13 renames. * trunk/orca/contrib/orca_services/S99orca_services.sh.in: Renamed from trunk/orca/contrib/orca_services/S99orcaservices.sh.in. * trunk/orca/contrib/orca_services/orca_services.cfg.in: Renamed from trunk/orca/contrib/orca_services/orcaservices.cfg.in. * trunk/orca/contrib/orca_services/orca_services.pl.in: Renamed from trunk/orca/contrib/orca_services/orcaservices.pl.in. * trunk/orca/contrib/orca_services/orca_services_running.pl.in: Renamed from trunk/orca/contrib/orca_services/orcaservices_running.pl.in. * trunk/orca/contrib/orca_services/restart_orca_services.sh.in: Renamed from trunk/orca/contrib/orca_services/restart_orcaservices.sh.in. * trunk/orca/contrib/orca_services/start_orca_services.sh.in: Renamed from trunk/orca/contrib/orca_services/start_orcaservices.sh.in. * trunk/orca/contrib/orca_services/stop_orca_services.sh.in: Renamed from trunk/orca/contrib/orca_services/stop_orcaservices.sh.in. * trunk/orca/lib/orca_logo.gif: Renamed from trunk/orca/lib/orca.gif. * trunk/orca/lib/orca_logo.gif.hex: Renamed from trunk/orca/lib/orca.gif.hex. * trunk/orca/lib/rrdtool_logo.gif: Renamed from trunk/orca/lib/rrdtool.gif. * trunk/orca/lib/rrdtool_logo.gif.hex: Renamed from trunk/orca/lib/rrdtool.gif.hex. * trunk/orca/packages/Digest-MD5-2.20: Renamed from trunk/orca/packages/Digest-MD5-2.16. * trunk/orca/packages/Storable-2.05: Renamed from trunk/orca/packages/Storable-1.0.13. Copied: start_orca_services.sh.in (from rev 151, trunk/orca/contrib/orca_services/start_orcaservices.sh.in) Copied: orca_services.pl.in (from rev 151, trunk/orca/contrib/orca_services/orcaservices.pl.in) Copied: orca_services_running.pl.in (from rev 151, trunk/orca/contrib/orca_services/orcaservices_running.pl.in) Copied: restart_orca_services.sh.in (from rev 151, trunk/orca/contrib/orca_services/restart_orcaservices.sh.in) Copied: S99orca_services.sh.in (from rev 151, trunk/orca/contrib/orca_services/S99orcaservices.sh.in) Copied: stop_orca_services.sh.in (from rev 151, trunk/orca/contrib/orca_services/stop_orcaservices.sh.in) Copied: orca_services.cfg.in (from rev 151, trunk/orca/contrib/orca_services/orcaservices.cfg.in) Deleted: trunk/orca/contrib/orca_services/start_orcaservices.sh.in Deleted: trunk/orca/contrib/orca_services/orcaservices.pl.in Deleted: trunk/orca/contrib/orca_services/orcaservices_running.pl.in Deleted: trunk/orca/contrib/orca_services/restart_orcaservices.sh.in Deleted: trunk/orca/contrib/orca_services/S99orcaservices.sh.in Deleted: trunk/orca/contrib/orca_services/stop_orcaservices.sh.in Deleted: trunk/orca/contrib/orca_services/orcaservices.cfg.in Copied: orca_logo.gif (from rev 151, trunk/orca/lib/orca.gif) Copied: rrdtool_logo.gif (from rev 151, trunk/orca/lib/rrdtool.gif) Copied: orca_logo.gif.hex (from rev 151, trunk/orca/lib/orca.gif.hex) Copied: rrdtool_logo.gif.hex (from rev 151, trunk/orca/lib/rrdtool.gif.hex) Deleted: trunk/orca/lib/orca.gif Deleted: trunk/orca/lib/rrdtool.gif Deleted: trunk/orca/lib/orca.gif.hex Deleted: trunk/orca/lib/rrdtool.gif.hex Copied: Digest-MD5-2.20 (from rev 151, trunk/orca/packages/Digest-MD5-2.16) Copied: Storable-2.05 (from rev 151, trunk/orca/packages/Storable-1.0.13) From blair at orcaware.com Sat Nov 9 12:28:41 2002 From: blair at orcaware.com (blair at orcaware.com) Date: Sat Nov 9 12:28:41 2002 Subject: [Orca-checkins] rev 153 - in trunk/orca/packages: . Storable-2.05/t Message-ID: <200211092028.gA9KSXNp005631@orcaware.com> Author: blair Date: 2002-11-08 21:04:12 -0800 (Fri, 08 Nov 2002) New Revision: 153 Added: trunk/orca/packages/Storable-2.05/t/compat06.t trunk/orca/packages/Storable-2.05/t/st-dump.pl trunk/orca/packages/Time-HiRes-1.38/ Removed: trunk/orca/packages/Storable-2.05/t/compat-0.6.t trunk/orca/packages/Storable-2.05/t/dump.pl trunk/orca/packages/Time-HiRes-01.20/ Log: To prepare to load orca-0.27b3 into trunk/orca, perform 3 renames. * trunk/orca/packages/Storable-2.05/t/compat06.t: Renamed from trunk/orca/packages/Storable-2.05/t/compat-0.6.t. * trunk/orca/packages/Storable-2.05/t/st-dump.pl: Renamed from trunk/orca/packages/Storable-2.05/t/dump.pl. * trunk/orca/packages/Time-HiRes-1.38: Renamed from trunk/orca/packages/Time-HiRes-01.20. Copied: Time-HiRes-1.38 (from rev 152, trunk/orca/packages/Time-HiRes-01.20) Copied: compat06.t (from rev 152, trunk/orca/packages/Storable-2.05/t/compat-0.6.t) Copied: st-dump.pl (from rev 152, trunk/orca/packages/Storable-2.05/t/dump.pl) Deleted: trunk/orca/packages/Storable-2.05/t/dump.pl Deleted: trunk/orca/packages/Storable-2.05/t/compat-0.6.t From blair at orcaware.com Sat Nov 9 12:29:01 2002 From: blair at orcaware.com (blair at orcaware.com) Date: Sat Nov 9 12:29:01 2002 Subject: [Orca-checkins] rev 154 - in trunk/orca/packages: . Time-HiRes-1.38/t Message-ID: <200211092028.gA9KSu0j005657@orcaware.com> Author: blair Date: 2002-11-08 21:05:28 -0800 (Fri, 08 Nov 2002) New Revision: 154 Added: trunk/orca/packages/Time-HiRes-1.38/t/HiRes.t trunk/orca/packages/TimeDate-1.14/ trunk/orca/packages/rrdtool-1.0.40/ Removed: trunk/orca/packages/Time-HiRes-1.38/t/01test.t trunk/orca/packages/TimeDate-1.10/ trunk/orca/packages/rrdtool-1.0.33/ Log: To prepare to load orca-0.27b3 into trunk/orca, perform 3 renames. * trunk/orca/packages/Time-HiRes-1.38/t/HiRes.t: Renamed from trunk/orca/packages/Time-HiRes-1.38/t/01test.t. * trunk/orca/packages/TimeDate-1.14: Renamed from trunk/orca/packages/TimeDate-1.10. * trunk/orca/packages/rrdtool-1.0.40: Renamed from trunk/orca/packages/rrdtool-1.0.33. Copied: rrdtool-1.0.40 (from rev 153, trunk/orca/packages/rrdtool-1.0.33) Copied: HiRes.t (from rev 153, trunk/orca/packages/Time-HiRes-1.38/t/01test.t) Deleted: trunk/orca/packages/Time-HiRes-1.38/t/01test.t Copied: TimeDate-1.14 (from rev 153, trunk/orca/packages/TimeDate-1.10) From blair at orcaware.com Sat Nov 9 12:29:21 2002 From: blair at orcaware.com (blair at orcaware.com) Date: Sat Nov 9 12:29:21 2002 Subject: [Orca-checkins] rev 155 - in trunk/orca/packages/rrdtool-1.0.40: . perl-shared Message-ID: <200211092029.gA9KTJok005686@orcaware.com> Author: blair Date: 2002-11-08 21:06:25 -0800 (Fri, 08 Nov 2002) New Revision: 155 Added: trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL.in trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/ Removed: trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.3/ Log: To prepare to load orca-0.27b3 into trunk/orca, perform 2 renames. * trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL.in: Renamed from trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL. * trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4: Renamed from trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.3. Copied: zlib-1.1.4 (from rev 154, trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.3) Copied: Makefile.PL.in (from rev 154, trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL) Deleted: trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL From blair at orcaware.com Sat Nov 9 12:33:25 2002 From: blair at orcaware.com (blair at orcaware.com) Date: Sat Nov 9 12:33:25 2002 Subject: rev 156 - in trunk/orca: . src docs contrib contrib/procallator contrib/rotate_orca_graphs contrib/orca_services orcallator config lib lib/Orca packages/Digest-MD5-2.20 packages/Digest-MD5-2.20/t packages/rrdtool-1.0.40 packages/rrdtool-1.0.40/tcl packages/rrdtool-1.0.40/src packages/rrdtool-1.0.40/cgilib-0.4 packages/rrdtool-1.0.40/zlib-1.1.4 packages/rrdtool-1.0.40/contrib packages/rrdtool-1.0.40/contrib/rrdview packages/rrdtool-1.0.40/contrib/rrdview/CVS packages/rrdtool-1.0.40/contrib/rrdfetchnames packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS packages/rrdtool-1.0.40/contrib/killspike packages/rrdtool-1.0.40/contrib/killspike/CVS packages/rrdtool-1.0.40/contrib/rrd-file-icon packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS packages/rrdtool-1.0.40/contrib/snmpstats packages/rrdtool-1.0.40/contrib/snmpstats/CVS packages/rrdtool-1.0.40/contrib/trytime packages/rrdtool-1.0.40/contrib/rrdlastds packages/rrdtool-1.0.40/contrib/rrdlastds/CVS packages/rrdtool-1.0.40/contrib/rrdexplorer packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS packages/rrdtool-1.0.40/contrib/php3 packages/rrdtool-1.0.40/contrib/php3/CVS packages/rrdtool-1.0.40/contrib/php3/examples packages/rrdtool-1.0.40/contrib/php3/examples/CVS packages/rrdtool-1.0.40/contrib/log2rrd packages/rrdtool-1.0.40/contrib/log2rrd/CVS packages/rrdtool-1.0.40/contrib/rrdproc packages/rrdtool-1.0.40/contrib/rrdproc/CVS packages/rrdtool-1.0.40/contrib/php4 packages/rrdtool-1.0.40/contrib/php4/CVS packages/rrdtool-1.0.40/contrib/php4/build packages/rrdtool-1.0.40/contrib/php4/build/CVS packages/rrdtool-1.0.40/contrib/php4/examples packages/rrdtool-1.0.40/contrib/php4/examples/CVS packages/rrdtool-1.0.40/contrib/add_ds packages/rrdtool-1.0.40/contrib/add_ds/CVS packages/rrdtool-1.0.40/contrib/add_ds/add_ds packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS packages/rrdtool-1.0.40/perl-piped packages/rrdtool-1.0.40/config packages/rrdtool-1.0.40/doc packages/rrdtool-1.0.40/perl-shared packages/rrdtool-1.0.40/gd1.3 packages/rrdtool-1.0.40/examples packages/rrdtool-1.0.40/libpng-1.0.9 packages/Storable-2.05 packages/Storable-2.05/t packages/Time-HiRes-1.38 packages/Time-HiRes-1.38/t packages/Time-HiRes-1.38/hints packages/TimeDate-1.14 packages/TimeDate-1.14/t packages/TimeDate-1.14/lib/Date packages/TimeDate-1.14/lib/Date/Language packages/TimeDate-1.14/lib/Time Message-ID: <200211092032.gA9KWvPH006364@orcaware.com> Author: blair Date: 2002-11-08 21:07:40 -0800 (Fri, 08 Nov 2002) New Revision: 156 Added: trunk/orca/COMMITTERS trunk/orca/HACKING trunk/orca/contrib/procallator/ trunk/orca/contrib/procallator/README trunk/orca/contrib/procallator/TODO trunk/orca/contrib/procallator/install.sh trunk/orca/contrib/procallator/procallator trunk/orca/contrib/procallator/procallator.cfg trunk/orca/contrib/procallator/procallator.pl.in trunk/orca/contrib/procallator/update_orca_server.sh trunk/orca/lib/rothschild_image_logo.png trunk/orca/lib/rothschild_image_logo.png.hex trunk/orca/lib/rothschild_image_logo.psd trunk/orca/packages/Digest-MD5-2.20/t/utf8.t trunk/orca/packages/Storable-2.05/t/code.t trunk/orca/packages/Storable-2.05/t/croak.t trunk/orca/packages/Storable-2.05/t/downgrade.t trunk/orca/packages/Storable-2.05/t/integer.t trunk/orca/packages/Storable-2.05/t/interwork56.t trunk/orca/packages/Storable-2.05/t/make_56_interwork.pl trunk/orca/packages/Storable-2.05/t/make_downgrade.pl trunk/orca/packages/Storable-2.05/t/malice.t trunk/orca/packages/Storable-2.05/t/restrict.t trunk/orca/packages/Storable-2.05/t/utf8hash.t trunk/orca/packages/Time-HiRes-1.38/hints/ trunk/orca/packages/Time-HiRes-1.38/hints/dynixptx.pl trunk/orca/packages/Time-HiRes-1.38/hints/sco.pl trunk/orca/packages/Time-HiRes-1.38/typemap trunk/orca/packages/TimeDate-1.14/lib/Date/Language/Brazilian.pm trunk/orca/packages/TimeDate-1.14/lib/Date/Language/Danish.pm trunk/orca/packages/TimeDate-1.14/lib/Date/Language/Greek.pm trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CREDITS trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/php4/EXPERIMENTAL trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/php4/libs.mk trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.php trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Root trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/ trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Entries trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Repository trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Root trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.txt trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.h trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.h Removed: trunk/orca/packages/Time-HiRes-1.38/t/02export.t trunk/orca/packages/TimeDate-1.14/TimeDate.ppd trunk/orca/packages/rrdtool-1.0.40/contrib/php3/Makefile trunk/orca/packages/rrdtool-1.0.40/contrib/php4/.deps trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in.orig trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in.rej trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/.deps/ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.dsp trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.dsw Modified: trunk/orca/CHANGES trunk/orca/FAQ trunk/orca/INSTALL trunk/orca/Makefile.in trunk/orca/NEWS trunk/orca/README trunk/orca/TODO trunk/orca/config/config.guess trunk/orca/config/config.sub trunk/orca/configure trunk/orca/configure.in trunk/orca/contrib/Makefile.in trunk/orca/contrib/orca_services/Makefile.in trunk/orca/contrib/orca_services/README trunk/orca/contrib/orca_services/orca_services.cfg.in trunk/orca/contrib/orca_services/orca_services.pl.in trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in trunk/orca/docs/Makefile.in trunk/orca/lib/Makefile.in trunk/orca/lib/Orca/Config.pm trunk/orca/lib/Orca/Constants.pm trunk/orca/lib/Orca/DataFile.pm trunk/orca/lib/Orca/HTMLFile.pm trunk/orca/lib/Orca/ImageFile.pm trunk/orca/lib/Orca/NewState.pm trunk/orca/lib/Orca/OldState.pm trunk/orca/lib/Orca/OpenFileHash.pm trunk/orca/lib/Orca/RRDFile.pm trunk/orca/lib/Orca/SourceFile.pm trunk/orca/lib/Orca/SourceFileIDs.pm trunk/orca/lib/Orca/Utils.pm trunk/orca/orcallator/Makefile.in trunk/orca/orcallator/orcallator.cfg.in trunk/orca/orcallator/orcallator_column.pl trunk/orca/orcallator/orcallator_running.pl.in trunk/orca/orcallator/start_orcallator.sh.in trunk/orca/packages/Digest-MD5-2.20/Changes trunk/orca/packages/Digest-MD5-2.20/MANIFEST trunk/orca/packages/Digest-MD5-2.20/MD5.pm trunk/orca/packages/Digest-MD5-2.20/MD5.xs trunk/orca/packages/Digest-MD5-2.20/README trunk/orca/packages/Digest-MD5-2.20/t/files.t trunk/orca/packages/Digest-MD5-2.20/t/md5-aaa.t trunk/orca/packages/Storable-2.05/ChangeLog trunk/orca/packages/Storable-2.05/MANIFEST trunk/orca/packages/Storable-2.05/Makefile.PL trunk/orca/packages/Storable-2.05/README trunk/orca/packages/Storable-2.05/Storable.pm trunk/orca/packages/Storable-2.05/Storable.xs trunk/orca/packages/Storable-2.05/t/blessed.t trunk/orca/packages/Storable-2.05/t/canonical.t trunk/orca/packages/Storable-2.05/t/compat06.t trunk/orca/packages/Storable-2.05/t/dclone.t trunk/orca/packages/Storable-2.05/t/forgive.t trunk/orca/packages/Storable-2.05/t/freeze.t trunk/orca/packages/Storable-2.05/t/lock.t trunk/orca/packages/Storable-2.05/t/overload.t trunk/orca/packages/Storable-2.05/t/recurse.t trunk/orca/packages/Storable-2.05/t/retrieve.t trunk/orca/packages/Storable-2.05/t/st-dump.pl trunk/orca/packages/Storable-2.05/t/store.t trunk/orca/packages/Storable-2.05/t/tied.t trunk/orca/packages/Storable-2.05/t/tied_hook.t trunk/orca/packages/Storable-2.05/t/tied_items.t trunk/orca/packages/Storable-2.05/t/utf8.t trunk/orca/packages/Time-HiRes-1.38/Changes trunk/orca/packages/Time-HiRes-1.38/HiRes.pm trunk/orca/packages/Time-HiRes-1.38/HiRes.xs trunk/orca/packages/Time-HiRes-1.38/MANIFEST trunk/orca/packages/Time-HiRes-1.38/Makefile.PL trunk/orca/packages/Time-HiRes-1.38/README trunk/orca/packages/Time-HiRes-1.38/TODO trunk/orca/packages/Time-HiRes-1.38/t/HiRes.t trunk/orca/packages/TimeDate-1.14/ChangeLog trunk/orca/packages/TimeDate-1.14/MANIFEST trunk/orca/packages/TimeDate-1.14/Makefile.PL trunk/orca/packages/TimeDate-1.14/lib/Date/Format.pm trunk/orca/packages/TimeDate-1.14/lib/Date/Language/French.pm trunk/orca/packages/TimeDate-1.14/lib/Date/Language/German.pm trunk/orca/packages/TimeDate-1.14/lib/Date/Parse.pm trunk/orca/packages/TimeDate-1.14/lib/Time/Zone.pm trunk/orca/packages/TimeDate-1.14/t/date.t trunk/orca/packages/TimeDate-1.14/t/format.t trunk/orca/packages/TimeDate-1.14/t/getdate.t trunk/orca/packages/rrdtool-1.0.40/CHANGES trunk/orca/packages/rrdtool-1.0.40/CONTRIBUTORS trunk/orca/packages/rrdtool-1.0.40/Makefile.am trunk/orca/packages/rrdtool-1.0.40/Makefile.in trunk/orca/packages/rrdtool-1.0.40/cgilib-0.4/Makefile.in trunk/orca/packages/rrdtool-1.0.40/config/Makefile.in trunk/orca/packages/rrdtool-1.0.40/config/config.guess trunk/orca/packages/rrdtool-1.0.40/config/config.h.in trunk/orca/packages/rrdtool-1.0.40/config/config.sub trunk/orca/packages/rrdtool-1.0.40/config/ltconfig trunk/orca/packages/rrdtool-1.0.40/config/ltmain.sh trunk/orca/packages/rrdtool-1.0.40/config/mkinstalldirs trunk/orca/packages/rrdtool-1.0.40/configure trunk/orca/packages/rrdtool-1.0.40/configure.in trunk/orca/packages/rrdtool-1.0.40/contrib/Makefile.in trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds.pl trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/batch.pl trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl.in trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/log2rrd.pl trunk/orca/packages/rrdtool-1.0.40/contrib/php4/INSTALL trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile.in trunk/orca/packages/rrdtool-1.0.40/contrib/php4/README trunk/orca/packages/rrdtool-1.0.40/contrib/php4/USAGE trunk/orca/packages/rrdtool-1.0.40/contrib/php4/acinclude.m4 trunk/orca/packages/rrdtool-1.0.40/contrib/php4/aclocal.m4 trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/fastgen.sh trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/library.mk trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/ltlib.mk trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/program.mk trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/rules.mk trunk/orca/packages/rrdtool-1.0.40/contrib/php4/config.m4 trunk/orca/packages/rrdtool-1.0.40/contrib/php4/php_rrdtool.h trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.c trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/rrdfetchnames.pl trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/rrdview.cgi trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.am trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.in trunk/orca/packages/rrdtool-1.0.40/doc/Makefile.am trunk/orca/packages/rrdtool-1.0.40/doc/Makefile.in trunk/orca/packages/rrdtool-1.0.40/doc/RRDp.txt trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.html trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.txt trunk/orca/packages/rrdtool-1.0.40/doc/bin_dec_hex.txt trunk/orca/packages/rrdtool-1.0.40/doc/cdeftutorial.html trunk/orca/packages/rrdtool-1.0.40/doc/cdeftutorial.pod trunk/orca/packages/rrdtool-1.0.40/doc/cdeftutorial.txt trunk/orca/packages/rrdtool-1.0.40/doc/rpntutorial.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrddump.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdinfo.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdlast.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdrestore.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdtool.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdtool.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdtool.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdtune.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.es.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.txt trunk/orca/packages/rrdtool-1.0.40/doc/rrdupdate.html trunk/orca/packages/rrdtool-1.0.40/doc/rrdupdate.pod trunk/orca/packages/rrdtool-1.0.40/doc/rrdupdate.txt trunk/orca/packages/rrdtool-1.0.40/examples/Makefile.in trunk/orca/packages/rrdtool-1.0.40/examples/bigtops.pl.in trunk/orca/packages/rrdtool-1.0.40/examples/shared-demo.pl.in trunk/orca/packages/rrdtool-1.0.40/gd1.3/Makefile.in trunk/orca/packages/rrdtool-1.0.40/libpng-1.0.9/Makefile.in trunk/orca/packages/rrdtool-1.0.40/perl-piped/RRDp.pm trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL.in trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.pm trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.xs trunk/orca/packages/rrdtool-1.0.40/src/Makefile.am trunk/orca/packages/rrdtool-1.0.40/src/Makefile.in trunk/orca/packages/rrdtool-1.0.40/src/gdpng.c trunk/orca/packages/rrdtool-1.0.40/src/gifsize.c trunk/orca/packages/rrdtool-1.0.40/src/pngsize.c trunk/orca/packages/rrdtool-1.0.40/src/rrd.h trunk/orca/packages/rrdtool-1.0.40/src/rrd_cgi.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_create.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_diff.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_dump.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_error.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_fetch.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.h trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_info.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_last.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_open.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_resize.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_restore.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.h trunk/orca/packages/rrdtool-1.0.40/src/rrd_tune.c trunk/orca/packages/rrdtool-1.0.40/src/rrd_update.c trunk/orca/packages/rrdtool-1.0.40/tcl/Makefile.in trunk/orca/packages/rrdtool-1.0.40/tcl/tclrrd.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/ChangeLog trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/FAQ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.am trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.in trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/README trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/adler32.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/compress.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/crc32.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/gzio.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inflate.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/trees.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/uncompr.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zconf.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.3 trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.h trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.c trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.h trunk/orca/src/Makefile.in trunk/orca/src/orca.pl.in trunk/orca/src/upgrade_installation.pl Log: Load orca-0.27b3 into trunk/orca. Modified: trunk/orca/configure ============================================================================== --- trunk/orca/configure (original) +++ trunk/orca/configure 2002-11-09 12:30:40.000000000 -0800 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52. +# Generated by Autoconf 2.52d. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. @@ -20,6 +20,10 @@ # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh @@ -517,10 +521,10 @@ fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { 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 in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi @@ -560,7 +564,7 @@ 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 <&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done @@ -692,31 +707,31 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then - cat <<\EOF + cat <<\_ACEOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF +_ACEOF exit 0 fi exec 5>config.log -cat >&5 <&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 $as_me, which was -generated by GNU Autoconf 2.52. Invocation command line was +generated by GNU Autoconf 2.52d. Invocation command line was $ $0 $@ -EOF +_ACEOF { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -740,12 +755,12 @@ _ASUNAME } >&5 -cat >&5 <&5 <<_ACEOF +## ----------- ## +## Core tests. ## +## ----------- ## -EOF +_ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. @@ -772,14 +787,19 @@ # 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 >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, + { + 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 @@ -793,20 +813,22 @@ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -831,9 +853,9 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:834: loading site script $ac_site_file" >&5 + { echo "$as_me:856: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done @@ -842,7 +864,7 @@ # 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:845: loading cache $cache_file" >&5 + { echo "$as_me:867: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -850,7 +872,7 @@ esac fi else - { echo "$as_me:853: creating cache $cache_file" >&5 + { echo "$as_me:875: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -866,21 +888,21 @@ eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:869: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:891: 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:873: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:895: 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:879: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:901: 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:881: former value: $ac_old_val" >&5 + { echo "$as_me:903: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:883: current value: $ac_new_val" >&5 + { echo "$as_me:905: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -899,9 +921,9 @@ fi done if $ac_cache_corrupted; then - { echo "$as_me:902: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:924: 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:904: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:926: 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 @@ -921,10 +943,10 @@ echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:924: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:946: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:927: \$? = $ac_status" >&5 + echo "$as_me:949: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' else @@ -950,7 +972,7 @@ fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:953: error: cannot find install-sh or install.sh in config $srcdir/config" >&5 + { { echo "$as_me:975: error: cannot find install-sh or install.sh in config $srcdir/config" >&5 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;} { (exit 1); exit 1; }; } fi @@ -960,11 +982,11 @@ # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:963: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:985: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:967: checking build system type" >&5 +echo "$as_me:989: 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 @@ -973,23 +995,23 @@ test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:976: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:998: 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:980: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1002: 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:985: result: $ac_cv_build" >&5 +echo "$as_me:1007: 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:992: checking host system type" >&5 +echo "$as_me:1014: 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 @@ -998,19 +1020,19 @@ 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:1001: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1023: 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:1006: result: $ac_cv_host" >&5 +echo "$as_me:1028: 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/'` -echo "$as_me:1013: checking target system type" >&5 +echo "$as_me:1035: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1019,12 +1041,12 @@ test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:1022: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:1044: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1027: result: $ac_cv_target" >&5 +echo "$as_me:1049: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1059,28 +1081,52 @@ COMPRESS_ZLIB_VER=1.05 DATA_DUMPER_DIR=Data-Dumper-2.101 DATA_DUMPER_VER=2.101 -DATE_PARSE_DIR=TimeDate-1.10 -DATE_PARSE_VER=2.20 -DIGEST_MD5_DIR=Digest-MD5-2.16 -DIGEST_MD5_VER=2.16 +DATE_PARSE_DIR=TimeDate-1.14 +DATE_PARSE_VER=2.24 +DIGEST_MD5_DIR=Digest-MD5-2.20 +DIGEST_MD5_VER=2.19 MATH_INTERPOLATE_DIR=Math-Interpolate-1.05 MATH_INTERPOLATE_VER=1.05 -RRDTOOL_DIR=rrdtool-1.0.33 -RRDTOOL_VER=1.000331 -STORABLE_DIR=Storable-1.0.13 -STORABLE_VER=1.012 -TIME_HIRES_DIR=Time-HiRes-01.20 -TIME_HIRES_VER=1.20 +RRDTOOL_DIR=rrdtool-1.0.40 +RRDTOOL_VER=1.000401 +STORABLE_DIR=Storable-2.05 +STORABLE_VER=2.05 +TIME_HIRES_DIR=Time-HiRes-1.38 +TIME_HIRES_VER=1.38 # Get the current working directory and the config directory. cwd=`pwd` config_dir="$cwd/config" if test ! -d $config_dir; then - { { echo "$as_me:1079: error: *** Cannot find config directory." >&5 + { { echo "$as_me:1101: error: *** Cannot find config directory." >&5 echo "$as_me: error: *** Cannot find config directory." >&2;} { (exit 1); exit 1; }; } fi +# Check whether --with-var-dir or --without-var-dir was given. +if test "${with_var_dir+set}" = set; then + withval="$with_var_dir" + + case "$withval" in + "" | y | ye | yes | n | no) + { { echo "$as_me:1112: error: *** You must supply an argument to the --with-var-dir option." >&5 +echo "$as_me: error: *** You must supply an argument to the --with-var-dir option." >&2;} + { (exit 1); exit 1; }; } + ;; + *) VAR_DIR="$withval" + ;; + esac + +else + : ${VAR_DIR=$localstatedir/orca} + +fi; +VAR_DIR=`( + test "x$prefix" = xNONE && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix=${prefix} + eval echo "$VAR_DIR" +)` + # Define the directories where the source orcallator and RRD data files # will be installed. @@ -1090,7 +1136,7 @@ case "$withval" in "" | y | ye | yes | n | no) - { { echo "$as_me:1093: error: *** You must supply an argument to the --with-rrd-dir option." >&5 + { { echo "$as_me:1139: error: *** You must supply an argument to the --with-rrd-dir option." >&5 echo "$as_me: error: *** You must supply an argument to the --with-rrd-dir option." >&2;} { (exit 1); exit 1; }; } ;; @@ -1099,7 +1145,7 @@ esac else - : ${RRD_DIR=$localstatedir/orca/rrd} + : ${RRD_DIR=$VAR_DIR/rrd} fi; RRD_DIR=`( @@ -1114,7 +1160,7 @@ case "$withval" in "" | y | ye | yes | n | no) - { { echo "$as_me:1117: error: *** You must supply an argument to the --with-html-dir option." >&5 + { { echo "$as_me:1163: error: *** You must supply an argument to the --with-html-dir option." >&5 echo "$as_me: error: *** You must supply an argument to the --with-html-dir option." >&2;} { (exit 1); exit 1; }; } ;; @@ -1123,36 +1169,12 @@ esac else - { { echo "$as_me:1126: error: *** You must use the --with-html-dir argument and supply a value." >&5 + { { echo "$as_me:1172: error: *** You must use the --with-html-dir argument and supply a value." >&5 echo "$as_me: error: *** You must use the --with-html-dir argument and supply a value." >&2;} { (exit 1); exit 1; }; } fi; -# Check whether --with-orcallator-dir or --without-orcallator-dir was given. -if test "${with_orcallator_dir+set}" = set; then - withval="$with_orcallator_dir" - - case "$withval" in - "" | y | ye | yes | n | no) - { { echo "$as_me:1138: error: *** You must supply an argument to the --with-orcallator-dir option." >&5 -echo "$as_me: error: *** You must supply an argument to the --with-orcallator-dir option." >&2;} - { (exit 1); exit 1; }; } - ;; - *) ORCALLATOR_DIR="$withval" - ;; - esac - -else - : ${ORCALLATOR_DIR=$localstatedir/orca/orcallator} - -fi; -ORCALLATOR_DIR=`( - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=${prefix} - eval echo "$ORCALLATOR_DIR" -)` - WATCH_WEB= NCSA_LOG= @@ -1162,7 +1184,7 @@ case "$withval" in "" | y | ye | yes | n | no) - { { echo "$as_me:1165: error: *** You must supply an argument to the --with-ncsa-log option." >&5 + { { echo "$as_me:1187: error: *** You must supply an argument to the --with-ncsa-log option." >&5 echo "$as_me: error: *** You must supply an argument to the --with-ncsa-log option." >&2;} { (exit 1); exit 1; }; } ;; @@ -1181,13 +1203,13 @@ withval="$with_proxy_log" if test "$NCSA_LOG"; then - { { echo "$as_me:1184: error: *** You cannot use both --with-ncsa-log and --with-proxy-log." >&5 + { { echo "$as_me:1206: error: *** You cannot use both --with-ncsa-log and --with-proxy-log." >&5 echo "$as_me: error: *** You cannot use both --with-ncsa-log and --with-proxy-log." >&2;} { (exit 1); exit 1; }; } fi case "$withval" in "" | y | ye | yes | n | no) - { { echo "$as_me:1190: error: *** You must supply an argument to the --with-proxy-log option." >&5 + { { echo "$as_me:1212: error: *** You must supply an argument to the --with-proxy-log option." >&5 echo "$as_me: error: *** You must supply an argument to the --with-proxy-log option." >&2;} { (exit 1); exit 1; }; } ;; @@ -1204,18 +1226,18 @@ withval="$with_squid_log" if test "$NCSA_LOG"; then - { { echo "$as_me:1207: error: *** You cannot use both --with-ncsa-log and --with-squid-log." >&5 + { { echo "$as_me:1229: error: *** You cannot use both --with-ncsa-log and --with-squid-log." >&5 echo "$as_me: error: *** You cannot use both --with-ncsa-log and --with-squid-log." >&2;} { (exit 1); exit 1; }; } fi if test "$PROXY_LOG"; then - { { echo "$as_me:1212: error: *** You cannot use both --with-proxy-log and --with-squid-log." >&5 + { { echo "$as_me:1234: error: *** You cannot use both --with-proxy-log and --with-squid-log." >&5 echo "$as_me: error: *** You cannot use both --with-proxy-log and --with-squid-log." >&2;} { (exit 1); exit 1; }; } fi case "$withval" in "" | y | ye | yes | n | no) - { { echo "$as_me:1218: error: *** You must supply an argument to the --with-squid-log option." >&5 + { { echo "$as_me:1240: error: *** You must supply an argument to the --with-squid-log option." >&5 echo "$as_me: error: *** You must supply an argument to the --with-squid-log option." >&2;} { (exit 1); exit 1; }; } ;; @@ -1236,7 +1258,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1239: checking for $ac_word" >&5 +echo "$as_me:1261: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1251,7 +1273,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1254: found $ac_dir/$ac_word" >&5 +echo "$as_me:1276: found $ac_dir/$ac_word" >&5 break done @@ -1259,10 +1281,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1262: result: $CC" >&5 + echo "$as_me:1284: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1265: result: no" >&5 + echo "$as_me:1287: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1271,7 +1293,7 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1274: checking for $ac_word" >&5 +echo "$as_me:1296: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1286,7 +1308,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1289: found $ac_dir/$ac_word" >&5 +echo "$as_me:1311: found $ac_dir/$ac_word" >&5 break done @@ -1294,10 +1316,10 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1297: result: $ac_ct_CC" >&5 + echo "$as_me:1319: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1300: result: no" >&5 + echo "$as_me:1322: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1310,7 +1332,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1313: checking for $ac_word" >&5 +echo "$as_me:1335: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1325,7 +1347,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1328: found $ac_dir/$ac_word" >&5 +echo "$as_me:1350: found $ac_dir/$ac_word" >&5 break done @@ -1333,10 +1355,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1336: result: $CC" >&5 + echo "$as_me:1358: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1339: result: no" >&5 + echo "$as_me:1361: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1345,7 +1367,7 @@ ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1348: checking for $ac_word" >&5 +echo "$as_me:1370: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1360,7 +1382,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1363: found $ac_dir/$ac_word" >&5 +echo "$as_me:1385: found $ac_dir/$ac_word" >&5 break done @@ -1368,10 +1390,10 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1371: result: $ac_ct_CC" >&5 + echo "$as_me:1393: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1374: result: no" >&5 + echo "$as_me:1396: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1384,7 +1406,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1387: checking for $ac_word" >&5 +echo "$as_me:1409: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1404,7 +1426,7 @@ continue fi ac_cv_prog_CC="cc" -echo "$as_me:1407: found $ac_dir/$ac_word" >&5 +echo "$as_me:1429: found $ac_dir/$ac_word" >&5 break done @@ -1426,10 +1448,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1429: result: $CC" >&5 + echo "$as_me:1451: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1432: result: no" >&5 + echo "$as_me:1454: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1440,7 +1462,7 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1443: checking for $ac_word" >&5 +echo "$as_me:1465: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1455,7 +1477,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1458: found $ac_dir/$ac_word" >&5 +echo "$as_me:1480: found $ac_dir/$ac_word" >&5 break done @@ -1463,10 +1485,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1466: result: $CC" >&5 + echo "$as_me:1488: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1469: result: no" >&5 + echo "$as_me:1491: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1479,7 +1501,7 @@ 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:1482: checking for $ac_word" >&5 +echo "$as_me:1504: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1494,7 +1516,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1497: found $ac_dir/$ac_word" >&5 +echo "$as_me:1519: found $ac_dir/$ac_word" >&5 break done @@ -1502,10 +1524,10 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1505: result: $ac_ct_CC" >&5 + echo "$as_me:1527: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1508: result: no" >&5 + echo "$as_me:1530: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1517,34 +1539,40 @@ fi -test -z "$CC" && { { echo "$as_me:1520: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1542: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1525:" \ +echo "$as_me:1547:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1528: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1550: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1531: \$? = $ac_status" >&5 + echo "$as_me:1553: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1533: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1555: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1536: \$? = $ac_status" >&5 + echo "$as_me:1558: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1538: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1560: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1541: \$? = $ac_status" >&5 + echo "$as_me:1563: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1545 "configure" +#line 1567 "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1558,13 +1586,13 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1561: checking for C compiler default output" >&5 +echo "$as_me:1589: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1564: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1592: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1567: \$? = $ac_status" >&5 + echo "$as_me:1595: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1573,7 +1601,7 @@ ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; @@ -1587,34 +1615,34 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1590: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1618: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1596: result: $ac_file" >&5 +echo "$as_me:1624: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1601: checking whether the C compiler works" >&5 +echo "$as_me:1629: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1607: \"$ac_try\"") >&5 + { (eval echo "$as_me:1635: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1610: \$? = $ac_status" >&5 + echo "$as_me:1638: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1617: error: cannot run C compiled programs. + { { echo "$as_me:1645: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1622,24 +1650,24 @@ fi fi fi -echo "$as_me:1625: result: yes" >&5 +echo "$as_me:1653: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1632: checking whether we are cross compiling" >&5 +echo "$as_me:1660: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1634: result: $cross_compiling" >&5 +echo "$as_me:1662: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1637: checking for executable suffix" >&5 +echo "$as_me:1665: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1639: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1667: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1642: \$? = $ac_status" >&5 + echo "$as_me:1670: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1655,27 +1683,33 @@ esac done else - { { echo "$as_me:1658: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1686: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1664: result: $ac_cv_exeext" >&5 +echo "$as_me:1692: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1670: checking for object suffix" >&5 +echo "$as_me:1698: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1676 "configure" +#line 1704 "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1685,10 +1719,10 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1688: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1722: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1691: \$? = $ac_status" >&5 + echo "$as_me:1725: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1700,26 +1734,32 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1703: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1737: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1710: result: $ac_cv_objext" >&5 +echo "$as_me:1744: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1714: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:1748: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1720 "configure" +#line 1754 "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1732,16 +1772,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1735: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1775: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1738: \$? = $ac_status" >&5 + echo "$as_me:1778: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1741: \"$ac_try\"") >&5 + { (eval echo "$as_me:1781: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1744: \$? = $ac_status" >&5 + echo "$as_me:1784: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1753,21 +1793,27 @@ ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1756: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:1796: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1762: checking whether $CC accepts -g" >&5 +echo "$as_me:1802: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1768 "configure" +#line 1808 "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1777,16 +1823,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1783: \$? = $ac_status" >&5 + echo "$as_me:1829: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1786: \"$ac_try\"") >&5 + { (eval echo "$as_me:1832: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1789: \$? = $ac_status" >&5 + echo "$as_me:1835: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1796,7 +1842,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1799: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:1845: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1823,16 +1869,16 @@ #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1872: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1829: \$? = $ac_status" >&5 + echo "$as_me:1875: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1832: \"$ac_try\"") >&5 + { (eval echo "$as_me:1878: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1835: \$? = $ac_status" >&5 + echo "$as_me:1881: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1844,10 +1890,16 @@ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1847 "configure" +#line 1893 "configure" #include "confdefs.h" #include $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1857,16 +1909,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1912: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1863: \$? = $ac_status" >&5 + echo "$as_me:1915: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1866: \"$ac_try\"") >&5 + { (eval echo "$as_me:1918: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1869: \$? = $ac_status" >&5 + echo "$as_me:1921: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1876,9 +1928,15 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1879 "configure" +#line 1931 "configure" #include "confdefs.h" $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1888,16 +1946,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1891: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1949: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1894: \$? = $ac_status" >&5 + echo "$as_me:1952: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1897: \"$ac_try\"") >&5 + { (eval echo "$as_me:1955: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1900: \$? = $ac_status" >&5 + echo "$as_me:1958: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1924,16 +1982,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:1927: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:1985: 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 <<\EOF + cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="${MAKE}"' -EOF +_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 @@ -1944,11 +2002,11 @@ rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:1947: result: yes" >&5 + echo "$as_me:2005: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:1951: result: no" >&5 + echo "$as_me:2009: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -1968,7 +2026,7 @@ # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 -echo "$as_me:1971: checking for $ac_word" >&5 +echo "$as_me:2029: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_BZIP2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1985,7 +2043,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_BZIP2="$ac_dir/$ac_word" - echo "$as_me:1988: found $ac_dir/$ac_word" >&5 + echo "$as_me:2046: found $ac_dir/$ac_word" >&5 break fi done @@ -1996,16 +2054,16 @@ BZIP2=$ac_cv_path_BZIP2 if test -n "$BZIP2"; then - echo "$as_me:1999: result: $BZIP2" >&5 + echo "$as_me:2057: result: $BZIP2" >&5 echo "${ECHO_T}$BZIP2" >&6 else - echo "$as_me:2002: result: no" >&5 + echo "$as_me:2060: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "bunzip2", so it can be a program name with args. set dummy bunzip2; ac_word=$2 -echo "$as_me:2008: checking for $ac_word" >&5 +echo "$as_me:2066: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_BUNZIP2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2022,7 +2080,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_BUNZIP2="$ac_dir/$ac_word" - echo "$as_me:2025: found $ac_dir/$ac_word" >&5 + echo "$as_me:2083: found $ac_dir/$ac_word" >&5 break fi done @@ -2033,16 +2091,16 @@ BUNZIP2=$ac_cv_path_BUNZIP2 if test -n "$BUNZIP2"; then - echo "$as_me:2036: result: $BUNZIP2" >&5 + echo "$as_me:2094: result: $BUNZIP2" >&5 echo "${ECHO_T}$BUNZIP2" >&6 else - echo "$as_me:2039: result: no" >&5 + echo "$as_me:2097: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "compress", so it can be a program name with args. set dummy compress; ac_word=$2 -echo "$as_me:2045: checking for $ac_word" >&5 +echo "$as_me:2103: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_COMPRESS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2059,7 +2117,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_COMPRESS="$ac_dir/$ac_word" - echo "$as_me:2062: found $ac_dir/$ac_word" >&5 + echo "$as_me:2120: found $ac_dir/$ac_word" >&5 break fi done @@ -2070,16 +2128,16 @@ COMPRESS=$ac_cv_path_COMPRESS if test -n "$COMPRESS"; then - echo "$as_me:2073: result: $COMPRESS" >&5 + echo "$as_me:2131: result: $COMPRESS" >&5 echo "${ECHO_T}$COMPRESS" >&6 else - echo "$as_me:2076: result: no" >&5 + echo "$as_me:2134: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "cut", so it can be a program name with args. set dummy cut; ac_word=$2 -echo "$as_me:2082: checking for $ac_word" >&5 +echo "$as_me:2140: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CUT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2096,7 +2154,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_CUT="$ac_dir/$ac_word" - echo "$as_me:2099: found $ac_dir/$ac_word" >&5 + echo "$as_me:2157: found $ac_dir/$ac_word" >&5 break fi done @@ -2108,16 +2166,16 @@ CUT=$ac_cv_path_CUT if test -n "$CUT"; then - echo "$as_me:2111: result: $CUT" >&5 + echo "$as_me:2169: result: $CUT" >&5 echo "${ECHO_T}$CUT" >&6 else - echo "$as_me:2114: result: no" >&5 + echo "$as_me:2172: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "expr", so it can be a program name with args. set dummy expr; ac_word=$2 -echo "$as_me:2120: checking for $ac_word" >&5 +echo "$as_me:2178: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_EXPR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2134,7 +2192,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_EXPR="$ac_dir/$ac_word" - echo "$as_me:2137: found $ac_dir/$ac_word" >&5 + echo "$as_me:2195: found $ac_dir/$ac_word" >&5 break fi done @@ -2146,10 +2204,10 @@ EXPR=$ac_cv_path_EXPR if test -n "$EXPR"; then - echo "$as_me:2149: result: $EXPR" >&5 + echo "$as_me:2207: result: $EXPR" >&5 echo "${ECHO_T}$EXPR" >&6 else - echo "$as_me:2152: result: no" >&5 + echo "$as_me:2210: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2157,7 +2215,7 @@ 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:2160: checking for $ac_word" >&5 +echo "$as_me:2218: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_TAR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2174,7 +2232,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_TAR="$ac_dir/$ac_word" - echo "$as_me:2177: found $ac_dir/$ac_word" >&5 + echo "$as_me:2235: found $ac_dir/$ac_word" >&5 break fi done @@ -2185,10 +2243,10 @@ TAR=$ac_cv_path_TAR if test -n "$TAR"; then - echo "$as_me:2188: result: $TAR" >&5 + echo "$as_me:2246: result: $TAR" >&5 echo "${ECHO_T}$TAR" >&6 else - echo "$as_me:2191: result: no" >&5 + echo "$as_me:2249: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2197,7 +2255,7 @@ # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 -echo "$as_me:2200: checking for $ac_word" >&5 +echo "$as_me:2258: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GZIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2214,7 +2272,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_GZIP="$ac_dir/$ac_word" - echo "$as_me:2217: found $ac_dir/$ac_word" >&5 + echo "$as_me:2275: found $ac_dir/$ac_word" >&5 break fi done @@ -2225,16 +2283,16 @@ GZIP=$ac_cv_path_GZIP if test -n "$GZIP"; then - echo "$as_me:2228: result: $GZIP" >&5 + echo "$as_me:2286: result: $GZIP" >&5 echo "${ECHO_T}$GZIP" >&6 else - echo "$as_me:2231: result: no" >&5 + echo "$as_me:2289: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "gunzip", so it can be a program name with args. set dummy gunzip; ac_word=$2 -echo "$as_me:2237: checking for $ac_word" >&5 +echo "$as_me:2295: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GUNZIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2251,7 +2309,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_GUNZIP="$ac_dir/$ac_word" - echo "$as_me:2254: found $ac_dir/$ac_word" >&5 + echo "$as_me:2312: found $ac_dir/$ac_word" >&5 break fi done @@ -2262,10 +2320,10 @@ GUNZIP=$ac_cv_path_GUNZIP if test -n "$GUNZIP"; then - echo "$as_me:2265: result: $GUNZIP" >&5 + echo "$as_me:2323: result: $GUNZIP" >&5 echo "${ECHO_T}$GUNZIP" >&6 else - echo "$as_me:2268: result: no" >&5 + echo "$as_me:2326: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2273,7 +2331,7 @@ 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:2276: checking for $ac_word" >&5 +echo "$as_me:2334: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2290,7 +2348,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_AWK="$ac_dir/$ac_word" - echo "$as_me:2293: found $ac_dir/$ac_word" >&5 + echo "$as_me:2351: found $ac_dir/$ac_word" >&5 break fi done @@ -2301,10 +2359,10 @@ AWK=$ac_cv_path_AWK if test -n "$AWK"; then - echo "$as_me:2304: result: $AWK" >&5 + echo "$as_me:2362: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:2307: result: no" >&5 + echo "$as_me:2365: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2314,7 +2372,7 @@ # Include the file that defines BORP_PERL_RUN. # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -echo "$as_me:2317: checking for $ac_word" >&5 +echo "$as_me:2375: 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 @@ -2331,7 +2389,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_PERL="$ac_dir/$ac_word" - echo "$as_me:2334: found $ac_dir/$ac_word" >&5 + echo "$as_me:2392: found $ac_dir/$ac_word" >&5 break fi done @@ -2343,20 +2401,20 @@ PERL=$ac_cv_path_PERL if test -n "$PERL"; then - echo "$as_me:2346: result: $PERL" >&5 + echo "$as_me:2404: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6 else - echo "$as_me:2349: result: no" >&5 + echo "$as_me:2407: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "x$PERL" = xNOT_FOUND; then - { { echo "$as_me:2354: error: *** Perl not found. Please install Perl. See INSTALL how to do this." >&5 + { { echo "$as_me:2412: error: *** Perl not found. Please install Perl. See INSTALL how to do this." >&5 echo "$as_me: error: *** Perl not found. Please install Perl. See INSTALL how to do this." >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:2359: checking if '$PERL' will run Perl scripts" >&5 + echo "$as_me:2417: checking if '$PERL' will run Perl scripts" >&5 echo $ECHO_N "checking if '$PERL' will run Perl scripts... $ECHO_C" >&6 rm -f conftest.BZ cat > conftest.BZ </dev/null; then PERL_HEAD=PerlHead1 - echo "$as_me:2370: result: yes" >&5 + echo "$as_me:2428: result: yes" >&5 echo "${ECHO_T}yes" >&6 else PERL_HEAD=PerlHead2 - echo "$as_me:2374: result: no" >&5 + echo "$as_me:2432: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.BZ @@ -2379,11 +2437,125 @@ fi PERL_HEAD="$cwd/config/$PERL_HEAD" +# Extract the first word of "pod2html", so it can be a program name with args. +set dummy pod2html; ac_word=$2 +echo "$as_me:2442: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_POD2HTML+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $POD2HTML in + [\\/]* | ?:[\\/]*) + ac_cv_path_POD2HTML="$POD2HTML" # Let the user override the test with a path. + ;; + *) + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_POD2HTML="$ac_dir/$ac_word" + echo "$as_me:2459: found $ac_dir/$ac_word" >&5 + break +fi +done + + test -z "$ac_cv_path_POD2HTML" && ac_cv_path_POD2HTML=":" + ;; +esac +fi +POD2HTML=$ac_cv_path_POD2HTML + +if test -n "$POD2HTML"; then + echo "$as_me:2471: result: $POD2HTML" >&5 +echo "${ECHO_T}$POD2HTML" >&6 +else + echo "$as_me:2474: result: no" >&5 +echo "${ECHO_T}no" >&6 +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:2480: 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. + ;; + *) + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_POD2MAN="$ac_dir/$ac_word" + echo "$as_me:2497: found $ac_dir/$ac_word" >&5 + break +fi +done + + test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN=":" + ;; +esac +fi +POD2MAN=$ac_cv_path_POD2MAN + +if test -n "$POD2MAN"; then + echo "$as_me:2509: result: $POD2MAN" >&5 +echo "${ECHO_T}$POD2MAN" >&6 +else + echo "$as_me:2512: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "pod2text", so it can be a program name with args. +set dummy pod2text; ac_word=$2 +echo "$as_me:2518: 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. + ;; + *) + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_POD2TEXT="$ac_dir/$ac_word" + echo "$as_me:2535: found $ac_dir/$ac_word" >&5 + break +fi +done + + test -z "$ac_cv_path_POD2TEXT" && ac_cv_path_POD2TEXT=":" + ;; +esac +fi +POD2TEXT=$ac_cv_path_POD2TEXT + +if test -n "$POD2TEXT"; then + echo "$as_me:2547: result: $POD2TEXT" >&5 +echo "${ECHO_T}$POD2TEXT" >&6 +else + echo "$as_me:2550: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + # Determine the correct ps command to use to find out about process # information for itself. # Extract the first word of "ps", so it can be a program name with args. set dummy ps; ac_word=$2 -echo "$as_me:2386: checking for $ac_word" >&5 +echo "$as_me:2558: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2400,7 +2572,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_PS="$ac_dir/$ac_word" - echo "$as_me:2403: found $ac_dir/$ac_word" >&5 + echo "$as_me:2575: found $ac_dir/$ac_word" >&5 break fi done @@ -2411,10 +2583,10 @@ PS=$ac_cv_path_PS if test -n "$PS"; then - echo "$as_me:2414: result: $PS" >&5 + echo "$as_me:2586: result: $PS" >&5 echo "${ECHO_T}$PS" >&6 else - echo "$as_me:2417: result: no" >&5 + echo "$as_me:2589: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2427,30 +2599,30 @@ ;; *) PS_SELF="$PS aux | grep PID" - { echo "$as_me:2430: WARNING: *** If you know a better PS command than" >&5 + { echo "$as_me:2602: WARNING: *** If you know a better PS command than" >&5 echo "$as_me: WARNING: *** If you know a better PS command than" >&2;} - { echo "$as_me:2432: WARNING: *** '$PS_SELF'" >&5 + { echo "$as_me:2604: WARNING: *** '$PS_SELF'" >&5 echo "$as_me: WARNING: *** '$PS_SELF'" >&2;} - { echo "$as_me:2434: WARNING: *** to get process information for your host," >&5 + { echo "$as_me:2606: WARNING: *** to get process information for your host," >&5 echo "$as_me: WARNING: *** to get process information for your host," >&2;} - { echo "$as_me:2436: WARNING: *** please email the command and the output from" >&5 + { echo "$as_me:2608: WARNING: *** please email the command and the output from" >&5 echo "$as_me: WARNING: *** please email the command and the output from" >&2;} - { echo "$as_me:2438: WARNING: *** ./config/config.guess to" >&5 + { echo "$as_me:2610: WARNING: *** ./config/config.guess to" >&5 echo "$as_me: WARNING: *** ./config/config.guess to" >&2;} - { echo "$as_me:2440: WARNING: *** orca-developers at yahoogroups.com" >&5 -echo "$as_me: WARNING: *** orca-developers at yahoogroups.com" >&2;} + { echo "$as_me:2612: WARNING: *** orca-dev at orcaware.com" >&5 +echo "$as_me: WARNING: *** orca-dev at orcaware.com" >&2;} ;; esac if test "$PS_SELF"; then - echo "$as_me:2445: checking for ps command" >&5 + echo "$as_me:2617: checking for ps command" >&5 echo $ECHO_N "checking for ps command... $ECHO_C" >&6 - echo "$as_me:2447: result: $PS_SELF" >&5 + echo "$as_me:2619: result: $PS_SELF" >&5 echo "${ECHO_T}$PS_SELF" >&6 fi # Extract the first word of "se", so it can be a program name with args. set dummy se; ac_word=$2 -echo "$as_me:2453: checking for $ac_word" >&5 +echo "$as_me:2625: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2467,7 +2639,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_SE="$ac_dir/$ac_word" - echo "$as_me:2470: found $ac_dir/$ac_word" >&5 + echo "$as_me:2642: found $ac_dir/$ac_word" >&5 break fi done @@ -2478,16 +2650,16 @@ SE=$ac_cv_path_SE if test -n "$SE"; then - echo "$as_me:2481: result: $SE" >&5 + echo "$as_me:2653: result: $SE" >&5 echo "${ECHO_T}$SE" >&6 else - echo "$as_me:2484: result: no" >&5 + echo "$as_me:2656: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 -echo "$as_me:2490: checking for $ac_word" >&5 +echo "$as_me:2662: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_UNAME+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2504,7 +2676,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_UNAME="$ac_dir/$ac_word" - echo "$as_me:2507: found $ac_dir/$ac_word" >&5 + echo "$as_me:2679: found $ac_dir/$ac_word" >&5 break fi done @@ -2516,16 +2688,16 @@ UNAME=$ac_cv_path_UNAME if test -n "$UNAME"; then - echo "$as_me:2519: result: $UNAME" >&5 + echo "$as_me:2691: result: $UNAME" >&5 echo "${ECHO_T}$UNAME" >&6 else - echo "$as_me:2522: result: no" >&5 + echo "$as_me:2694: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "uncompress", so it can be a program name with args. set dummy uncompress; ac_word=$2 -echo "$as_me:2528: checking for $ac_word" >&5 +echo "$as_me:2700: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_UNCOMPRESS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2542,7 +2714,7 @@ test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word" - echo "$as_me:2545: found $ac_dir/$ac_word" >&5 + echo "$as_me:2717: found $ac_dir/$ac_word" >&5 break fi done @@ -2553,10 +2725,10 @@ UNCOMPRESS=$ac_cv_path_UNCOMPRESS if test -n "$UNCOMPRESS"; then - echo "$as_me:2556: result: $UNCOMPRESS" >&5 + echo "$as_me:2728: result: $UNCOMPRESS" >&5 echo "${ECHO_T}$UNCOMPRESS" >&6 else - echo "$as_me:2559: result: no" >&5 + echo "$as_me:2731: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2598,20 +2770,20 @@ # options for RRDtool if it is not already declared. # expr "$ORCA_CONFIGURE_COMMAND_LINE" : "--enable-shared" >/dev/null 2>&1 || ORCA_CONFIGURE_COMMAND_LINE="$ORCA_CONFIGURE_COMMAND_LINE --enable-shared" - echo "$as_me:2601: checking if Perl module Data::Dumper version $DATA_DUMPER_VER is installed" >&5 + echo "$as_me:2773: checking if Perl module Data::Dumper version $DATA_DUMPER_VER is installed" >&5 echo $ECHO_N "checking if Perl module Data::Dumper version $DATA_DUMPER_VER is installed... $ECHO_C" >&6 if $PERL ./config/check_for_perl_mod Data::Dumper $DATA_DUMPER_VER; then - borp_cv_perl_data_dumper=yes + orca_cv_perl_data_dumper=yes else - borp_cv_perl_data_dumper=no + orca_cv_perl_data_dumper=no fi - echo "$as_me:2610: result: $borp_cv_perl_data_dumper" >&5 -echo "${ECHO_T}$borp_cv_perl_data_dumper" >&6 + echo "$as_me:2782: result: $orca_cv_perl_data_dumper" >&5 +echo "${ECHO_T}$orca_cv_perl_data_dumper" >&6 -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_data_dumper=no -if test "$borp_cv_perl_data_dumper" = no; then +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_data_dumper=no +if test "$orca_cv_perl_data_dumper" = no; then MAKE_DATA_DUMPER=make_data_dumper TEST_DATA_DUMPER=test_data_dumper INSTALL_PERL_DATA_DUMPER=install_perl_data_dumper @@ -2619,20 +2791,20 @@ DISTCLEAN_DATA_DUMPER=distclean_data_dumper fi - echo "$as_me:2622: checking if Perl module Date::Parse version $DATE_PARSE_VER is installed" >&5 + echo "$as_me:2794: checking if Perl module Date::Parse version $DATE_PARSE_VER is installed" >&5 echo $ECHO_N "checking if Perl module Date::Parse version $DATE_PARSE_VER is installed... $ECHO_C" >&6 if $PERL ./config/check_for_perl_mod Date::Parse $DATE_PARSE_VER; then - borp_cv_perl_date_parse=yes + orca_cv_perl_date_parse=yes else - borp_cv_perl_date_parse=no + orca_cv_perl_date_parse=no fi - echo "$as_me:2631: result: $borp_cv_perl_date_parse" >&5 -echo "${ECHO_T}$borp_cv_perl_date_parse" >&6 + echo "$as_me:2803: result: $orca_cv_perl_date_parse" >&5 +echo "${ECHO_T}$orca_cv_perl_date_parse" >&6 -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_date_parse=no -if test "$borp_cv_perl_date_parse" = no; then +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_date_parse=no +if test "$orca_cv_perl_date_parse" = no; then MAKE_DATE_PARSE=make_date_parse TEST_DATE_PARSE=test_date_parse INSTALL_PERL_DATE_PARSE=install_perl_date_parse @@ -2640,20 +2812,20 @@ DISTCLEAN_DATE_PARSE=distclean_date_parse fi - echo "$as_me:2643: checking if Perl module Digest::MD5 version $DIGEST_MD5_VER is installed" >&5 + echo "$as_me:2815: checking if Perl module Digest::MD5 version $DIGEST_MD5_VER is installed" >&5 echo $ECHO_N "checking if Perl module Digest::MD5 version $DIGEST_MD5_VER is installed... $ECHO_C" >&6 if $PERL ./config/check_for_perl_mod Digest::MD5 $DIGEST_MD5_VER; then - borp_cv_perl_digest_md5=yes + orca_cv_perl_digest_md5=yes else - borp_cv_perl_digest_md5=no + orca_cv_perl_digest_md5=no fi - echo "$as_me:2652: result: $borp_cv_perl_digest_md5" >&5 -echo "${ECHO_T}$borp_cv_perl_digest_md5" >&6 + echo "$as_me:2824: result: $orca_cv_perl_digest_md5" >&5 +echo "${ECHO_T}$orca_cv_perl_digest_md5" >&6 -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_digest_md5=no -if test "$borp_cv_perl_digest_md5" = no; then +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_digest_md5=no +if test "$orca_cv_perl_digest_md5" = no; then MAKE_DIGEST_MD5=make_digest_md5 TEST_DIGEST_MD5=test_digest_md5 INSTALL_PERL_DIGEST_MD5=install_perl_digest_md5 @@ -2661,20 +2833,20 @@ DISTCLEAN_DIGEST_MD5=distclean_digest_md5 fi - echo "$as_me:2664: checking if Perl module Math::Interpolate version $MATH_INTERPOLATE_VER is installed" >&5 + echo "$as_me:2836: checking if Perl module Math::Interpolate version $MATH_INTERPOLATE_VER is installed" >&5 echo $ECHO_N "checking if Perl module Math::Interpolate version $MATH_INTERPOLATE_VER is installed... $ECHO_C" >&6 if $PERL ./config/check_for_perl_mod Math::Interpolate $MATH_INTERPOLATE_VER; then - borp_cv_perl_math_interpolate=yes + orca_cv_perl_math_interpolate=yes else - borp_cv_perl_math_interpolate=no + orca_cv_perl_math_interpolate=no fi - echo "$as_me:2673: result: $borp_cv_perl_math_interpolate" >&5 -echo "${ECHO_T}$borp_cv_perl_math_interpolate" >&6 + echo "$as_me:2845: result: $orca_cv_perl_math_interpolate" >&5 +echo "${ECHO_T}$orca_cv_perl_math_interpolate" >&6 -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_math_interpolate=no -if test "$borp_cv_perl_math_interpolate" = no; then +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_math_interpolate=no +if test "$orca_cv_perl_math_interpolate" = no; then MAKE_MATH_INTERPOLATE=make_math_interpolate TEST_MATH_INTERPOLATE=test_math_interpolate INSTALL_PERL_MATH_INTERPOLATE=install_perl_math_interpolate @@ -2682,20 +2854,20 @@ DISTCLEAN_MATH_INTERPOLATE=distclean_math_interpolate fi - echo "$as_me:2685: checking if Perl module RRDs version $RRDTOOL_VER is installed" >&5 + echo "$as_me:2857: checking if Perl module RRDs version $RRDTOOL_VER is installed" >&5 echo $ECHO_N "checking if Perl module RRDs version $RRDTOOL_VER is installed... $ECHO_C" >&6 if $PERL ./config/check_for_perl_mod RRDs $RRDTOOL_VER; then - borp_cv_perl_rrds=yes + orca_cv_perl_rrds=yes else - borp_cv_perl_rrds=no + orca_cv_perl_rrds=no fi - echo "$as_me:2694: result: $borp_cv_perl_rrds" >&5 -echo "${ECHO_T}$borp_cv_perl_rrds" >&6 + echo "$as_me:2866: result: $orca_cv_perl_rrds" >&5 +echo "${ECHO_T}$orca_cv_perl_rrds" >&6 -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_rrds=no -if test "$borp_cv_perl_rrds" = no; then +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_rrds=no +if test "$orca_cv_perl_rrds" = no; then MAKE_RRDTOOL=make_rrdtool TEST_RRDTOOL=test_rrdtool INSTALL_PERL_RRDTOOL=install_perl_rrdtool @@ -2703,20 +2875,20 @@ DISTCLEAN_RRDTOOL=distclean_rrdtool fi - echo "$as_me:2706: checking if Perl module Storable version $STORABLE_VER is installed" >&5 + echo "$as_me:2878: checking if Perl module Storable version $STORABLE_VER is installed" >&5 echo $ECHO_N "checking if Perl module Storable version $STORABLE_VER is installed... $ECHO_C" >&6 if $PERL ./config/check_for_perl_mod Storable $STORABLE_VER; then - borp_cv_perl_storable=yes + orca_cv_perl_storable=yes else - borp_cv_perl_storable=no + orca_cv_perl_storable=no fi - echo "$as_me:2715: result: $borp_cv_perl_storable" >&5 -echo "${ECHO_T}$borp_cv_perl_storable" >&6 + echo "$as_me:2887: result: $orca_cv_perl_storable" >&5 +echo "${ECHO_T}$orca_cv_perl_storable" >&6 -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_storable=no -if test "$borp_cv_perl_storable" = no; then +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_storable=no +if test "$orca_cv_perl_storable" = no; then MAKE_STORABLE=make_storable TEST_STORABLE=test_storable INSTALL_PERL_STORABLE=install_perl_storable @@ -2724,20 +2896,20 @@ DISTCLEAN_STORABLE=distclean_storable fi - echo "$as_me:2727: checking if Perl module Time::HiRes version $TIME_HIRES_VER is installed" >&5 + echo "$as_me:2899: checking if Perl module Time::HiRes version $TIME_HIRES_VER is installed" >&5 echo $ECHO_N "checking if Perl module Time::HiRes version $TIME_HIRES_VER is installed... $ECHO_C" >&6 if $PERL ./config/check_for_perl_mod Time::HiRes $TIME_HIRES_VER; then - borp_cv_perl_time_hires=yes + orca_cv_perl_time_hires=yes else - borp_cv_perl_time_hires=no + orca_cv_perl_time_hires=no fi - echo "$as_me:2736: result: $borp_cv_perl_time_hires" >&5 -echo "${ECHO_T}$borp_cv_perl_time_hires" >&6 + echo "$as_me:2908: result: $orca_cv_perl_time_hires" >&5 +echo "${ECHO_T}$orca_cv_perl_time_hires" >&6 -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_time_hires=no -if test "$borp_cv_perl_time_hires" = no; then +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_time_hires=no +if test "$orca_cv_perl_time_hires" = no; then MAKE_TIME_HIRES=make_time_hires TEST_TIME_HIRES=test_time_hires INSTALL_PERL_TIME_HIRES=install_perl_time_hires @@ -2748,6 +2920,17 @@ PERL_USE_TIME_HIRES="use Time::HiRes qw(time);" fi +# Build the RRDtool library if it is needed. +if test "$orca_cv_perl_rrds" = no; then + command="(cd packages/$RRDTOOL_DIR; ./configure $RRD_CONFIGURE_COMMAND_LINE)" + echo "" + echo "Running configure in packages/$RRDTOOL_DIR to create RRDtool and RRDs.pm." + echo "" + echo $command + echo "" + eval $command +fi + # Define the INSTALL and MKDIR variables to point to the scripts in # the config directory. INSTALL="$config_dir/install-sh -c" @@ -2767,7 +2950,7 @@ orcallator/Makefile" fi -ac_config_files="$ac_config_files Makefile config/PerlHead1 config/PerlHead2 lib/Makefile packages/Makefile src/Makefile src/orca.pl $ORCALLATOR_OUTPUT docs/Makefile contrib/Makefile contrib/rotate_orca_graphs/Makefile contrib/rotate_orca_graphs/rotate_orca_graphs.sh contrib/orcaservices/Makefile contrib/orcaservices/orcaservices.cfg contrib/orcaservices/orcaservices.pl contrib/orcaservices/orcaservices_running.pl contrib/orcaservices/restart_orcaservices.sh contrib/orcaservices/start_orcaservices.sh contrib/orcaservices/stop_orcaservices.sh contrib/orcaservices/S99orcaservices.sh" +ac_config_files="$ac_config_files Makefile config/PerlHead1 config/PerlHead2 lib/Makefile packages/Makefile src/Makefile src/orca.pl $ORCALLATOR_OUTPUT docs/Makefile contrib/Makefile contrib/rotate_orca_graphs/Makefile contrib/rotate_orca_graphs/rotate_orca_graphs.sh contrib/orca_services/Makefile contrib/orca_services/orca_services.cfg contrib/orca_services/orca_services.pl contrib/orca_services/orca_services_running.pl contrib/orca_services/restart_orca_services.sh contrib/orca_services/start_orca_services.sh contrib/orca_services/stop_orca_services.sh contrib/orca_services/S99orca_services.sh" 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 @@ -2849,7 +3032,7 @@ # 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 <<\EOF +cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g @@ -2863,7 +3046,7 @@ s,\],\\&,g s,\$,$$,g p -EOF +_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 @@ -2877,22 +3060,25 @@ : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:2880: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:3063: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL -# Generated automatically by configure. +# Generated automatically 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 SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" - _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 @@ -2958,6 +3144,30 @@ 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 $as_me, which was +generated by GNU Autoconf 2.52d. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF # Files that config.status was made for. @@ -2977,7 +3187,7 @@ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -2996,12 +3206,12 @@ $config_files Report bugs to ." -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.52, +configured by $0, generated by GNU Autoconf 2.52d, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -3009,9 +3219,9 @@ This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +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=: @@ -3033,18 +3243,18 @@ case $1 in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:3047: error: ambiguous option: $1 + { { echo "$as_me:3257: 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;} @@ -3063,7 +3273,7 @@ ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:3066: error: unrecognized option: $1 + -*) { { echo "$as_me:3276: 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;} @@ -3075,25 +3285,9 @@ shift done -exec 5>>config.log -cat >&5 << _ACEOF - -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## - -This file was extended by $as_me 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` - _ACEOF -EOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in @@ -3110,15 +3304,15 @@ "contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "contrib/rotate_orca_graphs/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/rotate_orca_graphs/Makefile" ;; "contrib/rotate_orca_graphs/rotate_orca_graphs.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/rotate_orca_graphs/rotate_orca_graphs.sh" ;; - "contrib/orcaservices/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/Makefile" ;; - "contrib/orcaservices/orcaservices.cfg" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/orcaservices.cfg" ;; - "contrib/orcaservices/orcaservices.pl" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/orcaservices.pl" ;; - "contrib/orcaservices/orcaservices_running.pl" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/orcaservices_running.pl" ;; - "contrib/orcaservices/restart_orcaservices.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/restart_orcaservices.sh" ;; - "contrib/orcaservices/start_orcaservices.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/start_orcaservices.sh" ;; - "contrib/orcaservices/stop_orcaservices.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/stop_orcaservices.sh" ;; - "contrib/orcaservices/S99orcaservices.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orcaservices/S99orcaservices.sh" ;; - *) { { echo "$as_me:3121: error: invalid argument: $ac_config_target" >&5 + "contrib/orca_services/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/Makefile" ;; + "contrib/orca_services/orca_services.cfg" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/orca_services.cfg" ;; + "contrib/orca_services/orca_services.pl" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/orca_services.pl" ;; + "contrib/orca_services/orca_services_running.pl" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/orca_services_running.pl" ;; + "contrib/orca_services/restart_orca_services.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/restart_orca_services.sh" ;; + "contrib/orca_services/start_orca_services.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/start_orca_services.sh" ;; + "contrib/orca_services/stop_orca_services.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/stop_orca_services.sh" ;; + "contrib/orca_services/S99orca_services.sh" ) CONFIG_FILES="$CONFIG_FILES contrib/orca_services/S99orca_services.sh" ;; + *) { { echo "$as_me:3315: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -3154,9 +3348,9 @@ { (exit 1); exit 1; } } -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. @@ -3228,9 +3422,9 @@ s, at RRDTOOL_VER@,$RRDTOOL_VER,;t t s, at STORABLE_VER@,$STORABLE_VER,;t t s, at TIME_HIRES_VER@,$TIME_HIRES_VER,;t t +s, at VAR_DIR@,$VAR_DIR,;t t s, at RRD_DIR@,$RRD_DIR,;t t s, at HTML_DIR@,$HTML_DIR,;t t -s, at ORCALLATOR_DIR@,$ORCALLATOR_DIR,;t t s, at WATCH_WEB@,$WATCH_WEB,;t t s, at WEB_LOG@,$WEB_LOG,;t t s, at CC@,$CC,;t t @@ -3252,6 +3446,9 @@ s, at AWK@,$AWK,;t t s, at PERL@,$PERL,;t t s, at PERL_HEAD@,$PERL_HEAD,;t t +s, at POD2HTML@,$POD2HTML,;t t +s, at POD2MAN@,$POD2MAN,;t t +s, at POD2TEXT@,$POD2TEXT,;t t s, at PS@,$PS,;t t s, at PS_SELF@,$PS_SELF,;t t s, at SE@,$SE,;t t @@ -3306,9 +3503,9 @@ s, at MKDIR@,$MKDIR,;t t CEOF -EOF +_ACEOF - cat >>$CONFIG_STATUS <<\EOF + 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 @@ -3347,8 +3544,8 @@ fi fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF +_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 @@ -3373,8 +3570,7 @@ /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in + { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac @@ -3385,35 +3581,41 @@ ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:3586: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } ;; esac done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` - else - ac_dir_suffix= ac_dots= - fi + 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 - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; +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_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac if test x"$ac_file" != x-; then - { echo "$as_me:3416: creating $ac_file" >&5 + { echo "$as_me:3618: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -3431,7 +3633,7 @@ -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:3434: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:3636: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -3444,18 +3646,18 @@ echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:3447: error: cannot find input file: $f" >&5 + { { echo "$as_me:3649: 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; } -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s, at configure_input@,$configure_input,;t t @@ -3471,12 +3673,12 @@ fi done -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } -EOF +_ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save @@ -3498,19 +3700,40 @@ $ac_cs_success || { (exit 1); exit 1; } fi -# Build the RRDtool library if it is needed. -if test "$borp_cv_perl_rdds" = no; then - command="(cd packages/$RRDTOOL_DIR; ./configure $RRD_CONFIGURE_COMMAND_LINE)" - echo "" - echo "Running configure in packages/$RRDTOOL_DIR to create RRDtool and RRDs.pm." - echo "" - echo $command - echo "" - eval $command - sleep 1 -fi +echo +echo "----------------------------------------------------------------" +echo "You have now successfully configured Orca." +echo +echo "Type 'make' to compile the software and use 'make install' to " +echo "install everything to: $prefix." +echo +echo "If you find Orca useful, make my wife and me happy. Go to" +echo "http://www.orcaware.com/wish_list.html and pick an item from our" +echo "Amazon.com wish list." +echo +echo "Blair Zajac " +echo "----------------------------------------------------------------" + +echo $ECHO_N "ordering CD from http://www.orcaware.com/wish_list.html $ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo "$as_me:3727: result: just kidding ;-)" >&5 +echo "${ECHO_T} just kidding ;-)" >&6 -if test -z "$WEB_LOG"; then - { echo "$as_me:3514: WARNING: *** Unless you use a --with-*-log option orcallator will not gather WWW log data." >&5 +case "$target" in + *-solaris*) + if test -z "$WEB_LOG"; then + { echo "$as_me:3733: WARNING: *** Unless you use a --with-*-log option orcallator will not gather WWW log data." >&5 echo "$as_me: WARNING: *** Unless you use a --with-*-log option orcallator will not gather WWW log data." >&2;} -fi + fi + ;; + *) + ;; +esac Modified: trunk/orca/Makefile.in ============================================================================== --- trunk/orca/Makefile.in (original) +++ trunk/orca/Makefile.in 2002-11-09 12:30:42.000000000 -0800 @@ -4,14 +4,23 @@ prefix = @prefix@ MKDIR = @MKDIR@ MAKE_RRDTOOL = @MAKE_RRDTOOL@ -ORCALLATOR_DIR = @ORCALLATOR_DIR@ RRD_DIR = @RRD_DIR@ +VAR_DIR = @VAR_DIR@ +ORCALLATOR_DIR = $(VAR_DIR)/orcallator CFLAGS = @CFLAGS@ all: configure config/PerlHead1 config/PerlHead2 Makefile @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS)"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)"); \ + if test -d $$dir; then \ + echo "cd $$dir"; \ + cd $$dir || exit 1; \ + echo "$(MAKE) CFLAGS=$(CFLAGS) || exit 1"; \ + $(MAKE) CFLAGS="$(CFLAGS)" || exit 1; \ + echo "cd .."; \ + cd ..; \ + else \ + exit 1; \ + fi \ done test: configure Makefile @@ -20,11 +29,20 @@ cd src && $(MAKE) upgrade_installation install: $(INSTALL_RRDTOOL) + $(MKDIR) $(VAR_DIR) $(MKDIR) $(ORCALLATOR_DIR) $(MKDIR) $(RRD_DIR)/orcallator @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) install"; \ - (cd $$dir && $(MAKE) install); \ + if test -d $$dir; then \ + echo "cd $$dir"; \ + cd $$dir || exit 1; \ + echo "$(MAKE) CFLAGS=$(CFLAGS) install || exit 1"; \ + $(MAKE) CFLAGS="$(CFLAGS)" install || exit 1; \ + echo "cd .."; \ + cd ..; \ + else \ + exit 1; \ + fi \ done install_contrib: @@ -50,11 +68,14 @@ echo "cd $$dir && $(MAKE) distclean"; \ (cd $$dir && $(MAKE) distclean); \ done + $(RM) -r autom4te*.cache $(RM) config/PerlHead1 config/PerlHead2 $(RM) config.cache config.log config.status Makefile to-autoconf: - aclocal -I config --output=config/aclocal.m4 && autoconf --localdir=config + aclocal -I config --output=config/aclocal.m4 + autoconf --include=config + $(RM) -r autom4te.cache configure: configure.in $(MAKE) to-autoconf Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in 2002-11-09 12:30:42.000000000 -0800 @@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM # Minimum Autoconf version required. -AC_PREREQ(2.13) +AC_PREREQ(2.52) # Remember the command line arguments to configure for use when # configure is run again. Also create the command line options for @@ -29,18 +29,18 @@ COMPRESS_ZLIB_VER=1.05 DATA_DUMPER_DIR=Data-Dumper-2.101 DATA_DUMPER_VER=2.101 -DATE_PARSE_DIR=TimeDate-1.10 -DATE_PARSE_VER=2.20 -DIGEST_MD5_DIR=Digest-MD5-2.16 -DIGEST_MD5_VER=2.16 +DATE_PARSE_DIR=TimeDate-1.14 +DATE_PARSE_VER=2.24 +DIGEST_MD5_DIR=Digest-MD5-2.20 +DIGEST_MD5_VER=2.19 MATH_INTERPOLATE_DIR=Math-Interpolate-1.05 MATH_INTERPOLATE_VER=1.05 -RRDTOOL_DIR=rrdtool-1.0.33 -RRDTOOL_VER=1.000331 -STORABLE_DIR=Storable-1.0.13 -STORABLE_VER=1.012 -TIME_HIRES_DIR=Time-HiRes-01.20 -TIME_HIRES_VER=1.20 +RRDTOOL_DIR=rrdtool-1.0.40 +RRDTOOL_VER=1.000401 +STORABLE_DIR=Storable-2.05 +STORABLE_VER=2.05 +TIME_HIRES_DIR=Time-HiRes-1.38 +TIME_HIRES_VER=1.38 AC_SUBST(COMPRESS_ZLIB_DIR) AC_SUBST(DATA_DUMPER_DIR) @@ -66,10 +66,30 @@ AC_MSG_ERROR([*** Cannot find config directory.]) fi +AC_ARG_WITH(var-dir, + [ --with-var-dir=DIR where raw measured data is stored [[localstatedir/orca]]], + [ + case "$withval" in + "" | y | ye | yes | n | no) + AC_MSG_ERROR([*** You must supply an argument to the --with-var-dir option.]) + ;; + *) VAR_DIR="$withval" + ;; + esac + ], + : ${VAR_DIR=$localstatedir/orca} +) +VAR_DIR=`( + test "x$prefix" = xNONE && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix=${prefix} + eval echo "$VAR_DIR" +)` +AC_SUBST(VAR_DIR) + # Define the directories where the source orcallator and RRD data files # will be installed. AC_ARG_WITH(rrd-dir, - [ --with-rrd-dir=DIR directory were the RRD data files are stored], + [ --with-rrd-dir=DIR where RRD data files are stored [[var-dir/rrd]]], [ case "$withval" in "" | y | ye | yes | n | no) @@ -79,7 +99,7 @@ ;; esac ], - : ${RRD_DIR=$localstatedir/orca/rrd} + : ${RRD_DIR=$VAR_DIR/rrd} ) RRD_DIR=`( test "x$prefix" = xNONE && prefix=$ac_default_prefix @@ -89,7 +109,7 @@ AC_SUBST(RRD_DIR) AC_ARG_WITH(html-dir, - [ --with-html-dir=DIR location of the root output HTML directory], + [ --with-html-dir=DIR where is the output HTML root directory], [ case "$withval" in "" | y | ye | yes | n | no) @@ -103,30 +123,10 @@ ) AC_SUBST(HTML_DIR) -AC_ARG_WITH(orcallator-dir, - [ --with-orcallator-dir=DIR directory were orcallator output is stored], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-orcallator-dir option.]) - ;; - *) ORCALLATOR_DIR="$withval" - ;; - esac - ], - : ${ORCALLATOR_DIR=$localstatedir/orca/orcallator} -) -ORCALLATOR_DIR=`( - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=${prefix} - eval echo "$ORCALLATOR_DIR" -)` -AC_SUBST(ORCALLATOR_DIR) - WATCH_WEB= NCSA_LOG= AC_ARG_WITH(ncsa-log, - [ --with-ncsa-log=FILE location of the NCSA style web server access log], + [ --with-ncsa-log=FILE location of the NCSA style web server access log], [ case "$withval" in "" | y | ye | yes | n | no) @@ -142,7 +142,7 @@ PROXY_LOG= AC_ARG_WITH(proxy-log, - [ --with-proxy-log=FILE location of the proxy NCSA web server access log], + [ --with-proxy-log=FILE location of the proxy NCSA web server access log], [ if test "$NCSA_LOG"; then AC_MSG_ERROR([*** You cannot use both --with-ncsa-log and --with-proxy-log.]) @@ -160,7 +160,7 @@ ) AC_ARG_WITH(squid-log, - [ --with-squid-log=FILE location of the Squid file log file], + [ --with-squid-log=FILE location of the Squid file log file], [ if test "$NCSA_LOG"; then AC_MSG_ERROR([*** You cannot use both --with-ncsa-log and --with-squid-log.]) @@ -207,6 +207,10 @@ PERL_HEAD="$cwd/config/$PERL_HEAD" AC_SUBST(PERL_HEAD) +AC_PATH_PROG(POD2HTML, pod2html, :) +AC_PATH_PROG(POD2MAN, pod2man, :) +AC_PATH_PROG(POD2TEXT, pod2text, :) + # Determine the correct ps command to use to find out about process # information for itself. AC_PATH_PROG(PS, ps) @@ -224,7 +228,7 @@ AC_MSG_WARN([*** to get process information for your host,]) AC_MSG_WARN([*** please email the command and the output from]) AC_MSG_WARN([*** ./config/config.guess to]) - AC_MSG_WARN([*** orca-developers at yahoogroups.com]) + AC_MSG_WARN([*** orca-dev at orcaware.com]) ;; esac if test "$PS_SELF"; then @@ -278,9 +282,9 @@ # options for RRDtool if it is not already declared. # expr "$ORCA_CONFIGURE_COMMAND_LINE" : "--enable-shared" >/dev/null 2>&1 || ORCA_CONFIGURE_COMMAND_LINE="$ORCA_CONFIGURE_COMMAND_LINE --enable-shared" -dnl BORP_PERL_MODULE(borp_cv_perl_compress_zlib, $PERL, Compress::Zlib, $COMPRESS_ZLIB_VER) -dnl test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_compress_zlib=no -dnl if test "$borp_cv_perl_compress_zlib" = no; then +dnl BORP_PERL_MODULE(orca_cv_perl_compress_zlib, $PERL, Compress::Zlib, $COMPRESS_ZLIB_VER) +dnl test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_compress_zlib=no +dnl if test "$orca_cv_perl_compress_zlib" = no; then dnl MAKE_COMPRESS_ZLIB=make_compress_zlib dnl TEST_COMPRESS_ZLIB=test_compress_zlib dnl INSTALL_PERL_COMPRESS_ZLIB=install_perl_compress_zlib @@ -293,9 +297,9 @@ AC_SUBST(CLEAN_COMPRESS_ZLIB) AC_SUBST(DISTCLEAN_COMPRESS_ZLIB) -BORP_PERL_MODULE(borp_cv_perl_data_dumper, $PERL, Data::Dumper, $DATA_DUMPER_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_data_dumper=no -if test "$borp_cv_perl_data_dumper" = no; then +BORP_PERL_MODULE(orca_cv_perl_data_dumper, $PERL, Data::Dumper, $DATA_DUMPER_VER) +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_data_dumper=no +if test "$orca_cv_perl_data_dumper" = no; then MAKE_DATA_DUMPER=make_data_dumper TEST_DATA_DUMPER=test_data_dumper INSTALL_PERL_DATA_DUMPER=install_perl_data_dumper @@ -308,9 +312,9 @@ AC_SUBST(CLEAN_DATA_DUMPER) AC_SUBST(DISTCLEAN_DATA_DUMPER) -BORP_PERL_MODULE(borp_cv_perl_date_parse, $PERL, Date::Parse, $DATE_PARSE_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_date_parse=no -if test "$borp_cv_perl_date_parse" = no; then +BORP_PERL_MODULE(orca_cv_perl_date_parse, $PERL, Date::Parse, $DATE_PARSE_VER) +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_date_parse=no +if test "$orca_cv_perl_date_parse" = no; then MAKE_DATE_PARSE=make_date_parse TEST_DATE_PARSE=test_date_parse INSTALL_PERL_DATE_PARSE=install_perl_date_parse @@ -323,9 +327,9 @@ AC_SUBST(CLEAN_DATE_PARSE) AC_SUBST(DISTCLEAN_DATE_PARSE) -BORP_PERL_MODULE(borp_cv_perl_digest_md5, $PERL, Digest::MD5, $DIGEST_MD5_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_digest_md5=no -if test "$borp_cv_perl_digest_md5" = no; then +BORP_PERL_MODULE(orca_cv_perl_digest_md5, $PERL, Digest::MD5, $DIGEST_MD5_VER) +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_digest_md5=no +if test "$orca_cv_perl_digest_md5" = no; then MAKE_DIGEST_MD5=make_digest_md5 TEST_DIGEST_MD5=test_digest_md5 INSTALL_PERL_DIGEST_MD5=install_perl_digest_md5 @@ -338,9 +342,9 @@ AC_SUBST(CLEAN_DIGEST_MD5) AC_SUBST(DISTCLEAN_DIGEST_MD5) -BORP_PERL_MODULE(borp_cv_perl_math_interpolate, $PERL, Math::Interpolate, $MATH_INTERPOLATE_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_math_interpolate=no -if test "$borp_cv_perl_math_interpolate" = no; then +BORP_PERL_MODULE(orca_cv_perl_math_interpolate, $PERL, Math::Interpolate, $MATH_INTERPOLATE_VER) +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_math_interpolate=no +if test "$orca_cv_perl_math_interpolate" = no; then MAKE_MATH_INTERPOLATE=make_math_interpolate TEST_MATH_INTERPOLATE=test_math_interpolate INSTALL_PERL_MATH_INTERPOLATE=install_perl_math_interpolate @@ -353,9 +357,9 @@ AC_SUBST(CLEAN_MATH_INTERPOLATE) AC_SUBST(DISTCLEAN_MATH_INTERPOLATE) -BORP_PERL_MODULE(borp_cv_perl_rrds, $PERL, RRDs, $RRDTOOL_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_rrds=no -if test "$borp_cv_perl_rrds" = no; then +BORP_PERL_MODULE(orca_cv_perl_rrds, $PERL, RRDs, $RRDTOOL_VER) +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_rrds=no +if test "$orca_cv_perl_rrds" = no; then MAKE_RRDTOOL=make_rrdtool TEST_RRDTOOL=test_rrdtool INSTALL_PERL_RRDTOOL=install_perl_rrdtool @@ -368,9 +372,9 @@ AC_SUBST(CLEAN_RRDTOOL) AC_SUBST(DISTCLEAN_RRDTOOL) -BORP_PERL_MODULE(borp_cv_perl_storable, $PERL, Storable, $STORABLE_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_storable=no -if test "$borp_cv_perl_storable" = no; then +BORP_PERL_MODULE(orca_cv_perl_storable, $PERL, Storable, $STORABLE_VER) +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_storable=no +if test "$orca_cv_perl_storable" = no; then MAKE_STORABLE=make_storable TEST_STORABLE=test_storable INSTALL_PERL_STORABLE=install_perl_storable @@ -383,9 +387,9 @@ AC_SUBST(CLEAN_STORABLE) AC_SUBST(DISTCLEAN_STORABLE) -BORP_PERL_MODULE(borp_cv_perl_time_hires, $PERL, Time::HiRes, $TIME_HIRES_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && borp_cv_perl_time_hires=no -if test "$borp_cv_perl_time_hires" = no; then +BORP_PERL_MODULE(orca_cv_perl_time_hires, $PERL, Time::HiRes, $TIME_HIRES_VER) +test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_time_hires=no +if test "$orca_cv_perl_time_hires" = no; then MAKE_TIME_HIRES=make_time_hires TEST_TIME_HIRES=test_time_hires INSTALL_PERL_TIME_HIRES=install_perl_time_hires @@ -402,6 +406,17 @@ AC_SUBST(DISTCLEAN_TIME_HIRES) AC_SUBST(PERL_USE_TIME_HIRES) +# Build the RRDtool library if it is needed. +if test "$orca_cv_perl_rrds" = no; then + command="(cd packages/$RRDTOOL_DIR; ./configure $RRD_CONFIGURE_COMMAND_LINE)" + echo "" + echo "Running configure in packages/$RRDTOOL_DIR to create RRDtool and RRDs.pm." + echo "" + echo $command + echo "" + eval $command +fi + # Define the INSTALL and MKDIR variables to point to the scripts in # the config directory. INSTALL="$config_dir/install-sh -c" @@ -435,27 +450,47 @@ contrib/Makefile contrib/rotate_orca_graphs/Makefile contrib/rotate_orca_graphs/rotate_orca_graphs.sh - contrib/orcaservices/Makefile - contrib/orcaservices/orcaservices.cfg - contrib/orcaservices/orcaservices.pl - contrib/orcaservices/orcaservices_running.pl - contrib/orcaservices/restart_orcaservices.sh - contrib/orcaservices/start_orcaservices.sh - contrib/orcaservices/stop_orcaservices.sh - contrib/orcaservices/S99orcaservices.sh) - -# Build the RRDtool library if it is needed. -if test "$borp_cv_perl_rdds" = no; then - command="(cd packages/$RRDTOOL_DIR; ./configure $RRD_CONFIGURE_COMMAND_LINE)" - echo "" - echo "Running configure in packages/$RRDTOOL_DIR to create RRDtool and RRDs.pm." - echo "" - echo $command - echo "" - eval $command - sleep 1 -fi + contrib/orca_services/Makefile + contrib/orca_services/orca_services.cfg + contrib/orca_services/orca_services.pl + contrib/orca_services/orca_services_running.pl + contrib/orca_services/restart_orca_services.sh + contrib/orca_services/start_orca_services.sh + contrib/orca_services/stop_orca_services.sh + contrib/orca_services/S99orca_services.sh) + +echo +echo "----------------------------------------------------------------" +echo "You have now successfully configured Orca." +echo +echo "Type 'make' to compile the software and use 'make install' to " +echo "install everything to: $prefix." +echo +echo "If you find Orca useful, make my wife and me happy. Go to" +echo "http://www.orcaware.com/wish_list.html and pick an item from our" +echo "Amazon.com wish list." +echo +echo "Blair Zajac " +echo "----------------------------------------------------------------" + +echo $ECHO_N "ordering CD from http://www.orcaware.com/wish_list.html $ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +AC_MSG_RESULT([ just kidding ;-)]) -if test -z "$WEB_LOG"; then - AC_MSG_WARN([*** Unless you use a --with-*-log option orcallator will not gather WWW log data.]) -fi +case "$target" in + *-solaris*) + if test -z "$WEB_LOG"; then + AC_MSG_WARN([*** Unless you use a --with-*-log option orcallator will not gather WWW log data.]) + fi + ;; + *) + ;; +esac Added: trunk/orca/COMMITTERS ============================================================================== --- trunk/orca/COMMITTERS (original) +++ trunk/orca/COMMITTERS 2002-11-09 12:30:42.000000000 -0800 @@ -0,0 +1,11 @@ +The following people have commit access to the Orca sources. Note +that this is not a full list of Orca's authors, however -- for that, +you'd need to look over the log messages to see all the patch +contributors. + +If you have a question or comment, it's probably best to mail +orca-dev at orcaware.com, rather than mailing any of these people +directly. + +Blanket commit access: + blair Blair Zajac Modified: trunk/orca/src/upgrade_installation.pl ============================================================================== --- trunk/orca/src/upgrade_installation.pl (original) +++ trunk/orca/src/upgrade_installation.pl 2002-11-09 12:30:42.000000000 -0800 @@ -5,6 +5,7 @@ # 2) Rename all files with * in them to _times_. # # Copyright (C) 1999 Blair Zajac and GeoCities, Inc. +# Copyright (C) 1999-2002 Blair Zajac. use strict; use File::Find; Modified: trunk/orca/src/Makefile.in ============================================================================== --- trunk/orca/src/Makefile.in (original) +++ trunk/orca/src/Makefile.in 2002-11-09 12:30:42.000000000 -0800 @@ -6,8 +6,9 @@ INSTALL = @INSTALL@ MKDIR = @MKDIR@ PERL_HEAD = @PERL_HEAD@ -ORCALLATOR_DIR = @ORCALLATOR_DIR@ RRD_DIR = @RRD_DIR@ +VAR_DIR = @VAR_DIR@ +ORCALLATOR_DIR = $(VAR_DIR)/orcallator PERL_SCRIPTS = orca upgrade_installation SHELL_SCRIPTS = TARGETS = $(PERL_SCRIPTS) $(SHELL_SCRIPTS) Modified: trunk/orca/src/orca.pl.in ============================================================================== --- trunk/orca/src/orca.pl.in (original) +++ trunk/orca/src/orca.pl.in 2002-11-09 12:30:43.000000000 -0800 @@ -1,9 +1,11 @@ # Orca: display arbitrary data from files onto web pages using RRDtool. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. + +require 5.005_03; use strict; -require 5.004_01; $| = 1; @@ -34,10 +36,10 @@ $Data::Dumper::Deepcopy = 1; # Load the required Orca modules. -use Orca::Constants qw($ORCA_VERSION - IS_WIN32 +use Orca::Constants qw(IS_WIN32 die_when_called $INCORRECT_NUMBER_OF_ARGS + $ORCA_VERSION $opt_daemon $opt_generate_gifs $opt_log_filename @@ -609,7 +611,6 @@ warn "$0: warning: cannot create Orca::HTMLFile object: $@.\n"; return; } - $index_html->print("
\n"); # The first step is to create the HTML files for each different # subgroup. This is only done if there is more than one subgroup @@ -694,6 +695,11 @@ $href_html .= "{href}\">" . "$plot_type->{Plot_Type} $subgroup_name
\n"; } + + # Add a link back to the top HTML page. + $href_html .= "
Back to main page
\n"; + + # Push out the top of the HTML file. foreach my $html_file (@html_files) { $html_file->{fd}->print($href_html); } @@ -710,7 +716,7 @@ $href_html .= "[" . replace_subgroup_name($images[$i]->plot_ref->{title}, '') . - "]\n"; + "]    \n"; } foreach my $html_file (@html_files) { $html_file->{fd}->print($href_html); @@ -739,7 +745,7 @@ ""; $image_filename .= "$name-$html_files[$j]{plot_type}.$IMAGE_SUFFIX"; my $html = "\n"; + "alt=\"$html_files[$j]{Plot_Type} $title\">

\n"; $html_files[$j]{fd}->print($html); if ($make_html_all_page) { $html_files[-1]{fd}->print($html); @@ -881,6 +887,11 @@ $href_html .= "[$subgroup]\n"; } } + + # Add a link back to the top HTML page. + $href_html .= "
Back to main page
\n"; + + # Push out the top of the HTML file. foreach my $html_file (@legend_html_files) { $html_file->{fd}->print($href_html); } @@ -947,7 +958,7 @@ my $image_filename = length($subgroup_name) ? "$subgroup_name/" : ""; $image_filename .= "$name-$legend_html_files[$i]{plot_type}.$IMAGE_SUFFIX"; my $html = "\n"; + "alt=\"$Plot_Type $subgroup_name $legend_no_subgroup\">

\n"; $legend_html_files[$i]{fd}->print("
\n

$Plot_Type $subgroup_name $legend_no_subgroup

\n"); $legend_html_files[$i]{fd}->print($html); if ($make_html_all_page) { @@ -960,7 +971,7 @@ if (@table_columns) { $index_html->print("" . join('', @table_columns) . "\n"); } - $index_html->print("\n\n\n
\n
\n"); + $index_html->print("\n\n
\n"); } # Replace any %g with the subgroup and any %G's with a capitalized @@ -1264,56 +1275,62 @@ =head1 MAILING LISTS Four mailing lists exist for Orca. To subscribe to any of the mailing -lists, please visit the URL below. You have the parameter of choosing -a digest form of the mailing list if you wish it when you subscribe to -the mailing list or anytime thereafter. To send email to any of these +lists, please visit the URL listed below. You have the option of +choosing a digest form of the mailing list when you subscribe to the +mailing list or anytime thereafter. To send email to any of these lists you must subscribe to the list. -B - - Home http://groups.yahoo.com/group/orca-announce/ - Subscribe http://groups.yahoo.com/group/orca-announce/join - Archive http://groups.yahoo.com/group/orca-announce/archive - -The orca-announce at yahoogroups.com mailing list is a LOW volume -moderated mailing list for announcing stable releases of Orca. - -B - - Home http://groups.yahoo.com/group/orca-users/ - Subscribe http://groups.yahoo.com/group/orca-users/join - Archive http://groups.yahoo.com/group/orca-users/archive - -The orca-users at yahoogroups.com is a first stop mailing list for -getting help in setting up and getting Orca running. Problems -relating to downloading, configuring, compiling the necessary Perl -modules, and installing Orca belong here. People interested anything -more than this, such as developing data gathering modules or active -Perl development, should be on one or both of the -orca-discuss at yahoogroups.com or orca-developers at yahoogroups.com -mailing lists. Once you get Orca running to your satisfaction, you -may want to remove yourself from this list. - -B - - Home http://groups.yahoo.com/group/orca-discuss/ - Subscribe http://groups.yahoo.com/group/orca-discuss/join - Archive http://groups.yahoo.com/group/orca-discuss/archive - -The orca-discuss at yahoogroups.com mailing list is for active users of -Orca who are doing new interesting things with Orca and want to -discuss Orca but are not interested in actively developing Orca source -code. These people are also not interested in helping people get Orca -running on their systems. - -B - - Home http://groups.yahoo.com/group/orca-developers/ - Subscribe http://groups.yahoo.com/group/orca-developers/join - Archive http://groups.yahoo.com/group/orca-developers/archive +B -The orca-developers at yahoogroups.com mailing list is for hackers of -Orca who actually hack and improve Orca. + The orca-announce at orcaware.com mailing list is a *low* volume + moderated mailing list for announcing stable releases of Orca and + affiliated data measurement tools used with Orca. + + Home http://www.orcaware.com/mailman/listinfo/orca-announce + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-announce + Subscribe via email orca-announce-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-announce/ + +B + + The orca-users at orcaware.com is the mailing list for Orca users. + Problems relating to downloading, configuring, compiling the + necessary Perl modules, installing and configuring Orca belong + here. + + Home http://www.orcaware.com/mailman/listinfo/orca-users + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-users + Subscribe via email orca-users-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-users/ + +B + + The orca-dev at orcaware.com mailing list is for Orca developers who + develop Orca or its affiliated data gathering tools. + + Home http://www.orcaware.com/mailman/listinfo/orca-dev + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-dev + Subscribe via email orca-dev-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-dev/ + +B + + The orca-checkins at orcaware.com is a publically accessible, + moderated list which is used to disseminate version control + check-in messages made by the Orca maintainers, to the Orca + developer community. This list is an adjunct to the publically + available Subversion tree currently residing on OrcaWare. If you + intend to follow the Subversion checkins, you should also join the + orca-dev at orcaware.com mailing list for discussions. + + Home http://www.orcaware.com/mailman/listinfo/orca-checkins + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-checkins + Subscribe via email orca-checkins-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-checkins/ =head1 PLOT PREFIXES @@ -1590,10 +1607,10 @@ =item B I When creating plots and HTML files Orca can create filenames that have -an individual path element up to 250 bytes long. Some web servers +an individual path element up to 235 bytes long. Some web servers and/or web browsers cannot handle filenames this long and this configuration file parameter allows the user to reduce the length of -the filenames that Orca creates. The default I is 250 and +the filenames that Orca creates. The default I is 235 and I must be greater than 63. =back @@ -2073,14 +2090,14 @@ These values are only used once when the RRD files are created as a parameter to rrdcreate. If you want to change either B or -B after the RRD files have been created and you want to -change these values, then you have to modify Orca's configuration file -and either remove the RRD files and let Orca rebuild them or find a -separate RRD program that will modify the minimum and maximum values. - -If you want to specify the second data sources minimum and maximum but -do not want to limit the first data source, then set the I's -to U. For example: +B after the RRD files have been created, then you have to +modify Orca's configuration file and either remove the RRD files and +let Orca rebuild them or find a separate RRD program that will modify +the minimum and maximum values. + +If you want to specify the second data source's minimum and maximum +values but do not want to limit the first data source, then set the +I's to U. For example: plot { data column1 @@ -2093,18 +2110,19 @@ } If there are no minimum or maximum values specified for a particular -plot, then there will no limit applied to any input data given to the -RRD file since the value 'U' is passed to rrdcreate. If at least one -data_min or data_max is specified and there are more data's than -data_*'s, then the last specified data_* will be used for all of the -data's were not given a data_*'. In the example above, there are -three data's and only two data_*'s. The minimum of 0 and maximum of -100 will be applied to column3. +plot, then there will no limits applied to any input data given to the +RRD file since the value 'U' is passed to rrdcreate. -If there are multiple plots that refer to the same RRD and if the -different plots have different data_min's and data_max's, then the -first plot that creates the RRD file will set the data_min's and -data_max's. +If at least one data_min or data_max is specified and there are more +data's than data_*'s, then the last specified data_* will be used for +all of the data's were not given a data_*'. In the example above, +there are three data's and only two data_*'s. The minimum of 0 and +maximum of 100 will be applied to column3. + +If there are multiple plots that refer to the same input data and if +the different plots have different data_min's and data_max's, then the +first plot that creates the RRD file will set the data_min and +data_max. =item B I @@ -2151,11 +2169,15 @@ Using the B parameter specifies how many pixels wide the drawing area inside the PNG is. +The default plot width is 500 pixels. + =item B I Using the B parameter specifies how many pixels high the drawing area inside the PNG is. +The default plot height is 125 pixels. + =item B I By setting the B parameter, the minimum value to be graphed @@ -2212,6 +2234,13 @@ Depending on the type of previous graph, the STACK will either be a LINE? or an AREA. +If there are no line_type's specified for a plot, then the default +line_type of LINE1 will be used for all of the data line_type's. + +If at least one line_type is specified and there are more data's than +line_type's, then the last specified line_type will be used for all of +the remaining data's that do not have a specified line_type. + =item B I The B parameter specifies for a single data source the comment @@ -2256,10 +2285,11 @@ } If there are no summary format specifiers, then the default format of -'%9.3lf %S' will be used for all of the data summary lines. If at -least one summary_format is specified and there are more data's than -summary_format's, then the last specified summary_format will be used -for all of the data summary lines that were not given a +'%9.3lf %S' will be used for all of the data summary lines. + +If at least one summary_format is specified and there are more data's +than summary_format's, then the last specified summary_format will be +used for all of the data summary lines that were not given a summary_format. In the example above, there are four data's and only two summary_format's. The format '%4.1f %s' will be used for the `things' and `something_else' data summary lines. @@ -2284,7 +2314,7 @@ These are hexadecimal forms of GIFs used by Orca. -OPEN orca.gif +OPEN orca_logo.gif 749464839316ab00d2007fff00ffffff1f0f8f2e1e2f4d1dbe5c2c4e7b3bed8a4a7da9 490dc858ace7774c0776db16856b35940b44a39a63a22a72b1c991c059000000000000 0000000000000000000000000000000000000000000000000000000000000000000000 @@ -2352,7 +2382,7 @@ ad4f721a0e9965d8404000b3 CLOSE -OPEN rrdtool.gif +OPEN rrdtool_logo.gif 749464837316870022003f0000000066003399046699e375c864284bf7f73b9a9a9a08 99ccfbccccffffccffffff7f7f7f7e7e7e000000000000000000c20000000087002200 0040ef099c94badb83be9b63fbd57c882e866790ac4abe93e292c5032016fd87eafe97 @@ -2405,3 +2435,76 @@ d38a6917f96c13befd66aa6df35b5fe466d992b5ba190c6e9d5fea87dcbae57fac7deb af5ffa08d0c200220000b3 CLOSE + +OPEN rothschild_image_logo.png +9805e474d0a0a1a0000000d094844425000010e400000051806000000092d6709e0000 +00407614d41400001be8c7bf153900000002368425d40000a7520000083800009fff00 +00088e000057030000ae060000a379000071f6799a994d000090219444144587c926c3 +7de60ffffef8f4c04d202be153c02e61984533f8ed0e3f3839c0737144115a69d50468 +18d404a9189938f818751cc1c89b424b86ce2c1503a08870fce0c4202e98875d8a72c2 +307add1504c3008002613ca83f8552ec43823e5d80a0860508f844025e09f04c970663 +8a0a5055c302afeea8c40714a0aac364b00d1503a068f20080026a18670c05700aa044 +043c51c585ae61c146016380606b853a91edc585b30de4b1503a06410d80004001bc04 +b3068b1011061c9c521a90e2c314d59726ab04f3f3c3168f5f1e9289d0a61b284fd054 +00a6573c0082c00434814a08f6f2ea10b5fef99c6df3a08af004db92252e18455f8c0e +1fe861073048c504fc4f30010443b283143e488c91909101a135109e58d0300eb13a18 +d8132e2b360a008ab9ea2113381e1c682307b241b100520b79726103cb506bc4145072 +8abff0200a8c70512a0a65ca8b5420c32f14d28d7b86da8df6f2ea330ea1f9609b1899 +3871ec7099302731eb0f44e1280c60093e50600417cf2f4cc768f07367389f0aa838d0 +81f2021309f348d0280fe89738cfefc18e6a7f04dfc2047328a5ce0200273282318810 +3c0440a268c00fd0529943cd5c927027f2803ccf94c6a35a42d3312df0b8b205c1182c +00417f02c3810cd951910e4734c61240a4f50a83325b2f785a3209d38f2d02a30273df +0800131728d4c1458b30400d09e61728209849046a7208d46118a0c34f883051237f18 +58a2271a78eef009e305ba5142e0ac4402330ddc1c711f0a8c5a5f08f38a5800a4ce03 +002bf4120ab0ec7855e07d668f238656c66c0df8e58838a59088078c341dfae90b478d +6b04193ea04501cbdb0be0c1ea0a0bc18ced708cd20a4f50a4ba0a2c39010851e7c90c +87467302dcdd0a4b402002df8cd060c708699e7805ef10800a1d13e4a120051870b698 +1c008a04405d2e48652308a0940546384ff06c1f25052074e2431400491704d2668108 +5be14120a3134f38a53e4866b7195f3821f38232f07700a28214e76056cdb50ca83193 +c39ed0069671443a7c53a3005a7605c922be326108cc689f31658d11204a4af1058525 +b3df00400d861c943400aa1b09b5480a88385dca4c00054c38a5d10beecf0620fa0742 +e60dac204fa410d758109a591084f382c18490bb1ae004e765e889e30ae7605bc71600 +4ee0c758838a5f70b43a4a41c90a4b202db8a66d44cb9ed94d4f30ac78290c2049a916 +90010434abbaef9f1c9006023679385759702108a0e34e244041174eca995851a14c47 +798e500752c60983868810f57d8ee34b5624a081c01f94f600a2c314db61c63cd34b60 +0a47a8e50528a2540d09b0a7cb2cab8e8c00458b1133e4b8b2f4086cd21978d709dd54 +e4af1c634d58f008a1b28b681c043e6f00108a73365100040188e6dffff96b735db140 +194328c2ab1322484f2d3de90176464de02aea53a77cb68678080567b481188ec5c919 +9a9754f01109ecfb8d4e1972107e197242072f3c5cc063381d863c6e2f1d4d20d853ac +ccbd4c9572ebacd7b5db35798ea14c7fa8839d3e56e8ca3d3c0b1fd8d59def300d96db +95c6c7fbb00a1092831f93a040049189810c644e27f918200a481037f15a5150821128 +cc02570dd94104869f41271cf0a44d8f6c890751e9f58a051621208fcf0fde50f2c79c +ac05100a59324bea431d10eaa4e163ed90b59218cd547475748696111a13a409c3afa2 +e0a74af1010059f48f2d110400d0841c948c153c50082181ca6d54e6da1930049968a1 +da47c708055448cbc330433f90acc18f6cdb0b51e94f81ba52496b86d1e84d600acf20 +a4f34fc2831f58118ab7d0a036055048b62d8041fc0a8f7c5d04205b829751c20ce72c +5dae409b10dbbcf3856caf10208684f817e066009916ebe38a6c529a90023175d90e28 +11f57d90499788d5ec23a060700051650a20d0f55a8f0634938b2250d0120eb28f0b51 +c90a4f20a9c540d87928a024c731d30a24a94d53da8f622b04510186ce492d68b10400 +d8ecaa3d000822d04b4e841181140b6961ea58af4a89949a914d600ac414ccaf834e95 +0d1aabb2a60210db3ee141f50a56c30bd4918bcd402970d2037c5009765e19108ab7f0 +be6c3469f51e6b70db06526ec080099d0ae2e363c0a2039a1169001043a5072910e30e +910a68d2c57054e127d49496d078c3e5a389001b5872c69f21fc024f3c0670301dd470 +5a53051e98b2dc186c83167a181ea8b78c618cf4812602c8c6e21a50fe8c33fe496e10 +05f209a1169001043a5072910041980a2c1145082c6c160419b79728d38791508ab5a8 +e3b0a0a8c2277b1d1c6c5760b6b6d8892c316d572058b09bef0c6b8ee78b3009f714bc +f58e5006dab585c526bde690b54af03028872d53afcec382f90af233224bdc219715c3 +82f01529e78a5b5951020864b0e42300c6ba7286cee04bde116b7c61672421eaa51142 +f4ec6b140d27f0a4e0f30a7002458722726727cf20ac0d0aeaf1db795ec042009f9145 +923d3fc7bdf0736f0872d60600676c10230504a1282010c758112fcec38a7360a4728d +a0e309f11f51880ac360b6040529e74c1fc0d209200020864b0e42310821b08607b145 +8428ab250b3e5e0f10052c02522d1453d286ca45892865a1da0086d612af00c3ce0731 +c604819a0c38dedb726108ce10d2eb60d464d07ddfae8e006e76a775890a28e0db2e78 +47bd123e090be2a3abc3e200b9d9705a5605f6c02b2d22a0b26c736f803df0203812df +0040067ee8e40048188108e78b28bffa5ee2e79cba6040b6bf12a80add0ce5a1b796e2 +ffbaaf5858cc80ec0c6e658a824c27dabc95182daa6f6e5ddfd99e28909f87bd202406 +4488b7d8a2ab7de9457ca481b8b5b0bf35bcbc7961d8fa7d8f1e712c1a312f1035f4f7 +37c244532245fb9b4a87d1b5ae16b447aa97f35d075bdad456ce1b7487da0ea1762c9f +ac80e6f0f377ee5e2200577e69200480241dd1dcef797dc12e08f1a511cc05ef6418f8 +4c4ab7dba317674025df95eff2a693960cc4674215b20dce995cad3fe39e32dac98679 +84b27723320114845cd8e04fb714a6118c11aa7aef55542c524af772d281a7b670cfa2 +d28d9e39608ebd564146884346babfd42491b94d7d2334bf46018450f175f96edeb4fa +8f19ac6743ab60b597e451f3e4460488f9d1b5ecc7ad40013ef702029d4d15087108a0 +e0854c1133e353c1e023646f30821c1935bbf8e146c3c3108a02bf304c4be47d4fc4f3 +001060005898127b09b00863000000009454e444ea240628 +CLOSE Modified: trunk/orca/docs/Makefile.in ============================================================================== --- trunk/orca/docs/Makefile.in (original) +++ trunk/orca/docs/Makefile.in 2002-11-09 12:30:43.000000000 -0800 @@ -1,23 +1,26 @@ @SET_MAKE@ -prefix = @prefix@ -mandir = @mandir@/man1 -INSTALL = @INSTALL@ -MKDIR = @MKDIR@ -ORCA = ../src/orca.pl +prefix = @prefix@ +mandir = @mandir@/man1 +INSTALL = @INSTALL@ +MKDIR = @MKDIR@ +ORCA = ../src/orca.pl +POD2HTML = @POD2HTML@ +POD2MAN = @POD2MAN@ +POD2TEXT = @POD2TEXT@ -TARGETS = orca.man orca.html orca.txt +TARGETS = orca.html orca.man orca.txt all: Makefile $(TARGETS) -orca.man: $(ORCA) - pod2man $(ORCA) > $@ - orca.html: $(ORCA) - pod2html $(ORCA) > $@ + $(POD2HTML) $(ORCA) > $@ + +orca.man: $(ORCA) + $(POD2MAN) $(ORCA) > $@ orca.txt: $(ORCA) - pod2text $(ORCA) > $@ + $(POD2TEXT) $(ORCA) > $@ install: all $(MKDIR) $(mandir) Modified: trunk/orca/README ============================================================================== --- trunk/orca/README (original) +++ trunk/orca/README 2002-11-09 12:30:43.000000000 -0800 @@ -40,7 +40,7 @@ explain how the data files Orca uses are created, maintained, and used to create the images that Orca creates. Read about RRDtool at - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ + http://people.ethz.ch/~oetiker/webtools/rrdtool/ DATA COLLECTION TOOLS ===================== @@ -78,56 +78,73 @@ http://www.orcaware.com/orca/ +KEEPING BLAIR HAPPY +=================== + +If you want to show your appreciation for Orca, go to + +http://www.orcaware.com/wish_list.html + MAILING LISTS ============= Four mailing lists exist for Orca. To subscribe to any of the mailing -lists, please visit the URL listed below. You have the option of choosing -a digest form of the mailing list if you wish it when you subscribe to -the mailing list or anytime thereafter. To send email to any of these +lists, please visit the URL listed below. You have the option of +choosing a digest form of the mailing list when you subscribe to the +mailing list or anytime thereafter. To send email to any of these lists you must subscribe to the list. -orca-announce at yahoogroups.com - Home http://groups.yahoo.com/group/orca-announce/ - Subscribe http://groups.yahoo.com/group/orca-announce/join - Archive http://groups.yahoo.com/group/orca-announce/archive - - This is a LOW volume moderated mailing list for announcing stable - releases of Orca. - -orca-users at yahoogroups.com - Home http://groups.yahoo.com/group/orca-users/ - Subscribe http://groups.yahoo.com/group/orca-users/join - Archive http://groups.yahoo.com/group/orca-users/archive - - This mailing list is a first stop mailing list for getting help - in setting up and getting Orca running. Problems relating to - downloading, configuring, compiling the necessary Perl modules, - and installing Orca belong here. People interested anything more - than this, such as developing data gathering modules or active Perl - development, should be on one or both of the following mailing lists. - Once you get Orca running to your satisfaction, you may want to - remove yourself from this list. - -orca-discuss at yahoogroups.com - Home http://groups.yahoo.com/group/orca-discuss/ - Subscribe http://groups.yahoo.com/group/orca-discuss/join - Archive http://groups.yahoo.com/group/orca-discuss/archive - - This mailing list is for active users of Orca who are doing new - interesting things with Orca and want to discuss Orca but are not - interested in actively developing Orca source code. These people - are also not interested in helping people get Orca running on their - systems. - -orca-developers at yahoogroups.com - Home http://groups.yahoo.com/group/orca-developers/ - Subscribe http://groups.yahoo.com/group/orca-developers/join - Archive http://groups.yahoo.com/group/orca-developers/archive - - This mailing list is for people who are interested in actively - developing, fixing and improving Orca's source code and related data - gathering modules, and porting Orca to new platforms. +orca-announce at orcaware.com + + The orca-announce at orcaware.com mailing list is a *low* volume + moderated mailing list for announcing stable releases of Orca and + affiliated data measurement tools used with Orca. + + Home http://www.orcaware.com/mailman/listinfo/orca-announce + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-announce + Subscribe via email orca-announce-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-announce/ + +orca-users at orcaware.com + + The orca-users at orcaware.com is the mailing list for Orca users. + Problems relating to downloading, configuring, compiling the + necessary Perl modules, installing and configuring Orca belong + here. + + Home http://www.orcaware.com/mailman/listinfo/orca-users + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-users + Subscribe via email orca-users-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-users/ + +orca-dev at orcaware.com + + The orca-dev at orcaware.com mailing list is for Orca developers who + develop Orca or its affiliated data gathering tools. + + Home http://www.orcaware.com/mailman/listinfo/orca-dev + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-dev + Subscribe via email orca-dev-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-dev/ + +orca-checkins at orcaware.com + + The orca-checkins at orcaware.com is a publically accessible, + moderated list which is used to disseminate version control + check-in messages made by the Orca maintainers, to the Orca + developer community. This list is an adjunct to the publically + available Subversion tree currently residing on OrcaWare. If you + intend to follow the Subversion checkins, you should also join the + orca-dev at orcaware.com mailing list for discussions. + + Home http://www.orcaware.com/mailman/listinfo/orca-checkins + Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-checkins + Subscribe via email orca-checkins-request at orcaware.com + with subject "subscribe" + Archive http://www.orcaware.com/pipermail/orca-checkins/ INSTALLATION ============ @@ -139,8 +156,8 @@ These two tools were written by Blair Zajac. I welcome any patches for bugs or improvements, comments and suggestions. Please send any -Orca correspondence to orca-users at yahoogroups.com or -orca-developers at yahoogroups.com, which I read and participate on. +Orca correspondence to orca-dev at orcaware.com or +orca-users at orcaware.com, which I read and participate on. If you wish to contact me directly, my email address is blair at orcaware.com. @@ -151,5 +168,4 @@ I originally named Orca FMRTG, but after asking my wife Ashley Rothschild (http://www.rothschildimage.com) for some suggestions, she came up with Orca. It turns out that there are only one or two small -programs on the Internet named Orca, so we both were happy to hear -this. +programs on the Internet named Orca, so the name stuck. Added: trunk/orca/contrib/procallator/install.sh ============================================================================== --- trunk/orca/contrib/procallator/install.sh (original) +++ trunk/orca/contrib/procallator/install.sh 2002-11-09 12:30:44.000000000 -0800 @@ -0,0 +1,8 @@ +cp procallator.pl /usr/local/bin +cp procallator /etc/rc.d/init.d +ln -s /etc/rc.d/init.d/procallator /etc/rc.d/rc3.d/S99procallator +/etc/rc.d/init.d/procallator start +echo "Dont forget to copy procallator.cfg to your orca server, and start a new instance of orca using this file as the config file" +echo "To copy the collected files I suggest the use of rsync" +echo "This software is in alpha stagge, use at you own risk" +echo "Copyright (C) 2001 Guilherme Carvalho Chehab. All Rights Reserved" Added: trunk/orca/contrib/procallator/procallator.cfg ============================================================================== --- trunk/orca/contrib/procallator/procallator.cfg (original) +++ trunk/orca/contrib/procallator/procallator.cfg 2002-11-09 12:30:44.000000000 -0800 @@ -0,0 +1,652 @@ +# Orca configuration file for procallator files. + +# base_dir is prepended to the paths find_files, html_dir, rrd_dir, +# and state_file only if the path does not match the regular +# expression ^\\?\.{0,2}/, which matches /, ./, ../, and \./. +base_dir /usr/local/var/orca/rrd/procallator + +# rrd_dir specifies the location of the generated RRD data files. +rrd_dir . + +# state_file specifies the location of the state file that remembers +# the modification time of each source data file. +state_file orca.state + +# html_dir specifies the top of the HTML tree created by Orca. +html_dir /usr/local/www/ramdrive/servers2 + +# By default create .meta tag files for all PNGs or GIFs so that the +# web browser will automatically reload them. +expire_images 0 + +# Find files at the following times: +# 0:10 to pick up new orcallator files for the new day. +# 1:00 to pick up late comer orcallator files for the new day. +# 6:00 to pick up new files before the working day. +# 12:00 to pick up new files during the working day. +# 19:00 to pick up new files after the working day. +find_times 0:10 1:00 6:00 12:00 19:00 + +# This defines the email address of people to warn when a file that is +# being updated constantly stops being updated. For mathematical +# expressions use the word `interval' to get the interval number for +# the data source. +warn_email guilherme.chehab at tco.net.br +late_interval interval + 30 + +# This defines where the find the source data files and the format of +# those files. Notes about the fields: +# find_files +# You'll notice that all but the first () has the form (?:...). +# This tells Perl to match the expression but not save the matched +# text in the $1, $2, variables. Orca uses the matched text to +# generate a subgroup name, which is used to place files into +# different subgroups. Here, only the hostname should be used to +# generate a subgroup name, hence all the (?:...) for matching +# anything else. +# interval +# The interval here must match the interval used by orcallator to +# record data. Do not change this, as it has an effect on the +# generated RRD data files. + +group orcallator { +find_files /usr/local/var/orca/procallator/(.*)/(?:(?:procallator)|(?:proccol))-\d{4}-\d{2}-\d{2}(?:\.(?:Z|gz|bz2))? +column_description first_line +date_source column_name timestamp +date_format %s +interval 300 +reopen 1 +filename_compare sub { + my ($ay, $am, $ad) = $a =~ /-(\d{4})-(\d\d)-(\d\d)/; + my ($by, $bm, $bd) = $b =~ /-(\d{4})-(\d\d)-(\d\d)/; + if (my $c = (( $ay <=> $by) || + ( $am <=> $bm) || + (($ad >> 3) <=> ($bd >> 3)))) { + return 2*$c; + } + $ad <=> $bd; + } +} + +html_top_title Estado dos servidores TCO/NBT + +html_page_header + + + +html_page_footer + + + Estes gráficos foram gerados Blair Zajac?s ORCA, and Guilherme Chehab?s Procallator + + + +plot { +title %g Average # Processes in Run Queue (Load Average) & number pf CPUs +source orcallator +data 1runq +data 5runq +data 15runq +data ncpus +color 00ff00 +color 0000ff +color ff00ff +color ff0000 +line_type LINE1 +line_type LINE1 +line_type LINE1 +line_type LINE2 +legend 1 minute average +legend 5 minute average +legend 15 minute average +legend CPUs (load threshold) +y_legend Number of processes and CPUs + +data_min 0 +data_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#processes_in_run_queue +} + +plot { +title %g CPU Usage +source orcallator +data usr% +data sys% +data nice% +data 100 - usr% - sys% - nice% +line_type area +line_type stack +line_type stack +line_type stack +legend User +legend System +legend nice +legend Idle +y_legend Percent +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +rigid_min_max 1 +color 00ff00 +color 0000ff +color ff0000 +color ffffd0 +href http://www.orcaware.com/orca/docs/orcallator.html#cpu_usage +} + +plot { +title %g New Process Spawn Rate +source orcallator +data #proc/s +line_type area +line_type line1 +legend 5 min average +y_legend New processes/s +data_min 0 +data_max 100000 +href http://www.orcaware.com/orca/docs/orcallator.html#new_process_spawn_rate +} + +plot { +title %g Number of System & running Processes on cpu +source orcallator +data #proc +data #proc_oncpu +line_type line1 +line_type area +legend System total +legend Running +y_legend Number Processes +data_min 0 +data_max 10000 +color 0000ff +color 00ff00 +href http://www.orcaware.com/orca/docs/orcallator.html#number_system_processes +} + +plot { +title %g Web Server Hit Rate +source orcallator +data httpop/s +data http/p5s +line_type area +line_type line1 +legend 5 min average hits/s +legend Peak 5 second hits/s +y_legend Hits/s +data_min 0 +color 00ff00 +color 0000ff +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_hit_rate +} + +plot { +title %g Web Server File Size +source orcallator +data %to1KB +data %to10KB +data %to100KB +data %to1MB +data %over1MB +line_type area +line_type stack +line_type stack +line_type stack +line_type stack +legend 0 - 1 KB +legend 1 - 10 KB +legend 10 - 100 KB +legend 100 - 1000 KB +legend Greater than 1 MB +y_legend Percent +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +rigid_min_max 1 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_file_size +} + +plot { +title %g Web Server Data Transfer Rate +source orcallator +data httpb/s +line_type area +legend Bytes/s +y_legend Bytes/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_data_transfer_rate +} + +plot { +title %g Web Server HTTP Error Rate +source orcallator +data htErr/s +line_type area +legend HTTP errors/s +y_legend Errors/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_error_rate +} + +plot { +title %g Page ins & outs rate +source orcallator +data pages_in +data pages_out +legend pages in/s +legend pages out/s +y_legend Pages/s +data_min 0 +} + +plot { +title %g Swap ins & outs rate +source orcallator +data swap_in +data swap_out +legend Swap in/s +legend Swap out/s +y_legend Pages/s +data_min 0 +} + +plot { +title %g Context switches & Interrupts rate +source orcallator +data ctxt/s +data intr/s +legend Context switches +legend Interrupts +y_legend rate/s +data_min 0 +} + + +plot { +title %g Interface Input Bits Per Second +source orcallator +data 8 * if_in_b_(.*) +line_type line1 +legend $1 +y_legend Bits/s +data_min 0 +data_max 100000000 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +} + +plot { +title %g Interface Ouput Bits Per Second +source orcallator +data 8 * if_out_b_(.*) +line_type line1 +legend $1 +y_legend Bits/s +data_min 0 +data_max 100000000 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +} + +plot { +title %g Interface Input Packets Per Second +source orcallator +data if_in_p_(.*) +line_type line1 +legend $1 +y_legend Packets/s +data_min 0 +data_max 100000 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_packets_per_second +} + +plot { +title %g Interface Output Packets Per Second +source orcallator +data if_out_p_(.*) +line_type line1 +legend $1 +y_legend Packets/s +data_min 0 +data_max 100000 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_packets_per_second +} + +plot { +title %g Interface Input Errors Per Second +source orcallator +data if_in_e_(.*) +line_type line1 +legend $1 +y_legend Errors/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_errors_per_second +} + +plot { +title %g Interface Output Errors Per Second +source orcallator +data if_out_e_(.*) +line_type line1 +legend $1 +y_legend Errors/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_errors_per_second +} + +plot { +title %g Interface Input Dropped Per Second +source orcallator +data if_in_d_(.*) +line_type line1 +legend $1 +y_legend Errors/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_deferred_packet_rate +} + +plot { +title %g Interface Output Dropped Per Second +source orcallator +data if_out_d_(.*) +line_type line1 +legend $1 +y_legend Errors/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_deferred_packet_rate +} + +plot { +title %g Interface Output Collisions +source orcallator +data if_out_cl_(.*) +line_type area +legend $1 +y_legend Percent +data_min 0 +data_max 200 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_collisions +} + +plot { +title %g Interface Output Carrier Losses +source orcallator +data if_out_ca_(.*) +line_type area +legend $1 +y_legend Percent +data_min 0 +data_max 200 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_collisions +} + +plot { +title %g TCP Current connections +source orcallator +data gTcp_(.*) +legend Connections +y_legend Connections +data_min 0 +flush_regexps 1 +} + +plot { +title %g IP statistics +source orcallator +data Ip_(.*) +legend $1 rate +y_legend rate +data_min 0 +flush_regexps 1 +} + +plot { +title %g TCP statistics +source orcallator +data Tcp_(.*) +legend $1 rate +y_legend rate +data_min 0 +flush_regexps 1 +} + +plot { +title %g ICMP statistics +source orcallator +data Icmp_(.*) +legend $1 rate +y_legend rate +data_min 0 +flush_regexps 1 +} + +plot { +title %g UDP statistics +source orcallator +data Udp_(.*) +legend $1 rate +y_legend rate +data_min 0 +flush_regexps 1 +} + +plot { +title %g NFS Server Statistics +source orcallator +data nfs_s_(.*) +line_type line1 +legend $1/s +y_legend rate +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_rate +} + +plot { +title %g NFS Client Statistics +source orcallator +data nfs_c_(.*) +line_type line1 +legend $1/s +y_legend rate +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_rate +} + +plot { +title %g Disk System Wide Reads/Writes Per Second +source orcallator +data disk_rd/s +data disk_wr/s +line_type area +line_type line1 +legend Reads/s +legend Writes/s +y_legend Ops/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_reads_writes_per_second +} + +plot { +title %g Disk System Wide Transfer Rate +source orcallator +data disk_rB/s +data disk_wB/s +line_type area +line_type line1 +legend Read transfer rate +legend Write transfer rate +y_legend Block/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_transfer_rate +} + +plot { +title %g Disk Reads/Writes Per Second +source orcallator +data disk_rd_(.*)/s +data disk_wr_(.*)/s +line_type area +line_type line1 +legend $1 Reads/s +legend $1 Writes/s +y_legend Ops/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_reads_writes_per_second +} + +plot { +title %g Disk Transfer Rate +source orcallator +data disk_rB_(.*)/s +data disk_wB_(.*)/s +line_type area +line_type line1 +legend $1 Read transfer rate +legend $1 Write transfer rate +y_legend Block/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_transfer_rate +} + + + +plot { +title %g Disk Space Percent Usage +source orcallator +data mnt_(.*) +line_type line1 +legend $1 +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_space_percent_usage +} + +plot { +title %g Physical Memory usage percent +source orcallator +data mem_used% +data mem_free% +data mem_shrd% +data mem_buff% +data mem_cchd% +line_type area +line_type stack +line_type line1 +line_type stack +line_type stack +legend Used memory +legend Free memory +legend shared memory +legend buffer memory +legend cached memory +y_legend percent +data_min 0 +data_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#memory_free +} + +plot { +title %g Swap usage percent +source orcallator +data swp_used% +data swp_free% +line_type area +line_type stack +legend Used swap +legend Free swap +y_legend percent +data_min 0 +data_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#memory_free +} + + +plot { +title %g Memory Page Scan Rate +source orcallator +data scanrate +line_type area +legend Page scan rate +y_legend Pages/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#page_scan_rate +} + +plot { +title %g Memory Page Residence Time +source orcallator +data page_rstim +line_type area +legend Page residence time +y_legend Seconds +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#page_residence_time +} + +plot { +title %g Memory Available Swap Space +source orcallator +data 1024 * swap_avail +line_type area +legend Available swap space +y_legend Bytes +base 1024 +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#available_swap_space +} + +plot { +title %g Memory Page Usage +source orcallator +data pp_kernel +data free_pages +data pagestotl - pp_kernel - free_pages +data pagestotl +line_type area +line_type stack +line_type stack +line_type line1 +legend Kernel +legend Free list +legend Other +legend System total +y_legend Number Of Pages +data_min 0 +plot_min 0 +color 00ff00 +color ff0000 +color 0000ff +href http://www.orcaware.com/orca/docs/orcallator.html#page_usage +} + +plot { +title %g Memory Pages Locked & IO +source orcallator +data pageslock +data pagesio +line_type area +line_type line1 +legend Locked +legend IO +y_legend Number Of Pages +data_min 0 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#pages_locked_IO +} Added: trunk/orca/contrib/procallator/procallator.pl.in ============================================================================== --- trunk/orca/contrib/procallator/procallator.pl.in (original) +++ trunk/orca/contrib/procallator/procallator.pl.in 2002-11-09 12:30:44.000000000 -0800 @@ -0,0 +1,550 @@ +#!/usr/bin/perl -w +# +# collector for /proc statistics for use with Linux 2.2 and 2.4 kernels. +# +# Copyright (C) 2001 Guilherme Carvalho Chehab. All Rights Reserved. +# +# Config variables +#$PROC="./linux-2.2"; # Proc directory, usually /proc +$PROC="/proc"; # Proc directory, usually /proc +$INTERVAL=300; # Interval between each measure, in seconds +$COMPRESS="/usr/bin/gzip"; # Compressor... +$HOSTNAME=`/bin/hostname`; +chomp $HOSTNAME; +$DEST_DIR="/usr/local/var/orca/$HOSTNAME"; # Destination dir for output files +#$DEST_DIR="/tmp"; # Destination dir for output files + +# Initializations +$r=0; # Rotating indice for measuring counter differences +$rate_ok=0; # Check if is ok to calculate rates + +# Create output dir if needed +if (! -d $DEST_DIR ) { + `mkdir -p $DEST_DIR`; +} + +# Read kernel version +open (F_VERSION, "<$PROC/version"); +($os,$line,$version)=split / +/ , , 4; +close (F_VERSION); + +# Main loop +do { + # Wait for the next INTERVAL + sleep ($INTERVAL-time() % $INTERVAL); + + # Loop initializations + $n_cols[$r]=0; + + # Get Local time & uptime + $timestamp=time(); + ($sec,$min,$hour,$mday,$mon,$year,$yday,$isdst)=localtime($timestamp); + $mon+=1; + $year+=1900; + $locltime=sprintf "%02d:%02d:%02d", $hour,$min,$sec; + open (F_UPTIME,"<$PROC/uptime"); + ($uptime)=split / +/,; + close (F_UPTIME); + + # insert in output table + put_output("timestamp",$timestamp,"locltime",$locltime,"uptime",$uptime); + + # Evaluate filename + $out_filename[$r]=sprintf "%s/proccol-%04d-%02d-%02d",$DEST_DIR, $year,$mon,$mday; + + # Read load average + open (F_LOADAVG, "<$PROC/loadavg"); + ($runq_1, $runq_5, $runq_15, $proc_run, $procs[$r], $last_pid)=split / +|\//, ; + chomp $last_pid; + close (F_LOADAVG); + put_output ( "1runq",$runq_1, + "5runq",$runq_5, + "15runq",$runq_15, + "#proc_oncpu",$proc_run, + "#proc",$procs[$r], + "#proc/s",rate(@procs) + ); + + # Read system stats + open (F_STAT, "<$PROC/stat"); + $n_cpus=0; + while ( $line= ) { + chomp ($line); + if ( $line=~/cpu[0-9]*/ ) { + ($cpu[$r][$n_cpus], $usr[$r][$n_cpus], $nice[$r][$n_cpus], $sys[$r][$n_cpus], $idle[$r][$n_cpus])= split / +/,$line; + $total[$r][$n_cpus]= $usr[$r][$n_cpus] + $nice[$r][$n_cpus] + $sys[$r][$n_cpus] + $idle[$r][$n_cpus]; + $n_cpus++; + } + if ( $line=~/page/) { + ($dumb, $page_in[$r], $page_out[$r])= split / +/,$line; + } + if ( $line=~/swap/) { + ($dumb, $swap_in[$r], $swap_out[$r])= split / +/,$line; + } + if ( $line=~/ctxt/) { + ($dumb, $ctxt[$r])= split / +/,$line; + } + if ( $line=~/intr/) { + @dumb=split / /,$line; + $intr[$r]=0; + $i=1; + while ($i<@dumb) { + $intr[$r]+=$dumb[$i]; + $i++; + } + } + + # Linux 2.4 style I/O report + if ( $line=~/disk_io/ ) { + @dsk=0; + $i=0; + ($dsk_stat_t[$r],$dsk_rio_t[$r],$dsk_rblk_t[$r],$dsk_wio_t[$r],$dsk_wblk_t[$r])=(0,0,0,0); + + ($dumb, $line)= split /: /,$line; + $n_dsk=@dsk= split / /,$line; + + while ($i<$n_dsk) { + ( $dumb, + $dsk_maj[$r][$i],$dsk_min[$r][$i], + $dsk_stat[$r][$i], + $dsk_rio[$r][$i],$dsk_rblk[$r][$i], + $dsk_wio[$r][$i],$dsk_wblk[$r][$i] + ) = split /[^0-9]+/,$dsk[$i]; + $dsk_stat_t[$r]+=$dsk_stat[$r][$i]; + $dsk_rio_t[$r] +=$dsk_rio[$r][$i]; + $dsk_rblk_t[$r]+=$dsk_rblk[$r][$i]; + $dsk_wio_t[$r] +=$dsk_wio[$r][$i]; + $dsk_wblk_t[$r]+=$dsk_wblk[$r][$i]; + $i++; + } + } + + # Linux 2.2 style I/O report, they are strangely limited to first 4 disks + if ( $line=~/disk / ) { + @dumb=split / /,$line; + $dsk_stat_t[$r]=0; + $i=1; + while ($i<@dumb) { + $dsk_stat_t[$r]+=$dumb[$i]; + $i++; + } + } + if ( $line=~/disk_rio / ) { + @dumb=split / /,$line; + $dsk_rio_t[$r]=0; + $i=1; + while ($i<@dumb) { + $dsk_rio_t[$r]+=$dumb[$i]; + $i++; + } + } + if ( $line=~/disk_wio / ) { + @dumb=split / /,$line; + $dsk_wio_t[$r]=0; + $i=1; + while ($i<@dumb) { + $dsk_wio_t[$r]+=$dumb[$i]; + $i++; + } + } + if ( $line=~/disk_rblk / ) { + @dumb=split / /,$line; + $dsk_rblk_t[$r]=0; + $i=1; + while ($i<@dumb) { + $dsk_rblk_t[$r]+=$dumb[$i]; + $i++; + } + } + if ( $line=~/disk_wblk / ) { + @dumb=split / /,$line; + $dsk_wblk_t[$r]=0; + $i=1; + while ($i<@dumb) { + $dsk_wblk_t[$r]+=$dumb[$i]; + $i++; + } + } + } + + # Operate percentuals and rates for system Stats + for ($i=0;$i<$n_cpus ;$i++) { + $usr_100 [$i]=rate_prcnt($usr [$r][$i],$usr [1-$r][$i],$total[$r][$i],$total[1-$r][$i]); + $nice_100[$i]=rate_prcnt($nice[$r][$i],$nice[1-$r][$i],$total[$r][$i],$total[1-$r][$i]); + $sys_100 [$i]=rate_prcnt($sys [$r][$i],$sys [1-$r][$i],$total[$r][$i],$total[1-$r][$i]); + $idle_100[$i]=rate_prcnt($idle[$r][$i],$idle[1-$r][$i],$total[$r][$i],$total[1-$r][$i]); + if ($i==0) { + put_output("ncpus",$n_cpus-1,"usr%",$usr_100 [$i],"nice%",$nice_100[$i],"sys%",$sys_100 [$i],"wait%",$idle_100[$i]); + } else { + if ($n_cpus>2) { + put_output("usr_%_$i",$usr_100 [$i],"nice_%_$i",$nice_100[$i],"sys_%_$i",$sys_100 [$i],"wait_%_$i",$idle_100[$i]); + } + } + } + + put_output ( "pages_in",rate(@page_in), + "pages_out",rate(@page_out), + "swap_in",rate(@swap_in), + "swap_out",rate(@swap_out), + "ctxt/s",rate(@ctxt), + "intr/s",rate (@intr) + ); + + put_output ( "disk_op/s",rate(@dsk_stat_t), + "disk_rd/s",rate(@dsk_rio_t), + "disk_wr/s",rate(@dsk_wio_t), + "disk_rB/s",rate(@dsk_rblk_t), + "disk_wB/s",rate(@dsk_wblk_t) + ); + + if ( $version=~/^2\.4/ ) { + for ($i=0; $i<$n_dsk; $i++) { + $dumb="c$dsk_maj[$r][$i]_d$dsk_min[$r][$i]"; + put_output("disk_op_$dumb/s",rate($dsk_stat[$r][$i],$dsk_stat[1-$r][$i]), + "disk_rd_$dumb/s",rate($dsk_rio[$r][$i], $dsk_rio[1-$r][$i]), + "disk_wr_$dumb/s",rate($dsk_wio[$r][$i], $dsk_wio[1-$r][$i]), + "disk_rB_$dumb/s",rate($dsk_rblk[$r][$i],$dsk_rblk[1-$r][$i]), + "disk_wB_$dumb/s",rate($dsk_wblk[$r][$i],$dsk_wblk[1-$r][$i]) + ); + } + } + close (F_STAT); + + # Get filesystem ocupation + @df=`/bin/df -k`; + for ($i=1,$j=0;$df[$i];$i++) { + if (!(($df[$i]=~/cdrom/)||($df[$i]=~/cdrom/))) { + chomp $df[$i]; + ($dumb, $fs[2][$j], $fs[3][$j], $dumb, $dumb, $fs[0][$j])= split / +/,$df[$i]; + $fs[1][$j]=prcnt($fs[3][$j],$fs[2][$j]); + put_output("mnt_$fs[0][$j]",$fs[1][$j]); + $j++; + } + } + $n_fs=$j; + + # Get memory ocupation + open (F_MEMINFO, "<$PROC/meminfo"); + ; + ($dumb, $mem_total,$mem_used,$mem_free,$mem_shrd,$mem_buff,$mem_cchd)=split /[^0-9]+/,; + ($dumb, $swp_total,$swp_used,$swp_free)=split /[^0-9]+/,; + close (F_MEMINFO); + put_output ( "mem_used%",prcnt($mem_used,$mem_total), + "mem_free%",prcnt($mem_free,$mem_total), + "mem_shrd%",prcnt($mem_shrd,$mem_total), + "mem_buff%",prcnt($mem_buff,$mem_total), + "mem_cchd%",prcnt($mem_cchd,$mem_total), + "swp_free%",prcnt($swp_free,$swp_total), + "swp_used%",prcnt($swp_used,$swp_total) + ); + + # Get network interface statistics + open (F_NET_DEV, "<$PROC/net/dev"); + $i=0; + while ($line=) { + if ($line=~/:/) { + ($if_name[$i][$r],$line)=split /: */,$line; + ($dumb, $if_name[$i][$r])=split /^ +/,$if_name[$i][$r]; + ( $if_in_b[$i][$r], $if_in_p[$i][$r], + $if_in_e[$i][$r], $if_in_d[$i][$r], + $if_in_ff[$i][$r], $if_in_fr[$i][$r], + $if_in_c[$i][$r], $if_in_m[$i][$r], + $if_out_b[$i][$r], $if_out_p[$i][$r], + $if_out_e[$i][$r], $if_out_d[$i][$r], + $if_out_ff[$i][$r],$if_out_cl[$i][$r], + $if_out_ca[$i][$r], $if_out_cp[$i][$r] + ) = split / +/,$line; + put_output ( "if_in_b_$if_name[$i][$r]", rate ($if_in_b[$i][$r] ,$if_in_b[$i][1-$r]), + "if_in_p_$if_name[$i][$r]", rate ($if_in_p[$i][$r],$if_in_p[$i][1-$r]), + "if_in_e_$if_name[$i][$r]", rate ($if_in_e[$i][$r],$if_in_e[$i][1-$r]), + "if_in_d_$if_name[$i][$r]", rate ($if_in_d[$i][$r],$if_in_d[$i][1-$r]), + "if_in_ff_$if_name[$i][$r]", rate ($if_in_ff[$i][$r],$if_in_ff[$i][1-$r]), + "if_in_fr_$if_name[$i][$r]", rate ($if_in_fr[$i][$r],$if_in_fr[$i][1-$r]), + "if_in_c_$if_name[$i][$r]", rate ($if_in_c[$i][$r],$if_in_c[$i][1-$r]), + "if_in_m_$if_name[$i][$r]", rate ($if_in_m[$i][$r],$if_in_m[$i][1-$r]), + "if_out_b_$if_name[$i][$r]", rate ($if_out_b[$i][$r],$if_out_b[$i][1-$r]), + "if_out_p_$if_name[$i][$r]", rate ($if_out_p[$i][$r],$if_out_p[$i][1-$r]), + "if_out_e_$if_name[$i][$r]", rate ($if_out_e[$i][$r],$if_out_e[$i][1-$r]), + "if_out_d_$if_name[$i][$r]", rate ($if_out_d[$i][$r],$if_out_d[$i][1-$r]), + "if_out_ff_$if_name[$i][$r]",rate ($if_out_ff[$i][$r],$if_out_ff[$i][1-$r]), + "if_out_cl_$if_name[$i][$r]",rate ($if_out_cl[$i][$r],$if_out_cl[$i][1-$r]), + "if_out_ca_$if_name[$i][$r]",rate ($if_out_ca[$i][$r],$if_out_ca[$i][1-$r]), + "if_out_cp_$if_name[$i][$r]",rate ($if_out_cp[$i][$r],$if_out_cp[$i][1-$r]) + ); + + $i++; + } + } + $n_nets=$i; + + # Get TCP/IP statistics + open (F_SNMP, "<$PROC/net/snmp"); + $j=0; + while ($line=) { + $line2=; + chomp $line; + chomp $line2; + ($cat,$line) = split /: +/,$line; + ($dumb,$line2)=split /: +/,$line2; + (@dumb) =split / +/,$line; + (@dumb2)=split / +/,$line2; + for ($i=0; $dumb[$i]; $i++, $j++) { + $net_parm[0][$j]=sprintf "%s_%s",$cat,$dumb[$i]; + $net_parm[2+$r][$j]= $dumb2[$i]; + $net_parm[1][$j]= rate ($net_parm[2+$r][$j],$net_parm[3-$r][$j]); + SWITCH: { + if ($cat=~/Ip/) { + if ($net_parm[0][$j]=~/In|Out|Forw|Reasm|Frag/) { + put_output("$net_parm[0][$j]",$net_parm[1][$j]); + }; + last SWITCH; + } + if ($cat=~/Icmp/) { + put_output("$net_parm[0][$j]",$net_parm[1][$j]); + last SWITCH; + } + if ($cat=~/Udp/) { + put_output("$net_parm[0][$j]",$net_parm[1][$j]); + last SWITCH; + } + if ($cat=~/Tcp/) { + if ($net_parm[0][$j]=~/Rto|Max/) { last SWITCH; } + if ($net_parm[0][$j]=~/CurrEstab/) { + put_output("g$net_parm[0][$j]",$net_parm[2+$r][$j]); + last SWITCH; + } + put_output("$net_parm[0][$j]",$net_parm[1][$j]); + last SWITCH; + }; + } + } + } + $net_parms=$j; + + # Get NFS Client statistics + if ( -f "$PROC/net/rpc/nfs") { + open (F_NFS, "<$PROC/net/rpc/nfs"); + while ($line=) { + + if ($line=~/rpc/) { + ($dumb,$nfs_c_rpc_calls[$r],$nfs_c_rpc_retrs[$r],$nfs_c_rpc_auth[$r])=split / +/,$line; + put_output( "nfs_c_rpc_calls", rate(@nfs_c_rpc_calls), + "nfs_c_rpc_retrs", rate(@nfs_c_rpc_retrs), + "nfs_c_rpc_auth", rate(@nfs_c_rpc_auth) + ); + } + + if ($line=~/proc2/) { + ( $dumb,$dumb,$dumb, $nfs_c_p2_getattr[$r], $nfs_c_p2_setattr[$r], $nfs_c_p2_root[$r], + $nfs_c_p2_lookup[$r], $nfs_c_p2_readlink[$r], $nfs_c_p2_read[$r], $nfs_c_p2_wrcache[$r], + $nfs_c_p2_write[$r], $nfs_c_p2_create[$r], $nfs_c_p2_remove[$r], $nfs_c_p2_rename[$r], + $nfs_c_p2_link[$r], $nfs_c_p2_symlink[$r], $nfs_c_p2_mkdir[$r], $nfs_c_p2_rmdir[$r], + $nfs_c_p2_readdir[$r], $nfs_c_p2_fsstat[$r] + ) = split / +/,$line; + + put_output( "nfs_c_p2_getattr", rate(@nfs_c_p2_getattr), + "nfs_c_p2_setattr", rate(@nfs_c_p2_setattr), + "nfs_c_p2_root", rate(@nfs_c_p2_root), + "nfs_c_p2_lookup", rate(@nfs_c_p2_lookup), + "nfs_c_p2_readlink", rate(@nfs_c_p2_readlink), + "nfs_c_p2_read", rate(@nfs_c_p2_read), + "nfs_c_p2_wrcache", rate(@nfs_c_p2_wrcache), + "nfs_c_p2_write", rate(@nfs_c_p2_write), + "nfs_c_p2_create", rate(@nfs_c_p2_create), + "nfs_c_p2_remove", rate(@nfs_c_p2_remove), + "nfs_c_p2_rename", rate(@nfs_c_p2_rename), + "nfs_c_p2_link", rate(@nfs_c_p2_link), + "nfs_c_p2_symlink", rate(@nfs_c_p2_symlink), + "nfs_c_p2_mkdir", rate(@nfs_c_p2_mkdir), + "nfs_c_p2_rmdir", rate(@nfs_c_p2_rmdir), + "nfs_c_p2_readdir", rate(@nfs_c_p2_readdir), + "nfs_c_p2_fsstat", rate(@nfs_c_p2_fsstat) + ); + } + if ($line=~/proc3/) { + ( $dumb,$dumb,$dumb, $nfs_c_p3_getattr[$r], $nfs_c_p3_setattr[$r], $nfs_c_p3_lookup[$r], + $nfs_c_p3_access[$r], $nfs_c_p3_readlink[$r], $nfs_c_p3_read[$r], $nfs_c_p3_write[$r], + $nfs_c_p3_create[$r], $nfs_c_p3_mkdir[$r], $nfs_c_p3_symlink[$r], $nfs_c_p3_mknod[$r], + $nfs_c_p3_remove[$r], $nfs_c_p3_rmdir[$r], $nfs_c_p3_rename[$r], $nfs_c_p3_link[$r], + $nfs_c_p3_readdir[$r], $nfs_c_p3_readdirplus[$r],$nfs_c_p3_fsstat[$r], $nfs_c_p3_fsinfo[$r], + $nfs_c_p3_pathconf[$r], $nfs_c_p3_commit[$r] + )=split / +/,$line; + + put_output( "nfs_c_p3_getattr", rate(@nfs_c_p3_getattr), + "nfs_c_p3_setattr", rate(@nfs_c_p3_setattr), + "nfs_c_p3_lookup", rate(@nfs_c_p3_lookup), + "nfs_c_p3_access", rate(@nfs_c_p3_access), + "nfs_c_p3_readlink", rate(@nfs_c_p3_readlink), + "nfs_c_p3_read", rate(@nfs_c_p3_read), + "nfs_c_p3_write", rate(@nfs_c_p3_write), + "nfs_c_p3_create", rate(@nfs_c_p3_create), + "nfs_c_p3_mkdir", rate(@nfs_c_p3_mkdir), + "nfs_c_p3_symlink", rate(@nfs_c_p3_symlink), + "nfs_c_p3_mknod", rate(@nfs_c_p3_mknod), + "nfs_c_p3_remove", rate(@nfs_c_p3_remove), + "nfs_c_p3_rmdir", rate(@nfs_c_p3_rmdir), + "nfs_c_p3_rename", rate(@nfs_c_p3_rename), + "nfs_c_p3_link", rate(@nfs_c_p3_link), + "nfs_c_p3_readdir", rate(@nfs_c_p3_readdir), + "nfs_c_p3_readdirplus", rate(@nfs_c_p3_readdirplus), + "nfs_c_p3_fsstat", rate(@nfs_c_p3_fsstat), + "nfs_c_p3_fsinfo", rate(@nfs_c_p3_fsinfo), + "nfs_c_p3_pathconf", rate(@nfs_c_p3_pathconf), + "nfs_c_p3_commit", rate(@nfs_c_p3_commit) + ); + } + } + } + + # Get NFS Server statistics + if ( -f "$PROC/net/rpc/nfsd") { + open (F_NFS, "<$PROC/net/rpc/nfsd"); + while ($line=) { + + if ($line=~/rpc/) { + ( $dumb,$nfs_s_rpc_calls[$r], $nfs_s_rpc_badcalls[$r], + $nfs_s_rpc_badauth[$r], $nfs_s_rpc_badclnt[$r], $nfs_s_rpc_xdrcall[$r] + )=split / +/,$line; + put_output( "nfs_s_rpc_calls", rate(@nfs_s_rpc_calls), + "nfs_s_rpc_badcalls", rate(@nfs_s_rpc_badcalls), + "nfs_s_rpc_badauth", rate(@nfs_s_rpc_badauth), + "nfs_s_rpc_badclnt", rate(@nfs_s_rpc_badclnt), + "nfs_s_rpc_xdrcall", rate(@nfs_s_rpc_xdrcall) + ); + } + + if ($line=~/proc2/) { + ( $dumb,$dumb,$dumb, $nfs_s_p2_getattr[$r], $nfs_s_p2_setattr[$r], $nfs_s_p2_root[$r], + $nfs_s_p2_lookup[$r], $nfs_s_p2_readlink[$r], $nfs_s_p2_read[$r], $nfs_s_p2_wrcache[$r], + $nfs_s_p2_write[$r], $nfs_s_p2_create[$r], $nfs_s_p2_remove[$r], $nfs_s_p2_rename[$r], + $nfs_s_p2_link[$r], $nfs_s_p2_symlink[$r], $nfs_s_p2_mkdir[$r], $nfs_s_p2_rmdir[$r], + $nfs_s_p2_readdir[$r], $nfs_s_p2_fsstat[$r] + ) = split / +/,$line; + + put_output( "nfs_s_p2_getattr", rate(@nfs_s_p2_getattr), + "nfs_s_p2_setattr", rate(@nfs_s_p2_setattr), + "nfs_s_p2_root", rate(@nfs_s_p2_root), + "nfs_s_p2_lookup", rate(@nfs_s_p2_lookup), + "nfs_s_p2_readlink", rate(@nfs_s_p2_readlink), + "nfs_s_p2_read", rate(@nfs_s_p2_read), + "nfs_s_p2_wrcache", rate(@nfs_s_p2_wrcache), + "nfs_s_p2_write", rate(@nfs_s_p2_write), + "nfs_s_p2_create", rate(@nfs_s_p2_create), + "nfs_s_p2_remove", rate(@nfs_s_p2_remove), + "nfs_s_p2_rename", rate(@nfs_s_p2_rename), + "nfs_s_p2_link", rate(@nfs_s_p2_link), + "nfs_s_p2_symlink", rate(@nfs_s_p2_symlink), + "nfs_s_p2_mkdir", rate(@nfs_s_p2_mkdir), + "nfs_s_p2_rmdir", rate(@nfs_s_p2_rmdir), + "nfs_s_p2_readdir", rate(@nfs_s_p2_readdir), + "nfs_s_p2_fsstat", rate(@nfs_s_p2_fsstat) + ); + } + if ($line=~/proc3/) { + ( $dumb,$dumb,$dumb, $nfs_s_p3_getattr[$r], $nfs_s_p3_setattr[$r], $nfs_s_p3_lookup[$r], + $nfs_s_p3_access[$r], $nfs_s_p3_readlink[$r], $nfs_s_p3_read[$r], $nfs_s_p3_write[$r], + $nfs_s_p3_create[$r], $nfs_s_p3_mkdir[$r], $nfs_s_p3_symlink[$r], $nfs_s_p3_mknod[$r], + $nfs_s_p3_remove[$r], $nfs_s_p3_rmdir[$r], $nfs_s_p3_rename[$r], $nfs_s_p3_link[$r], + $nfs_s_p3_readdir[$r], $nfs_s_p3_readdirplus[$r],$nfs_s_p3_fsstat[$r], $nfs_s_p3_fsinfo[$r], + $nfs_s_p3_pathconf[$r], $nfs_s_p3_commit[$r] + )=split / +/,$line; + + put_output( "nfs_s_p3_getattr", rate(@nfs_s_p3_getattr), + "nfs_s_p3_setattr", rate(@nfs_s_p3_setattr), + "nfs_s_p3_lookup", rate(@nfs_s_p3_lookup), + "nfs_s_p3_access", rate(@nfs_s_p3_access), + "nfs_s_p3_readlink", rate(@nfs_s_p3_readlink), + "nfs_s_p3_read", rate(@nfs_s_p3_read), + "nfs_s_p3_write", rate(@nfs_s_p3_write), + "nfs_s_p3_create", rate(@nfs_s_p3_create), + "nfs_s_p3_mkdir", rate(@nfs_s_p3_mkdir), + "nfs_s_p3_symlink", rate(@nfs_s_p3_symlink), + "nfs_s_p3_mknod", rate(@nfs_s_p3_mknod), + "nfs_s_p3_remove", rate(@nfs_s_p3_remove), + "nfs_s_p3_rmdir", rate(@nfs_s_p3_rmdir), + "nfs_s_p3_rename", rate(@nfs_s_p3_rename), + "nfs_s_p3_link", rate(@nfs_s_p3_link), + "nfs_s_p3_readdir", rate(@nfs_s_p3_readdir), + "nfs_s_p3_readdirplus", rate(@nfs_s_p3_readdirplus), + "nfs_s_p3_fsstat", rate(@nfs_s_p3_fsstat), + "nfs_s_p3_fsinfo", rate(@nfs_s_p3_fsinfo), + "nfs_s_p3_pathconf", rate(@nfs_s_p3_pathconf), + "nfs_s_p3_commit", rate(@nfs_s_p3_commit) + ); + } + } + } + + + # flush output + flush_output(); + + $r=1-$r; + $rate_ok=1; + +} while (1); + +# to perl dont complain on unused vars +($os,$n_fs,$net_parms,$n_nets,$cpu,$yday,$isdst)=($os,$n_fs,$net_parms,$n_nets,$cpu,$yday,$isdst); + +sub rate { + my ($a,$b) = @_; + my $c; + $c= (!($a&&$b))?0:((abs($a-$b)%$INTERVAL)==0)?abs($a-$b)/$INTERVAL:sprintf("%.3f",abs($a-$b)/$INTERVAL); + return $c; +} + +sub prcnt { + my ($a,$b) = @_; + return ($b==0) ? 0 : sprintf ("%.2f",100 * $a / $b); +} + +sub rate_prcnt { + my ($a1,$a2,$b1,$b2) = @_; + if (!($a1&&$b1&&$a2&&$b2)) { + return 0; + } + + return (abs($b1-$b2)==0)?0:sprintf ("%.2f",100*abs($a1-$a2)/abs($b1-$b2)); +} + +sub flush_output { + my $t; + + # check if new file is not required + open (F_OUT,">>$out_filename[$r]") or die "Could not open output"; + + if (!$rate_ok) { + for ($t=0;$t<$n_cols[$r];$t++) { + print F_OUT $out [0][$t]," "; + } + print F_OUT "\n"; + } else { + if ( ($n_cols[$r]!=$n_cols[1-$r]) || ($out_filename[$r] ne $out_filename[1-$r]) || $rate_ok==0 ) { + for ($t=0;$t<$n_cols[$r];$t++) { + print F_OUT $out [0][$t]," "; + } + print F_OUT "\n"; + } + if ($out_filename[$r] ne $out_filename[1-$r]) { + `$COMPRESS $out_filename[1-$r]`; + } + } + + for ($t=0;$t<$n_cols[$r];$t++) { + print F_OUT $out [1][$t]," "; + } + print F_OUT "\n"; + close F_OUT; + + @out=(); +} +sub put_output { + my (@a) = @_; + my $t; + + for ($t=0;$a[$t];$t+=2,$n_cols[$r]+=1) { + $out [0][$n_cols[$r]]=$a[$t]; + $out [1][$n_cols[$r]]=$a[$t+1]; + } +} Added: trunk/orca/contrib/procallator/procallator ============================================================================== --- trunk/orca/contrib/procallator/procallator (original) +++ trunk/orca/contrib/procallator/procallator 2002-11-09 12:30:44.000000000 -0800 @@ -0,0 +1,31 @@ +#!/bin/sh +# +# procallator Script to load procallator at time. +# +# Author Guilherme Carvalho Chehab +# + +# Source function library. +. /etc/init.d/functions + +# See how we were called. +case "$1" in + start) + if [ -f /usr/local/bin/procallator.pl ]; then + action "Initializing procalator statistics colector " /usr/local/bin/procallator.pl & + fi + + ;; + stop) + action "Stoping procallator" kill `ps -ef | grep procallat | grep -v grep | tr -s " " | cut -f 2 -d " "` + + ;; + *) + # do not advertise unreasonable commands that there is no reason + # to use with this device + echo "Usage: procallator {start|stop}" + exit 1 +esac + +exit 0 + Added: trunk/orca/contrib/procallator/update_orca_server.sh ============================================================================== --- trunk/orca/contrib/procallator/update_orca_server.sh (original) +++ trunk/orca/contrib/procallator/update_orca_server.sh 2002-11-09 12:30:44.000000000 -0800 @@ -0,0 +1,5 @@ +server=Orca_Server::package +host=`hostname` +cd /usr/local/var/orca/$host +rsync --times --delete --recursive . $server/$host +cd / Added: trunk/orca/contrib/procallator/TODO ============================================================================== --- trunk/orca/contrib/procallator/TODO (original) +++ trunk/orca/contrib/procallator/TODO 2002-11-09 12:30:44.000000000 -0800 @@ -0,0 +1,9 @@ +Procallator TODO list: + - Use the same names for data sets as in solaris version for using same config files + - Document and optimize collectorn source code + - Write better config file for network and NFS stats + - Add web server stats + - LVM statsi + + +Copyright (C) 2001 Guilherme Carvalho Chehab. All Rights Reserved Added: trunk/orca/contrib/procallator/README ============================================================================== --- trunk/orca/contrib/procallator/README (original) +++ trunk/orca/contrib/procallator/README 2002-11-09 12:30:44.000000000 -0800 @@ -0,0 +1,23 @@ +Linux ORCA-aware statistics colector + +This piece of software is for use with Orca, by Blair Zajac - http://www.gps.caltech.edu/~blair/orca/ - and intends +to provide relevant system statistics in a friendly and graphical interface. + + Requirements: + - A running Orca server. + - perl 5 installad on target linux systems + - a mecanism for remote distribution of software to send collected stats from de target to the server. + I use rsync, but anything, ranging from ftp to NFS will do fine. + Check the updat_orca_server.sh script (I use it in crontab) for reference on doing it + + Installation: + The installation is quite simple. + - Edit script procallator.pl and adjust the configurable parameters on the beginning of this file + - Edit install.sh script and check it + - as root run install.sh + - configure the distribution mecanism + - on the server, run orca using the exmple procallator.cfg + +This software is in alpha stage, use at your own risk. +Any comments to Guilherme Chehab +Copyright (C) 2001 Guilherme Carvalho Chehab. All Rights Reserved Modified: trunk/orca/contrib/Makefile.in ============================================================================== --- trunk/orca/contrib/Makefile.in (original) +++ trunk/orca/contrib/Makefile.in 2002-11-09 12:30:44.000000000 -0800 @@ -1,6 +1,6 @@ @SET_MAKE@ -SUBDIRS = orcaservices rotate_orca_graphs +SUBDIRS = orca_services rotate_orca_graphs all: Makefile $(TARGETS) @for dir in $(SUBDIRS); do \ Modified: trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in ============================================================================== --- trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in (original) +++ trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in 2002-11-09 12:30:44.000000000 -0800 @@ -32,7 +32,7 @@ exit 1 fi -if test ! -e $ARCHIVE_DIR/$DATE; then +if /bin/test ! -e $ARCHIVE_DIR/$DATE; then mkdir $ARCHIVE_DIR/$DATE || exit 1 fi Modified: trunk/orca/contrib/orca_services/Makefile.in ============================================================================== --- trunk/orca/contrib/orca_services/Makefile.in (original) +++ trunk/orca/contrib/orca_services/Makefile.in 2002-11-09 12:30:44.000000000 -0800 @@ -7,44 +7,44 @@ INSTALL = @INSTALL@ MKDIR = @MKDIR@ PERL_HEAD = @PERL_HEAD@ -ORCALLATOR_DIR = @ORCALLATOR_DIR@/../orcaservices -ORCASERVICES_DIR = @ORCALLATOR_DIR@/../orcaservices +VAR_DIR = @VAR_DIR@ RRD_DIR = @RRD_DIR@ RRDTOOL_DIR = @RRDTOOL_DIR@ -PERL_SCRIPTS = orcaservices_running orcaservices.pl -SHELL_SCRIPTS = restart_orcaservices stop_orcaservices start_orcaservices \ - S99orcaservices +ORCA_SERVICES_DIR = $(VAR_DIR)/orca_services +PERL_SCRIPTS = orca_services_running orca_services.pl +SHELL_SCRIPTS = restart_orca_services stop_orca_services start_orca_services \ + S99orca_services TARGETS = $(PERL_SCRIPTS) $(SHELL_SCRIPTS) -all: Makefile $(TARGETS) orcaservices.cfg +all: Makefile $(TARGETS) orca_services.cfg install: all $(MKDIR) $(bindir) $(MKDIR) $(libdir) - $(MKDIR) $(RRD_DIR)/orcaservices + $(MKDIR) $(RRD_DIR)/orca_services @for file in $(TARGETS); do \ echo $(INSTALL) $$file $(bindir); \ $(INSTALL) $$file $(bindir); \ done - if test -r $(libdir)/orcaservices.cfg; then \ - cp -p $(libdir)/orcaservices.cfg $(libdir)/orcaservices.cfg.`date +%Y-%m-%d-%H:%M:%S`; \ + if test -r $(libdir)/orca_services.cfg; then \ + cp -p $(libdir)/orca_services.cfg $(libdir)/orca_services.cfg.`date +%Y-%m-%d-%H:%M:%S`; \ fi - $(INSTALL) -m 0644 orcaservices.cfg $(libdir) - $(INSTALL) -m 0755 orcaservices.pl $(libdir) + $(INSTALL) -m 0644 orca_services.cfg $(libdir) + $(INSTALL) -m 0755 orca_services.pl $(libdir) -orcaservices_run_at_boot: all - -$(RM) /etc/init.d/orcaservices /etc/rc0.d/K01orcaservices - -$(RM) /etc/rc1.d/K01orcaservices /etc/rc3.d/S99orcaservices - $(INSTALL) -m 0744 S99orcaservices /etc/init.d/orcaservices - ln /etc/init.d/orcaservices /etc/rc0.d/K01orcaservices - ln /etc/init.d/orcaservices /etc/rc1.d/K01orcaservices - ln /etc/init.d/orcaservices /etc/rc3.d/S99orcaservices +orca_services_run_at_boot: all + -$(RM) /etc/init.d/orca_services /etc/rc0.d/K01orca_services + -$(RM) /etc/rc1.d/K01orca_services /etc/rc3.d/S99orca_services + $(INSTALL) -m 0744 S99orca_services /etc/init.d/orca_services + ln /etc/init.d/orca_services /etc/rc0.d/K01orca_services + ln /etc/init.d/orca_services /etc/rc1.d/K01orca_services + ln /etc/init.d/orca_services /etc/rc3.d/S99orca_services clean: $(RM) $(TARGETS) distclean: clean - $(RM) *.sh orcaservices.cfg orcaservices_running.pl Makefile + $(RM) *.sh orca_services.cfg orca_services_running.pl Makefile .SUFFIXES: .pl .sh @@ -57,29 +57,29 @@ chmod 0755 $@ Makefile: Makefile.in - cd ../.. && CONFIG_FILES=contrib/orcaservices/Makefile ./config.status + cd ../.. && CONFIG_FILES=contrib/orca_services/Makefile ./config.status $(MAKE) -orcaservices.cfg: orcaservices.cfg.in - cd ../.. && CONFIG_FILES=contrib/orcaservices/orcaservices.cfg ./config.status +orca_services.cfg: orca_services.cfg.in + cd ../.. && CONFIG_FILES=contrib/orca_services/orca_services.cfg ./config.status -orcaservices.pl: orcaservices.pl.in $(PERL_HEAD) - cd ../.. && CONFIG_FILES=contrib/orcaservices/orcaservices.pl ./config.status - cat $(PERL_HEAD) orcaservices.pl > orcaservices.perl - mv orcaservices.perl orcaservices.pl - chmod 0755 orcaservices.pl +orca_services.pl: orca_services.pl.in $(PERL_HEAD) + cd ../.. && CONFIG_FILES=contrib/orca_services/orca_services.pl ./config.status + cat $(PERL_HEAD) orca_services.pl > orca_services.perl + mv orca_services.perl orca_services.pl + chmod 0755 orca_services.pl -orcaservices_running.pl: orcaservices_running.pl.in - cd ../.. && CONFIG_FILES=contrib/contrib/orcaservices/orcaservices_running.pl ./config.status +orca_services_running.pl: orca_services_running.pl.in + cd ../.. && CONFIG_FILES=contrib/contrib/orca_services/orca_services_running.pl ./config.status -restart_orcaservices.sh: restart_orcaservices.sh.in - cd ../.. && CONFIG_FILES=contrib/contrib/orcaservices/restart_orcaservices.sh ./config.status +restart_orca_services.sh: restart_orca_services.sh.in + cd ../.. && CONFIG_FILES=contrib/contrib/orca_services/restart_orca_services.sh ./config.status -start_orcaservices.sh: start_orcaservices.sh.in - cd ../.. && CONFIG_FILES=contrib/contrib/orcaservices/start_orcaservices.sh ./config.status +start_orca_services.sh: start_orca_services.sh.in + cd ../.. && CONFIG_FILES=contrib/contrib/orca_services/start_orca_services.sh ./config.status -stop_orcaservices.sh: stop_orcaservices.sh.in - cd ../.. && CONFIG_FILES=contrib/contrib/orcaservices/stop_orcaservices.sh ./config.status +stop_orca_services.sh: stop_orca_services.sh.in + cd ../.. && CONFIG_FILES=contrib/contrib/orca_services/stop_orca_services.sh ./config.status -S99orcaservices.sh: S99orcaservices.sh.in - cd ../.. && CONFIG_FILES=contrib/contrib/orcaservices/S99orcaservices.sh ./config.status +S99orca_services.sh: S99orca_services.sh.in + cd ../.. && CONFIG_FILES=contrib/contrib/orca_services/S99orca_services.sh ./config.status Modified: trunk/orca/contrib/orca_services/orca_services.pl.in ============================================================================== --- trunk/orca/contrib/orca_services/orca_services.pl.in (original) +++ trunk/orca/contrib/orca_services/orca_services.pl.in 2002-11-09 12:30:45.000000000 -0800 @@ -98,7 +98,7 @@ $nodename = `$UNAME -n`; chop($nodename); -require 5.004; +require 5.004_05; use Fcntl; use Getopt::Long; # option handler use POSIX; # useful functions Modified: trunk/orca/contrib/orca_services/orca_services.cfg.in ============================================================================== --- trunk/orca/contrib/orca_services/orca_services.cfg.in (original) +++ trunk/orca/contrib/orca_services/orca_services.cfg.in 2002-11-09 12:30:45.000000000 -0800 @@ -1,20 +1,50 @@ -base_dir @RRD_DIR@/orcaservices +# Orca configuration file for orca_services files. + +# Require at least this version of Orca. +require 0.27 + +# base_dir is prepended to the paths find_files, html_dir, rrd_dir, +# and state_file only if the path does not match the regular +# expression ^\\?\.{0,2}/, which matches /, ./, ../, and \./. +base_dir @RRD_DIR@/orca_services + +# rrd_dir specifies the location of the generated RRD data files. If +# rrd_dir is a relative path, then it is made relative to base_dir if +# base_dir is set. rrd_dir . + +# state_file specifies the location of the state file that remembers +# the modification time of each source data file. If state_file is a +# relative path, then it is made relative to base_dir is base_dir is +# set. state_file orca.state -html_dir @HTML_DIR at -services +html_dir @HTML_DIR@/orca_services + +# By default create .meta tag files for all PNGs or GIFs so that the +# web browser will automatically reload them. expire_images 1 + +# Find files at the following times: +# 0:10 to pick up new orcallator files for the new day. +# 1:00 to pick up late comer orcallator files for the new day. +# 6:00 to pick up new files before the working day. +# 12:00 to pick up new files during the working day. +# 19:00 to pick up new files after the working day. find_times 0:10 1:00 6:00 12:00 19:00 +# This defines the email address of people to warn when a file that is +# being updated constantly stops being updated. For mathematical +# expressions use the word `interval' to get the interval number for +# the data source. warn_email root at localhost late_interval interval + 30 - # -# ATTENTION: hardcoded /var/orca/orcaservices/ in find_files +# ATTENTION: hardcoded /var/orca/orca_services/ in find_files # you might need to change this to your values # -group orcaservices { -find_files /var/orca/orcaservices/(.*)/(?:(?:orcaservices)|(?:percol))-\d{4}-\d{2}-\d{2}(?:\.(?:Z|gz|bz2))? +group orca_services { +find_files /var/orca/orca_services/(.*)/(?:(?:orca_services)|(?:percol))-\d{4}-\d{2}-\d{2}(?:\.(?:Z|gz|bz2))? column_description first_line date_source column_name timestamp date_format %s @@ -56,19 +86,19 @@ plot { title %g SMTP Mail Queue -source orcaservices +source orca_services data mailq_total legend Msgs. in queue (5m) y_legend Number of Messages line_type line2 data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#SMTP_Mail_Queue +href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Mail_Queue } plot { title %g SMTP Messages in 5 minutes -source orcaservices +source orca_services data smtp_from data smtp_sent legend Messages In (5m) @@ -76,12 +106,12 @@ y_legend Number of Messages data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#SMTP_Messages_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Messages_in_5_minutes } plot { title %g SMTP Size -source orcaservices +source orca_services data smtp_sizes data smtp_tops line_type area @@ -91,12 +121,12 @@ y_legend Message size (bytes) data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#SMTP_Size +href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Size } plot { title %g SMTP Delay -source orcaservices +source orca_services data smtp_delay data smtp_maxd line_type area @@ -106,12 +136,12 @@ y_legend Message Delay (seconds) data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#SMTP_Delay +href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Delay } plot { title %g SMTP Retries and Queueing -source orcaservices +source orca_services data smtp_rtrs data smtp_queued legend Retries (5m) @@ -119,12 +149,12 @@ y_legend Number of Messages data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#SMTP_Retries_and_Queueing +href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Retries_and_Queueing } plot { title %g SMTP Failed -source orcaservices +source orca_services data smtp_torf data smtp_c_ml data smtp_c_rt @@ -136,12 +166,12 @@ y_legend Number of Messages data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#SMTP_Failed +href http://o-s.kpnqwest.pt/orca_services.html#SMTP_Failed } plot { title %g SMTP DSN and Undefs -source orcaservices +source orca_services data smtp_dsns data smtp_undf legend Number of DSNs (5m) @@ -149,7 +179,7 @@ y_legend Number of Messages data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#SMTP_DSN_and_Undefs +href http://o-s.kpnqwest.pt/orca_services.html#SMTP_DSN_and_Undefs } @@ -157,7 +187,7 @@ plot { title %g MERIT RADIUS AUTH in 5 minutes -source orcaservices +source orca_services data radius_auth data radius_auth_ok data radius_auth_nok @@ -167,12 +197,12 @@ y_legend Number of Auth Packets data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#MERIT_RADIUS_AUTH_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#MERIT_RADIUS_AUTH_in_5_minutes } plot { title %g MERIT RADIUS ACCT in 5 minutes -source orcaservices +source orca_services data radius_acct_start data radius_acct_stop legend Start records (5m) @@ -180,12 +210,12 @@ y_legend Number of Acct Packets data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#MERIT_RADIUS_ACCT_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#MERIT_RADIUS_ACCT_in_5_minutes } plot { title %g MERIT RADIUS REMOTE AUTH in 5 minutes -source orcaservices +source orca_services data radius_rem_auth data radius_rem_auth_ok data radius_rem_auth_nok @@ -195,25 +225,25 @@ y_legend Number of Remote Auth Packets data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#MERIT_RADIUS_REMOTE_AUTH_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#MERIT_RADIUS_REMOTE_AUTH_in_5_minutes } plot { title %g MERIT RADIUS UNDEFS in 5 minutes -source orcaservices +source orca_services data radius_undefs legend Undef lines (5m) y_legend Number of undef lines data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#MERIT_RADIUS_UNDEFS_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#MERIT_RADIUS_UNDEFS_in_5_minutes } plot { title %g POP SESSIONS in 5 minutes -source orcaservices +source orca_services data pop_connect data pop_login data pop_logout @@ -223,12 +253,12 @@ y_legend Units in 5 minutes data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#POP_SESSIONS_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#POP_SESSIONS_in_5_minutes } plot { title %g POP DENIED in 5 minutes -source orcaservices +source orca_services data pop_failure data pop_refused legend Failures (5m) @@ -236,12 +266,12 @@ y_legend Units in 5 minutes data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#POP_DENIED_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#POP_DENIED_in_5_minutes } plot { title %g POP FAILURES in 5 minutes -source orcaservices +source orca_services data pop_net_error data pop_local_error legend Network errors (5m) @@ -249,49 +279,49 @@ y_legend Units in 5 minutes data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#POP_FAILURES_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#POP_FAILURES_in_5_minutes } plot { title %g POP UNDEFS in 5 minutes -source orcaservices +source orca_services data pop_undefs legend Undefs (5m) y_legend Units in 5 minutes data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#POP_UNDEFS_in_5_minutes +href http://o-s.kpnqwest.pt/orca_services.html#POP_UNDEFS_in_5_minutes } plot { title %g Radius time usage -source orcaservices +source orca_services line_type line2 data rad_time/60 legend Time consumption (5 min) y_legend Minutes data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#Radius_time_usage +href http://o-s.kpnqwest.pt/orca_services.html#Radius_time_usage } plot { title %g Radius sessions -source orcaservices +source orca_services line_type line2 data rad_sessions legend Number of Sessions (5 min) y_legend Terminated Sessions data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#Radius_sessions +href http://o-s.kpnqwest.pt/orca_services.html#Radius_sessions } plot { title %g NAMED CPU Usage in 1 hour -source orcaservices +source orca_services data dns_cpu_u data dns_cpu_s data dns_ccpu_u @@ -307,12 +337,12 @@ y_legend Seconds in 1 hour data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#NAMED_CPU_Usage_in_1_hour +href http://o-s.kpnqwest.pt/orca_services.html#NAMED_CPU_Usage_in_1_hour } plot { title %g NAMED Major queries -source orcaservices +source orca_services data dns_a data dns_ptr data dns_mx @@ -328,12 +358,12 @@ y_legend Units in 1 hour data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#NAMED_Major_queries +href http://o-s.kpnqwest.pt/orca_services.html#NAMED_Major_queries } plot { title %g NAMED Minor queries -source orcaservices +source orca_services data dns_ns data dns_soa data dns_axfr @@ -352,12 +382,12 @@ y_legend Units in 1 hour data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#NAMED_Minor_queries +href http://o-s.kpnqwest.pt/orca_services.html#NAMED_Minor_queries } plot { title %g NAMED Received -source orcaservices +source orca_services data dns_rr data dns_rq data dns_rother @@ -370,12 +400,12 @@ y_legend Units in 1 hour data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#NAMED_Received +href http://o-s.kpnqwest.pt/orca_services.html#NAMED_Received } plot { title %g NAMED Sent -source orcaservices +source orca_services data dns_sans data dns_snaans data dns_snxd @@ -391,5 +421,5 @@ y_legend Units in 1 hour data_min 0 data_max U -href http://o-s.kpnqwest.pt/orcaservices.html#NAMED_Sent +href http://o-s.kpnqwest.pt/orca_services.html#NAMED_Sent } Modified: trunk/orca/contrib/orca_services/README ============================================================================== --- trunk/orca/contrib/orca_services/README (original) +++ trunk/orca/contrib/orca_services/README 2002-11-09 12:30:45.000000000 -0800 @@ -1,6 +1,6 @@ ## ## -## OrcaServices.pl, a log generating services usage monitor +## Orca_Services.pl, a log generating services usage monitor ## ## @@ -22,29 +22,29 @@ ## PERL_SCRIPTS - orcaservices_running - warn if orcaservices files are not up to date. + orca_services_running + warn if orca_services files are not up to date. Not changed by canau. - orcaservices.pl + orca_services.pl main data collector SHELL_SCRIPTS - restart_orcaservices + restart_orca_services guess! - stop_orcaservices + stop_orca_services I'll give you a hint... stopping - start_orcaservices + start_orca_services need a hint, look above - S99orcaservices - used for automatic start of orcaservices + S99orca_services + used for automatic start of orca_services Other Files: - orcaservices.cfg + orca_services.cfg Configuration of services to monitor graph details etc - $libdir/orcaservices.$HOSTNAME + $libdir/orca_services.$HOSTNAME services can be disabled editing this file. $libdir defaults to /usr/local/lib @@ -52,7 +52,7 @@ the switch for input file and setting it to off: ex: --smtp_logfile=off - $libdir/orcaservices.DB.$HOSTNAME + $libdir/orca_services.DB.$HOSTNAME $libdir defaults to /usr/local/lib auth info for accessing database SYNTAX: proto:drv:database:user:pass @@ -75,16 +75,16 @@ make make install - * if orcaservices should run at boottime + * if orca_services should run at boottime - make orcaservices_run_at_boot + make orca_services_run_at_boot - Most of the skeleton code of orcaservices comes from orcallator. So + Most of the skeleton code of orca_services comes from orcallator. So everything is very similar. -4) You might need to edit orcaservices.pl to suit your needs. Look for +4) You might need to edit orca_services.pl to suit your needs. Look for code need the ATTENTION string. You'll probably need to edit - orcaservices.cfg.in. + orca_services.cfg.in. ########################################################################### @@ -121,13 +121,13 @@ RADIUS FROM DATABASE -------------------- -DEFAULT: $def_radius_auth = "/usr/local/lib/orcaservices.DB.$nodename"; +DEFAULT: $def_radius_auth = "/usr/local/lib/orca_services.DB.$nodename"; DISABLE: --radius_db=off Reads Radius stop records from Database and do stats. You might need to change the SQL query in the code. You'll have - to create the orcaservices.DB.$hostname file with the database + to create the orca_services.DB.$hostname file with the database options. MAILQ Modified: trunk/orca/orcallator/orcallator_running.pl.in ============================================================================== --- trunk/orca/orcallator/orcallator_running.pl.in (original) +++ trunk/orca/orcallator/orcallator_running.pl.in 2002-11-09 12:30:45.000000000 -0800 @@ -1,13 +1,14 @@ # orcallator_running: warn if orcallator files are not up to date. # -# Copyright (C) 1998, 1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. use strict; use POSIX qw(strftime); # Set this to the list of directories that contain the output from # percollator.se. -my @stats_dirs = ('@ORCALLATOR_DIR@'); +my @stats_dirs = ('@VAR_DIR@/orcallator'); foreach my $stats_dir (@stats_dirs) { Modified: trunk/orca/orcallator/Makefile.in ============================================================================== --- trunk/orca/orcallator/Makefile.in (original) +++ trunk/orca/orcallator/Makefile.in 2002-11-09 12:30:46.000000000 -0800 @@ -7,7 +7,7 @@ INSTALL = @INSTALL@ MKDIR = @MKDIR@ PERL_HEAD = @PERL_HEAD@ -ORCALLATOR_DIR = @ORCALLATOR_DIR@ +VAR_DIR = @VAR_DIR@ RRD_DIR = @RRD_DIR@ RRDTOOL_DIR = @RRDTOOL_DIR@ PERL_SCRIPTS = orcallator_column orcallator_running Modified: trunk/orca/orcallator/orcallator.cfg.in ============================================================================== --- trunk/orca/orcallator/orcallator.cfg.in (original) +++ trunk/orca/orcallator/orcallator.cfg.in 2002-11-09 12:30:46.000000000 -0800 @@ -1,7 +1,7 @@ # Orca configuration file for orcallator files. # Require at least this version of Orca. -require Orca 0.264 +require Orca 0.265 # base_dir is prepended to the paths find_files, html_dir, rrd_dir, # and state_file only if the path does not match the regular Modified: trunk/orca/orcallator/orcallator_column.pl ============================================================================== --- trunk/orca/orcallator/orcallator_column.pl (original) +++ trunk/orca/orcallator/orcallator_column.pl 2002-11-09 12:30:46.000000000 -0800 @@ -1,6 +1,7 @@ # orcallator_column: display selected columns from orcallator output. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!/GeoCities, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!/GeoCities, Inc. +# Copyright (C) 1999-2002 Blair Zajac. use strict; Modified: trunk/orca/orcallator/start_orcallator.sh.in ============================================================================== --- trunk/orca/orcallator/start_orcallator.sh.in (original) +++ trunk/orca/orcallator/start_orcallator.sh.in 2002-11-09 12:30:46.000000000 -0800 @@ -11,7 +11,7 @@ CUT=@CUT@ EXPR=@EXPR@ UNAME=@UNAME@ -ORCALLATOR_DIR=@ORCALLATOR_DIR@ +ORCALLATOR_DIR=@VAR_DIR@/orcallator SE=@SE@ # WEB_LOG contains the location of the web server log file that Added: trunk/orca/HACKING ============================================================================== --- trunk/orca/HACKING (original) +++ trunk/orca/HACKING 2002-11-09 12:30:46.000000000 -0800 @@ -0,0 +1,395 @@ + -*-text-*- + +If you are contributing code to the Orca project, please read this +first. + + ====================== + HACKER'S GUIDE TO ORCA + ====================== + +$LastChangedDate: 2002-11-07 09:30:37 -0800 (Thu, 07 Nov 2002) $ + +TABLE OF CONTENTS + + * Participating in the community + * Getting the source + * What to read + * Directory layout + * Coding style + * Document everything + * Using page breaks + * Other conventions + * Writing log messages + * Patch submission guidelines + * Commit access + + + +Participating in the community +============================== + +The community exists mainly through mailing lists and a Subversion +source code repository: + +Go to http://www.orcaware.com/mailman/listinfo and + + * Join the "Orca-dev", "Orca-checkins", and "Orca-announce" + mailing lists. The dev list, orca-dev at orcaware.com, is where + almost all discussion takes place. All questions should go + there, though you might want to check the list archives first. + The "orca-checkins" list receives automated commit emails. + +There are many ways to join the project, either by writing code, or by +testing. + +To submit code, simply send your patches to orca-dev at orcaware.com. +No, wait, first read the rest of this file, _then_ start sending +patches to orca-dev at orcaware.com. :-) + + + +Getting the source +================== + +Orca uses the Subversion source control system to manage the source +code. Subversion is a CVS replacement that offers many features over +and above CVS. To get an overview of Subversion, check out + + http://www.orcaware.com/svn/Subversion-Blair_Zajac.ppt + +The Orca Subversion repository is located at + + http://svn.orcaware.com/repos/trunk/orca/ + +with tagged releases located at + + http://svn.orcaware.com/repos/tags/orca/ + +The Subversion home page is at + + http://subversion.tigris.org + +If you are using Windows, then you can use the Windows binaries +available at + + http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 + +Make sure to use the latest svn-*-setup.exe file. + +If you are running Unix, then you'll need to compile Subversion for +yourself. To get the source code for Subversion, go to + + http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260 + +and download the latest tar.gz. To build Subversion, read these pages + + http://svn.collab.net/repos/svn/trunk/INSTALL + http://subversion.tigris.org/project_source.html + + + +What to read +============ + +Before you can contribute code, you'll need to familiarize yourself +with the existing code base and interfaces. + +Check out a copy of Orca (anonymously, if you don't yet have an +account with commit-access) -- so you can look at the code base. + + + +Directory layout +================ + +A rough guide to the source tree: + + config/ + Files for the configure auto-configuration system. + contrib/ + Contributed tools. + docs/ + User documentation. + lib/ + Perl modules and image files for Orca. + lib/Orca/ + Perl modules that Orca uses. + orcallator/ + All programs and scripts for the Solaris orcallator.se program. + packages/ + Important Perl modules used by Orca that don't come with Perl. + patches/ + Patches for the SE toolkit. + src/ + The main Orca script and key utility scripts. + + + +Coding style +============ + +We're using Perl, and following the standard Perl style. + +In general, be generous with parentheses even when you're sure about +the operator precedence, and be willing to add spaces and newlines to +avoid "code crunch". Don't worry too much about vertical density; +it's more important to make code readable than to fit that extra line +on the screen. + + + +Document everything +=================== + +Every function, whether public or internal, must start out with a +documentation comment that describes what the function does. The +documentation should mention every parameter received by the function, +every possible return value, and (if not obvious) the conditions under +which the function could return an error. Put the parameter names in +upper case in the doc string, even when they are not upper case in the +actual declaration, so that they stand out to human readers. + + + +Using page breaks +================= + +We're using page breaks (the Ctrl-L character, ASCII 12) for section +boundaries in both code and plaintext prose files. This file is a +good example of how it's done: each section starts with a page break, +and the immediately after the page break comes the title of the +section. + +This helps out people who use the Emacs page commands, such as +`pages-directory' and `narrow-to-page'. Such people are not as scarce +as you might think, and if you'd like to become one of them, then type +C-x C-p C-h in Emacs sometime. + + + +Other conventions +================= + +In addition to the above standards, Orca uses these conventions: + + * Use only spaces for indenting code, never tabs. Tab display + width is not standardized enough, and anyway it's easier to + manually adjust indentation that uses spaces. + + * Stay within 80 columns, the width of a minimal standard display + window. + + * We have a tradition of not marking files with the names of + individual authors (i.e., we don't put lines like "Author: foo" + or "@author foo" in a special position at the top of a source + file). This is to discourage territoriality -- even when a file + has only one author, we want to make sure others feel free to + make changes. People might be unnecessarily hesitant if someone + appears to have staked ownership on the file. + + * There are many other unspoken conventions maintained throughout + the code, that are only noticed when someone unintentionally + fails to follow them. Just try to have a sensitive eye for the + way things are done, and when in doubt, ask. + + + +Writing log messages +==================== + +Certain guidelines should be adhered to when writing log messages: + +Make a log message for every change. The value of the log becomes +much less if developers cannot rely on its completeness. Even if +you've only changed comments, write a log that says "Doc fix." or +something. + +Use full sentences, not sentence fragments. Fragments are more often +ambiguous, and it takes only a few more seconds to write out what you +mean. Fragments like "Doc fix", "New file", or "New function" are +acceptable because they are standard idioms, and all further details +should appear in the source code. + +The log message should name every affected function, variable, macro, +makefile target, grammar rule, etc, including the names of symbols +that are being removed in this commit. This helps people searching +through the logs later. Don't hide names in wildcards, because the +globbed portion may be what someone searches for later. For example, +this is bad: + + * twirl.c + (twirling_baton_*): Removed these obsolete structures. + (handle_parser_warning): Pass data directly to callees, instead + of storing in twirling_baton_*. + + * twirl.h: Fix indentation. + +Later on, when someone is trying to figure out what happened to +`twirling_baton_fast', they may not find it if they just search for +"_fast". A better entry would be: + + * twirl.c + (twirling_baton_fast, twirling_baton_slow): Removed these + obsolete structures. + (handle_parser_warning): Pass data directly to callees, instead + of storing in twirling_baton_*. + + * twirl.h: Fix indentation. + +The wildcard is okay in the description for `handle_parser_warning', +but only because the two structures were mentioned by full name +elsewhere in the log entry. + +Note how each file gets its own entry, and the changes within a file +are grouped by symbol, with the symbols are listed in parentheses +followed by a colon, followed by text describing the change. Please +adhere to this format -- not only does consistency aid readability, it +also allows software to colorize log entries automatically. + +If your change is related to a specific issue in the issue tracker, +then include a string like "issue #N" in the log message. For +example, if a patch resolves issue 1729, then the log message might +be: + + Fix issue #1729: + + * get_editor.c + (frobnicate_file): Check that file exists first. + +For large changes or change groups, group the log entry into +paragraphs separated by blank lines. Each paragraph should be a set +of changes that accomplishes a single goal, and each group should +start with a sentence or two summarizing the change. Truly +independent changes should be made in separate commits, of course. + +One should never need the log entries to understand the current code. +If you find yourself writing a significant explanation in the log, you +should consider carefully whether your text doesn't actually belong in +a comment, alongside the code it explains. Here's an example of doing +it right: + + (consume_count): If `count' is unreasonable, return 0 and don't + advance input pointer. + +And then, in `consume_count' in `cplus-dem.c': + + while (isdigit ((unsigned char)**type)) + { + count *= 10; + count += **type - '0'; + /* A sanity check. Otherwise a symbol like + `_Utf390_1__1_9223372036854775807__9223372036854775' + can cause this function to return a negative value. + In this case we just consume until the end of the string. */ + if (count > strlen (*type)) + { + *type = save; + return 0; + } + +This is why a new function, for example, needs only a log entry saying +"New Function" --- all the details should be in the source. + +There are some common-sense exceptions to the need to name everything +that was changed: + + * If you have made a change which requires trivial changes + throughout the rest of the program (e.g., renaming a variable), + you needn't name all the functions affected, you can just say + "All callers changed". + + * If you have rewritten a file completely, the reader understands + that everything in it has changed, so your log entry may simply + give the file name, and say "Rewritten". + + * If your change was only to one file, or was the same change to + multiple files, then there's no need to list their paths in the + log message (because "svn log" can show the changed paths for + that revision anyway). Only when you need to describe how the + change affected different areas in different ways is it + necessary to organize the log message by paths and symbols, as + in the examples above. + +In general, there is a tension between making entries easy to find by +searching for identifiers, and wasting time or producing unreadable +entries by being exhaustive. Use your best judgment --- and be +considerate of your fellow developers. (Also, run "svn log" to see +how others have been writing their log entries.) + + + +Patch submission guidelines +=========================== + +Mail patches to `orca-dev at orcaware.com', with a subject line that +contains the word "PATCH" in all uppercase, for example + + Subject: [PATCH] fix for Orca images + +A patch submission should contain one logical change; please don't mix +N unrelated changes in one submission -- send N separate emails +instead. + +The email message should start off with a log message, as described in +"Writing log messages" above. The patch itself should be in unified +diff format, preferably inserted directly into the body of your +message (rather than MIME-attached, uuencoded, or otherwise +opaqified). If your mailer wraps long lines, then you will need to +attach your patch. Please ensure the MIME type of the attachment is +text/plain (some mailers allow you to set the MIME type; for some +others, you might have to use a .txt extension on your patch file). Do +not compress or otherwise encode the attached patch. + +If the patch implements a new feature, make sure to describe the +feature completely in your mail; if the patch fixes a bug, describe +the bug in detail and give a reproduction recipe. An exception to +these guidelines is when the patch addresses a specific issue in the +issues database -- in that case, just make sure to refer to the issue +number in your log message, as described in "Writing log messages". + +It is normal for patches to undergo several rounds of feedback and +change before being applied. Don't be discouraged if your patch is +not accepted immediately -- it doesn't mean you goofed, it just means +that there are a *lot* of eyes looking at every code submission, and +it's a rare patch that doesn't have at least a little room for +improvement. After reading people's responses to your patch, make the +appropriate changes and resubmit, wait for the next round of feedback, +and lather, rinse, repeat, until some committer applies it. + +If you don't get a response for a while, and don't see the patch +applied, it may just mean that people are really busy. Go ahead and +repost, and don't hesitate to point out that you're still waiting for +a response. One way to think of it is that patch management is highly +parallizable, and we need you to shoulder your share of the management +as well as the coding. Every patch needs someone to shepherd it +through the process, and the person best qualified to do that is the +original submitter. + + + +Commit access +============= + +After someone has successfully contributed a few non-trivial patches, +some committer, usually whoever has reviewed and applied the most +patches from that contributor, proposes them for commit access. This +proposal is sent only to the other full committers -- the ensuing +discussion is private, so that everyone can feel comfortable speaking +their minds. Assuming there are no objections, the contributor is +granted commit access. The decision is made by consensus; there are +no formal rules governing the procedure, though generally if someone +strongly objects the access is not offered, or is offered on a +provisional basis. + +The criteria for commit access are that the person's patches adhere to +the guidelines in this file, adhere to all the usual unquantifiable +rules of coding (code should readable, robust, maintainable, etc), and +that the person respects the "Hippocratic Principle": first, do no +harm. In other words, what is significant is not the size or quantity +of patches submitted, but the degree of care shown in avoiding bugs +and minimizing unnecessary impact on the rest of the code. Many +committers are people who have not made major code contributions, but +rather lots of small, clean fixes, each of which was an unambiguous +improvement to the code. + +See the COMMITTERS file for a complete list of committers. Modified: trunk/orca/config/config.guess ============================================================================== --- trunk/orca/config/config.guess (original) +++ trunk/orca/config/config.guess 2002-11-09 12:30:47.000000000 -0800 @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2001-09-13' +timestamp='2002-10-21' # 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 @@ -24,8 +24,9 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner . -# Please send patches to . +# 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 @@ -87,30 +88,40 @@ exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; 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. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +dummy=$tmpdir/dummy ; +files="$dummy.c $dummy.o $dummy.rel $dummy" ; +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; +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 ; - rm -f $dummy.c $dummy.o $dummy.rel ; + rm -f $files ; 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' +esac ; +unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi at noc.rutgers.edu 1994-08-24) @@ -134,23 +145,23 @@ # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - sparc*) machine=`uname -p`-unknown ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # 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}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + 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 @@ -220,6 +231,7 @@ # 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. + eval $set_cc_for_build cat <$dummy.s .data \$Lformat: @@ -245,10 +257,9 @@ jsr \$26,exit .end main EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then - case `./$dummy` in + case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; @@ -270,9 +281,12 @@ 2-1307) UNAME_MACHINE="alphaev68" ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi - rm -f $dummy.s $dummy + rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) @@ -290,6 +304,9 @@ *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; @@ -310,6 +327,10 @@ NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -338,7 +359,7 @@ echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + 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) @@ -416,15 +437,21 @@ exit (-1); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -497,8 +524,8 @@ exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -507,7 +534,7 @@ fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + 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 @@ -547,10 +574,8 @@ 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + 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 @@ -559,13 +584,13 @@ 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 ;; - esac - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include @@ -598,10 +623,10 @@ exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy && rmdir $tmpdir + fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; @@ -636,8 +661,8 @@ exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -683,9 +708,6 @@ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; @@ -707,9 +729,6 @@ CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; 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/\///'` @@ -726,7 +745,19 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -737,6 +768,9 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i386-pc-interix3 + exit 0 ;; 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 @@ -762,16 +796,30 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac + 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=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu @@ -820,7 +868,8 @@ # 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. - ld_supported_targets=`cd /; ld --help 2>&1 \ + # 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: *// @@ -832,7 +881,7 @@ ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; @@ -844,32 +893,29 @@ esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} + 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 EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) @@ -907,13 +953,13 @@ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + 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|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else @@ -946,9 +992,12 @@ # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*: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) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1039,6 +1088,9 @@ SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1049,15 +1101,17 @@ echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1229,8 +1283,8 @@ } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. Modified: trunk/orca/config/config.sub ============================================================================== --- trunk/orca/config/config.sub (original) +++ trunk/orca/config/config.sub 2002-11-09 12:30:47.000000000 -0800 @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2001-09-14' +timestamp='2002-09-05' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -29,7 +29,8 @@ # 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 . +# 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. @@ -117,7 +118,7 @@ # 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* | storm-chaos* | os2-emx* | windows32-*) + nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -226,32 +227,42 @@ 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ - | openrisc \ + | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | s390 | s390x \ - | sh | sh[34] | sh[34]eb | shbe | shle \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ - | stormy16 | strongarm \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic80 | tron \ - | v850 \ + | v850 | v850e \ | we32k \ - | x86 | xscale \ + | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -278,39 +289,51 @@ 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alphapca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cray2-* | cydra-* \ - | d10v-* | d30v-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ - | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39 | mipstx39el \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | s390-* | s390x-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ - | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ - | v850-* | vax-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -375,6 +398,10 @@ basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -395,16 +422,8 @@ basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) @@ -419,6 +438,14 @@ 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 @@ -599,14 +626,6 @@ basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -621,6 +640,10 @@ basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos @@ -700,6 +723,10 @@ basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -722,19 +749,19 @@ pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) @@ -749,22 +776,22 @@ 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/^[^-]*-//'` ;; @@ -785,10 +812,22 @@ 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 + ;; sequent) basic_machine=i386-sequent ;; @@ -796,7 +835,7 @@ basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -862,10 +901,22 @@ basic_machine=i386-sequent os=-dynix ;; + t3d) + basic_machine=alpha-cray + os=-unicos + ;; t3e) - basic_machine=t3e-cray + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray os=-unicos ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -876,6 +927,10 @@ tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -900,8 +955,8 @@ os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -926,13 +981,13 @@ basic_machine=i386-pc os=-windows32-msvcrt ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim @@ -953,13 +1008,6 @@ op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; @@ -979,13 +1027,16 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh3eb | sh4eb) + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -1000,10 +1051,6 @@ pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1069,7 +1116,8 @@ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos*) + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1121,14 +1169,20 @@ -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1167,8 +1221,8 @@ -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint ;; -none) ;; @@ -1201,10 +1255,11 @@ arm*-semi) os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1231,6 +1286,9 @@ mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -1294,19 +1352,19 @@ *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1378,7 +1436,7 @@ -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) Modified: trunk/orca/TODO ============================================================================== --- trunk/orca/TODO (original) +++ trunk/orca/TODO 2002-11-09 12:30:47.000000000 -0800 @@ -12,6 +12,9 @@ using 7.3 gigabytes of storage. I have 9 different orcallator.cfg for different classes of machines. +* Orca: Fix the "did exist and is now gone" email messages for source + files that are fine. + * Orca: Have an install option just for orcallator.se and not the Orca whole pacckage. Modified: trunk/orca/INSTALL ============================================================================== --- trunk/orca/INSTALL (original) +++ trunk/orca/INSTALL 2002-11-09 12:30:48.000000000 -0800 @@ -1,10 +1,9 @@ Outline: - 1) Install Perl 5.004_01 or later. + 1) Install Perl 5.005_03 or later. - 2) Decide where Orca's binaries, RRD, HTML, and orcallator - directories will reside. Make sure performance concerns are - handled. + 2) Decide where Orca's binaries, raw data, RRD and HTML directories + will reside. Make sure performance concerns are handled. 3) Determine which Perl modules need compiling and installing. Optionally download newer versions of these modules. @@ -35,7 +34,7 @@ - 1) Install Perl 5.004_01 or later. + 1) Install Perl 5.005_03 or later. This step is too large to go into here. The bottom line is to follow the instructions at @@ -46,19 +45,20 @@ http://aspn.activestate.com/ASPN/Downloads/ActivePerl/ - 2) Decide where Orca's binaries, RRD, HTML, and orcallator - directories will reside. Make sure performance concerns are - handled. + if you happen to run Linux, Solaris or Windows. + + 2) Decide where Orca's binaries, raw data, RRD and HTML directories + will reside. Make sure performance concerns are handled. First choose the location where Orca will be installed. By default, Orca will install into the following structure: - $prefix Prefix, set with --prefix= - $prefix/bin Binaries, set with --bindir= - $prefix/lib Libraries, set with --libdir= - $prefix/man Manual pages, set with --mandir= + $prefix Prefix, set with --prefix + $prefix/bin Binaries, set with --bindir + $prefix/lib Libraries, set with --libdir + $prefix/man Manual pages, set with --mandir + $prefix/var/orca Data storage directory, set with --with-var-dir $prefix/var/orca/rrd RRD directory, set with --with-rrd-dir - $prefix/var/orca/orcallator Orcallator directory, set with --with-orcallator-dir The HTML output directory is not set by default and must be specified by the Orca administrator. @@ -78,8 +78,8 @@ the HTML and image files, since the RRD files are much more read/write intensive. - If you are going to use the orcallator Orca addon to monitor your - Sun Solaris systems, then you will in addition need to decide + If you are going to use the orcallator.se Orca addon to monitor + your Sun Solaris systems, then you will in addition need to decide where to have orcallator store its data files. By default, these data files are written to once every 5 minutes, so IO is not an issue. The issue here is that orcallator needs to run as root and @@ -100,10 +100,10 @@ orcallator data files and the web server access logs, are located, run the configure script with the following arguments: - % ./configure --prefix=ORCA_PREFIX_DIRECTORY \ - --with-rrd-dir=RRD_DIR_LOCATION \ + % ./configure --prefix=ORCA_PREFIX_DIRECTORY \ + --with-var-dir=VAR_DIR_LOCATION \ + --with-rrd-dir=RRD_DIR_LOCATION \ --with-html-dir=HTML_DIR_LOCATION \ - --with-orcallator-dir=ORCALLATOR_DIR_LOCATION \ --with-TYPE-log=LOG_LOCATION If you choose nothing else, the --with-html-dir must always be @@ -142,10 +142,10 @@ Name Required Version Included With Orca ---------------------------------------------------------------------- Data::Dumper 2.101 or greater 2.101 - Digest::MD5 2.16 or greater 2.16 + Digest::MD5 2.20 or greater 2.20 Math::IntervalSearch 1.05 or greater 1.05 RRDs 1.0.33 or greater 1.0.33 - Storable 1.0.13 or greater 1.0.13 + Storable 2.05 or greater 2.05 All five of these modules are included with the Orca distribution in the packages directory. When you configure Orca in step 3), @@ -173,10 +173,10 @@ Digest::MD5 - http://www.perl.com/CPAN/authors/id/G/GA/GAAS/Digest-MD5-2.16.tar.gz + http://www.perl.com/CPAN/authors/id/G/GA/GAAS/Digest-MD5-2.20.tar.gz - % gunzip -c Digest-MD5-2.16.tar.gz | tar xvf - - % cd Digest-MD5-2.16 + % gunzip -c Digest-MD5-2.20.tar.gz | tar xvf - + % cd Digest-MD5-2.20 % perl Makefile.PL % make % make test @@ -213,10 +213,10 @@ Storable - http://www.perl.com/CPAN/authors/id/R/RA/RAM/Storable-1.0.13.tar.gz + http://www.perl.com/CPAN/authors/id/A/AM/AMS/Storable-2.05.tar.gz - % gunzip -c Storable-1.0.13.tar.gz | tar xvf - - % cd Storable-1.0.13 + % gunzip -c Storable-2.05.tar.gz | tar xvf - + % cd Storable-2.05 % perl Makefile.PL % make % make test Modified: trunk/orca/lib/Makefile.in ============================================================================== --- trunk/orca/lib/Makefile.in (original) +++ trunk/orca/lib/Makefile.in 2002-11-09 12:30:48.000000000 -0800 @@ -6,16 +6,24 @@ INSTALL = @INSTALL@ MKDIR = @MKDIR@ -all: Makefile orca.gif.hex rrdtool.gif.hex +all: Makefile \ + orca_logo.gif.hex \ + rrdtool_logo.gif.hex \ + rothschild_image_logo.png.hex + +# Create a hex file representation of orca_logo.gif that can be stored +# inside orca.pl. +orca_logo.gif.hex: orca_logo.gif + perl -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*", $$b),"\n"}' < $< > $@ -# Create a hex file representation of orca.gif that can be stored inside -# orca.pl. -orca.gif.hex: orca.gif +# Create a hex file representation of rrdtool_logo.gif that can be +# stored inside orca.pl. +rrdtool_logo.gif.hex: rrdtool_logo.gif perl -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*", $$b),"\n"}' < $< > $@ -# Create a hex file representation of rrdtool.gif that can be stored inside -# orca.pl. -rrdtool.gif.hex: rrdtool.gif +# Create a hex file representation of rothschild_image_logo.png that +# can be stored inside orca.pl. +rothschild_image_logo.png.hex: rothschild_image_logo.png perl -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*", $$b),"\n"}' < $< > $@ install: all Modified: trunk/orca/lib/Orca/HTMLFile.pm ============================================================================== --- trunk/orca/lib/Orca/HTMLFile.pm (original) +++ trunk/orca/lib/Orca/HTMLFile.pm 2002-11-09 12:30:48.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::HTMLFile: Manage the creation of HTML files. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::HTMLFile; @@ -33,14 +34,23 @@ } print FD < - -Orca - $title - - + + Orca - $title + + + -$top -

$title

+ + + + + + + $top + +

$title

END bless [$filename, *FD, $bottom], $class; @@ -57,28 +67,106 @@ my $self = shift; print { $self->[I_FD] } <[$i_bottom] -

-


- - - - - -
- - Orca Home Page -
- - Orca-$ORCA_VERSION by - Blair Zajac - blair\@orcaware.com. - -
- - RRDTool Home Page -
- + $self->[$i_bottom] + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ + Orca home page +    + + The Rothschild Image home page +    + + RRDtool home page +
+ + Orca $ORCA_VERSION + by
+ Blair Zajac
+ blair\@orcaware.com + + Orca home page + +
+
   + + Funding for Orca provided by renowned fashion + image consultant, + Ashley Rothschild. + +    + + Graphs made available by RRDtool. + +
+ END Modified: trunk/orca/lib/Orca/OpenFileHash.pm ============================================================================== --- trunk/orca/lib/Orca/OpenFileHash.pm (original) +++ trunk/orca/lib/Orca/OpenFileHash.pm 2002-11-09 12:30:48.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::OpenFileHash: Cache open file descriptors for the whole program. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::OpenFileHash; @@ -71,20 +72,30 @@ $is_pipe = 0; } - # Try to open the file or pipe. If the pipe fails and if there are + # Try to open the file or pipe. If the open fails and if there are # other opened files, then reduce the maximum number of open files. # If this is the first open file and the pipe fails, then do not # attempt to open it again. + my $open_error = 0; while (!open(FD, $filename)) { + my $num_current_open_files = keys %{$self->[I_HASH]}; warn "$0: warning: cannot open `$filename' for reading: $!\n"; - my $num_current_open_files = (keys %{$self->[I_HASH]}); + warn "$0: warning: there are current $num_current_open_files open source ", + "files.\n"; return unless $num_current_open_files; + $num_current_open_files -= 2; return if $num_current_open_files <= 4; warn "$0: warning: shrinking maximum number open files to ", "$num_current_open_files.\n"; + $self->[I_MAX_ELEMENTS] = $num_current_open_files; $self->_close_extra($num_current_open_files-1); + $open_error = 1; + } + + if ($open_error) { + warn "$0: warning: finally able to open `$filename' for reading.\n"; } $self->add($fid, $weight, *FD, $is_pipe); Modified: trunk/orca/lib/Orca/Config.pm ============================================================================== --- trunk/orca/lib/Orca/Config.pm (original) +++ trunk/orca/lib/Orca/Config.pm 2002-11-09 12:30:49.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::Config: Manage configuration parameters for Orca. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::Config; @@ -314,24 +315,25 @@ if (defined $config_global{require}) { my @require = @{$config_global{require}}; if (@require == 2) { - unless ($require[0] eq 'Orca') { - ++$number_errors; + my ($require_what, $require_version) = @require; + unless ($require_what eq 'Orca') { warn "$0: error: `require' only accepts `Orca' as first argument in ", "`$config_filename'.\n"; + ++$number_errors; } - my $number = $require[1]; - if ($number !~ /^\d+(?:\.\d*)?$/ and $number !~ /^\.\d+$/) { + if ($require_version !~ /^\d+(?:\.\d*)?$/ and + $require_version !~ /^\.\d+$/) { ++$number_errors; - warn "$0: error: `require' second argument `$number' is not a number ", - "in `$config_filename'.\n"; - } elsif ($ORCA_VERSION < $number) { + warn "$0: error: `require' second argument `$require_version' is not ", + "a number in `$config_filename'.\n"; + } elsif ($ORCA_VERSION < $require_version) { ++$number_errors; warn "$0: Orca version $ORCA_VERSION less than required version ", - "$number specified in `$config_filename'.\n"; + "$require_version specified in `$config_filename'.\n"; } } else { - ++$number_errors; warn "$0: error: `require' needs two arguments in `$config_filename'.\n"; + ++$number_errors; } } @@ -341,8 +343,8 @@ if (defined $config_global{base_dir}) { $config_global{rrd_dir} = $config_global{base_dir}; } else { - ++$number_errors; warn "$0: error: must set `rrd_dir' in `$config_filename'.\n"; + ++$number_errors; } } @@ -350,9 +352,9 @@ my $required_error = 0; foreach my $option (@cc_required_global) { unless (defined $config_global{$option}) { + warn "$0: error: must set `$option' in `$config_filename'.\n"; $required_error = 1; ++$number_errors; - warn "$0: error: must set `$option' in `$config_filename'.\n"; } } @@ -367,8 +369,8 @@ foreach my $dir_key ('html_dir', 'rrd_dir') { my $dir = $config_global{$dir_key}; unless (-d $dir) { - ++$number_errors; warn "$0: error: please create $dir_key `$dir'.\n"; + ++$number_errors; } } @@ -389,8 +391,8 @@ my $mfl = $config_global{max_filename_length}; if (defined $mfl) { unless ($mfl =~ /^\d+$/ and $mfl > 63) { - ++$number_errors; warn "$0: error: max_filename_length `$mfl' is not a number > 63.\n"; + ++$number_errors; } } else { $config_global{max_filename_length} = 235; @@ -419,21 +421,21 @@ # and minutes will only be positive, so check for hours > 23 and # minutes > 59. unless ($hours < 24) { - ++$number_errors; warn "$0: warning: ignoring find_times `$find_time': hours must be ", "less than 24.\n"; + ++$number_errors; next; } unless ($minutes < 60) { - ++$number_errors; warn "$0: warning: ignoring find_times `$find_time': minutes must be ", "less than 60.\n"; + ++$number_errors; next; } push(@find_times, $hours + $minutes/60.0); } else { - ++$number_errors; warn "$0: warning: ignoring find_times `$find_time': illegal format.\n"; + ++$number_errors; } } $config_global{find_times} = [ sort { $a <=> $b } @find_times ]; @@ -463,16 +465,16 @@ # There must be at least one timespan plot. unless (@IMAGE_PLOT_TYPES) { - ++$number_errors; warn "$0: error: generate_*_plots parameters turn off all plots in ", "`$config_filename'.\n"; + ++$number_errors; } # There must be at least one group. unless (@config_groups) { - ++$number_errors; warn "$0: error: must define at least one `group' in ", "`$config_filename'.\n"; + ++$number_errors; } # For each group parameter there are required options. @@ -483,10 +485,10 @@ $required_error = 0; foreach my $option (@cc_required_group) { unless (defined $group->{$option}) { - $required_error = 1; - ++$number_errors; warn "$0: error: must set `$option' for `group $group_name' ", "in `$config_filename'.\n"; + $required_error = 1; + ++$number_errors; } } @@ -511,9 +513,9 @@ # Check that the interval is a number. unless ($group->{interval} =~ /^\d+$/ and $group->{interval} > 0) { - ++$number_errors; warn "$0: error: interval `$group->{interval}' for `group $group_name' ", "is not an integer greater than 0 in `$config_filename'.\n"; + ++$number_errors; } # Check the late_interval. If it does not exist, then use the @@ -539,13 +541,13 @@ my $value; eval '$value = &$sub($group->{interval});'; if ($@) { - ++$number_errors; warn "$0: cannot execute `late_interval' in `group $group_name' in ", "`$config_filename':\n $expr\nOutput: $@\n"; - } elsif ($value !~ /^\d+$/ and $value <= 0) { ++$number_errors; + } elsif ($value !~ /^\d+$/ and $value <= 0) { warn "$0: `late_interval' in `group $group_name' did not generate an ", "integer `$value' greater than 0.\n"; + ++$number_errors; } $group->{late_interval} = $value; } @@ -608,9 +610,9 @@ $group->{date_parse} = 0; if ($date_source eq 'column_name') { if (@{$group->{date_source}} != 2) { - ++$number_errors; warn "$0: error: incorrect number of arguments for `date_source' for ", "`group $group_name'.\n"; + ++$number_errors; } elsif (my $expr = $group->{date_parse}) { unless ($group->{date_parse} = compile_sub('date_parse', "group `$group_name'", @@ -621,9 +623,9 @@ } } else { unless ($date_source eq 'file_mtime') { - ++$number_errors; warn "$0: error: illegal argument for `date_source' for ", "`group $group_name'.\n"; + ++$number_errors; } } $group->{date_source}[0] = $date_source; @@ -657,10 +659,10 @@ local $SIG{__WARN__} = \&die_when_called; eval { $test_string =~ /$find/ }; if ($@) { - ++$number_errors; warn "$0: error: illegal regular expression in `find_files ", "$orig_find' for `files $group_name' in ", "`$config_filename':\n$@\n"; + ++$number_errors; } else { $find_files{$find} = 1; } @@ -670,8 +672,8 @@ # There must be at least one plot. unless (@config_plots) { - ++$number_errors; warn "$0: error: must define at least one `plot' in `$config_filename'.\n"; + ++$number_errors; } # Foreach plot there are required options. Create default options @@ -684,9 +686,9 @@ foreach my $option (@cc_required_plot) { unless (defined $plot->{$option}) { $required_error = 1; - ++$number_errors; warn "$0: error: must set `$option' for `plot' #$j in ", "`$config_filename'.\n"; + ++$number_errors; } } @@ -720,8 +722,8 @@ # Make sure the base is either 1000 or 1024. if (defined $plot->{base} && length($plot->{base})) { if ($plot->{base} != 1000 and $plot->{base} != 1024) { - ++$number_errors; warn "$0: error: plot #$j must set base to be either 1000 or 1024.\n"; + ++$number_errors; } } else { $plot->{base} = 1000; @@ -740,23 +742,25 @@ # The data type must be either gauge, absolute, or counter. $plot->{data_type} = [] unless defined $plot->{data_type}; for (my $k=0; $k<@{$plot->{data_type}}; ++$k) { - my $data_type = $plot->{data_type}[$k]; + my $data_type = $plot->{data_type}[$k]; my $first_char = lc(substr($data_type, 0, 1)); if ($first_char eq 'g') { - $plot->{data_type}[$k] = 'GAUGE'; + $data_type = 'GAUGE'; } elsif ($first_char eq 'c') { - $plot->{data_type}[$k] = 'COUNTER'; + $data_type = 'COUNTER'; } elsif ($first_char eq 'a') { - $plot->{data_type}[$k] = 'ABSOLUTE'; + $data_type = 'ABSOLUTE'; } elsif ($first_char eq 'd') { - $plot->{data_type}[$k] = 'DERIVE'; + $data_type = 'DERIVE'; } else { - ++$number_errors; - my $l = $k + 1; - warn "$0: error: `data_type #$l `$data_type' for `plot' #$j in ", + $data_type = 'GAUGE'; + my $l = $k + 1; + warn "$0: error: `plot' #$j `data_type #$l `$data_type' in ", "`$config_filename' must be gauge, counter, derive, or ", "absolute.\n"; + ++$number_errors; } + $plot->{data_type}[$k] = $data_type; } fill_append_elements($plot->{data_type}, $number_datas, 'GAUGE'); @@ -764,16 +768,16 @@ # group's name with its index. my $source = delete $plot->{source}; unless (defined $source) { - ++$number_errors; warn "$0: error: plot #$j `source $source' requires one group_name ", "argument in `$config_filename'.\n"; + ++$number_errors; next; } my $source_index = $pcl_group_name_to_index{$source}; unless (defined $source_index) { - ++$number_errors; warn "$0: error: plot #$j `source $source' references non-existant ", "`group' in `$config_filename'.\n"; + ++$number_errors; next; } $plot->{source_index} = $source_index; @@ -796,26 +800,26 @@ $plot->{color}[$k] = get_color($k); } - # Check each line type setting. + # Check each line type setting. Use the last line_type to set any + # following line_type's if they are not specified. $plot->{line_type} = [] unless defined $plot->{line_type}; - for (my $k=0; $k<$number_datas; ++$k) { - if (defined $plot->{line_type}[$k]) { + for (my $k=0; $k<@{$plot->{line_type}}; ++$k) { my $line_type = $plot->{line_type}[$k]; - if ($line_type =~ /^line([123])$/i) { - $line_type = "LINE$1"; - } elsif ($line_type =~ /^area$/i) { - $line_type = 'AREA'; - } elsif ($line_type =~ /^stack$/i) { - $line_type = 'STACK'; - } else { - ++$number_errors; - warn "$0: error: plot #$j illegal `line_type' `$line_type'.\n"; - } - $plot->{line_type}[$k] = $line_type; + if ($line_type =~ /^line([123])$/i) { + $line_type = "LINE$1"; + } elsif ($line_type =~ /^area$/i) { + $line_type = 'AREA'; + } elsif ($line_type =~ /^stack$/i) { + $line_type = 'STACK'; } else { - $plot->{line_type}[$k] = 'LINE1'; + $line_type = 'LINE1'; + my $l = $k + 1; + warn "$0: error: `plot' #$j illegal `line_type' #$l `$line_type'.\n"; + ++$number_errors; } + $plot->{line_type}[$k] = $line_type; } + fill_append_elements($plot->{line_type}, $number_datas, 'LINE1'); # If the summary_format is not set, then set it to a reasonable # default. Use the last set summary_format for those that are not @@ -876,9 +880,9 @@ push(@line, 1) unless @line; } else { unless (@line) { - ++$number_errors; warn "$0: warning: option `$key' needs arguments in ", "`$config_filename' line $line_number.\n"; + ++$number_errors; return; } } @@ -938,9 +942,9 @@ } unless ($pcl_elements_ref->{$key}) { - ++$number_errors; warn "$0: warning: directive `$key' unknown for $label at line ", "$line_number in `$config_filename'.\n"; + ++$number_errors; return; } @@ -958,9 +962,9 @@ } if (defined $config_ref->[$$index_ref]{$key}) { - ++$number_errors; warn "$0: warning: `$key' for $label already defined at line ", "$line_number in `$config_filename'.\n"; + ++$number_errors; return; } @@ -992,7 +996,6 @@ $pcl_group_index =~ s:^-::; $pcl_group_name = shift(@line); unless (@line == 1 and $line[0] eq '{' ) { - ++$number_errors; if ($pcl_group_name eq '{') { warn "$0: warning: 'group_name {' required after `group' at ", "line $line_number in `$config_filename'.\n"; @@ -1000,11 +1003,12 @@ warn "$0: warning: '{' required after `group $pcl_group_name' at ", "line $line_number in `$config_filename'.\n"; } + ++$number_errors; } if (defined $pcl_group_name_to_index{$pcl_group_name}) { + warn "$0: warning: `group $key' at line $line_number in ", + "`$config_filename' previously defined.\n"; ++$number_errors; - die "$0: warning: `group $key' at line $line_number in ", - "`$config_filename' previously defined.\n"; } $config_groups[$pcl_group_index]{index} = $pcl_group_index; $config_groups_names[$pcl_group_index] = $pcl_group_name; @@ -1017,18 +1021,18 @@ $pcl_plot_index =~ s:^-::; $config_plots[$pcl_plot_index]{index} = $pcl_plot_index; unless (@line == 1 and $line[0] eq '{') { - ++$number_errors; $label = "@line"; $label = " $label" if $label; warn "$0: warning: '{' required immediately after plot in `plot$label' ", "at line $line_number in `$config_filename'.\n"; + ++$number_errors; } return; } - ++$number_errors; warn "$0: warning: unknown directive `$key' at line $line_number in ", "`$config_filename'.\n"; + ++$number_errors; } sub load_config { Modified: trunk/orca/lib/Orca/RRDFile.pm ============================================================================== --- trunk/orca/lib/Orca/RRDFile.pm (original) +++ trunk/orca/lib/Orca/RRDFile.pm 2002-11-09 12:30:49.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::RRDFile: Manage RRD file creation and updating. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::RRDFile; Modified: trunk/orca/lib/Orca/DataFile.pm ============================================================================== --- trunk/orca/lib/Orca/DataFile.pm (original) +++ trunk/orca/lib/Orca/DataFile.pm 2002-11-09 12:30:49.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::DataFile: Base class for managing source data, RRD and image files. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::DataFile; Modified: trunk/orca/lib/Orca/NewState.pm ============================================================================== --- trunk/orca/lib/Orca/NewState.pm (original) +++ trunk/orca/lib/Orca/NewState.pm 2002-11-09 12:30:49.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::NewState: Keep state information between invocations of Orca. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::NewState; Modified: trunk/orca/lib/Orca/Constants.pm ============================================================================== --- trunk/orca/lib/Orca/Constants.pm (original) +++ trunk/orca/lib/Orca/Constants.pm 2002-11-09 12:30:50.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::Constants.pm: Global constants for Orca. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::Constants; @@ -20,7 +21,7 @@ # IS_WIN32 If Orca is running on a Windows platform. use vars qw($ORCA_VERSION $ORCA_RRD_VERSION); push(@EXPORT_OK, qw($ORCA_VERSION $ORCA_RRD_VERSION DAY_SECONDS IS_WIN32)); -$ORCA_VERSION = '0.264'; +$ORCA_VERSION = '0.265'; $ORCA_RRD_VERSION = 19990222; sub DAY_SECONDS () { 24*60*60 }; sub IS_WIN32 () { $^O eq 'MSWin32' }; Modified: trunk/orca/lib/Orca/OldState.pm ============================================================================== --- trunk/orca/lib/Orca/OldState.pm (original) +++ trunk/orca/lib/Orca/OldState.pm 2002-11-09 12:30:50.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::OldState: Keep state information between invocations of Orca. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::OldState; Modified: trunk/orca/lib/Orca/SourceFile.pm ============================================================================== --- trunk/orca/lib/Orca/SourceFile.pm (original) +++ trunk/orca/lib/Orca/SourceFile.pm 2002-11-09 12:30:50.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::SourceFile: Manage the watching and loading of source data files. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::SourceFile; Modified: trunk/orca/lib/Orca/Utils.pm ============================================================================== --- trunk/orca/lib/Orca/Utils.pm (original) +++ trunk/orca/lib/Orca/Utils.pm 2002-11-09 12:30:50.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::Utils: Small utility subroutines. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::Utils; Modified: trunk/orca/lib/Orca/SourceFileIDs.pm ============================================================================== --- trunk/orca/lib/Orca/SourceFileIDs.pm (original) +++ trunk/orca/lib/Orca/SourceFileIDs.pm 2002-11-09 12:30:51.000000000 -0800 @@ -2,7 +2,8 @@ # identifiers. The primary purpose of this module is to keep only two # copies of all the filenames used by Orca. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::SourceFileIDs; Modified: trunk/orca/lib/Orca/ImageFile.pm ============================================================================== --- trunk/orca/lib/Orca/ImageFile.pm (original) +++ trunk/orca/lib/Orca/ImageFile.pm 2002-11-09 12:30:51.000000000 -0800 @@ -1,6 +1,7 @@ # Orca::ImageFile: Manage the creation of PNG or GIF plot files. # -# Copyright (C) 1998-2001 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 1999-2002 Blair Zajac. package Orca::ImageFile; Added: trunk/orca/lib/rothschild_image_logo.png ============================================================================== Binary files trunk/orca/lib/rothschild_image_logo.png (original) and trunk/orca/lib/rothschild_image_logo.png differ Added: trunk/orca/lib/rothschild_image_logo.psd ============================================================================== Binary files trunk/orca/lib/rothschild_image_logo.psd (original) and trunk/orca/lib/rothschild_image_logo.psd differ Added: trunk/orca/lib/rothschild_image_logo.png.hex ============================================================================== --- trunk/orca/lib/rothschild_image_logo.png.hex (original) +++ trunk/orca/lib/rothschild_image_logo.png.hex 2002-11-09 12:30:52.000000000 -0800 @@ -0,0 +1,70 @@ +9805e474d0a0a1a0000000d094844425000010e400000051806000000092d6709e0000 +00407614d41400001be8c7bf153900000002368425d40000a7520000083800009fff00 +00088e000057030000ae060000a379000071f6799a994d000090219444144587c926c3 +7de60ffffef8f4c04d202be153c02e61984533f8ed0e3f3839c0737144115a69d50468 +18d404a9189938f818751cc1c89b424b86ce2c1503a08870fce0c4202e98875d8a72c2 +307add1504c3008002613ca83f8552ec43823e5d80a0860508f844025e09f04c970663 +8a0a5055c302afeea8c40714a0aac364b00d1503a068f20080026a18670c05700aa044 +043c51c585ae61c146016380606b853a91edc585b30de4b1503a06410d80004001bc04 +b3068b1011061c9c521a90e2c314d59726ab04f3f3c3168f5f1e9289d0a61b284fd054 +00a6573c0082c00434814a08f6f2ea10b5fef99c6df3a08af004db92252e18455f8c0e +1fe861073048c504fc4f30010443b283143e488c91909101a135109e58d0300eb13a18 +d8132e2b360a008ab9ea2113381e1c682307b241b100520b79726103cb506bc4145072 +8abff0200a8c70512a0a65ca8b5420c32f14d28d7b86da8df6f2ea330ea1f9609b1899 +3871ec7099302731eb0f44e1280c60093e50600417cf2f4cc768f07367389f0aa838d0 +81f2021309f348d0280fe89738cfefc18e6a7f04dfc2047328a5ce0200273282318810 +3c0440a268c00fd0529943cd5c927027f2803ccf94c6a35a42d3312df0b8b205c1182c +00417f02c3810cd951910e4734c61240a4f50a83325b2f785a3209d38f2d02a30273df +0800131728d4c1458b30400d09e61728209849046a7208d46118a0c34f883051237f18 +58a2271a78eef009e305ba5142e0ac4402330ddc1c711f0a8c5a5f08f38a5800a4ce03 +002bf4120ab0ec7855e07d668f238656c66c0df8e58838a59088078c341dfae90b478d +6b04193ea04501cbdb0be0c1ea0a0bc18ced708cd20a4f50a4ba0a2c39010851e7c90c +87467302dcdd0a4b402002df8cd060c708699e7805ef10800a1d13e4a120051870b698 +1c008a04405d2e48652308a0940546384ff06c1f25052074e2431400491704d2668108 +5be14120a3134f38a53e4866b7195f3821f38232f07700a28214e76056cdb50ca83193 +c39ed0069671443a7c53a3005a7605c922be326108cc689f31658d11204a4af1058525 +b3df00400d861c943400aa1b09b5480a88385dca4c00054c38a5d10beecf0620fa0742 +e60dac204fa410d758109a591084f382c18490bb1ae004e765e889e30ae7605bc71600 +4ee0c758838a5f70b43a4a41c90a4b202db8a66d44cb9ed94d4f30ac78290c2049a916 +90010434abbaef9f1c9006023679385759702108a0e34e244041174eca995851a14c47 +798e500752c60983868810f57d8ee34b5624a081c01f94f600a2c314db61c63cd34b60 +0a47a8e50528a2540d09b0a7cb2cab8e8c00458b1133e4b8b2f4086cd21978d709dd54 +e4af1c634d58f008a1b28b681c043e6f00108a73365100040188e6dffff96b735db140 +194328c2ab1322484f2d3de90176464de02aea53a77cb68678080567b481188ec5c919 +9a9754f01109ecfb8d4e1972107e197242072f3c5cc063381d863c6e2f1d4d20d853ac +ccbd4c9572ebacd7b5db35798ea14c7fa8839d3e56e8ca3d3c0b1fd8d59def300d96db +95c6c7fbb00a1092831f93a040049189810c644e27f918200a481037f15a5150821128 +cc02570dd94104869f41271cf0a44d8f6c890751e9f58a051621208fcf0fde50f2c79c +ac05100a59324bea431d10eaa4e163ed90b59218cd547475748696111a13a409c3afa2 +e0a74af1010059f48f2d110400d0841c948c153c50082181ca6d54e6da1930049968a1 +da47c708055448cbc330433f90acc18f6cdb0b51e94f81ba52496b86d1e84d600acf20 +a4f34fc2831f58118ab7d0a036055048b62d8041fc0a8f7c5d04205b829751c20ce72c +5dae409b10dbbcf3856caf10208684f817e066009916ebe38a6c529a90023175d90e28 +11f57d90499788d5ec23a060700051650a20d0f55a8f0634938b2250d0120eb28f0b51 +c90a4f20a9c540d87928a024c731d30a24a94d53da8f622b04510186ce492d68b10400 +d8ecaa3d000822d04b4e841181140b6961ea58af4a89949a914d600ac414ccaf834e95 +0d1aabb2a60210db3ee141f50a56c30bd4918bcd402970d2037c5009765e19108ab7f0 +be6c3469f51e6b70db06526ec080099d0ae2e363c0a2039a1169001043a5072910e30e +910a68d2c57054e127d49496d078c3e5a389001b5872c69f21fc024f3c0670301dd470 +5a53051e98b2dc186c83167a181ea8b78c618cf4812602c8c6e21a50fe8c33fe496e10 +05f209a1169001043a5072910041980a2c1145082c6c160419b79728d38791508ab5a8 +e3b0a0a8c2277b1d1c6c5760b6b6d8892c316d572058b09bef0c6b8ee78b3009f714bc +f58e5006dab585c526bde690b54af03028872d53afcec382f90af233224bdc219715c3 +82f01529e78a5b5951020864b0e42300c6ba7286cee04bde116b7c61672421eaa51142 +f4ec6b140d27f0a4e0f30a7002458722726727cf20ac0d0aeaf1db795ec042009f9145 +923d3fc7bdf0736f0872d60600676c10230504a1282010c758112fcec38a7360a4728d +a0e309f11f51880ac360b6040529e74c1fc0d209200020864b0e42310821b08607b145 +8428ab250b3e5e0f10052c02522d1453d286ca45892865a1da0086d612af00c3ce0731 +c604819a0c38dedb726108ce10d2eb60d464d07ddfae8e006e76a775890a28e0db2e78 +47bd123e090be2a3abc3e200b9d9705a5605f6c02b2d22a0b26c736f803df0203812df +0040067ee8e40048188108e78b28bffa5ee2e79cba6040b6bf12a80add0ce5a1b796e2 +ffbaaf5858cc80ec0c6e658a824c27dabc95182daa6f6e5ddfd99e28909f87bd202406 +4488b7d8a2ab7de9457ca481b8b5b0bf35bcbc7961d8fa7d8f1e712c1a312f1035f4f7 +37c244532245fb9b4a87d1b5ae16b447aa97f35d075bdad456ce1b7487da0ea1762c9f +ac80e6f0f377ee5e2200577e69200480241dd1dcef797dc12e08f1a511cc05ef6418f8 +4c4ab7dba317674025df95eff2a693960cc4674215b20dce995cad3fe39e32dac98679 +84b27723320114845cd8e04fb714a6118c11aa7aef55542c524af772d281a7b670cfa2 +d28d9e39608ebd564146884346babfd42491b94d7d2334bf46018450f175f96edeb4fa +8f19ac6743ab60b597e451f3e4460488f9d1b5ecc7ad40013ef702029d4d15087108a0 +e0854c1133e353c1e023646f30821c1935bbf8e146c3c3108a02bf304c4be47d4fc4f3 +001060005898127b09b00863000000009454e444ea240628 Modified: trunk/orca/FAQ ============================================================================== --- trunk/orca/FAQ (original) +++ trunk/orca/FAQ 2002-11-09 12:30:52.000000000 -0800 @@ -1,9 +1,9 @@ This is a FAQ (Frequently Asked Questions) for Orca and the tools that gather data for it. -Please email submissions to the FAQ to orca-users at yahoogroups.com. +Please email submissions to the FAQ to orca-users at orcaware.com. -Version: 1.07 May 24, 2001 +Version: 1.13 Nov 7, 2002. General ------- @@ -23,6 +23,11 @@ description. 2.2) Warning: file `../orcallator/.../temp-percol-2001-02-22' was current and now is not. + 2.3) Warning: cannot create Orca::HTMLFile object: cannot open + `/home/orca_html/o_host1-monthly.html.htm' for writing: Too + many open files. + 2.4) Warning: file `.../orcallator/host1/orcallator-2001-11-06-000' + did exist and is now gone. Solaris/Orcallator.se --------------------- @@ -52,6 +57,11 @@ 3.14) Why don't I get any Interface Bits Per Second data for my qe board? 3.15) Orcallator.se core dumps. + 3.16) Why should I keep my compressed percol-* or orcallator-* files? + 3.17) Why do my Orca plots no longer contain any data after I change + anything related to orcallator, such as the subsystems to + measure, or when something changes on the system, such as mount + points, ethernet devices, etc? General ------- @@ -112,12 +122,29 @@ ---------------- 2.1) Number of columns in line '1,2,3.....' of - ../orcallator/...../percol-2000-09-26 does not match column - description. + ../orcallator/...../percol-2000-09-26 does not match column + description. - When Orca sees a line in an input data file that does not have - the same number of columns as defined at the top of the file, - then Orca will complain and ignore the line. + When Orca sees a line in an input data file that does not have + the same number of columns as defined at the top of the file + when column_description is `first_line' or does not match the + column_description, then Orca will complain and ignore the + line. Additionally, Orca will not record the data from this + line in the RRD files and no data will be plotted. + + If this happens when using orcallator.se, then it will happen + for orcallator.se versions 1.28b6 or older when hardware, mount + points, network interfaces, etc. are added or removed from the + system and orcallator.se outputs a different number of columns. + + To work around this problem, upgrade to version 1.32 or later + of orcallator.se and orcallator.cfg at + + http://www.orcaware.com/orca/pub/ + + which now create new output data file any time the number of + columns or a name of a column changes so that Orca will not + complain and all of your data will be plotted. 2.2) Warning: file `../orcallator/.../temp-percol-2001-02-22' was current and now is not. @@ -155,6 +182,64 @@ Increasing the "late_interval" may also remove this error. + 2.3) Warning: cannot create Orca::HTMLFile object: cannot open + `/home/orca_html/o_host1-monthly.html.htm' for writing: Too + many open files. + + This obviously happens with Orca runs out of open file + descriptors. Orca opens many file descriptors to do its work + and it doesn't like to close them unless it needs to. + + The first thing to check is the maximum number of file + descriptors each process can have. On some systems, the login + shell scripts lower the maximum number of open file descriptors + a process may have. + + To check this in a Csh shell variant (csh, tcsh), then type + + limit descriptors + + or for Bourne shell variant (sh, bash), then type + + ulimit -n + + On all operating systems Orca should be able to use 256 file + descriptors. On some, such as Linux, Orca can open 1024 files + at once. If the number you are getting is less than 256, then + raise this limit. Some operating systems let you raise the + limit. such as Solaris, while others do not, such as Linux. To + try to raise the limit, do + + limit descriptors 1024 + + or + + ulimit -n 1024 + + If these commands do not work, ask your system administrator + how to do this. + + There is a bug in Orca's older than 0.27b2 where Orca would not + close a pipe file descriptor that is uncompressing a compressed + percol-* file to Orca. If your percol-* files are compressed, + then try either upgrading to 0.27b2 or later or apply the patch + + http://www.orcaware.com/orca/pub/patches/orca-0.26-defunct-processes-patch.txt + + to Orca 0.26. This should have Orca reduce its file descriptor + count. + + 2.4) Warning: file `.../orcallator/host1/orcallator-2001-11-06-000' + did exist and is now gone. + + Orca prints this message when it found an input data file to + read and when it goes to read it, which may be a while later, + the file no longer exists. + + When Orca is being used with orcallator.se, this message may + occur when orcallator.se compresses the previous day's percol-* + or orcallator-* file that Orca found. + Solaris/Orcallator.se --------------------- @@ -423,3 +508,54 @@ i = 0; for(p=strtok(buf, "\t"); p != nil; p=strtok(nil, "\t")) { switch(i) { + + 3.16) Why should I keep my compressed percol-* or orcallator-* files? + + There are several reasons to keep the data files: + + 1) If the RRD files get screwed up, you'll be able to + regenerate them. + + 2) If Orca ever needs to change the internal format of the RRD + files, it'll need to regenerate them. + + 3) If you ever want to look at older data in the RRD files, the + older data has less resolution. For example, if you want to + look at data, say 6 months old, in the RRD files, it is + averaged over a whole day. You won't be able to get the 5 + minute data generated by orcallator.se. + + Here's the resolution of the data in the RRD files (here + RRA is Round Robin Archive and there can be many in one RRD + file) as defined in lib/Orca/Constants.pm + + # The first RRA is every 5 minutes for 200 hours, the second + # is every 30 minutes for 31 days, the third is every 2 + # hours for 100 days, and the last is every day for 3 years. + + 3.17) Why do my Orca plots no longer contain any data after I change + anything related to orcallator, such as the subsystems to + measure, or when something changes on the system, such as mount + points, ethernet devices, etc? + + Orca's input data files must contain the exact number of + columns either specified in the orcallator.cfg with the + column_description listing the actual column names or the + column names as specified in the first line of the input data + file when column_description is set to `first_line'. If the + number of columns do not match, then Orca ignores this data to + protect the RRD files from incorrect data added to them. + + The columns in the Orca's input files commonly happen with + orcallator.se when the administrator tells orcallator to + measure a different set of subsystems or when the system itself + adds or removed mount points, disk drives, ethernet devices, + etc. + + To work around this problem, upgrade to the latest version of + Orca, orcallator.se and orcallator.cfg which now create a new + data file anytime the number of columns changes. The file + format of the output files has changed from + orcallator-YYYY-MM-DD to orcallator-YYYY-MM-DD-XXX where XXX is + a monotonically increasing number that resets to 0 at the + beginning of the next day. Modified: trunk/orca/CHANGES ============================================================================== --- trunk/orca/CHANGES (original) +++ trunk/orca/CHANGES 2002-11-09 12:30:52.000000000 -0800 @@ -1,4 +1,548 @@ -Tue Oct 2 18:18:29 PDT 2001 +Thu Nov 7 14:53:39 PST 2002 Blair Zajac + + * Release Orca version 0.27b3. + +Thu Nov 7 14:45:34 PST 2002 Blair Zajac + + * configure.in: Only print the warning about not using + --with-*-log on solaris systems. + +Thu Nov 7 14:29:45 PST 2002 Blair Zajac + + * FAQ: Update all mailing list info to refer to the Mailman + mailing lists on orcaware.com. + * NEWS: Ditto. + * README: Ditto. + * configure.in: Ditto. + * src/orca.pl.in: Ditto. + +Thu Nov 7 13:56:42 PST 2002 Blair Zajac + + * packages: Include Time::HiRes 1.38. + * configure.in: Ditto. + * configure: Ditto. + * NEWS: Ditto. + +Thu Nov 7 13:10:56 PST 2002 Blair Zajac + + * orcallator/start_orcallator.sh.in: Replace @ORCALLATOR_DIR@ + with @VAR_DIR@/orcallator. Patch by Sean O'Neill + . + +Wed Nov 6 22:02:41 PST 2002 Blair Zajac + + * lib/Orca/HTMLFile.pm: Print in each generated HTML file in + an HTML comment the version of Orca, RRDtool and Perl that + was used. + +Wed Nov 6 21:29:55 PST 2002 Blair Zajac + + * COMMITTERS: New file. + * HACKING: New file. + +Wed Nov 6 21:28:02 PST 2002 Blair Zajac + + * config/config.guess: Upgrade from + ftp://ftp.gnu.org/gnu/config to version 2002-10-21. + * config/config.sub: Upgrade from ftp://ftp.gnu.org/gnu/config + to version 2002-09-05. + +Wed Nov 6 20:56:32 PST 2002 Blair Zajac + + * src/orca.pl.in: Rename orca.gif to orca_logo.gif. Rename + rrdtool.gif to rrdtool_logo.gif. + * lib/Makefile.in: Ditto. + * lib/orca_logo.gif: Renamed from orca.gif. + * lib/orca_logo.gif.hex: Renamed from orca.gif.hex. + * lib/rrdtool_logo.gif: Renamed from rrdtool.gif. + * lib/rrdtool_logo.gif.hex: Renamed from rrdtool.gif.hex. + * lib/Orca/HTMLFile.pm: Ditto. + +Wed Nov 6 20:49:38 PST 2002 Blair Zajac + + * src/orca.pl.in: Add rothschild_image_logo.png as an + additional file that is automatically created when Orca + runs, the same as orca.gif and rrdtool.gif. + * lib/rothschild_image_logo.png: New PNG file. + * lib/rothschild_image_logo.psd: New Photoshop file. + * lib/Makefile.in: Generate rothschild_image_logo.png.hex from + rothschild_image_logo.png. + +Wed Nov 6 20:00:33 PST 2002 Blair Zajac + + * src/orca.pl.in: Now require Perl version 5.005_03 instead of + 5.004_05. Perl versions older than this are very broken and + cannot even load Orca. Additionally, CPAN modules are now + requiring newer Perl features which the older ones do not + support. + * NEWS: Ditto. + * INSTALL: Ditto. + +Tue Nov 5 09:48:48 PST 2002 Blair Zajac + + * packages: Include and require RRDtool 1.0.40. + * configure.in: Ditto. + * configure: Ditto. + * NEWS: Ditto. + +Sun Nov 3 09:25:50 PST 2002 Blair Zajac + + * packages: Include TimeDate 1.14. + * configure.in: Ditto. + * configure: Ditto. + * NEWS: Ditto. + +Thu Oct 3 00:28:49 PDT 2002 Blair Zajac + + * packages: Include and require Storable 2.05. + * configure.in: Ditto. + * configure: Ditto. + * INSTALL: Ditto. + * NEWS: Ditto. + +Sat Aug 24 20:39:35 PDT 2002 Blair Zajac + + * src/orca.pl.in: At the top of the `Available Targets' and + `Available Data Sets' HTML pages, add a link back to the top + so that the user does not have to use the browser's back + button. Add `

' after any plots so that on the + `All' plots, there is some vertical separation between the + plots when viewed by the Opera browser. + +Thu Aug 22 21:24:43 PDT 2002 Blair Zajac + + * orcallator/orcallator.cfg.in: Add a match on ce\d+ for the + Sun GigaSwift Gigabit Ethernet card. + +Sat Aug 17 14:54:03 PDT 2002 Blair Zajac + + * orcallator/orcallator.cfg.in: Remove the extra data line for + the "Disk Run Percent" plot that I inadvertently added. + +Sat Aug 17 14:44:36 PDT 2002 Blair Zajac + + * config/config.guess: Upgrade from + ftp://ftp.gnu.org/gnu/config to version 2002-07-23. + * config/config.sub: Upgrade from ftp://ftp.gnu.org/gnu/config + to version 2002-07-03. + +Sat Aug 17 14:41:38 PDT 2002 Blair Zajac + + * configure.in: Just before configure exits, print a message + pointing Orca users to the Make Blair Happy page. + * configure: Ditto. + +Sun Aug 11 20:12:38 PDT 2002 Blair Zajac + * orcallator/orcallator.se: + Upgrade to version 1.35. + Add a new measurement, the number of secure web server + processes on the system using the column name #httpsds. + If the environmental variable WEB_SERVER_SECURE is + defined, use its value as the regular expression to + match on process names. If WEB_SERVER_SECURE is not + defined, then count the number of httpsd's. New + variable www_server_secure_proc_name to hold the regular + expression. + Increase the maximum number of disks that can be monitored + using the RAWDISK code from 512 to 1024 by increasing + MAX_RAWDISKS from 512 to 1024. + Reformat and modify the usage message to fit the new + WEB_SERVER_SECURE environmental variable. + (count_procs): Renamed from count_proc. Take a list of + regular expressions to match instead of just one regular + expression. Return the number of process names that + match each regular expression in a global integer array, + count_procs_results. + * orcallator/start_orcallator.sh.in: + Set WEB_SERVER to httpd and and set WEB_SERVER_SECURE to + httpsd and export them both into the environment for + orcallator.se to use. Add documentation for these two + variables. + +Wed Aug 7 19:57:45 PDT 2002 Blair Zajac + + * Makefile.in: Restructure the `all' and `install' rules so + that if make fails in one subdirectory, then the top level + make fail fail immediately. Previously, all subdirectories + would be built, regardless if there was a failure in any one + subdirectory. Do not do this for `clean' and `distclean', + because they should always clean up as much as they can, + regardless of any sub-make failures. + * configure.in: Rename all borp_* variables to orca_*. Fix a + spelling mistake for the variable orca_cv_perl_rrds which + was preventing RRDtool from being built. + +Tue Jul 30 21:17:31 PDT 2002 Blair Zajac + + * orcallator/orcallator.cfg.in: Add a match on qfe\d+ for 100 + Mbit Ethernet cards. Change html_page_header to say "Put + your site's logo here". Change html_top_title to read "Orca + Host Status" instead of "Yahoo!/GeoCities Host Status". + Remove , which is not a valid HTML 4.01 + Transitional tag. + +Fri Jul 26 18:50:22 PDT 2002 Blair Zajac + + * packages: Include and require RRDtool 1.0.39. + * configure.in: Ditto. + * configure: Ditto. + * NEWS: Ditto. + +Mon Jul 22 22:18:04 PDT 2002 Blair Zajac + + * src/orca.pl.in: Make sure that the HTML output conforms to + HTML 4.01 Transitional by no longer using the + HTML tag, instead of  . Validated with + http://validator.w3.org/ + * lib/Orca/HTMLFile.pm: Ditto. + * lib/Orca/Constants.pm: Bump version number to 0.265. + +Mon Jul 22 20:58:47 PDT 2002 Blair Zajac + + * packages: Include TimeDate 1.1301. + * configure.in: Ditto. + * configure: Ditto. + * NEWS: Ditto. + +Sun Jun 30 18:59:29 PDT 2002 Blair Zajac + + * packages: Include and require Storable 2.04. + * configure.in: Ditto. + * configure: Ditto. + * INSTALL: Ditto. + * NEWS: Ditto. + +Fri Jun 14 16:55:42 PDT 2002 Blair Zajac + + * config/config.guess: Upgrade from + ftp://ftp.gnu.org/gnu/config to version 2002-05-29. + * config/config.sub: Upgrade from ftp://ftp.gnu.org/gnu/config + to version 2002-05-28. + +Fri Jun 7 10:02:48 PDT 2002 Blair Zajac + + * packages: Include TimeDate 1.13. + * configure.in: Ditto. + * configure: Ditto. + * NEWS: Ditto. + +Wed Jun 5 11:04:07 PDT 2002 Blair Zajac + + * contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in: On + Solaris 2.6 and Solaris 2.8, /bin/sh's builtin test does not + support the -e test. Force using /bin/test whichs supports + the -e test. Problem noted by Marty Leisner. + +Mon Jun 3 10:38:51 PDT 2002 Blair Zajac + + * packages: Include TimeDate 1.12. + * configure.in: Ditto. + * configure: Ditto. + * NEWS: Ditto. + +Thu May 30 17:53:26 PDT 2002 Blair Zajac + + * src/orca.pl.in: Add the default plot_width and plot_height + of 500 and 125 respectively, to the POD documentation. + +Tue May 28 13:35:27 PDT 2002 Blair Zajac + + * FAQ: Added an answer to the question: "Why do my Orca plots + no longer contain any data after I change anything related + to orcallator, such as the subsystems to measure, or when + something changes on the system, such as mount points, + ethernet devices, etc?" + +Mon May 6 10:38:16 PDT 2002 Blair Zajac + + * packages: Include and require Digest::MD5 2.20. + * configure.in: Ditto. + * configure: Ditto. + * INSTALL: Ditto. + * NEWS: Ditto. + +Thu May 2 10:02:56 PDT 2002 Blair Zajac + + * packages: Include and require Digest::MD5 2.19. + * configure.in: Ditto. + * configure: Ditto. + * INSTALL: Ditto. + * NEWS: Ditto. + +Wed May 1 10:49:13 PDT 2002 Blair Zajac + + * orcallator/orcallator.cfg.in: Add the qfe Ethernet device to + the list of 100 Mbit Ethernet devices to plot data for. + +Thu Apr 25 12:23:57 PDT 2002 Blair Zajac + + * packages: Include and require Digest::MD5 2.17. + * configure.in: Ditto. + * configure: Ditto. + * INSTALL: Ditto. + * NEWS: Ditto. + +Thu Apr 18 18:39:19 PDT 2002 Blair Zajac + + * orcallator/start_orcallator.sh.in: Change the command to + find existing orcallator.se processes to avoid nawk + complaining that processes with extremeley long processes + are exceeding some internal buffers. + +Sat Apr 6 20:17:13 PST 2002 Blair Zajac + + * packages: Upgrade from TimeDate 1.10 to TimeDate 1.11 which + upgrades Date::Parse from 2.20 to 2.22. + * configure.in: Update to point to TimeDate 1.11. + +Sat Apr 6 20:01:35 PST 2002 Blair Zajac + + * configure.in: Set and replace POD2HTML, POD2MAN and POD2TEXT + with the locations of pod2html, pod2man and pod2text + respectively. If one of the programs cannot be found, then + the value : is used. Require autoconf version 2.52. + + * docs/Makefile.in: Use the new POD2HTML, POD2MAN and POD2TEXT + variables to create the output manuals. + + * Makefile.in: Change the command to create configure.in when + running autoconf to use --include=config instead of + --localdir=config to remove a warning from autoconf 2.52. + Add autom4te.cache to the list of directories to be deleted + using 'make distclean'. + + * config/config.guess: Upgrade from + ftp://ftp.gnu.org/gnu/config to version 2002-03-20. + + * config/config.sub: Upgrade from ftp://ftp.gnu.org/gnu/config + to version 2002-03-07. + +Mon Jan 14 15:11:36 PST 2002 Blair Zajac + + * orcallator/start_orcallator.sh.in: Instead of starting + orcallator.se without telling it the measurement interval + via the command line and letting it set the default + measurment interval of 300, set the default interval in + start_orcallator.sh.in to 300 and pass it to orcallator.se's + command line. + +Sat Dec 15 19:55:19 PST 2001 Blair Zajac + + * config/config.guess: Upgrade from ftp://ftp.gnu.org/gnu/config . + * config/config.sub: Ditto. + +Thu Dec 13 14:12:07 PST 2001 Blair Zajac + + * src/orca.pl.in: Correct the documentation for the + max_filename_length configuration file option to reflect + that the default max_filename_length is 235. + +Sat Dec 1 12:35:46 PST 2001 Blair Zajac + + * packages: Include and require Storable 1.014. + * configure.in: Ditto. + * configure: Ditto. + * INSTALL: Ditto. + * NEWS: Ditto. + +Fri Nov 16 00:17:10 PST 2001 Blair Zajac + + * lib/Orca/HTMLFile.pm: Make the generated HTML compliant to + HTML 4.01. Make the output font for Blair Zajac's name and + email address use "verdana,geneva,arial,helvetica" instead + of "Arial,Helvetica" which does not work that well for + Macintosh users. + * orcallator/orcallator.cfg.in: Ditto. + +Fri Nov 16 00:09:34 PST 2001 Blair Zajac + + * orcallator/orcallator.cfg.in: Replace @ORCALLATOR_DIR@ with + @VAR_DIR@/orcallator to enable other data measurement tools + to place their data under @VAR_DIR at . + * orcallator/start_orcallator.sh.in: Ditto. + * orcallator/orcallator_running.pl.in: Ditto. + * orcallator/Makefile.in: Remove @ORCALLATOR_DIR@ as it is not + used. + +Fri Nov 9 10:04:28 PST 2001 Blair Zajac + + * FAQ: Add an answer to the question: "Why should I keep my + compressed percol-* or orcallator-* files?" + +Thu Nov 8 10:49:58 PST 2001 Blair Zajac + + * FAQ: Add an answer to describe the message: "Warning: file + `.../orcallator/host1/orcallator-2001-11-06-000' did exist + and is now gone." + +Sat Nov 3 08:04:26 PST 2001 Blair Zajac + + * FAQ: Update the answer to question 2.1 "Number of columns in + line '1,2,3.....' of ../orcallator/.../percol-2000-09-26 + does not match column description" to suggest upgrading to + orcallator.se and orcallator.cfg.in 1.32 or greater. + +Sat Oct 27 18:02:52 PDT 2001 Blair Zajac + + * orcallator/orcallator.cfg.in: Change html_dir from + @HTML_DIR@ to @HTML_DIR@/orcallator so that other Orca + output directory trees, such as those from orca_services, + can be placed in the same directory. + +Sat Oct 27 17:41:40 PDT 2001 Blair Zajac + + * configure.in: Rename all names containing orcaservices to + orca_services to make the name easier to read. + * configure: Ditto. + * NEWS: Ditto. + * contrib/Makefile.in: Ditto. + * contrib: Rename the orcaservices directory to orca_services + to make the name easier to read. + * contrib/*: Ditto. + +Wed Oct 24 23:36:31 PDT 2001 Blair Zajac + + * orcallator/orcallator.cfg.in: Divide the state values in "%g + System Overview" by 2 to make normal operating state values + range from 0 to 1, which is expected for a system + administrator. + +Wed Oct 24 20:24:30 PDT 2001 Blair Zajac + + * orcallator/orcallator.se: Upgrade to orcallator.se version + 1.32. Fix a problem where the web access log file pointer + instead of the file descriptor was being passed to fstat(). + Fix a problem where the cached web access log stat() + information wasn't being erased if the log file was + successfully stat()ed but then fopen() failed. Rename + variables used to keep track of open file pointers and file + stat() information to be clearer: ofile to out_log_fp, + www_fd to www_log_fp, www_stat to www_log_stat, www_ino to + www_log_ino and www_size to www_log_size. Problem noted by + Jeremy McCarty . + +Sun Oct 21 14:56:45 PDT 2001 Blair Zajac + + * orcallator/orcallator.se: Upgrade to orcallator.se version + 1.31. Instead of naming the output files percol-*, name + them orcallator-*. Always define USE_RAWDISK to use the new + raw disk code. Previously, USE_RAWDISK was defined only if + WATCH_OS was defined, but if WATCH_DISK was defined and + WATCH_OS was not, then the new raw disk code was not being + used. This change makes the behavior consistent. + +Sun Oct 21 14:40:41 PDT 2001 Blair Zajac + + * README: Add wish list URL. + +Sun Oct 21 13:01:09 PDT 2001 Blair Zajac + + * orcallator/orcallator.cfg.in: The "%g Disk Run Percent" plot + was not matching on IDE disks on x86 Solaris systems. Add + an additional regular expression to match these disks. + +Fri Oct 19 19:30:26 PDT 2001 Blair Zajac + + * orcallator/orcallator.cfg.in: Revamp the "%g Subsystem + state" plot. Rename the plot to "%g System Overview" and + reorder the subsystems plotted to make more sense. + +Fri Oct 19 18:59:10 PDT 2001 Blair Zajac + + * lib/Orca/Constants.pm: Update Orca's version number to 0.27. + * orcallator/orcallator.cfg.in: Require Orca version 0.27. + +Fri Oct 19 18:17:22 PDT 2001 Blair Zajac + + * orcallator/orcallator.se: Upgrade to orcallator.se version + 1.30. Rename the new State_* columns to state_*. + +Fri Oct 19 18:16:30 PDT 2001 Blair Zajac + + * orcallator/orcallator.se: Upgrade to orcallator.se version + 1.30b2. Output eleven new columns named State_* where each + column represents numerically the state of one of the + system's substates as they appear in the DNnsrkcmdit output. + The character * is replaced with the same character that + appears in the DNnsrkcmdit string to represent the + particular subsystem. This can be used to create a single + plot that shows how all of the subsystems are performing. + The mapping between successive states is exponential, so + that as the subsystems get in worse conditions, the plots + will show higher values. Patch contributed by Rusty Carruth + . Make all of the live_rule.se + live and temporary variable names consistent. + +Fri Oct 19 18:14:15 PDT 2001 Blair Zajac + + * orcallator/orcallator.se: Upgrade to orcallator.se version + 1.30b1. Changed method used by raw_disk_map to detect the + end of GLOBAL_disk_info to looking for the first short disk + name. This works for SCSI disks and looking for fd or st + devices which should work for EIDE devices. Patch + contributed by Alan LeGrand . + +Mon Oct 15 15:28:47 PDT 2001 Blair Zajac + + * lib/Orca/OpenFileHash.pm: If a file cannot be opened the + first time but after reducing the number of open file + descriptors the file is opened, then print a message saying + that the file was opened. + +Thu Oct 11 21:51:07 PDT 2001 Blair Zajac + + * FAQ: Answer the question: "Warning: cannot create + Orca::HTMLFile object: cannot open + '/home/orca_html/o_host1-monthly.html.htm' for writing: Too + many open files." + +Thu Oct 11 19:13:18 PDT 2001 Blair Zajac + + * orcallator/orcallator.cfg.in: Add a new orcallator plot + titled "%g Subsystem state" which plots a numerical severity + level using the subsystem state as determined by SE's + live_rules.se class. How a subsystem state is determined is + described here + + http://www.sun.com/950901/columns/adrian/column1.html + + but the specific rules for each subsystem on this web page + are out of date with respect to the latest SE release. + +Thu Oct 11 18:40:55 PDT 2001 Blair Zajac + + * src/orca.pl.in: In Orca's configuration file, instead of + defaulting to LINE1 for any data parameters appearing + in a plot configuration that does not have its line_type + specified, use the last set line_type set in that plot. If + no line_type's are set in a plot, then use LINE1 as the + default for all data's in that plot. + * lib/Orca/Config: Ditto. + +Thu Oct 11 16:42:26 PDT 2001 Blair Zajac + + * src/orca.pl.in: Now require Perl version 5.004_05 instead of + 5.004_01. Perl 5.004_04 is very broken and cannot even load + Orca. + * contrib/orcaservices/orcaservices.pl.in: Ditto. + * NEWS: Ditto. + * INSTALL: Ditto. + +Fri Oct 5 14:25:18 PDT 2001 Blair Zajac + + * orcallator/orcallator.se: Upgrade to orcallator.se version + 1.29. In SE 3.2.1 stat.se, mknod is a C-preprocessor define + to _xmknod on x86 systems while on SPARC systems stat.se + declares mknod as a normal function. When stat.se is + included before kstat.se on x86 systems the mknod define + causes a compile error on kstat's mknod variables which are + part of the ks_rfs_proc_v3 and ks_rfs_req_v3 structures. + The work around is to include kstat.se before stat.se. + * NEWS: Be more specific on what files where changed in the + orcallator.se/orcallator.cfg.in section for the changes made + in 0.27b2. + +Tue Oct 2 18:18:29 PDT 2001 Blair Zajac * Release Orca version 0.27b2. @@ -9,7 +553,7 @@ Tue Oct 2 17:56:22 PDT 2001 Blair Zajac - * config/config.guess: Upgrade from ftp://ftp.gnu.org/gnu/config + * config/config.guess: Upgrade from ftp://ftp.gnu.org/gnu/config . * config/config.sub: Ditto. Tue Oct 2 17:51:46 PDT 2001 Blair Zajac @@ -107,7 +651,7 @@ Fri Aug 24 11:12:31 PDT 2001 - * config/config.guess: Upgrade from ftp://ftp.gnu.org/gnu/config + * config/config.guess: Upgrade from ftp://ftp.gnu.org/gnu/config . * config/config.sub: Ditto. Fri Aug 24 09:57:36 PDT 2001 @@ -157,7 +701,7 @@ Wed Jul 11 16:08:15 PDT 2001 - * config/config.guess: Upgrade from ftp://ftp.gnu.org/pub/gnu/config + * config/config.guess: Upgrade from ftp://ftp.gnu.org/pub/gnu/config . * config/config.sub: Ditto. Mon Jul 2 22:58:04 PDT 2001 @@ -183,7 +727,7 @@ Mon Jun 4 00:50:28 PDT 2001 - * config/config.guess: Upgrade from ftp://ftp.gnu.org/pub/gnu/config + * config/config.guess: Upgrade from ftp://ftp.gnu.org/pub/gnu/config . * config/config.sub: Ditto. Thu May 24 12:09:18 PDT 2001 Modified: trunk/orca/NEWS ============================================================================== --- trunk/orca/NEWS (original) +++ trunk/orca/NEWS 2002-11-09 12:30:53.000000000 -0800 @@ -1,3 +1,104 @@ +NEW IN ORCA 0.27b3 +================== + + 1) Now require Perl version 5.005_03 instead of 5.004_01. Perl + versions older than this are very broken and cannot even load + Orca. Additionally, CPAN modules are now requiring newer Perl + features which the older ones do not support. + + 2) In Orca's configuration file, instead of defaulting to LINE1 for + any data parameters appearing in a plot configuration that does + not have its line_type specified, use the last set line_type set + in that plot. If no line_type's are set in a plot, then use LINE1 + as the default for all data's in that plot. + + 3) Rename any orcaservices file and directory names to orca_services + to make the name easier to read. + + 4) Include and require rrdtool 1.0.40, Digest::MD5 2.20 and Storable + 2.05. Include TimeDate 1.14 and Time::HiRes 1.38. + + 5) All of the Orca mailing lists have moved off of Yahoo! Groups and + are now hosted on orcaware.com using the Mailman mailing list + software. See http://devel.orcaware.com/orca/mailing_lists.html + or http://www.orcaware.com/mailman/listinfo for more information. + +The following changes are what's new in orcallator.se 1.35 and the +orcallator.cfg file since version 1.28 which was included with Orca +0.27b2. Most of the changes below are taken advantage of in the +included orcallator.cfg and start_orcallator files. + + 4) Instead of naming the output files percol-*, name them + orcallator-*. + + 5) Output eleven new columns named state_* where each column + represents numerically the state of one of the system's substates + as they appear in the DNnsrkcmdit output. The character * is + replaced with the same character that appears in the DNnsrkcmdit + string to represent the particular subsystem. This can be used to + create a single plot that shows how all of the subsystems are + performing. The mapping between successive states is exponential, + so that as the subsystems get in worse conditions, the plots will + show higher values. Patch contributed by Rusty Carruth + . Make all of the live_rule.se live + and temporary variable names consistent. + + 6) In orcallator.se, SE 3.2.1 stat.se, mknod is a C-preprocessor + define to _xmknod on x86 systems while on SPARC systems stat.se + declares mknod as a normal function. When stat.se is included + before kstat.se on x86 systems the mknod define causes a compile + error on kstat's mknod variables which are part of the + ks_rfs_proc_v3 and ks_rfs_req_v3 structures. The work around is + to include kstat.se before stat.se. + + 7) In orcallator.se, changed method used by raw_disk_map to detect + the end of GLOBAL_disk_info to looking for the first short disk + name. This works for SCSI disks and looking for fd or st devices + whichshould work for EIDE devices. Patch contributed by Alan + LeGrand . + + 8) In orcallator.se, always define USE_RAWDISK to use the new raw + disk code. Previously, USE_RAWDISK was defined only if WATCH_OS + was defined, but if WATCH_DISK was defined and WATCH_OS was not, + then the new raw disk code was not being used. This change makes + the behavior consistent. + + 9) In orcallator.se, fix a problem where the web access log file + pointer instead of the file descriptor was being passed to + fstat(). Fix a problem where the cached web access log stat() + information wasn't being erased if the log file was successfully + stat()ed but then fopen() failed. Problem noted by Jeremy McCarty + . + +10) In orcallator.se, in check_output_log_filename(), stat() was was + being passed a stat_t by value, instead of a pointer to a stat_t. + Only the return value from stat() was being used, so this bug had + no effect upon the logic of the code. Problem noted by Richard + Pettit . + +11) In orcallator.se, add support for SE version 3.3. Break + compatibility with SE version 3.1, which was released in April + 1999, and older SE versions. Solaris 8 removed the pagesio + variable and in SE 3.3, kstat.se #ifdef's out ks_system_pages's + pagesio variable on Solaris 8 and above, so now orcallator.se only + measures pagesio on Solaris 7 or older. Even with older versions + of SE and orcallator.se which defined and used pagesio on Solaris + 8, pagesio would always measure as 0. SE 3.3 finally removed the + compatibility #define from prpsinfo_t to psinfo_t, so now use + psinfo_t. This breaks compatibility with SE 3.1 and older SE + versions. + +12) In orcallator.se, add a new measurement, the number of secure web + server processes on the system using the column name #httpsds. If + the environmental variable WEB_SERVER_SECURE is defined, use its + value as the regular expression to match on process names. If + WEB_SERVER_SECURE is not defined, then count the number of + httpsd's. New variable www_server_secure_proc_name to hold the + regular expression. Increase the maximum number of disks that can + be monitored using the RAWDISK code from 512 to 1024 by increasing + MAX_RAWDISKS from 512 to 1024. Reformat and modify the usage + message to fit the new WEB_SERVER_SECURE environmental variable. + NEW IN ORCA 0.27b2 ================== @@ -31,47 +132,47 @@ 5) In orcallator.cfg.in, the Disk Run Percent plots also match for disk_runp_sd\d+ in addition to disk_runp_md\d+. - 6) Change the output log filename format from percol-%Y-%m-%d to - percol-%Y-%m-%d-XXX, where XXX is a number starting at 0 that is - incremented anytime the number of output columns changes or type - of data stored in a column changes. This is in addition to the - creation of a new log filename when a new day starts. Whenever - the program needs to create a new log file for any reason, it will - search for the smallest XXX so that there are no log files named - percol-%Y-%m-%d-XXX{,.Z,.gz,.bz2}. If the COMPRESSOR - environmental is set and any uncompressed files are found while - looking for the smallest XXX, they are compressed with the - COMPRESSOR command. orcallator.cfg.in's find_files has been + 6) In orcallator.se, change the output log filename format from + percol-%Y-%m-%d to percol-%Y-%m-%d-XXX, where XXX is a number + starting at 0 that is incremented anytime the number of output + columns changes or type of data stored in a column changes. This + is in addition to the creation of a new log filename when a new + day starts. Whenever the program needs to create a new log file + for any reason, it will search for the smallest XXX so that there + are no log files named percol-%Y-%m-%d-XXX{,.Z,.gz,.bz2}. If the + COMPRESSOR environmental is set and any uncompressed files are + found while looking for the smallest XXX, they are compressed with + the COMPRESSOR command. orcallator.cfg.in's find_files has been updated to find the new log filenames generated by orcallator.se 1.28. - 7) Instead of outputting the number of CPUs only when WATCH_MUTEX is - defined, output it when either WATCH_CPU or WATCH_MUTEX is - defined. Only declare and update tmp_mutex if WATCH_MUTEX - defined. - - 8) Add three parameters that vmstat outputs to the output files that - orcallator.se generates, #runque, vmstat's `r' column, which is - the number of processes in the run queue waiting to run on a CPU, - #waiting, vmstat's `b' column, which is the number of processes - blocked for resourceses (I/O, paging), and #swpque, vmstat's `w', - the number of proceses runnable but swapped out. In - orcallator.cfg.in add a new plot titled "Processes in Run + 7) In orcallator.se, instead of outputting the number of CPUs only + when WATCH_MUTEX is defined, output it when either WATCH_CPU or + WATCH_MUTEX is defined. Only declare and update tmp_mutex if + WATCH_MUTEX defined. + + 8) In orcallator.se, add three parameters that vmstat outputs to the + output files that orcallator.se generates, #runque, vmstat's `r' + column, which is the number of processes in the run queue waiting + to run on a CPU, #waiting, vmstat's `b' column, which is the + number of processes blocked for resourceses (I/O, paging), and + #swpque, vmstat's `w', the number of proceses runnable but swapped + out. In orcallator.cfg.in add a new plot titled "Processes in Run Queue/Waiting/Swapped" to plot the new measurements. - 9) Check [wr]lentime to see if an EMC is using a fake disk for - control. EMC disks have a fake disk which commands are run over - to configure the disk array or to get stats from; they are not - real data transfers. They cause 1000 MB/sec writes to appear in - the stats. I still get them but not as often with this bit of - code in. If the I/O which occurred in the last five minutes is - not greater than 1/100sec then it is not a very valid stat anyway. - What hapens is that we can have a small I/O, say 1024 bytes, in a - 1/100sec = 1024*100/sec. Make sure to define + 9) In orcallator.se, check [wr]lentime to see if an EMC is using a + fake disk for control. EMC disks have a fake disk which commands + are run over to configure the disk array or to get stats from; + they are not real data transfers. They cause 1000 MB/sec writes to + appear in the stats. I still get them but not as often with this + bit of code in. If the I/O which occurred in the last five + minutes is not greater than 1/100sec then it is not a very valid + stat anyway. What hapens is that we can have a small I/O, say + 1024 bytes, in a 1/100sec = 1024*100/sec. Make sure to define HAVE_EMC_DISK_CONTROL to enable this check. Patch contributed by Damon Atkins . -10) Increase MAX_COLUMNS from 512 to 2048. +10) In orcallator.se, increase MAX_COLUMNS from 512 to 2048. NEW IN ORCA 0.27b1 ================== @@ -128,9 +229,10 @@ contributed scripts and programs will be kept. The first submissions are: - a) Include the orcaservices package in the contrib directory which - was written by Carlos Canau and - documented by Jose Carlos . This package + a) Include the orca_services (was originally named orcaservices + but this is too hard to read) package in the contrib directory + which was written by Carlos Canau + and documented by Jose Carlos . This package allows monitoring of many different types of Unix services, such as DNS, SMTP, POP, etc. Modified: trunk/orca/packages/Digest-MD5-2.20/MD5.pm ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/MD5.pm (original) +++ trunk/orca/packages/Digest-MD5-2.20/MD5.pm 2002-11-09 12:30:53.000000000 -0800 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION @ISA @EXPORT_OK); -$VERSION = '2.16'; # $Date: 2001/09/07 05:45:14 $ +$VERSION = '2.20'; # $Date: 2002/05/06 05:15:09 $ require Exporter; *import = \&Exporter::import; @@ -113,7 +113,7 @@ the state of the MD5 message-digest algorithm. You can add data to the object and finally ask for the digest. -If called as a instance method (i.e. $md5->new) it will just reset the +If called as an instance method (i.e. $md5->new) it will just reset the state the object to the state of a newly created object. No new object is created in this case. @@ -230,7 +230,7 @@ This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. - Copyright 1998-2001 Gisle Aas. + Copyright 1998-2002 Gisle Aas. Copyright 1995-1996 Neil Winton. Copyright 1991-1992 RSA Data Security, Inc. Modified: trunk/orca/packages/Digest-MD5-2.20/t/files.t ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/t/files.t (original) +++ trunk/orca/packages/Digest-MD5-2.20/t/files.t 2002-11-09 12:30:54.000000000 -0800 @@ -1,3 +1,10 @@ +BEGIN { + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } +} + print "1..5\n"; use strict; @@ -6,13 +13,31 @@ # # This is the output of: 'md5sum Changes README MD5.pm MD5.xs rfc1321.txt' # -my $EXPECT = <updir; + while (@path) { + $path = File::Spec->catdir($path, shift @path); + } + $file = File::Spec->catfile($path, $file); + } +# print "# file = $file\n"; + unless (-f $file) { + warn "No such file: $file\n"; + next; + } + if ($ENV{EBCDIC_MD5SUM}) { + require Encode; + my $data = cat_file($file); + Encode::from_to($data, 'latin1', 'cp1047'); + print md5_hex($data), " $base\n"; + next; + } my $md5bin = pack("H*", $md5hex); my $md5b64; if ($B64) { @@ -37,14 +87,15 @@ chop($md5b64); chop($md5b64); # remove padding } my $failed; + my $got; if (digest_file($file, 'digest') ne $md5bin) { print "$file: Bad digest\n"; $failed++; } - if (digest_file($file, 'hexdigest') ne $md5hex) { - print "$file: Bad hexdigest\n"; + if (($got = digest_file($file, 'hexdigest')) ne $md5hex) { + print "$file: Bad hexdigest: got $got expected $md5hex\n"; $failed++; } @@ -110,7 +161,6 @@ #print "$file $method\n"; open(FILE, $file) or die "Can't open $file: $!"; - binmode(FILE); my $digest = Digest::MD5->new->addfile(*FILE)->$method(); close(FILE); @@ -122,7 +172,6 @@ my($file) = @_; local $/; # slurp open(FILE, $file) or die "Can't open $file: $!"; - binmode(FILE); my $tmp = ; close(FILE); $tmp; Modified: trunk/orca/packages/Digest-MD5-2.20/t/md5-aaa.t ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/t/md5-aaa.t (original) +++ trunk/orca/packages/Digest-MD5-2.20/t/md5-aaa.t 2002-11-09 12:30:54.000000000 -0800 @@ -1,10 +1,26 @@ +BEGIN { + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } +} + use strict; print "1..256\n"; use Digest::MD5 qw(md5_hex); +my $Is_EBCDIC = ord('A') == 193; + my $testno = 0; while () { + if (!$Is_EBCDIC) { + next if /^EBCDIC/; + } + else { + next if !/^EBCDIC/; + s/^EBCDIC,\w+#//; + } my($hexdigest, $message) = split; $message =~ s/\"//g; @@ -280,3 +296,259 @@ dfde09457e2017e31d4ecfaea010db8f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 46bc249a5a8fc5d622cf12c42c463ae0 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 81109eec5aa1a284fb5327b10e9c16b9 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#cd25041f9f36811b04ab3015805fe816 "a" +EBCDIC,1047#762b8b87733ee724b8cb751c3b956ea7 "aa" +EBCDIC,1047#f39105ec557abe624399862897a127ed "aaa" +EBCDIC,1047#b825cfc3203d45d01156b8e06ae74901 "aaaa" +EBCDIC,1047#a497a05975af505878aa98b26bd329dd "aaaaa" +EBCDIC,1047#90420f3fc7d64c6cdd7a3bf218b004b1 "aaaaaa" +EBCDIC,1047#b3d7a168407b1613f08f186dc3744a72 "aaaaaaa" +EBCDIC,1047#b7b4ab251d9cc8dc9fc562272a1c7f44 "aaaaaaaa" +EBCDIC,1047#eb974f5cd9b8100dad8e9b82bbdb4a7a "aaaaaaaaa" +EBCDIC,1047#cd675880a60d9c2095fe48981959ea5b "aaaaaaaaaa" +EBCDIC,1047#8396c227248d77e1ebb478b4c44ee8e8 "aaaaaaaaaaa" +EBCDIC,1047#ae59cf65c1c722b8ea6f6e770b20315f "aaaaaaaaaaaa" +EBCDIC,1047#d1550adc6c6f2baeb5da9e2acd75eea1 "aaaaaaaaaaaaa" +EBCDIC,1047#bddd60dbf174785c39827c71ecb29706 "aaaaaaaaaaaaaa" +EBCDIC,1047#d0ef1bc67b2d761513ad8c1f92ca7a2b "aaaaaaaaaaaaaaa" +EBCDIC,1047#dd613bdc90e1e71e57e40931cf3803c1 "aaaaaaaaaaaaaaaa" +EBCDIC,1047#3810ed84a3fabf136b9f5c2de3c802ca "aaaaaaaaaaaaaaaaa" +EBCDIC,1047#a41d584a36ba74526057338e4240b31d "aaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e361a7b2e6adb9df91ed794f39c31a8f "aaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#dc089d8d25773e879ce759357394f63b "aaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#096bdd77ddd6393b5ff2878813ebc9c3 "aaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e457d06769e51e7b34314c1fa885534b "aaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#ae3399b847ef9ce11d958a8926afa2a3 "aaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#be65d5ac6ebe81410cca55c2ad70e672 "aaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#108e4c3887db4178e5ea72782fb105d2 "aaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#d6ccc43d376b6ded51af488d1f56a872 "aaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e208a35fdf88de1da8ec8411888b807e "aaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#bf09c576c720c32342308fae413347ae "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#aac629ca1ec1d5908fe85d6eeb352765 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#845a64111840e9db26e8f5032d59187d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#db38d8cf4f7037e6a150cc35e385972c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#2586f6fcb6ffb1578a94f8c9c2944b40 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#cb63decd219ee21068b330d321061434 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#d98cca1ccf230b2619ae6f452ab18325 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f99e8a5e800a9c1b78b9c7181fa4113d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c60d314815b0d438fe8cf18a62d8680d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#1256f52d15ab93e69c75d6cc9986fa49 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#7e6b1236d08400ec5723b76f3b883b2a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#bae076b34373156e51196c8170fff549 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b957a14baa9ab970516e5e3fe30560c5 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8209c722c9d86984bde35f31e64de4c9 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#ad6abdadefb6809ef9db323939dad44e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#91ae6c863369dbfb13c688b9e5290929 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#770e940a6f11de3a3897031c7040573f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#2d07c71e6709d908992a19ee8fcd70c7 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e748dc11e3b2984e0888782ecc9fa43f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#99573ce268b1f9e32e18319922380b2b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#68951bca944217c5a17d54d9fe296ee9 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#53addd1728c3fd60ba02e29ff7eac4d8 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#7c4abc37772402388c8d792351ae3163 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#a21011fb1a5c1f06dfc23c1b9b921506 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5ce00db35364620dc75696426b9c7948 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#50a785cbcd6cb70322f32062bcfc8940 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#92e6ad1aa09ecde0becf66dc9f356549 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#bb769fed437ab5471f0453bdf0de6ca2 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#49d68b22125368b152dd80773b1053cd "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8c7ce5f0c7ed40ec25df22b68d1725f3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#344d80c1906e9e728e0cc9703fc60803 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#630a45b11cc72d8e36aca0e180241cb4 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#1c9ba16c5be8d48b5d8fe1a8dd1b6999 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#74bb8337e8e9a3d114eb266437302949 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#134ddd06fa362804c9f8cf02111826bd "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#1ffd548f057ed474c0d3b53ee1f8ce1b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#487823e5089b40d8c66a6a7fc613c26c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#a40e0c6392e974bc6e258fb7530b9ec3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#dccf88078dcb7501156e17b6f5b90bd0 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9012cdfe170301d3c8d11d9dab87bf96 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#046d4f6709367aa9be3452dc5dd03601 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#237b85d7be428836b0835e3f7411d0d0 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#32022ea076ffe7496da0b64b2482b963 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c68b3e8c7c88bf10003deaf652549f1c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e648925002262503def112984215d21d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#192328de11913688d002f01326071abb "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#42f7138b1f7ed2121098f3e418406e7b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#cb64c10607f961b2714a3b104e487838 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#0a8fb4023704d318e53a6047531477f3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#2c9a5487397c8245fe8a52684fa50554 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#26efb364f1da859fbc71744d2c62570e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#3359363d24960feaa2f05ea1b403ddcc "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#be9304d0a6297a1a1c7b02cbf177fe0c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#badb0d02141d35349b3b2838cb6450cc "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#75261d10ee76bfc016f98a868e535e49 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#d85006031896657b7215ed1f64f002b9 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#2db85d6ffa2287e42c0e55a72900dd4f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f8ce69fabcf5d5013aaede9c90a7e4c0 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5749ef4b7f6347c3cf9e8af2dc48093e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#afd1f87f6522f82f7d260909db38f84c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#690a229786930ec741404c83738f0e87 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#a1f02fbe5b1815f5d68ebfa5c5b8cdda "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4e75faba6d50d6f3341b3623f3457c83 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#af0eed7206c2aba4622b15a826b3cf48 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#984236c86e268a506dda56886d4589aa "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#256f33cc0cd5d0d700b959143f8b81fb "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#a4f4a73bdf53bd03ec2bf406df8c5bf1 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#bac0c7bb84f581a8ca67e49ecb7eabdc "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c1be2bc056a5abfff888f562f7420b8b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#6db1e154a0feeb290d6f9b6ca78b9faa "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#163fa1f68d79b511aa832e4d513c0d75 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f00e90ba697aa55722c87b51652b515f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#ba925e3f1584bb930da28396334dfb06 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#6a43780f9f36e80e977d31e6ee055ccf "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f07953ebdb37e911069ab4dc1d11b691 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#0f21a8a924546d121d479c2ae9b22788 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#6c857bf152348cc6a8d63ef4bb3a8b22 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#afc61c11e9730f9221e5b013cb75e36b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#7c762743838df21dbe61883325e4de3e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#a78d17621ef736358cf69909fe1841ae "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#687559a1f8bb2799d3f7e57ceb0f816e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#0a5eb0bcfc8888839b3b4f986e91db7c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#232c4a6355062f36d5b18a18453ba936 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5ec9bdfb872d07265113dd94eaf7a9ea "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f3c9f677ab5404ed16b029067a8d632f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#290997df4163f9f37994048b7f750ecb "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9d482b2d64d165eaf1796bddb15ffc43 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f7e059c707e4156d59bef9c887731b75 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#dec244a8f0d45814f8968492cae063ae "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#a153d558a8bed15abe61d6de1345200c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c4c4155e9855435000915b9028af57ad "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#3bf4740880459875fc6625d3e8b9702b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b73a90ab965e8254aeb1ed8995ccf551 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#143a255cfc206e135b23ed557c6b8c7d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#1600b994bf10eeb85772e0f5811ed661 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#7becfd6e439108f896d34012bc3c879f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9fb1155e1c1529943d378bc79ce7248a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#210f27a4c085f4c50b119a9f530dbe64 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c03e534627aec7638f2ef7136a987afb "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#056ff6dcf19eff62af1f7eaf68fdb868 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#78ebdbcbd1cf873ac5bc3317bc333d74 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#379ed8c06d6533b0ae397bd9bcc88727 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#68202ec0f97b3d04145ad8143b36bbec "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f2e8c8f3ab9832adae73d6694b5aa6b5 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4dd0228d79bab138ae330137ceac9547 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#db509dc0a6d9a43323f200c3944fdd47 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#91e5620a3fbe4a7dbddc6328024f57e6 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#cebbeb507c5b8534898b394c3cb6dbab "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#eaa83adae76b4e5a38361a7943b2fc51 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#cf3fe145cdd9d906dff484591bebb099 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5ee68f513d294e242dfd84066a489ad4 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#1452349d5b61efaf5f86f6c67ae1e67d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4a6d9c83bb7f0418977302f41861c674 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#1c82f764bc22e2b43aa64c86152576c5 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#94046ff34b09f2d5cd1ecc145f8b67f9 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#2f9b4413a963175dbf6c0e79fbafc13f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#fdcfd05667569a819bd43a32f3f0034c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#977ffabd477e827a170211d989121719 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#eb42e9022bad24209923768cd295da59 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#34daced153754389b0a3dd457aaa580f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4d4ac318fd2765150cdd3a1fd9046f76 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5f3779e31d8b4ecc587ef2aa620990cb "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#538a0f0a41a77491368d12d280b67ffc "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#2b8bea1be2920657faea5d2f306df93e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#fdb162676ff37cafbb0b37f4a34e1f05 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#79b031eae2e5d593ad9e1765c1b32311 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9a9d79d611f3f97dac3f1f16aeb95810 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#eca47f4f27f10c6e50bc02e96c1305e0 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c27a036a378a0c37e551623253de6c86 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#846248b2d8ba9a2845a5b5a6160ea043 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#37f6c0bb5c1c76a018bd92d6267d5f52 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c71638a87de7d0b7ff178235d368ca87 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c1769c2dafefeb4400d8aaaad7be13e2 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c2170ff8ba444a468ecc92c68e156876 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#87d372bb84572d2c33e910a8f39a46c3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e198c2b2ad83adf6d2edb90918afb140 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#dc89c07be1a85973ce4a75fdd70b945f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8213ffd54a231c594058b572f12ed2ce "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#64a275192c6bbaf330994498212ff235 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e718b792be6311e0248a537ba6d5e84c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b7ee2cd790ed748aa3ac632e2c30fe08 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#6a97471085d1e13858f7febbc8762a40 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#d82fa7cf3fe39751e88cc6a4c5ea0a80 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4d3ea68fdfb845be4aa12eef1868ac54 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b24417be7632f1db1f37c00f2be59372 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#79f7f0088af39859c26e8dd422102e4a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8e7c80a85e3a76bb83d81e12122d699c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#ffb596a208a1b81b17cf86e809ea9b15 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#a3e78c5e9bd595ea8457b25b7ae5ee7c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#200b9de7d5ebd0a74deb6d501fa9c273 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#75865e9d3111b6e17ba1e1b586c520e0 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f13640a7b68db8d2bd853a95c371f4e7 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4525f0da220d5e730ad91070c819ca6a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#3f9c9eb19f1fd6aefeb3d736d5f37cbb "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e3344f64ba3436948b3de13081c98eb9 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#18b50889733a1e896e8fd2e460e98d7f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#918a86710bc529f44f022d5f891107a1 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4aaea2b4f2cfcfef3a5f6be8996b2a3e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#af899efcace3138fea64764015e265f6 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#d472112d115b9bfb34a65cc6683109fc "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f2a42d47b187fc7a250f771ebcda779b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#43442e458f65b5dc6b84181fb70f0e36 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#051771335f34ad905c1af28c429e23e2 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c2c23e86aac60a7d8cb2f2d9a011b525 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4276f514d2e9b5cf511a01b16d5bd7ad "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#43011a7d9ad322984e3617859eb37ee7 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9b7e0d04de1c0121bd261a15cf9bb806 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#bc1e0269ae34e27ed0534a8ab5146324 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#85fa07daa4541779d7c8436a737802cf "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5d1db871938d1dcc8a72509411dada31 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e679a912e400a1c078e657be492a672c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b17718a20096befcee63c2b55bbc5399 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4786015b6aa47e81752f4e2aa59061d5 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#7f3793d46edf449ce5800d568ef6e83f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8f992f2bc222fdc9ecf86eb0c984948b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#aec900f38434e9fb7ded9d33f9a59b66 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#de3fe519c53310d2a8970a4ed2bcc937 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#02bf7d064c621689246886752ddc08bc "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c306bdf0469814bf38b2cadc896489a3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9f84e151ea29f14871b63454585cbc78 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#cc4fd08ed3768b08646bfa6c332a6156 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#d35126a1dc2ae4b93ac67a442961a752 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4c2ed17f95f823071289b94c7efe53f2 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#63e071ca26135f7e27d76fa57d015dbe "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4e506bd75c0d1391a0dd36adc18b3485 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b8a9a5bf97ce5fc88a24c128bb75536e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#97e8bb790b164bc3bdb7189630748841 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#3c7a2d742d599f4fac9231c5264967ee "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#0483a8dc4b24d3d26f0d3bf0402486c5 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#86022bc208c5bbded89bbaeae88e6dbf "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c7a3f500cfe98f8c1959922b381b9438 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#bff3067df4cfff43007bea69f2380d6a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e34a5c41f51ea6d1f1b187e90d940b59 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c8468cae7c8a2a999a0a164f68b759eb "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4bccb2bff1862782004398afff2289b4 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9710683ca0b5cbf10c3df249bfa85d7a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5a705ab132807ce9605b98444622abf3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#dd53ab3422160f933f9723cd3cb53b5a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#bad7e8a4aeea40f8642a0ca1cdfcc61b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#4c0df2b1456694b51a5c809f34f959a8 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f330498cabce39dd03eb02d6c983281f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#915ff5f5c93e0a7833be8cc529108216 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b8facb5253a2b7e091c0a6c18d48e368 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8ebdd257c3bc052f9c837f90fb1879cf "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#42d2cf830ee626939580323a824a4099 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#0d364adcb48ee9db07828ce127355a0b "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#14d9170b8f9ead33ec4da94d66b6b74a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#0327eff7ae5d6b5966def78e593ff5f7 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#f08ac509f43f8e34008a65c3f47d29aa "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#7dc9cdc33fb9a0d70e1409357b086783 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#5f079c22e843c3426bcf03efbd0fc54d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8422781e8a9390246920556090a9559d "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#0cc485a5c828b2cdc895f38b5c3b386e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#2259886c34c2e8adf2b3552bd47a3d6e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c96af44682d38aa7e4b86954c883f8dc "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#85bfdfeff05f7120bd5821ac6668694e "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#b4083c69629ec95f6397cd5844edaf90 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#666550654d7c9e6b8a3118d9dc64bace "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#eef83a6cad3d9a8d963d468cb037ccce "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c2fd346804a8c9c80a08312d7b9d17f3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#6521b944a119cd1f787ff75c1452db74 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#805638adfdb3bf9591fd28dfadba697a "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#e62d07301fd3c0bdb5f7ce0e49e4b5d3 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#49b46e007e0c79c047f655b1b46167c2 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#8811ec9d3b878d168975ed835b3acaa8 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#9b4e8b089d75d1fe3567bcc97b4379d5 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c279605bdcfee9b4976eb57a9eb0d5fd "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#3e362e6f8c5eb3aa7530ef9722dda11c "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +EBCDIC,1047#c54a2d44c8a73ab63d892b8b3d1c336f "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" Added: trunk/orca/packages/Digest-MD5-2.20/t/utf8.t ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/t/utf8.t (original) +++ trunk/orca/packages/Digest-MD5-2.20/t/utf8.t 2002-11-09 12:30:55.000000000 -0800 @@ -0,0 +1,33 @@ +#!perl -w + +if ($] < 5.006) { + print "1..0\n"; + exit; +} + +print "1..3\n"; + +use strict; +use Digest::MD5 qw(md5_hex); + +my $str; +$str = "foo\xFF\x{100}"; + +eval { + print md5_hex($str); + print "not ok 1\n"; # should not run +}; +print "not " unless $@ && $@ =~ /^(Big byte|Wide character)/; +print "ok 1\n"; + +my $exp = ord "A" == 193 ? # EBCDIC + "c307ec81deba65e9a222ca81cd8f6ccd" : + "503debffe559537231ed24f25651ec20"; # Latin 1 + +chop($str); # only bytes left +print "not " unless md5_hex($str) eq $exp; +print "ok 2\n"; + +# reference +print "not " unless md5_hex("foo\xFF") eq $exp; +print "ok 3\n"; Modified: trunk/orca/packages/Digest-MD5-2.20/MANIFEST ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/MANIFEST (original) +++ trunk/orca/packages/Digest-MD5-2.20/MANIFEST 2002-11-09 12:30:55.000000000 -0800 @@ -10,4 +10,5 @@ t/badfile.t Try addfile() on unopened file t/files.t Check a few files. t/md5-aaa.t Exercise padding code +t/utf8.t Try some Unicode strings Changes Version history Modified: trunk/orca/packages/Digest-MD5-2.20/Changes ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/Changes (original) +++ trunk/orca/packages/Digest-MD5-2.20/Changes 2002-11-09 12:30:55.000000000 -0800 @@ -1,3 +1,49 @@ +2002-05-05 Gisle Aas + + Release 2.20 + + More synchronization with tweaks Jarkko have done to the + bleadperl test suite. This time various EBCDIC hacks. + + Outside PERL_CORE the md5-aaa.t test loaded the wrong version of + the module (and would fail if no previous Digest::MD5 was installed). + Patch by Mike Stok + + + +2002-05-01 Gisle Aas + + Release 2.19 + + One more test suite update from Jarkko to sync it + even better with bleadperl. + + + +2002-05-01 Gisle Aas + + Release 2.18 + + Changes #12954 and #16173 from bleadperl. Documentation typo fix + and some signed/unsigned mismatches that Microsoft's C compiler + complained about. + + The EBCDIC-aware md5-aaa.t from bleadperl. + + + +2002-04-25 Gisle Aas + + Release 2.17 + + The SvPVbyte in perl-5.6.1 is buggy. Use the one from 5.7.3 + instead. + + Give warning if the function interface is used as instance + methods: $md5->md5_hex(). + + + 2001-09-07 Gisle Aas Release 2.16 Modified: trunk/orca/packages/Digest-MD5-2.20/README ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/README (original) +++ trunk/orca/packages/Digest-MD5-2.20/README 2002-11-09 12:30:55.000000000 -0800 @@ -6,7 +6,7 @@ You will need perl version 5.004 or better to install this module. -Copyright 1998-2001 Gisle Aas. +Copyright 1998-2002 Gisle Aas. Copyright 1995-1996 Neil Winton. Copyright 1990-1992 RSA Data Security, Inc. Modified: trunk/orca/packages/Digest-MD5-2.20/MD5.xs ============================================================================== --- trunk/orca/packages/Digest-MD5-2.20/MD5.xs (original) +++ trunk/orca/packages/Digest-MD5-2.20/MD5.xs 2002-11-09 12:30:56.000000000 -0800 @@ -1,4 +1,4 @@ -/* $Id: MD5.xs,v 1.29 2001/09/07 05:33:57 gisle Exp $ */ +/* $Id: MD5.xs,v 1.34 2002/05/01 23:30:28 gisle Exp $ */ /* * This library is free software; you can redistribute it and/or @@ -9,7 +9,7 @@ * Copyright 1991-1992 RSA Data Security, Inc. * * This code is derived from Neil Winton's MD5-1.7 Perl module, which in - * turn is derived from the reference implementation in RFC 1231 which + * turn is derived from the reference implementation in RFC 1321 which * comes with this message: * * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All @@ -49,7 +49,22 @@ #define PL_dowarn dowarn #endif -#ifndef SvPVbyte +#ifdef SvPVbyte + #if PERL_REVISION == 5 && PERL_VERSION < 7 + /* SvPVbyte does not work in perl-5.6.1, borrowed version for 5.7.3 */ + #undef SvPVbyte + #define SvPVbyte(sv, lp) \ + ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ + ? ((lp = SvCUR(sv)), SvPVX(sv)) : my_sv_2pvbyte(aTHX_ sv, &lp)) + + static char * + my_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) + { + sv_utf8_downgrade(sv,0); + return SvPV(sv,*lp); + } + #endif +#else #define SvPVbyte SvPV #endif @@ -87,10 +102,10 @@ #ifndef BYTESWAP static void u2s(U32 u, U8* s) { - *s++ = u & 0xFF; - *s++ = (u >> 8) & 0xFF; - *s++ = (u >> 16) & 0xFF; - *s = (u >> 24) & 0xFF; + *s++ = (U8)(u & 0xFF); + *s++ = (U8)((u >> 8) & 0xFF); + *s++ = (U8)((u >> 16) & 0xFF); + *s = (U8)((u >> 24) & 0xFF); } #define s2u(s,u) ((u) = (U32)(*s) | \ @@ -626,14 +641,31 @@ unsigned char digeststr[16]; PPCODE: MD5Init(&ctx); - if (PL_dowarn && items > 1) { - data = (unsigned char *)SvPVbyte(ST(0), len); - if (len == 11 && memEQ("Digest::MD5", data, 11)) { - char *f = (ix == F_BIN) ? "md5" : - (ix == F_HEX) ? "md5_hex" : "md5_base64"; - warn("&Digest::MD5::%s function probably called as method", f); - } + + if (PL_dowarn) { + char *msg = 0; + if (items == 1) { + if (SvROK(ST(0))) { + SV* sv = SvRV(ST(0)); + if (SvOBJECT(sv) && strEQ(HvNAME(SvSTASH(sv)), "Digest::MD5")) + msg = "probably called as method"; + else + msg = "called with reference argument"; + } + } + else if (items > 1) { + data = (unsigned char *)SvPVbyte(ST(0), len); + if (len == 11 && memEQ("Digest::MD5", data, 11)) { + msg = "probably called as class method"; + } + } + if (msg) { + char *f = (ix == F_BIN) ? "md5" : + (ix == F_HEX) ? "md5_hex" : "md5_base64"; + warn("&Digest::MD5::%s function %s", f, msg); + } } + for (i = 0; i < items; i++) { data = (unsigned char *)(SvPVbyte(ST(i), len)); MD5Update(&ctx, data, len); Modified: trunk/orca/packages/rrdtool-1.0.40/configure ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/configure (original) +++ trunk/orca/packages/rrdtool-1.0.40/configure 2002-11-09 12:30:57.000000000 -0800 @@ -11,7 +11,7 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: -ac_default_prefix=/usr/local/rrdtool-1.0.33 +ac_default_prefix=/usr/local/rrdtool-1.0.40 ac_help="$ac_help --with-tcllib=DIR location of the tclConfig.sh" ac_help="$ac_help @@ -799,7 +799,7 @@ PACKAGE=rrdtool -VERSION=1.0.33 +VERSION=1.0.40 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -894,7 +894,7 @@ CGI_LIB_DIR=cgilib-0.4 GD_LIB_DIR=gd1.3 PNG_LIB_DIR=libpng-1.0.9 -ZLIB_LIB_DIR=zlib-1.1.3 +ZLIB_LIB_DIR=zlib-1.1.4 @@ -946,6 +946,19 @@ echo "configure:947: checking for shared library extension" >&5 SO_EXT=`$PERL -e 'use Config; if (defined $Config{so} and $Config{so} ne 'a') {print "$Config{so}\n"} else {print "so\n"};'` echo "$ac_t""$SO_EXT" 1>&6 + echo $ac_n "checking for the C compiler perl wants to use to build its modules""... $ac_c" 1>&6 +echo "configure:951: checking for the C compiler perl wants to use to build its modules" >&5 + PROBLEMCC=`$PERL -e 'use Config; exit 0 if -x $Config{cc}; map {if (-x "$_/$Config{cc}"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'` + if test x$PROBLEMCC != x; then + echo "$ac_t""no" 1>&6 + echo Could not find the Compiler: '"'$PROBLEMCC'"' + echo which has been used to build perl. You may have to compile + echo your own copy of perl to make this work. Binary perls often + echo exhibit this problem + exit 1 + else + echo "$ac_t""found" 1>&6 + fi fi @@ -959,7 +972,7 @@ found=0 echo $ac_n "checking for tclConfig.sh in $withval""... $ac_c" 1>&6 -echo "configure:963: checking for tclConfig.sh in $withval" >&5 +echo "configure:976: checking for tclConfig.sh in $withval" >&5 if test -f "$withval/tclConfig.sh" ; then tcl_config=$withval/tclConfig.sh found=1 @@ -1004,7 +1017,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1008: checking for $ac_word" >&5 +echo "configure:1021: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1034,7 +1047,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1038: checking for $ac_word" >&5 +echo "configure:1051: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1085,7 +1098,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1089: checking for $ac_word" >&5 +echo "configure:1102: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1117,7 +1130,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1121: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1134: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1128,12 +1141,12 @@ cat > conftest.$ac_ext << EOF -#line 1132 "configure" +#line 1145 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1159,12 +1172,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1163: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1176: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1168: checking whether we are using GNU C" >&5 +echo "configure:1181: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1173,7 +1186,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1192,7 +1205,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1196: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1209: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1224,7 +1237,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1228: checking how to run the C preprocessor" >&5 +echo "configure:1241: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1239,13 +1252,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1256,13 +1269,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1273,13 +1286,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1377,7 +1390,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1381: checking for $ac_word" >&5 +echo "configure:1394: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1416,7 +1429,7 @@ if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1420: checking for ld used by GCC" >&5 +echo "configure:1433: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1440,10 +1453,10 @@ esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1444: checking for GNU ld" >&5 +echo "configure:1457: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1447: checking for non-GNU ld" >&5 +echo "configure:1460: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1478,7 +1491,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1482: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1495: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1494,7 +1507,7 @@ echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1498: checking for BSD-compatible nm" >&5 +echo "configure:1511: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1530,7 +1543,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1534: checking whether ln -s works" >&5 +echo "configure:1547: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1579,8 +1592,8 @@ case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1583 "configure"' > conftest.$ac_ext - if { (eval echo configure:1584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1596 "configure"' > conftest.$ac_ext + if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1601,19 +1614,19 @@ SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1605: checking whether the C compiler needs -belf" >&5 +echo "configure:1618: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1716,12 +1729,12 @@ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1720: checking for ANSI C header files" >&5 +echo "configure:1733: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1729,7 +1742,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1746,7 +1759,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1764,7 +1777,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1785,7 +1798,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1796,7 +1809,7 @@ exit (0); } EOF -if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1819,21 +1832,21 @@ fi -for ac_hdr in fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h +for ac_hdr in sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h time.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1827: checking for $ac_hdr" >&5 +echo "configure:1840: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1861,12 +1874,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1865: checking for working const" >&5 +echo "configure:1878: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1936,12 +1949,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1940: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1953: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1950,7 +1963,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1971,12 +1984,12 @@ fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1975: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:1988: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1984,7 +1997,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:1988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2006,12 +2019,12 @@ echo $ac_n "checking for acos""... $ac_c" 1>&6 -echo "configure:2010: checking for acos" >&5 +echo "configure:2023: checking for acos" >&5 if eval "test \"`echo '$''{'ac_cv_func_acos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_acos=yes" else @@ -2052,7 +2065,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:2056: checking for acos in -lm" >&5 +echo "configure:2069: checking for acos in -lm" >&5 ac_lib_var=`echo m'_'acos | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2060,7 +2073,7 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2106,7 +2119,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2110: checking for $ac_word" >&5 +echo "configure:2123: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2146,7 +2159,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2150: checking for $ac_word" >&5 +echo "configure:2163: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2186,19 +2199,19 @@ oCFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline" echo $ac_n "checking if we can use GCC-specific compiler options""... $ac_c" 1>&6 -echo "configure:2190: checking if we can use GCC-specific compiler options" >&5 +echo "configure:2203: checking if we can use GCC-specific compiler options" >&5 if eval "test \"`echo '$''{'rd_cv_gcc_opt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rd_cv_gcc_opt=yes else @@ -2220,19 +2233,21 @@ CFLAGS="$CFLAGS "`grep pic_flag= libtool | sed -e 's/.*pic_flag=//' -e 's/"//g'` +ZLIB_CFLAGS=$CFLAGS case $target_os in *hpux*) - CLFAGS=`echo $CFLAGS|sed -e 's/-fPIC/-fpic/g'` + ZLIB_CFLAGS=`echo $CFLAGS|sed -e 's/-fPIC/-fpic/g'` ;; esac + echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2231: checking for strftime" >&5 +echo "configure:2246: checking for strftime" >&5 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2277,7 +2292,7 @@ echo "$ac_t""no" 1>&6 # strftime is in -lintl on SCO UNIX. echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:2281: checking for strftime in -lintl" >&5 +echo "configure:2296: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2285,7 +2300,7 @@ ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2323,12 +2338,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2327: checking for vprintf" >&5 +echo "configure:2342: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2375,12 +2390,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2379: checking for _doprnt" >&5 +echo "configure:2394: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2429,15 +2444,15 @@ -for ac_func in strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday +for ac_func in opendir readdir chdir chroot getuid strerror tzset setlocale snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2436: checking for $ac_func" >&5 +echo "configure:2451: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2488,12 +2503,12 @@ for ac_func in fpclassify do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2492: checking for $ac_func" >&5 +echo "configure:2507: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2538,16 +2553,16 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for fpclassify with ""... $ac_c" 1>&6 -echo "configure:2542: checking for fpclassify with " >&5 +echo "configure:2557: checking for fpclassify with " >&5 cat > conftest.$ac_ext < int main() { float f = 0.0; fpclassify(f) ; return 0; } EOF -if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -2567,12 +2582,12 @@ for ac_func in finite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2571: checking for $ac_func" >&5 +echo "configure:2586: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2619,12 +2634,12 @@ for ac_func in isfinite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2623: checking for $ac_func" >&5 +echo "configure:2638: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2669,16 +2684,16 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for isfinite with ""... $ac_c" 1>&6 -echo "configure:2673: checking for isfinite with " >&5 +echo "configure:2688: checking for isfinite with " >&5 cat > conftest.$ac_ext < int main() { float f = 0.0; isfinite(f) ; return 0; } EOF -if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -2701,12 +2716,12 @@ for ac_func in isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2705: checking for $ac_func" >&5 +echo "configure:2720: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2751,16 +2766,16 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for isinf with ""... $ac_c" 1>&6 -echo "configure:2755: checking for isinf with " >&5 +echo "configure:2770: checking for isinf with " >&5 cat > conftest.$ac_ext < int main() { float f = 0.0; isinf(f) ; return 0; } EOF -if { (eval echo configure:2764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -2780,7 +2795,7 @@ echo $ac_n "checking if realloc can deal with NULL""... $ac_c" 1>&6 -echo "configure:2784: checking if realloc can deal with NULL" >&5 +echo "configure:2799: checking if realloc can deal with NULL" >&5 if eval "test \"`echo '$''{'rd_cv_null_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2788,7 +2803,7 @@ : else cat > conftest.$ac_ext < int main(void){ @@ -2798,7 +2813,7 @@ return 0; } EOF -if { (eval echo configure:2802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_null_realloc=yes else @@ -2826,7 +2841,7 @@ _cflags=${CFLAGS} echo $ac_n "checking if IEEE math works out of the box""... $ac_c" 1>&6 -echo "configure:2830: checking if IEEE math works out of the box" >&5 +echo "configure:2845: checking if IEEE math works out of the box" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2834,7 +2849,7 @@ : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_works=yes else @@ -2923,7 +2938,7 @@ echo "$ac_t""no" 1>&6 CFLAGS="$_cflags -ieee" echo $ac_n "checking if IEEE math works with the -ieee switch""... $ac_c" 1>&6 -echo "configure:2927: checking if IEEE math works with the -ieee switch" >&5 +echo "configure:2942: checking if IEEE math works with the -ieee switch" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_switch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2931,7 +2946,7 @@ : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_switch=yes else @@ -3020,7 +3035,7 @@ echo "$ac_t""no" 1>&6 CFLAGS="$_cflags -qfloat=nofold" echo $ac_n "checking if IEEE math works with the -qfloat=nofold switch""... $ac_c" 1>&6 -echo "configure:3024: checking if IEEE math works with the -qfloat=nofold switch" >&5 +echo "configure:3039: checking if IEEE math works with the -qfloat=nofold switch" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_nofold'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3028,7 +3043,7 @@ : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_nofold=yes else @@ -3117,7 +3132,7 @@ echo "$ac_t""no" 1>&6 CFLAGS="$_cflags -w -qflttrap=enable:zerodivide" echo $ac_n "checking if IEEE math works with the -w -qflttrap=enable:zerodivide""... $ac_c" 1>&6 -echo "configure:3121: checking if IEEE math works with the -w -qflttrap=enable:zerodivide" >&5 +echo "configure:3136: checking if IEEE math works with the -w -qflttrap=enable:zerodivide" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_flttrap'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3125,7 +3140,7 @@ : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_flttrap=yes else @@ -3214,7 +3229,7 @@ echo "$ac_t""no" 1>&6 CFLAGS="$_cflags -mieee" echo $ac_n "checking if IEEE math works with the -mieee switch""... $ac_c" 1>&6 -echo "configure:3218: checking if IEEE math works with the -mieee switch" >&5 +echo "configure:3233: checking if IEEE math works with the -mieee switch" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_mswitch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3222,7 +3237,7 @@ : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_mswitch=yes else @@ -3311,7 +3326,7 @@ echo "$ac_t""no" 1>&6 CFLAGS="$_cflags -q float=rndsngl" echo $ac_n "checking if IEEE math works with the -q float=rndsngl switch""... $ac_c" 1>&6 -echo "configure:3315: checking if IEEE math works with the -q float=rndsngl switch" >&5 +echo "configure:3330: checking if IEEE math works with the -q float=rndsngl switch" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_qswitch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3319,7 +3334,7 @@ : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_qswitch=yes else @@ -3408,7 +3423,7 @@ echo "$ac_t""no" 1>&6 CFLAGS="$_cflags -OPT:IEEE_comparisons=ON" echo $ac_n "checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch""... $ac_c" 1>&6 -echo "configure:3412: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5 +echo "configure:3427: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_ieeecmpswitch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3416,7 +3431,7 @@ : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_ieeecmpswitch=yes else @@ -3505,7 +3520,7 @@ echo "$ac_t""no" 1>&6 CFLAGS=$_cflags echo $ac_n "checking if IEEE math works with fpsetmask(0)""... $ac_c" 1>&6 -echo "configure:3509: checking if IEEE math works with fpsetmask(0)" >&5 +echo "configure:3524: checking if IEEE math works with fpsetmask(0)" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_mask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3513,7 +3528,7 @@ : else cat > conftest.$ac_ext < @@ -3581,7 +3596,7 @@ return 0; } EOF -if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_mask=yes else @@ -3605,7 +3620,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking if IEEE math works with signal(SIGFPE,SIG_IGN)""... $ac_c" 1>&6 -echo "configure:3609: checking if IEEE math works with signal(SIGFPE,SIG_IGN)" >&5 +echo "configure:3624: checking if IEEE math works with signal(SIGFPE,SIG_IGN)" >&5 if eval "test \"`echo '$''{'rd_cv_ieee_sigfpe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3613,7 +3628,7 @@ : else cat > conftest.$ac_ext < @@ -3681,7 +3696,7 @@ return 0; } EOF -if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rd_cv_ieee_sigfpe=yes else @@ -3859,9 +3874,10 @@ doc/Makefile \ gd1.3/Makefile \ libpng-1.0.9/Makefile \ - zlib-1.1.3/Makefile \ + zlib-1.1.4/Makefile \ src/Makefile \ tcl/Makefile \ + perl-shared/Makefile.PL \ Makefile config/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF @@ -4191,10 +4209,10 @@ echo $ac_n "checking in""... $ac_c" 1>&6 -echo "configure:4195: checking in" >&5 +echo "configure:4213: checking in" >&5 echo "$ac_t""and out again" 1>&6 -echo $ac_n "ordering CD from http://ee-staff.ethz.ch/~oetiker/wish $ac_c" 1>&6 +echo $ac_n "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6 sleep 1 echo $ac_n ".$ac_c" 1>&6 sleep 1 Modified: trunk/orca/packages/rrdtool-1.0.40/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/Makefile.in 2002-11-09 12:30:58.000000000 -0800 @@ -82,16 +82,17 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ RSYNC = rsync --rsh=ssh # build the following subdirectories -SUBDIRS = cgilib-0.4 config gd1.3 zlib-1.1.3 libpng-1.0.9 src doc examples contrib tcl +SUBDIRS = cgilib-0.4 config gd1.3 zlib-1.1.4 libpng-1.0.9 src doc examples contrib tcl # the following files are not mentioned in any other Makefile -EXTRA_DIST = COPYRIGHT CHANGES NT-BUILD-TIPS.txt TODO CONTRIBUTORS rrdtool.spec perl-piped/MANIFEST perl-piped/README perl-piped/rrdpl.ds? perl-piped/RRDp.pm perl-piped/Makefile.PL perl-piped/t/base.t perl-shared/MANIFEST perl-shared/README perl-shared/RRDs.xs perl-shared/ntmake.pl perl-shared/Makefile.PL perl-shared/t/base.t perl-shared/rrdpl.ds? perl-shared/RRDs.pm +EXTRA_DIST = COPYRIGHT CHANGES NT-BUILD-TIPS.txt TODO CONTRIBUTORS rrdtool.spec perl-piped/MANIFEST perl-piped/README perl-piped/rrdpl.ds? perl-piped/RRDp.pm perl-piped/Makefile.PL perl-piped/t/base.t perl-shared/MANIFEST perl-shared/README perl-shared/RRDs.xs perl-shared/ntmake.pl perl-shared/Makefile.PL.in perl-shared/t/base.t perl-shared/rrdpl.ds? perl-shared/RRDs.pm CLEANFILES = config.cache @@ -103,6 +104,13 @@ ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config + +# rules for building the perl module + +# This "CLONE" stuff is probably not as clean as it should be. +# But it is only used when the source and build trees are mutually separate. +PERL_CLONE = mkdir \$${P_DIR} && cd \$${P_DIR} && for _perlfile_ in \$${P_FILES} ; do ln -s ../$(top_srcdir)/\$${P_DIR}/\$${_perlfile_} . ; done + mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = ./config/config.h CONFIG_CLEAN_FILES = @@ -385,20 +393,27 @@ # lets schedule the perl stuff for installation # the special call to install-sh is because the -d switch is not portable install-data-local: - ./config/mkinstalldirs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs + $(top_srcdir)/config/mkinstalldirs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs $(INSTALL) -m 644 perl-piped/RRDp.pm $(DESTDIR)$(prefix)/lib/perl $(INSTALL) -m 644 perl-shared/RRDs.pm $(DESTDIR)$(prefix)/lib/perl $(INSTALL) -m 644 perl-shared/blib/arch/auto/RRDs/RRDs.bs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs $(INSTALL) -m 755 perl-shared/blib/arch/auto/RRDs/RRDs. at SO_EXT@ $(DESTDIR)$(prefix)/lib/perl/auto/RRDs -# rules for building the perl module -perl_piped: perl-piped/Makefile +perl_piped:: $(top_builddir)/perl-piped + test -d perl-piped \ + || sh -c "P_DIR='perl-piped'; P_FILES='Makefile.PL RRDp.pm' ; $(PERL_CLONE)" + +perl_piped:: perl-piped/Makefile cd perl-piped && $(MAKE) perl-piped/Makefile: perl-piped/Makefile.PL cd perl-piped && $(PERL) Makefile.PL $(PERL_MAKE_OPTIONS) -perl_shared: perl-shared/Makefile +perl_shared:: $(top_builddir)/perl-shared + test -d perl-shared \ + || sh -c "P_DIR='perl-shared'; P_FILES='Makefile.PL RRDs.pm RRDs.xs' ; $(PERL_CLONE)" + +perl_shared:: perl-shared/Makefile cd perl-shared && $(MAKE) perl-shared/Makefile: perl-shared/Makefile.PL @@ -426,11 +441,11 @@ site-perl-inst: site-perl-install -site-perl-install: perl-piped/Makefile perl-shared/Makefile +site-perl-install: all perl-piped/Makefile perl-shared/Makefile cd perl-piped && $(MAKE) install cd perl-shared && $(MAKE) install -site-tcl-install: +site-tcl-install: all cd tcl && $(MAKE) tcl-install clean-local: Modified: trunk/orca/packages/rrdtool-1.0.40/tcl/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/tcl/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/tcl/Makefile.in 2002-11-09 12:30:58.000000000 -0800 @@ -76,6 +76,7 @@ RANLIB = @RANLIB@ SO_EXT = @SO_EXT@ TROFF = @TROFF@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ EXTRA_DIST = README ifOctets.tcl tclrrd.c Modified: trunk/orca/packages/rrdtool-1.0.40/tcl/tclrrd.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/tcl/tclrrd.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/tcl/tclrrd.c 2002-11-09 12:30:58.000000000 -0800 @@ -6,7 +6,7 @@ * See the file "COPYING" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * $Id$ + * $Id: tclrrd.c,v 1.1.1.1 2002/02/26 10:21:52 oetiker Exp $ */ Modified: trunk/orca/packages/rrdtool-1.0.40/configure.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/configure.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/configure.in 2002-11-09 12:30:59.000000000 -0800 @@ -16,11 +16,11 @@ AC_CANONICAL_SYSTEM dnl tell automake the this script is for rrdtool -AM_INIT_AUTOMAKE(rrdtool, 1.0.33) +AM_INIT_AUTOMAKE(rrdtool, 1.0.40) AC_SUBST(VERSION) dnl where we install our stuff ... -AC_PREFIX_DEFAULT( /usr/local/rrdtool-1.0.33 ) +AC_PREFIX_DEFAULT( /usr/local/rrdtool-1.0.40 ) dnl tell automake which file to use as config header AM_CONFIG_HEADER(config/config.h) @@ -32,7 +32,7 @@ CGI_LIB_DIR=cgilib-0.4 GD_LIB_DIR=gd1.3 PNG_LIB_DIR=libpng-1.0.9 -ZLIB_LIB_DIR=zlib-1.1.3 +ZLIB_LIB_DIR=zlib-1.1.4 dnl substitute them in all the files listed in AC_OUTPUT AC_SUBST(CGI_LIB_DIR) @@ -50,6 +50,18 @@ AC_MSG_CHECKING(for shared library extension) SO_EXT=`$PERL -e 'use Config; if (defined $Config{so} and $Config{so} ne 'a') {print "$Config{so}\n"} else {print "so\n"};'` AC_MSG_RESULT($SO_EXT) + AC_MSG_CHECKING(for the C compiler perl wants to use to build its modules) + PROBLEMCC=`$PERL -e 'use Config; exit 0 if -x $Config{cc}; map {if (-x "$_/$Config{cc}"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'` + if test x$PROBLEMCC != x; then + AC_MSG_RESULT(no) + echo Could not find the Compiler: '"'$PROBLEMCC'"' + echo which has been used to build perl. You may have to compile + echo your own copy of perl to make this work. Binary perls often + echo exhibit this problem + exit 1 + else + AC_MSG_RESULT(found) + fi fi AC_SUBST(COMP_PERL) AC_SUBST(SO_EXT) @@ -104,7 +116,7 @@ dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h) +AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h time.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -137,11 +149,13 @@ CFLAGS="$CFLAGS "`grep pic_flag= libtool | sed -e 's/.*pic_flag=//' -e 's/"//g'` dnl it seems that hpux chockes on -fPIC for some reason +ZLIB_CFLAGS=$CFLAGS case $target_os in *hpux*) - CLFAGS=`echo $CFLAGS|sed -e 's/-fPIC/-fpic/g'` + ZLIB_CFLAGS=`echo $CFLAGS|sed -e 's/-fPIC/-fpic/g'` ;; esac +AC_SUBST(ZLIB_CFLAGS) dnl Checks for library functions. AC_FUNC_STRFTIME @@ -150,7 +164,7 @@ dnl for each function found we get a definition in config.h dnl of the form HAVE_FUNCTION -AC_CHECK_FUNCS(strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) +AC_CHECK_FUNCS(opendir readdir chdir chroot getuid strerror tzset setlocale snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) dnl HP-UX 11.00 does not have finite but does have isfinite as a macro AC_CHECK_FUNCS(fpclassify, , @@ -323,16 +337,17 @@ doc/Makefile \ gd1.3/Makefile \ libpng-1.0.9/Makefile \ - zlib-1.1.3/Makefile \ + zlib-1.1.4/Makefile \ src/Makefile \ tcl/Makefile \ + perl-shared/Makefile.PL \ Makefile, \ [chmod +x examples/*.cgi examples/*.pl contrib/*/*.pl]) AC_MSG_CHECKING(in) AC_MSG_RESULT(and out again) -echo $ac_n "ordering CD from http://ee-staff.ethz.ch/~oetiker/wish $ac_c" 1>&6 +echo $ac_n "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6 sleep 1 echo $ac_n ".$ac_c" 1>&6 sleep 1 Modified: trunk/orca/packages/rrdtool-1.0.40/src/gifsize.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/gifsize.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/gifsize.c 2002-11-09 12:30:59.000000000 -0800 @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 **************************************************************************** * gifsize.c provides the function gifsize which determines the size of a gif ****************************************************************************/ Modified: trunk/orca/packages/rrdtool-1.0.40/src/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/Makefile.in 2002-11-09 12:30:59.000000000 -0800 @@ -86,19 +86,25 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ -CGI_LIB_DIR = $(top_srcdir)/@CGI_LIB_DIR@ -GD_LIB_DIR = $(top_srcdir)/@GD_LIB_DIR@ -PNG_LIB_DIR = $(top_srcdir)/@PNG_LIB_DIR@ -ZLIB_LIB_DIR = $(top_srcdir)/@ZLIB_LIB_DIR@ +CGI_INC_DIR = $(top_srcdir)/@CGI_LIB_DIR@ +GD_INC_DIR = $(top_srcdir)/@GD_LIB_DIR@ +PNG_INC_DIR = $(top_srcdir)/@PNG_LIB_DIR@ +ZLIB_INC_DIR = $(top_srcdir)/@ZLIB_LIB_DIR@ + +CGI_LIB_DIR = $(top_builddir)/@CGI_LIB_DIR@ +GD_LIB_DIR = $(top_builddir)/@GD_LIB_DIR@ +PNG_LIB_DIR = $(top_builddir)/@PNG_LIB_DIR@ +ZLIB_LIB_DIR = $(top_builddir)/@ZLIB_LIB_DIR@ -INCLUDES = -I$(CGI_LIB_DIR) -I$(GD_LIB_DIR) -I$(PNG_LIB_DIR) -I$(ZLIB_LIB_DIR) +INCLUDES = -I$(CGI_INC_DIR) -I$(GD_INC_DIR) -I$(PNG_INC_DIR) -I$(ZLIB_INC_DIR) #COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA) #LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA) #LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA) $(LDFLAGS) -o $@ -RRD_C_FILES = gdpng.c getopt.c getopt1.c gifsize.c parsetime.c pngsize.c rrd_create.c rrd_diff.c rrd_dump.c rrd_info.c rrd_error.c rrd_fetch.c rrd_format.c rrd_graph.c rrd_last.c rrd_open.c rrd_resize.c rrd_restore.c rrd_tune.c rrd_update.c getopt.h ntconfig.h parsetime.h rrd_format.h rrd_tool.h rrd.h +RRD_C_FILES = gdpng.c getopt.c getopt1.c gifsize.c parsetime.c pngsize.c rrd_create.c rrd_diff.c rrd_dump.c rrd_info.c rrd_error.c rrd_fetch.c rrd_format.c rrd_graph.c rrd_last.c rrd_open.c rrd_resize.c rrd_restore.c rrd_tune.c rrd_update.c rrd_xport.c rrd_graph.h rrd_xport.h getopt.h ntconfig.h parsetime.h rrd_format.h rrd_tool.h rrd.h # Build two libraries. One is a public one that gets installed in @@ -154,7 +160,7 @@ parsetime.lo pngsize.lo rrd_create.lo rrd_diff.lo rrd_dump.lo \ rrd_info.lo rrd_error.lo rrd_fetch.lo rrd_format.lo rrd_graph.lo \ rrd_last.lo rrd_open.lo rrd_resize.lo rrd_restore.lo rrd_tune.lo \ -rrd_update.lo +rrd_update.lo rrd_xport.lo librrd_private_la_DEPENDENCIES = $(CGI_LIB_DIR)/librrd_cgi.la \ $(GD_LIB_DIR)/librrd_gd.la $(PNG_LIB_DIR)/librrd_png.la \ $(ZLIB_LIB_DIR)/librrd_z.la @@ -162,7 +168,7 @@ parsetime.lo pngsize.lo rrd_create.lo rrd_diff.lo rrd_dump.lo \ rrd_info.lo rrd_error.lo rrd_fetch.lo rrd_format.lo rrd_graph.lo \ rrd_last.lo rrd_open.lo rrd_resize.lo rrd_restore.lo rrd_tune.lo \ -rrd_update.lo +rrd_update.lo rrd_xport.lo PROGRAMS = $(bin_PROGRAMS) rrdcgi_OBJECTS = rrd_cgi.o @@ -378,15 +384,15 @@ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done -gdpng.lo gdpng.o : gdpng.c ../libpng-1.0.9/png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h ../libpng-1.0.9/pngconf.h ../gd1.3/gd.h +gdpng.lo gdpng.o : gdpng.c ../libpng-1.0.9/png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h ../libpng-1.0.9/pngconf.h ../gd1.3/gd.h getopt.lo getopt.o : getopt.c ../config/config.h getopt.h getopt1.lo getopt1.o : getopt1.c ../config/config.h getopt.h gifsize.lo gifsize.o : gifsize.c parsetime.lo parsetime.o : parsetime.c rrd_tool.h ../config/config.h \ rrd.h getopt.h rrd_format.h ../gd1.3/gd.h pngsize.lo pngsize.o : pngsize.c ../libpng-1.0.9/png.h \ - ../zlib-1.1.3/zlib.h ../zlib-1.1.3/zconf.h \ + ../zlib-1.1.4/zlib.h ../zlib-1.1.4/zconf.h \ ../libpng-1.0.9/pngconf.h rrd_cgi.o: rrd_cgi.c rrd_tool.h ../config/config.h rrd.h getopt.h \ rrd_format.h ../gd1.3/gd.h ../cgilib-0.4/cgi.h @@ -403,7 +409,7 @@ rrd_format.lo rrd_format.o : rrd_format.c rrd_tool.h ../config/config.h \ rrd.h getopt.h rrd_format.h ../gd1.3/gd.h rrd_graph.lo rrd_graph.o : rrd_graph.c rrd_tool.h ../config/config.h \ - rrd.h getopt.h rrd_format.h ../gd1.3/gd.h \ + rrd.h getopt.h rrd_format.h ../gd1.3/gd.h rrd_graph.h \ ../gd1.3/gdlucidan10.h ../gd1.3/gdlucidab12.h rrd_info.lo rrd_info.o : rrd_info.c rrd_tool.h ../config/config.h rrd.h \ getopt.h rrd_format.h ../gd1.3/gd.h @@ -416,11 +422,14 @@ rrd_restore.lo rrd_restore.o : rrd_restore.c rrd_tool.h \ ../config/config.h rrd.h getopt.h rrd_format.h ../gd1.3/gd.h rrd_tool.o: rrd_tool.c rrd_tool.h ../config/config.h rrd.h getopt.h \ - rrd_format.h ../gd1.3/gd.h + rrd_format.h ../gd1.3/gd.h rrd_xport.h rrd_tune.lo rrd_tune.o : rrd_tune.c rrd_tool.h ../config/config.h rrd.h \ getopt.h rrd_format.h ../gd1.3/gd.h rrd_update.lo rrd_update.o : rrd_update.c rrd_tool.h ../config/config.h \ rrd.h getopt.h rrd_format.h ../gd1.3/gd.h +rrd_xport.lo rrd_xport.o : rrd_xport.c rrd_tool.h ../config/config.h \ + rrd.h getopt.h rrd_format.h ../gd1.3/gd.h rrd_graph.h \ + rrd_xport.h info-am: info: info-am @@ -510,8 +519,8 @@ mostlyclean distclean maintainer-clean -rrdupdate.c: rrd_update.c - -ln -s rrd_update.c rrdupdate.c +rrdupdate.c: $(srcdir)/rrd_update.c + -ln -s $(srcdir)/rrd_update.c rrdupdate.c rrdupdate.o: rrdupdate.c $(COMPILE) -DSTANDALONE -c rrdupdate.c Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_info.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_info.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_info.c 2002-11-09 12:31:00.000000000 -0800 @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_info Get Information about the configuration of an RRD *****************************************************************************/ Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_last.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_last.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_last.c 2002-11-09 12:31:00.000000000 -0800 @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_last.c ***************************************************************************** Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_dump.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_dump.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_dump.c 2002-11-09 12:31:00.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_dump Display a RRD ***************************************************************************** - * $Id: rrd_dump.c,v 1.5 1998/03/08 12:35:11 oetiker Exp oetiker $ + * $Id: rrd_dump.c,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ * $Log: rrd_dump.c,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * *****************************************************************************/ #include "rrd_tool.h" Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_diff.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_diff.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_diff.c 2002-11-09 12:31:00.000000000 -0800 @@ -1,12 +1,15 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1999 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1999 * This code is stolen from rateup (mrtg-2.x) by Dave Rand ***************************************************************************** * diff calculate the difference between two very long integers available as * strings ***************************************************************************** - * $Id: diff.c,v 1.1 1998/10/08 18:21:45 oetiker Exp oetiker $ - * $Log: diff.c,v $ + * $Id: rrd_diff.c,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ + * $Log: rrd_diff.c,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * * Revision 1.1 1998/10/08 18:21:45 oetiker * Initial revision * @@ -29,13 +32,13 @@ char res[LAST_DS_LEN+1], *a1, *b1, *r1, *fix; int c,x,m; - while (!isdigit((int)*a) || *a==0) + while (!(isdigit((int)*a) || *a==0)) a++; fix=a; while (isdigit((int)*fix)) fix++; *fix = 0; /* maybe there is some non digit data in the string */ - while (!isdigit((int)*b) || *b==0) + while (!(isdigit((int)*b) || *b==0)) b++; fix=b; while (isdigit((int)*fix)) Added: trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.c 2002-11-09 12:31:01.000000000 -0800 @@ -0,0 +1,458 @@ +/**************************************************************************** + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 + **************************************************************************** + * rrd_xport.c export RRD data + ****************************************************************************/ + +#include "rrd_tool.h" +#include "rrd_graph.h" +#include "rrd_xport.h" +#include +#ifdef WIN32 +#include +#include +#endif + + +int rrd_xport(int, char **, int *, + time_t *, time_t *, + unsigned long *, unsigned long *, + char ***, rrd_value_t **); + +int rrd_xport_fn(image_desc_t *, + time_t *, time_t *, + unsigned long *, unsigned long *, + char ***, rrd_value_t **); + + + +/* mostly rrd_graph(), just pushed a bit here and stretched a bit there */ +int +rrd_xport(int argc, char **argv, int *xsize, + time_t *start, + time_t *end, /* which time frame do you want ? + * will be changed to represent reality */ + unsigned long *step, /* which stepsize do you want? + * will be changed to represent reality */ + unsigned long *col_cnt, /* number of data columns in the result */ + char ***legend_v, /* legend entries */ + rrd_value_t **data) /* two dimensional array containing the data */ + +{ + image_desc_t im; + int i; + long long_tmp; + time_t start_tmp=0,end_tmp=0; + char symname[100]; + long scancount; + struct time_value start_tv, end_tv; + char *parsetime_error = NULL; + + parsetime("end-24h", &start_tv); + parsetime("now", &end_tv); + + /* use the default values from rrd_graph.c */ + im.xlab_user.minsec = -1; + im.xgif=0; + im.ygif=0; + im.xsize = 400; + im.ysize = 100; + im.step = 0; + im.ylegend[0] = '\0'; + im.title[0] = '\0'; + im.minval = DNAN; + im.maxval = DNAN; + im.interlaced = 0; + im.unitsexponent= 9999; + im.extra_flags= 0; + im.rigid = 0; + im.imginfo = NULL; + im.lazy = 0; + im.logarithmic = 0; + im.ygridstep = DNAN; + im.draw_x_grid = 1; + im.draw_y_grid = 1; + im.base = 1000; + im.prt_c = 0; + im.gdes_c = 0; + im.gdes = NULL; + im.imgformat = IF_GIF; /* we default to GIF output */ + + while (1){ + static struct option long_options[] = + { + {"start", required_argument, 0, 's'}, + {"end", required_argument, 0, 'e'}, + {"maxrows", required_argument, 0, 'm'}, + {"step", required_argument, 0, 261}, + {0,0,0,0} + }; + int option_index = 0; + int opt; + + opt = getopt_long(argc, argv, "s:e:m:", + long_options, &option_index); + + if (opt == EOF) + break; + + switch(opt) { + case 261: + im.step = atoi(optarg); + break; + case 's': + if ((parsetime_error = parsetime(optarg, &start_tv))) { + rrd_set_error( "start time: %s", parsetime_error ); + return -1; + } + break; + case 'e': + if ((parsetime_error = parsetime(optarg, &end_tv))) { + rrd_set_error( "end time: %s", parsetime_error ); + return -1; + } + break; + case 'm': + long_tmp = atol(optarg); + if (long_tmp < 10) { + rrd_set_error("maxrows below 10 rows"); + return -1; + } + im.xsize = long_tmp; + break; + + case '?': + if (optopt != 0) + rrd_set_error("unknown option '%c'", optopt); + else + rrd_set_error("unknown option '%s'",argv[optind-1]); + return -1; + } + } + + /* + if (optind >= argc) { + rrd_set_error("missing filename"); + return -1; + } + */ + + if (proc_start_end(&start_tv,&end_tv,&start_tmp,&end_tmp) == -1){ + return -1; + } + + if (start_tmp < 3600*24*365*10){ + rrd_set_error("the first entry to fetch should be after 1980 (%ld)",start_tmp); + return -1; + } + + if (end_tmp < start_tmp) { + rrd_set_error("start (%ld) should be less than end (%ld)", + start_tmp, end_tmp); + return -1; + } + + im.start = start_tmp; + im.end = end_tmp; + + + for(i=optind;i=1){ + if(strstart <= 0){ + im.gdes[im.gdes_c-1].legend[0] = '\0'; + } else { + scan_for_col(&argv[i][argstart+strstart],FMT_LEG_LEN,im.gdes[im.gdes_c-1].legend); + } + if((im.gdes[im.gdes_c-1].vidx=find_var(&im,varname))==-1){ + im_free(&im); + rrd_set_error("unknown variable '%s'",varname); + return -1; + } + } else { + im_free(&im); + rrd_set_error("can't parse '%s'",&argv[i][argstart]); + return -1; + } + break; + default: + break; + } + + } + + if (im.gdes_c == 0){ + rrd_set_error("can't make a graph without contents"); + im_free(&im); + return(-1); + } + + if (rrd_xport_fn(&im, start, end, step, col_cnt, legend_v, data) == -1){ + im_free(&im); + return -1; + } + + im_free(&im); + return 0; +} + + +int +rrd_xport_fn(image_desc_t *im, + time_t *start, + time_t *end, /* which time frame do you want ? + * will be changed to represent reality */ + unsigned long *step, /* which stepsize do you want? + * will be changed to represent reality */ + unsigned long *col_cnt, /* number of data columns in the result */ + char ***legend_v, /* legend entries */ + rrd_value_t **data) /* two dimensional array containing the data */ +{ + + int i = 0, j = 0; + unsigned long *ds_cnt; /* number of data sources in file */ + unsigned long col, dst_row, row_cnt; + rrd_value_t *srcptr, *dstptr; + + unsigned long nof_xports = 0; + unsigned long xport_counter = 0; + unsigned long *ref_list; + rrd_value_t **srcptr_list; + char **legend_list; + int ii = 0; + + time_t start_tmp = 0; + time_t end_tmp = 0; + unsigned long step_tmp = 1; + + /* pull the data from the rrd files ... */ + if(data_fetch(im)==-1) + return -1; + + /* evaluate CDEF operations ... */ + if(data_calc(im)==-1) + return -1; + + /* how many xports? */ + for(i = 0; i < im->gdes_c; i++) { + switch(im->gdes[i].gf) { + case GF_XPORT: + nof_xports++; + break; + default: + break; + } + } + + if(nof_xports == 0) { + rrd_set_error("no XPORT found, nothing to do"); + return -1; + } + + /* a list of referenced gdes */ + ref_list = malloc(sizeof(int) * nof_xports); + if(ref_list == NULL) + return -1; + + /* a list to save pointers into each gdes data */ + srcptr_list = malloc(sizeof(srcptr) * nof_xports); + if(srcptr_list == NULL) { + free(ref_list); + return -1; + } + + /* a list to save pointers to the column's legend entry */ + /* this is a return value! */ + legend_list = malloc(sizeof(char *) * nof_xports); + if(legend_list == NULL) { + free(srcptr_list); + free(ref_list); + return -1; + } + + /* find referenced gdes and save their index and */ + /* a pointer into their data */ + for(i = 0; i < im->gdes_c; i++) { + switch(im->gdes[i].gf) { + case GF_XPORT: + ii = im->gdes[i].vidx; + if(xport_counter > nof_xports) { + rrd_set_error( "too many xports: should not happen. Hmmm"); + free(srcptr_list); + free(ref_list); + free(legend_list); + return -1; + } + srcptr_list[xport_counter] = im->gdes[ii].data; + ref_list[xport_counter++] = i; + break; + default: + break; + } + } + + start_tmp = im->gdes[0].start; + end_tmp = im->gdes[0].end; + step_tmp = im->gdes[0].step; + + *col_cnt = nof_xports; + *start = start_tmp; + *end = end_tmp; + *step = step_tmp; + + row_cnt = ((*end)-(*start))/(*step) + 1; + + /* room for rearranged data */ + /* this is a return value! */ + if (((*data) = malloc((*col_cnt) * row_cnt * sizeof(rrd_value_t)))==NULL){ + free(srcptr_list); + free(ref_list); + free(legend_list); + rrd_set_error("malloc xport data area"); + return(-1); + } + dstptr = (*data); + + j = 0; + for(i = 0; i < im->gdes_c; i++) { + switch(im->gdes[i].gf) { + case GF_XPORT: + /* reserve room for one legend entry */ + /* is FMT_LEG_LEN + 5 the correct size? */ + if ((legend_list[j] = malloc(sizeof(char) * (FMT_LEG_LEN+5)))==NULL) { + free(srcptr_list); + free(ref_list); + free(legend_list); + rrd_set_error("malloc xprint legend entry"); + return(-1); + } + + if (im->gdes[i].legend) + /* omit bounds check, should have the same size */ + strcpy (legend_list[j++], im->gdes[i].legend); + else + legend_list[j++][0] = '\0'; + + break; + default: + break; + } + } + + /* fill data structure */ + for(dst_row = 0; dst_row < row_cnt; dst_row++) { + for(i = 0; i < nof_xports; i++) { + j = ref_list[i]; + ii = im->gdes[j].vidx; + ds_cnt = &im->gdes[ii].ds_cnt; + col = *ds_cnt; + + srcptr = srcptr_list[i]; + for(col = 0; col < (*ds_cnt); col++) { + rrd_value_t newval = DNAN; + newval = srcptr[col]; + + if (im->gdes[ii].ds_namv && im->gdes[ii].ds_nam) { + if(strcmp(im->gdes[ii].ds_namv[col],im->gdes[ii].ds_nam) == 0) + (*dstptr++) = newval; + } else { + (*dstptr++) = newval; + } + + } + srcptr_list[i] += (*ds_cnt); + } + } + + *legend_v = legend_list; + free(srcptr_list); + free(ref_list); + return 0; + +} Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.c 2002-11-09 12:31:01.000000000 -0800 @@ -1,10 +1,11 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2001 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2001 ***************************************************************************** * rrd_tool.c Startup wrapper *****************************************************************************/ #include "rrd_tool.h" +#include "rrd_xport.h" void PrintUsage(char *cmd); int CountArgs(char *aLine); @@ -12,19 +13,19 @@ int HandleInputLine(int, char **, FILE*); #define TRUE 1 #define FALSE 0 -#define MAX_LENGTH 10000 +#define MAX_LENGTH 100000 void PrintUsage(char *cmd) { char help_main[] = - "RRDtool 1.0.33 Copyright 1997-2001 by Tobias Oetiker \n\n" + "RRDtool 1.0.40 Copyright 1997-2001 by Tobias Oetiker \n\n" "Usage: rrdtool [options] command command_options\n\n"; char help_list[] = "Valid commands: create, update, graph, dump, restore,\n" - "\t\tlast, info, fetch, tune, resize\n\n"; + "\t\tlast, info, fetch, tune, resize, xport\n\n"; char help_create[] = "* create - create a new RRD\n\n" @@ -71,6 +72,7 @@ "\t\t[-h|--height pixels] [-o|--logarithmic]\n" "\t\t[-u|--upper-limit value] [-z|--lazy]\n" "\t\t[-l|--lower-limit value] [-r|--rigid]\n" + "\t\t[-g|--no-legend]\n" "\t\t[--alt-autoscale]\n" "\t\t[--alt-autoscale-max]\n" "\t\t[--units-exponent value]\n" @@ -100,6 +102,15 @@ " * resize - alter the lenght of one of the RRAs in an RRD\n\n" "\trrdtool resize filename rranum GROW|SHRINK rows\n\n"; + char help_xport[] = + "* xport - generate XML dump from one or several RRD\n\n" + "\trrdtool xport [-s|--start seconds] [-e|--end seconds]\n" + "\t\t[-m|--maxrows rows]\n" + "\t\t[--step seconds]\n" + "\t\t[DEF:vname=rrd:ds-name:CF]\n" + "\t\t[CDEF:vname=rpn-expression]\n" + "\t\t[XPORT:vname:legend]\n\n"; + char help_lic[] = "RRDtool is distributed under the Terms of the GNU General\n" "Public License Version 2. (www.gnu.org/copyleft/gpl.html)\n\n" @@ -107,7 +118,7 @@ "For more information read the RRD manpages\n\n"; enum { C_NONE, C_CREATE, C_DUMP, C_INFO, C_RESTORE, C_LAST, - C_UPDATE, C_FETCH, C_GRAPH, C_TUNE, C_RESIZE }; + C_UPDATE, C_FETCH, C_GRAPH, C_TUNE, C_RESIZE, C_XPORT }; int help_cmd = C_NONE; @@ -133,6 +144,8 @@ help_cmd = C_TUNE; else if (!strcmp(cmd,"resize")) help_cmd = C_RESIZE; + else if (!strcmp(cmd,"xport")) + help_cmd = C_XPORT; } fputs(help_main, stdout); switch (help_cmd) @@ -170,6 +183,9 @@ case C_RESIZE: fputs(help_resize, stdout); break; + case C_XPORT: + fputs(help_xport, stdout); + break; } fputs(help_lic, stdout); } @@ -303,7 +319,7 @@ strcmp("v", argv[1]) == 0 || strcmp("-v", argv[1]) == 0 || strcmp("-version", argv[1]) == 0 ) - printf("RRDtool 1.0.33 Copyright (C) 1997-2001 by Tobias Oetiker \n"); + printf("RRDtool 1.0.40 Copyright (C) 1997-2001 by Tobias Oetiker \n"); else if (strcmp("restore", argv[1]) == 0) rrd_restore(argc-1, &argv[1]); else if (strcmp("resize", argv[1]) == 0) @@ -334,8 +350,54 @@ free(ds_namv); free (data); } - } - else if (strcmp("graph", argv[1]) == 0) { + } else if (strcmp("xport", argv[1]) == 0) { + int xxsize; + int i = 0, j = 0; + time_t start,end; + unsigned long step, col_cnt,row_cnt; + rrd_value_t *data,*ptr; + char **legend_v; + if(rrd_xport(argc-1, &argv[1], &xxsize,&start,&end,&step,&col_cnt,&legend_v,&data) != -1) { + row_cnt = (end-start)/step + 1; + ptr = data; + printf("\n\n", XML_ENCODING); + printf("<%s>\n", ROOT_TAG); + printf(" <%s>\n", META_TAG); + printf(" <%s>%lu\n", META_START_TAG, start, META_START_TAG); + printf(" <%s>%lu\n", META_STEP_TAG, step, META_STEP_TAG); + printf(" <%s>%lu\n", META_END_TAG, end, META_END_TAG); + printf(" <%s>%lu\n", META_ROWS_TAG, row_cnt, META_ROWS_TAG); + printf(" <%s>%lu\n", META_COLS_TAG, col_cnt, META_COLS_TAG); + printf(" <%s>\n", LEGEND_TAG); + for (j = 0; j < col_cnt; j++) { + char *entry = NULL; + entry = legend_v[j]; + printf(" <%s>%s\n", LEGEND_ENTRY_TAG, entry, LEGEND_ENTRY_TAG); + free(entry); + } + free(legend_v); + printf(" \n", LEGEND_TAG); + printf(" \n", META_TAG); + printf(" <%s>\n", DATA_TAG); + for (i = start; i <= end; i += step) { + printf (" <%s>", DATA_ROW_TAG); + printf ("<%s>%lu", COL_TIME_TAG, i, COL_TIME_TAG); + for (j = 0; j < col_cnt; j++) { + rrd_value_t newval = DNAN; + newval = *(ptr++); + if(isnan(newval)){ + printf("<%s>NaN", COL_DATA_TAG, COL_DATA_TAG); + } else { + printf("<%s>%0.10e", COL_DATA_TAG, newval, COL_DATA_TAG); + }; + } + printf("\n", DATA_ROW_TAG); + } + free(data); + printf(" \n", DATA_TAG); + printf("\n", ROOT_TAG); + } + } else if (strcmp("graph", argv[1]) == 0) { char **calcpr; int xsize, ysize; int i; Added: trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_xport.h 2002-11-09 12:31:01.000000000 -0800 @@ -0,0 +1,34 @@ +/**************************************************************************** + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 + **************************************************************************** + * rrd_xport.h contains XML related constants + ****************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _RRD_XPORT_H +#define _RRD_XPORT_H + +#define XML_ENCODING "ISO-8859-1" +#define ROOT_TAG "xport" +#define META_TAG "meta" +#define META_START_TAG "start" +#define META_STEP_TAG "step" +#define META_END_TAG "end" +#define META_ROWS_TAG "rows" +#define META_COLS_TAG "columns" +#define LEGEND_TAG "legend" +#define LEGEND_ENTRY_TAG "entry" +#define DATA_TAG "data" +#define DATA_ROW_TAG "row" +#define COL_TIME_TAG "t" +#define COL_DATA_TAG "v" + + +#endif + + +#ifdef __cplusplus +} +#endif Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_update.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_update.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_update.c 2002-11-09 12:31:02.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_update.c RRD Update Function ***************************************************************************** - * $Id: rrd_update.c,v 1.7 1998/03/08 12:35:11 oetiker Exp oetiker $ + * $Id: rrd_update.c,v 1.1.1.1 2002/02/26 10:21:38 oetiker Exp $ * $Log: rrd_update.c,v $ + * Revision 1.1.1.1 2002/02/26 10:21:38 oetiker + * Intial Import + * *****************************************************************************/ #include "rrd_tool.h" @@ -29,7 +32,7 @@ main(int argc, char **argv){ rrd_update(argc,argv); if (rrd_test_error()) { - printf("RRDtool 1.0.33 Copyright 1997-2000 by Tobias Oetiker \n\n" + printf("RRDtool 1.0.40 Copyright 1997-2000 by Tobias Oetiker \n\n" "Usage: rrdupdate filename\n" "\t\t\t[--template|-t ds-name:ds-name:...]\n" "\t\t\ttime|N:value[:value...]\n\n" Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_tool.h 2002-11-09 12:31:02.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_tool.h Common Header File ***************************************************************************** - * $Id: rrd_tool.h,v 1.5 1998/03/08 12:35:11 oetiker Exp oetiker $ + * $Id: rrd_tool.h,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ * $Log: rrd_tool.h,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * *****************************************************************************/ #ifdef __cplusplus extern "C" { Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd.h 2002-11-09 12:31:02.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997,1998, 1999 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997,1998, 1999 ***************************************************************************** * rrdlib.h Public header file for librrd ***************************************************************************** - * $Id: rrd_tool.h,v 1.5 1998/03/08 12:35:11 oetiker Exp oetiker $ - * $Log: rrd_tool.h,v $ + * $Id: rrd.h,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ + * $Log: rrd.h,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * *****************************************************************************/ #ifdef __cplusplus extern "C" { @@ -31,6 +34,9 @@ int rrd_tune(int, char **); time_t rrd_last(int, char **); int rrd_resize(int, char **); +int rrd_xport(int, char **, int *, time_t *, time_t *, + unsigned long *, unsigned long *, + char ***, rrd_value_t **); /* Transplanted from parsetime.h */ typedef enum { Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.c 2002-11-09 12:31:03.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1999 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1999 ***************************************************************************** * rrd_format.c RRD Database Format helper functions ***************************************************************************** - * $Id: rrd_format.c,v 1.3 1998/03/08 12:35:11 oetiker Exp oetiker $ + * $Id: rrd_format.c,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ * $Log: rrd_format.c,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * * Revision 1.3 1998/03/08 12:35:11 oetiker * checkpointing things because the current setup seems to work * according to the things said in the manpages Modified: trunk/orca/packages/rrdtool-1.0.40/src/gdpng.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/gdpng.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/gdpng.c 2002-11-09 12:31:03.000000000 -0800 @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * gdpng.c add PNG output routine to gd library *****************************************************************************/ Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_error.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_error.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_error.c 2002-11-09 12:31:03.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_error.c Common Header File ***************************************************************************** - * $Id: rrd_tool.h,v 1.5 1998/03/08 12:35:11 oetiker Exp oetiker $ - * $Log: rrd_tool.h,v $ + * $Id: rrd_error.c,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ + * $Log: rrd_error.c,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * *************************************************************************** */ #include "rrd_tool.h" Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_fetch.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_fetch.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_fetch.c 2002-11-09 12:31:03.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_fetch.c read date from an rrd to use for further processing ***************************************************************************** - * $Id: rrd_fetch.c,v 1.8 1998/03/08 12:35:11 oetiker Exp oetiker $ + * $Id: rrd_fetch.c,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ * $Log: rrd_fetch.c,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * *****************************************************************************/ #include "rrd_tool.h" @@ -254,8 +257,8 @@ - (rrd.live_head->last_up % *step)); rra_start_time = (rra_end_time - ( *step * (rrd.rra_def[chosen_rra].row_cnt-1))); - start_offset = (*start - rra_start_time) / (long)*step; - end_offset = (rra_end_time - *end ) / (long)*step; + start_offset = (long)(*start - rra_start_time) / (long)*step; + end_offset = (long)(rra_end_time - *end ) / (long)*step; #ifdef DEBUG fprintf(stderr,"rra_start %lu, rra_end %lu, start_off %li, end_off %li\n", rra_start_time,rra_end_time,start_offset,end_offset); Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_format.h 2002-11-09 12:31:04.000000000 -0800 @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997, 1998, 1999 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997, 1998, 1999 ***************************************************************************** * rrd_format.h RRD Database Format header *****************************************************************************/ @@ -24,7 +24,7 @@ #if defined(WIN32) #define DNAN ((double)fmod(0.0,0.0)) -#define DINF ((double)log(0.0)) +#define DINF ((double)fabs((double)log(0.0))) #else #define DNAN ((double)(0.0/0.0)) /* we use a DNAN to Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_open.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_open.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_open.c 2002-11-09 12:31:04.000000000 -0800 @@ -1,10 +1,13 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_open.c Open an RRD File ***************************************************************************** - * $Id: rrd_open.c,v 1.6 1998/03/08 12:35:11 oetiker Exp oetiker $ + * $Id: rrd_open.c,v 1.1.1.1 2002/02/26 10:21:37 oetiker Exp $ * $Log: rrd_open.c,v $ + * Revision 1.1.1.1 2002/02/26 10:21:37 oetiker + * Intial Import + * *****************************************************************************/ #include "rrd_tool.h" @@ -42,6 +45,7 @@ #define MYFREAD(MYVAR,MYVART,MYCNT) \ if ((MYVAR = malloc(sizeof(MYVART) * MYCNT)) == NULL) {\ rrd_set_error("" #MYVAR " malloc"); \ + fclose(*in_file); \ return (-1); } \ fread(MYVAR,sizeof(MYVART),MYCNT, *in_file); @@ -52,17 +56,20 @@ if (strncmp(rrd->stat_head->cookie,RRD_COOKIE,4) != 0){ rrd_set_error("'%s' is not an RRD file",file_name); free(rrd->stat_head); + fclose(*in_file); return(-1);} if (strncmp(rrd->stat_head->version,RRD_VERSION,5) != 0){ - rrd_set_error("cant handle RRD file version %s", + rrd_set_error("can't handle RRD file version %s", rrd->stat_head->version); free(rrd->stat_head); + fclose(*in_file); return(-1);} if (rrd->stat_head->float_cookie != FLOAT_COOKIE){ rrd_set_error("This RRD was created on other architecture"); free(rrd->stat_head); + fclose(*in_file); return(-1);} MYFREAD(rrd->ds_def, ds_def_t, rrd->stat_head->ds_cnt) Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_resize.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_resize.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_resize.c 2002-11-09 12:31:04.000000000 -0800 @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_resize.c Alters size of an RRA ***************************************************************************** Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.c 2002-11-09 12:31:05.000000000 -0800 @@ -1,10 +1,12 @@ + /**************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 **************************************************************************** * rrd__graph.c make creates ne rrds ****************************************************************************/ #include "rrd_tool.h" +#include "rrd_graph.h" #include #include #include @@ -14,6 +16,14 @@ #include #endif +#ifdef HAVE_TIME_H +#include +#endif + +#ifdef HAVE_LOCALE_H +#include +#endif + #define SmallFont gdLucidaNormal10 #define LargeFont gdLucidaBold12 @@ -25,57 +35,6 @@ # define DPRINT(x) #endif -#define DEF_NAM_FMT "%29[_A-Za-z0-9]" - -enum tmt_en {TMT_SECOND=0,TMT_MINUTE,TMT_HOUR,TMT_DAY, - TMT_WEEK,TMT_MONTH,TMT_YEAR}; - -enum grc_en {GRC_CANVAS=0,GRC_BACK,GRC_SHADEA,GRC_SHADEB, - GRC_GRID,GRC_MGRID,GRC_FONT,GRC_FRAME,GRC_ARROW,__GRC_END__}; - - -enum gf_en {GF_PRINT=0,GF_GPRINT,GF_COMMENT,GF_HRULE,GF_VRULE,GF_LINE1, - GF_LINE2,GF_LINE3,GF_AREA,GF_STACK, GF_DEF, GF_CDEF }; - -enum op_en {OP_NUMBER=0,OP_VARIABLE,OP_INF,OP_PREV,OP_NEGINF, - OP_UNKN,OP_NOW,OP_TIME,OP_LTIME,OP_ADD,OP_MOD, - OP_SUB,OP_MUL, - OP_DIV,OP_SIN, OP_DUP, OP_EXC, OP_POP, - OP_COS,OP_LOG,OP_EXP,OP_LT,OP_LE,OP_GT,OP_GE,OP_EQ,OP_IF, - OP_MIN,OP_MAX,OP_LIMIT, OP_FLOOR, OP_CEIL, - OP_UN,OP_END}; - -enum if_en {IF_GIF=0,IF_PNG=1}; - -typedef struct rpnp_t { - enum op_en op; - double val; /* value for a OP_NUMBER */ - long ptr; /* pointer into the gdes array for OP_VAR */ - double *data; /* pointer to the current value from OP_VAR DAS*/ - long ds_cnt; /* data source count for data pointer */ - long step; /* time step for OP_VAR das */ -} rpnp_t; - - -typedef struct col_trip_t { - int red; /* red = -1 is no color */ - int green; - int blue; - int i; /* color index assigned in gif image i=-1 is unasigned*/ -} col_trip_t; - - -typedef struct xlab_t { - long minsec; /* minimum sec per pix */ - enum tmt_en gridtm; /* grid interval in what ?*/ - long gridst; /* how many whats per grid*/ - enum tmt_en mgridtm; /* label interval in what ?*/ - long mgridst; /* how many whats per label*/ - enum tmt_en labtm; /* label interval in what ?*/ - long labst; /* how many whats per label*/ - long precis; /* label precision -> label placement*/ - char *stst; /* strftime string*/ -} xlab_t; xlab_t xlab[] = { {0, TMT_SECOND,30, TMT_MINUTE,5, TMT_MINUTE,5, 0,"%H:%M"}, @@ -88,8 +47,8 @@ /*{300, TMT_HOUR,3, TMT_HOUR,12, TMT_HOUR,12, 12*3600,"%a %p"}, this looks silly*/ {600, TMT_HOUR,6, TMT_DAY,1, TMT_DAY,1, 24*3600,"%a"}, {1800, TMT_HOUR,12, TMT_DAY,1, TMT_DAY,2, 24*3600,"%a"}, - {3600, TMT_DAY,1, TMT_WEEK,1, TMT_WEEK,1, 7*24*3600,"Week %W"}, - {3*3600, TMT_WEEK,1, TMT_MONTH,1, TMT_WEEK,2, 7*24*3600,"Week %W"}, + {3600, TMT_DAY,1, TMT_WEEK,1, TMT_WEEK,1, 7*24*3600,"Week %V"}, + {3*3600, TMT_WEEK,1, TMT_MONTH,1, TMT_WEEK,2, 7*24*3600,"Week %V"}, {6*3600, TMT_MONTH,1, TMT_MONTH,1, TMT_MONTH,1, 30*24*3600,"%b"}, {48*3600, TMT_MONTH,1, TMT_MONTH,3, TMT_MONTH,3, 30*24*3600,"%b"}, {10*24*3600, TMT_YEAR,1, TMT_YEAR,1, TMT_YEAR,1, 365*24*3600,"%y"}, @@ -111,11 +70,6 @@ /* sensible y label intervals ...*/ -typedef struct ylab_t { - double grid; /* grid spacing */ - int lfac[4]; /* associated label spacing*/ -} ylab_t; - ylab_t ylab[]= { {0.1, {1,2, 5,10}}, {0.2, {1,5,10,20}}, @@ -154,121 +108,6 @@ #define FMT_LEG_LEN 2000 #endif -typedef struct graph_desc_t { - enum gf_en gf; /* graphing function */ - char vname[30]; /* name of the variable */ - long vidx; /* gdes reference */ - char rrd[255]; /* name of the rrd_file containing data */ - char ds_nam[DS_NAM_SIZE]; /* data source name */ - long ds; /* data source number */ - enum cf_en cf; /* consolidation function */ - col_trip_t col; /* graph color */ - char format[FMT_LEG_LEN+5]; /* format for PRINT AND GPRINT */ - char legend[FMT_LEG_LEN+5]; /* legend*/ - gdPoint legloc; /* location of legend */ - double yrule; /* value for y rule line */ - time_t xrule; /* value for x rule line */ - rpnp_t *rpnp; /* instructions for CDEF function */ - - /* description of data fetched for the graph element */ - time_t start,end; /* timestaps for first and last data element */ - unsigned long step; /* time between samples */ - unsigned long ds_cnt; /* how many data sources are there in the fetch */ - long data_first; /* first pointer to this data */ - char **ds_namv; /* name of datasources in the fetch. */ - rrd_value_t *data; /* the raw data drawn from the rrd */ - rrd_value_t *p_data; /* processed data, xsize elments */ - -} graph_desc_t; - -#define ALTYGRID 0x01 /* use alternative y grid algorithm */ -#define ALTAUTOSCALE 0x02 /* use alternative algorithm to find lower and upper bounds */ -#define ALTAUTOSCALE_MAX 0x04 /* use alternative algorithm to find upper bounds */ -#define NOLEGEND 0x08 /* use no legend */ - -typedef struct image_desc_t { - - /* configuration of graph */ - - char graphfile[MAXPATH]; /* filename for graphic */ - long xsize,ysize; /* graph area size in pixels */ - col_trip_t graph_col[__GRC_END__]; /* real colors for the graph */ - char ylegend[200]; /* legend along the yaxis */ - char title[200]; /* title for graph */ - int draw_x_grid; /* no x-grid at all */ - int draw_y_grid; /* no x-grid at all */ - xlab_t xlab_user; /* user defined labeling for xaxis */ - char xlab_form[200]; /* format for the label on the xaxis */ - - double ygridstep; /* user defined step for y grid */ - int ylabfact; /* every how many y grid shall a label be written ? */ - - time_t start,end; /* what time does the graph cover */ - unsigned long step; /* any preference for the default step ? */ - rrd_value_t minval,maxval; /* extreme values in the data */ - int rigid; /* do not expand range even with - values outside */ - char* imginfo; /* construct an xorigin \ @@ -348,6 +187,7 @@ conv_if(STACK,GF_STACK) conv_if(DEF,GF_DEF) conv_if(CDEF,GF_CDEF) + conv_if(XPORT,GF_XPORT) return (-1); } @@ -356,6 +196,7 @@ conv_if(GIF,IF_GIF) conv_if(PNG,IF_PNG) + conv_if(GD,IF_GD) return (-1); } @@ -526,6 +367,12 @@ #endif if (isnan(im->ygridstep)){ + if(im->extra_flags & ALTYMRTG) { /* mrtg */ + int decimals = ceil(log10(max(fabs(im->maxval),fabs(im->minval)))); + double scaledstep = ceil(25 * pow((double)10,-decimals) * im->maxval) * pow((double)10,decimals - 2); + im->minval = 0; + im->maxval = 4 * scaledstep; + } else if(im->extra_flags & ALTAUTOSCALE) { /* measure the amplitude of the function. Make sure that graph boundaries are slightly higher then max/min vals @@ -871,6 +718,20 @@ expr+=strlen(#VVV); \ } +#define match_op_param(VV,VVV) \ + else if (sscanf(expr, #VVV "(" DEF_NAM_FMT ")",vname) == 1) { \ + int length = 0; \ + if ((length = strlen(#VVV)+strlen(vname)+2, \ + expr[length] == ',' || expr[length] == '\0') ) { \ + rpnp[steps].op = VV; \ + if ((rpnp[steps].ptr = find_var(im,vname)) == -1) { \ + im_free(im); \ + rrd_set_error("unknown variable '%s'",vname); \ + return NULL; \ + } else { expr+=length; } \ + } \ + } + match_op(OP_ADD,+) match_op(OP_SUB,-) match_op(OP_MUL,*) @@ -899,6 +760,7 @@ match_op(OP_UN,UN) match_op(OP_NEGINF,NEGINF) match_op(OP_PREV,PREV) + match_op_param(OP_PREV_OTHER,PREV) match_op(OP_INF,INF) match_op(OP_NOW,NOW) match_op(OP_LTIME,LTIME) @@ -998,7 +860,8 @@ this will be the step size for the cdef created data source*/ for(rpi=0;im->gdes[gdi].rpnp[rpi].op != OP_END;rpi++){ - if(im->gdes[gdi].rpnp[rpi].op == OP_VARIABLE){ + if(im->gdes[gdi].rpnp[rpi].op == OP_VARIABLE || + im->gdes[gdi].rpnp[rpi].op == OP_PREV_OTHER){ long ptr = im->gdes[gdi].rpnp[rpi].ptr; if ((steparray = rrd_realloc(steparray, (++stepcnt+1)*sizeof(*steparray)))==NULL){ rrd_set_error("realloc steparray"); @@ -1053,6 +916,17 @@ return -1; } + /* move the data pointers to the correct period */ + for(rpi=0;im->gdes[gdi].rpnp[rpi].op != OP_END;rpi++){ + if(im->gdes[gdi].rpnp[rpi].op == OP_VARIABLE || + im->gdes[gdi].rpnp[rpi].op == OP_PREV_OTHER){ + long ptr = im->gdes[gdi].rpnp[rpi].ptr; + if(im->gdes[gdi].start > im->gdes[ptr].start) { + im->gdes[gdi].rpnp[rpi].data += im->gdes[gdi].rpnp[rpi].ds_cnt; + } + } + } + /* step through the new cdef results array and calculate the values */ for (now = im->gdes[gdi].start; now<=im->gdes[gdi].end; @@ -1073,21 +947,28 @@ stack[++stptr] = im->gdes[gdi].rpnp[rpi].val; break; case OP_VARIABLE: - /* make sure we pull the correct value from the *.data array */ - /* adjust the pointer into the array acordingly. */ - if(now > im->gdes[gdi].start && - now % im->gdes[gdi].rpnp[rpi].step == 0){ - im->gdes[gdi].rpnp[rpi].data += - im->gdes[gdi].rpnp[rpi].ds_cnt; - } + /* go to the next value of the variable if necessary */ stack[++stptr] = *im->gdes[gdi].rpnp[rpi].data; + if ( /* now > im->gdes[gdi].start && */ + now % im->gdes[gdi].rpnp[rpi].step == 0 ){ + im->gdes[gdi].rpnp[rpi].data += im->gdes[gdi].rpnp[rpi].ds_cnt; + } break; case OP_PREV: - if (dataidx <= 0) { - stack[++stptr] = DNAN; - } else { - stack[++stptr] = im->gdes[gdi].data[dataidx]; - } + if (dataidx <= 0) { + stack[++stptr] = DNAN; + } else { + stack[++stptr] = im->gdes[gdi].data[dataidx]; + } + break; + case OP_PREV_OTHER: + if (dataidx <= 0) { + stack[++stptr] = DNAN; + } else { + int rpi_ptr = im->gdes[gdi].rpnp[rpi].ptr; + int ds_cnt = im->gdes[gdi].rpnp[rpi].ds_cnt; + stack[++stptr] = im->gdes[rpi_ptr].data[dataidx*ds_cnt+rpi_ptr]; + } break; case OP_UNKN: stack[++stptr] = DNAN; @@ -1447,6 +1328,7 @@ case GF_VRULE: case GF_DEF: case GF_CDEF: + case GF_XPORT: break; } } @@ -1708,6 +1590,7 @@ } if (im->gdes[i].gf == GF_PRINT){ (*prdata)[prlines-2] = malloc((FMT_LEG_LEN+2)*sizeof(char)); + (*prdata)[prlines-1] = NULL; if (bad_format(im->gdes[i].format)) { rrd_set_error("bad format for [G]PRINT in '%s'", im->gdes[i].format); return -1; @@ -1717,7 +1600,6 @@ #else sprintf((*prdata)[prlines-2],im->gdes[i].format,printval,si_symb); #endif - (*prdata)[prlines-1] = NULL; } else { /* GF_GPRINT */ @@ -1745,6 +1627,7 @@ break; case GF_DEF: case GF_CDEF: + case GF_XPORT: break; } } @@ -1969,6 +1852,7 @@ polyPoints[0].x=im->xorigin; polyPoints[1].x=im->xorigin+im->xsize; + sgrid = (int)( im->minval / gridstep - 1); egrid = (int)( im->maxval / gridstep + 1); scaledstep = gridstep/im->magfact; @@ -1976,7 +1860,7 @@ polyPoints[0].y=ytr(im,gridstep*i); if ( polyPoints[0].y >= im->yorigin-im->ysize && polyPoints[0].y <= im->yorigin) { - if(i % labfact == 0){ + if(i % labfact == 0){ if (i==0 || im->symbol == ' ') { if(scaledstep < 1){ if(im->extra_flags & ALTYGRID) { @@ -2028,6 +1912,54 @@ return 1; } +int +horizontal_mrtg_grid(gdImagePtr gif, image_desc_t *im) +{ + int i, xLeft, xRight, y; + double scaledstep; + char graph_label[100]; + int styleMajor[2]; + int decimals; + char labfmt[64]; + + /* does the scale of this graph make it impossible to put lines + on it? If so, give up. */ + if (isnan((im->maxval - im->minval) / im->magfact)) + return 0; + + styleMajor[0] = graph_col[GRC_MGRID].i; + styleMajor[1] = gdTransparent; + + xLeft = im->xorigin; + xRight = im->xorigin + im->xsize; + + decimals = ceil(log10(max(fabs(im->maxval),fabs(im->minval)))); + scaledstep = ceil(25 * pow((double)10,-decimals) * im->maxval) * pow((double)10,decimals - 2) / im->magfact; + + sprintf(labfmt,"%%4.%df",1 - (scaledstep > (double)10 || ceil(scaledstep) == scaledstep)); + if (im->symbol != ' ' || im->unit) + strcat(labfmt," "); + if (im->symbol != ' ') + sprintf(labfmt + strlen(labfmt),"%c",im->symbol); + if (im->unit) + strcat(labfmt,im->unit); + + for (i = 0; i <= 4; i++) + {y = im->yorigin - im->ysize * i / 4; + if (y >= im->yorigin-im->ysize && y <= im->yorigin) + {sprintf(graph_label,labfmt,scaledstep * i); + gdImageString(gif,SmallFont,(xLeft - (strlen(graph_label) * SmallFont->w) - 7), + y - SmallFont->h / 2 + 1, + (unsigned char *)graph_label,graph_col[GRC_FONT].i); + gdImageSetStyle(gif,styleMajor,2); + gdImageLine(gif,xLeft - 2,y,xLeft + 2,y,graph_col[GRC_MGRID].i); + gdImageLine(gif,xRight - 2,y,xRight + 2,y,graph_col[GRC_MGRID].i); + gdImageLine(gif,xLeft, y,xRight, y,gdStyled); + } + } + return 1; +} + /* logaritmic horizontal grid */ int horizontal_log_grid(gdImagePtr gif, image_desc_t *im) @@ -2294,6 +2226,10 @@ vertical_grid(gif, im); if (im->draw_y_grid == 1){ + if (im->extra_flags & ALTYMRTG) + {res = horizontal_mrtg_grid(gif,im); + } + else if(im->logarithmic){ res = horizontal_log_grid(gif,im); } else { @@ -2417,6 +2353,29 @@ } return brush; } + +void +copyImage(gdImagePtr gif, char *image, int copy_white) +{FILE *fi; + if ((fi = fopen(image,"rb")) != (FILE *)NULL) + {int i1, i2, c1, c2; + gdImagePtr img; + img = gdImageCreateFromGd(fi); /* load image */ + fclose(fi); + for (i1 = gdImageSX(img); --i1; ) + for (i2 = gdImageSY(img); --i2; ) + {c2 = gdImageGetPixel(img,i1,i2); /* get pixel */ + if (copy_white || img->red[c2] != 255 || img->green[c2] != 255 || img->blue[c2] != 255) + {if ((c1 = gdImageColorExact(gif,img->red[c2],img->green[c2],img->blue[c2])) < 0) + if ((c1 = gdImageColorAllocate(gif,img->red[c2],img->green[c2],img->blue[c2])) < 0) + c1 = gdImageColorClosest(gif,img->red[c2],img->green[c2],img->blue[c2]); + gdImageSetPixel(gif,i1,i2,c1); + } + } + gdImageDestroy(img); + } +} + /***************************************************** * lazy check make sure we rely need to create this graph *****************************************************/ @@ -2443,6 +2402,9 @@ case IF_PNG: size = PngSize(fd,&(im->xgif),&(im->ygif)); break; + case IF_GD: + size = 0; /* for now - GdSize(fd,&(im->xgif),&(im->ygif)); */ + break; } fclose(fd); return size; @@ -2549,10 +2511,13 @@ im->gdes[i].col.green, im->gdes[i].col.blue); - /* the actual graph is created by going through the individual graph elements and then drawing them */ - + + if (im->bkg_image) /* background image added first */ + copyImage(gif,im->bkg_image,1); + else + { back[0].x = 0; back[0].y = 0; back[1].x = back[0].x+im->xgif; @@ -2563,6 +2528,7 @@ back[3].y = back[2].y; gdImageFilledPolygon(gif,back,4,graph_col[GRC_BACK].i); + } canvas[0].x = im->xorigin; canvas[0].y = im->yorigin; @@ -2592,6 +2558,7 @@ case GF_COMMENT: case GF_HRULE: case GF_VRULE: + case GF_XPORT: break; case GF_LINE1: case GF_LINE2: @@ -2690,6 +2657,9 @@ } } + if (im->ovl_image) /* overlay image added last */ + copyImage(gif,im->ovl_image,0); + if (strcmp(im->graphfile,"-")==0) { #ifdef WIN32 /* Change translation mode for stdout to BINARY */ @@ -2709,6 +2679,9 @@ case IF_PNG: gdImagePng(gif, fo); break; + case IF_GD: + gdImageGd(gif, fo); + break; } if (strcmp(im->graphfile,"-") != 0) fclose(fo); @@ -2801,6 +2774,14 @@ (*prdata)=NULL; +#ifdef HAVE_TZSET + tzset(); +#endif +#ifdef HAVE_SETLOCALE + setlocale(LC_TIME,""); +#endif + + parsetime("end-24h", &start_tv); parsetime("now", &end_tv); @@ -2830,6 +2811,10 @@ im.gdes = NULL; im.imgformat = IF_GIF; /* we default to GIF output */ +im.bkg_image = NULL; /* do not put anything to background per default */ +im.ovl_image = NULL; /* do not use anything as overlay per default */ +im.unit = 0; /* do not display unit if not set */ + for(i=0;i= '0' && *ptr <= '9') || *ptr == '.') { - ptr++; - } - if (*ptr == '\0') return 1; - if (*ptr == 'l') { - ptr++; - if (*ptr == '\0') return 1; - if (*ptr == 'e' || *ptr == 'f') { - ptr++; - } else { return 1; } - } - else if (*ptr == 's' || *ptr == 'S' || *ptr == '%') { ++ptr; } - else { return 1; } - } else { - ++ptr; - } - } - return 0; + char *ptr; + int n=0; + ptr = fmt; + while (*ptr != '\0') { + if (*ptr++ == '%') { + + /* line cannot end with percent char */ + if (*ptr == '\0') return 1; + + /* '%s', '%S' and '%%' are allowed */ + if (*ptr == 's' || *ptr == 'S' || *ptr == '%') ptr++; + + /* or else '% 6.2lf' and such are allowed */ + else { + + /* optional padding character */ + if (*ptr == ' ' || *ptr == '+' || *ptr == '-') ptr++; + + /* This should take care of 'm.n' with all three optional */ + while (*ptr >= '0' && *ptr <= '9') ptr++; + if (*ptr == '.') ptr++; + while (*ptr >= '0' && *ptr <= '9') ptr++; + + /* Either 'le' or 'lf' must follow here */ + if (*ptr++ != 'l') return 1; + if (*ptr == 'e' || *ptr == 'f') ptr++; + else return 1; + n++; + } + } + } + return (n!=1); } - Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_cgi.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_cgi.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_cgi.c 2002-11-09 12:31:06.000000000 -0800 @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_cgi.c RRD Web Page Generator *****************************************************************************/ @@ -454,7 +454,7 @@ getP = aLine; putP = aLine; while (*getP && !( !Quote && (braket == 0) && ((*getP) == '>'))){ - if (*getP < ' ') *getP = ' '; /*remove all special chars*/ + if ((unsigned)*getP < ' ') *getP = ' '; /*remove all special chars*/ switch (*getP) { case ' ': if (Quote){ Modified: trunk/orca/packages/rrdtool-1.0.40/src/rrd_create.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_create.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_create.c 2002-11-09 12:31:06.000000000 -0800 @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 ***************************************************************************** * rrd_create.c creates new rrds *****************************************************************************/ Added: trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/src/rrd_graph.h 2002-11-09 12:31:07.000000000 -0800 @@ -0,0 +1,216 @@ +/**************************************************************************** + * RRDtool 1.0.40 Copyright Tobias Oetiker, 1997 - 2000 + **************************************************************************** + * rrd__graph.h + ****************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _RRD_GRAPH_H +#define _RRD_GRAPH_H + + +#define DEF_NAM_FMT "%29[_A-Za-z0-9]" + +enum tmt_en {TMT_SECOND=0,TMT_MINUTE,TMT_HOUR,TMT_DAY, + TMT_WEEK,TMT_MONTH,TMT_YEAR}; + +enum grc_en {GRC_CANVAS=0,GRC_BACK,GRC_SHADEA,GRC_SHADEB, + GRC_GRID,GRC_MGRID,GRC_FONT,GRC_FRAME,GRC_ARROW,__GRC_END__}; + + +enum gf_en {GF_PRINT=0,GF_GPRINT,GF_COMMENT,GF_HRULE,GF_VRULE,GF_LINE1, + GF_LINE2,GF_LINE3,GF_AREA,GF_STACK, GF_DEF, GF_CDEF, GF_XPORT }; + +enum op_en {OP_NUMBER=0,OP_VARIABLE,OP_INF,OP_PREV,OP_PREV_OTHER,OP_NEGINF, + OP_UNKN,OP_NOW,OP_TIME,OP_LTIME,OP_ADD,OP_MOD, + OP_SUB,OP_MUL, + OP_DIV,OP_SIN, OP_DUP, OP_EXC, OP_POP, + OP_COS,OP_LOG,OP_EXP,OP_LT,OP_LE,OP_GT,OP_GE,OP_EQ,OP_IF, + OP_MIN,OP_MAX,OP_LIMIT, OP_FLOOR, OP_CEIL, + OP_UN,OP_END}; + +enum if_en {IF_GIF=0,IF_PNG=1,IF_GD=2}; + +typedef struct rpnp_t { + enum op_en op; + double val; /* value for a OP_NUMBER */ + long ptr; /* pointer into the gdes array for OP_VAR */ + double *data; /* pointer to the current value from OP_VAR DAS*/ + long ds_cnt; /* data source count for data pointer */ + long step; /* time step for OP_VAR das */ +} rpnp_t; + + +typedef struct col_trip_t { + int red; /* red = -1 is no color */ + int green; + int blue; + int i; /* color index assigned in gif image i=-1 is unasigned*/ +} col_trip_t; + + +typedef struct xlab_t { + long minsec; /* minimum sec per pix */ + enum tmt_en gridtm; /* grid interval in what ?*/ + long gridst; /* how many whats per grid*/ + enum tmt_en mgridtm; /* label interval in what ?*/ + long mgridst; /* how many whats per label*/ + enum tmt_en labtm; /* label interval in what ?*/ + long labst; /* how many whats per label*/ + long precis; /* label precision -> label placement*/ + char *stst; /* strftime string*/ +} xlab_t; + +typedef struct ylab_t { + double grid; /* grid spacing */ + int lfac[4]; /* associated label spacing*/ +} ylab_t; + +/* this structure describes the elements which can make up a graph. + because they are quite diverse, not all elements will use all the + possible parts of the structure. */ +#ifdef HAVE_SNPRINTF +#define FMT_LEG_LEN 200 +#else +#define FMT_LEG_LEN 2000 +#endif + +typedef struct graph_desc_t { + enum gf_en gf; /* graphing function */ + char vname[30]; /* name of the variable */ + long vidx; /* gdes reference */ + char rrd[255]; /* name of the rrd_file containing data */ + char ds_nam[DS_NAM_SIZE]; /* data source name */ + long ds; /* data source number */ + enum cf_en cf; /* consolidation function */ + col_trip_t col; /* graph color */ + char format[FMT_LEG_LEN+5]; /* format for PRINT AND GPRINT */ + char legend[FMT_LEG_LEN+5]; /* legend*/ + gdPoint legloc; /* location of legend */ + double yrule; /* value for y rule line */ + time_t xrule; /* value for x rule line */ + rpnp_t *rpnp; /* instructions for CDEF function */ + + /* description of data fetched for the graph element */ + time_t start,end; /* timestaps for first and last data element */ + unsigned long step; /* time between samples */ + unsigned long ds_cnt; /* how many data sources are there in the fetch */ + long data_first; /* first pointer to this data */ + char **ds_namv; /* name of datasources in the fetch. */ + rrd_value_t *data; /* the raw data drawn from the rrd */ + rrd_value_t *p_data; /* processed data, xsize elments */ + +} graph_desc_t; + +#define ALTYGRID 0x01 /* use alternative y grid algorithm */ +#define ALTAUTOSCALE 0x02 /* use alternative algorithm to find lower and upper bounds */ +#define ALTAUTOSCALE_MAX 0x04 /* use alternative algorithm to find upper bounds */ +#define NOLEGEND 0x08 /* use no legend */ + + +typedef struct image_desc_t { + + /* configuration of graph */ + + char graphfile[MAXPATH]; /* filename for graphic */ + long xsize,ysize; /* graph area size in pixels */ + col_trip_t graph_col[__GRC_END__]; /* real colors for the graph */ + char ylegend[200]; /* legend along the yaxis */ + char title[200]; /* title for graph */ + int draw_x_grid; /* no x-grid at all */ + int draw_y_grid; /* no x-grid at all */ + xlab_t xlab_user; /* user defined labeling for xaxis */ + char xlab_form[200]; /* format for the label on the xaxis */ + + double ygridstep; /* user defined step for y grid */ + int ylabfact; /* every how many y grid shall a label be written ? */ + + time_t start,end; /* what time does the graph cover */ + unsigned long step; /* any preference for the default step ? */ + rrd_value_t minval,maxval; /* extreme values in the data */ + int rigid; /* do not expand range even with + values outside */ + char* imginfo; /* construct an /* Prototypes */ @@ -279,9 +280,11 @@ if (strcmp("-",file_name)==0){ *rrd_file= *stdout; } else { - if ((rrd_file = fopen(file_name,"wb")) == NULL ) { + int fd = open(file_name,O_RDWR|O_CREAT|O_EXCL,0666); + if (fd == -1 || (rrd_file = fdopen(fd,"wb")) == NULL) { rrd_set_error("creating '%s': %s",file_name,strerror(errno)); - rrd_free(rrd); + if (fd != -1) + close(fd); return(-1); } } Modified: trunk/orca/packages/rrdtool-1.0.40/cgilib-0.4/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/cgilib-0.4/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/cgilib-0.4/Makefile.in 2002-11-09 12:31:08.000000000 -0800 @@ -84,6 +84,7 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ noinst_LTLIBRARIES = librrd_cgi.la Modified: trunk/orca/packages/rrdtool-1.0.40/CONTRIBUTORS ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/CONTRIBUTORS (original) +++ trunk/orca/packages/rrdtool-1.0.40/CONTRIBUTORS 2002-11-09 12:31:08.000000000 -0800 @@ -54,7 +54,8 @@ Bruce Campbell Sean Summers (RPM .spec) Christophe Van Ginneken (--no-legend) - + Milan Obuch background unit GD overlay --y-alt-mrtg + Wolfgang Schrimm xport function Documentation @@ -83,6 +84,9 @@ and DNS:NET Internet Services (www.dns-net.de) for http://rrdtool.org + Matt Levine (matt at deliver3.com) + for http://rrdtool.com + Further I would like to note, that rrdtool would not exist without the following free software products: Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.h 2002-11-09 12:31:09.000000000 -0800 @@ -1,5 +1,5 @@ /* infcodes.h -- header to use infcodes.c - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.in 2002-11-09 12:31:09.000000000 -0800 @@ -90,9 +90,12 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -EXTRA_DIST = ChangeLog FAQ INDEX README README.rrdtool algorithm.txt zlib.dsp zlib.dsw zlib.3 +EXTRA_DIST = ChangeLog FAQ INDEX README README.rrdtool algorithm.txt zlib.3 + +CFLAGS = $(ZLIB_CFLAGS) noinst_LTLIBRARIES = librrd_z.la @@ -113,7 +116,6 @@ librrd_z_la_OBJECTS = adler32.lo compress.lo crc32.lo deflate.lo \ gzio.lo infblock.lo infcodes.lo inffast.lo inflate.lo inftrees.lo \ infutil.lo trees.lo uncompr.lo zutil.lo -CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -134,7 +136,7 @@ .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps zlib-1.1.3/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps zlib-1.1.4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -222,7 +224,7 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -subdir = zlib-1.1.3 +subdir = zlib-1.1.4 distdir: $(DISTFILES) @for file in $(DISTFILES); do \ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.c 2002-11-09 12:31:10.000000000 -0800 @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -47,12 +47,12 @@ * */ -/* @(#) $Id$ */ +/* @(#) $Id: deflate.c,v 1.1 2002/03/12 06:52:06 oetiker Exp $ */ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly "; + " deflate 1.1.4 Copyright 1995-2002 Jean-loup Gailly "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -242,7 +242,7 @@ windowBits = -windowBits; } if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) { return Z_STREAM_ERROR; } Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.c 2002-11-09 12:31:10.000000000 -0800 @@ -1,9 +1,9 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ +/* @(#) $Id: zutil.c,v 1.1 2002/03/12 06:52:13 oetiker Exp $ */ #include "zutil.h" Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/gzio.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/gzio.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/gzio.c 2002-11-09 12:31:10.000000000 -0800 @@ -1,11 +1,11 @@ /* gzio.c -- IO on .gz files - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h * * Compile this file with -DNO_DEFLATE to avoid the compression code. */ -/* @(#) $Id$ */ +/* @(#) $Id: gzio.c,v 1.1 2002/03/12 06:52:08 oetiker Exp $ */ #include Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/deflate.h 2002-11-09 12:31:11.000000000 -0800 @@ -1,5 +1,5 @@ /* deflate.h -- internal compression state - * Copyright (C) 1995-1998 Jean-loup Gailly + * Copyright (C) 1995-2002 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,7 +8,7 @@ subject to change. Applications should only use zlib.h. */ -/* @(#) $Id$ */ +/* @(#) $Id: deflate.h,v 1.1 2002/03/12 06:52:07 oetiker Exp $ */ #ifndef _DEFLATE_H #define _DEFLATE_H Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.c 2002-11-09 12:31:11.000000000 -0800 @@ -1,5 +1,5 @@ /* inflate_util.c -- data and routines common to blocks and codes - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/crc32.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/crc32.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/crc32.c 2002-11-09 12:31:12.000000000 -0800 @@ -1,9 +1,9 @@ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ +/* @(#) $Id: crc32.c,v 1.1 2002/03/12 06:52:06 oetiker Exp $ */ #include "zlib.h" Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zutil.h 2002-11-09 12:31:12.000000000 -0800 @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,7 +8,7 @@ subject to change. Applications should only use zlib.h. */ -/* @(#) $Id$ */ +/* @(#) $Id: zutil.h,v 1.1 2002/03/12 06:52:14 oetiker Exp $ */ #ifndef _Z_UTIL_H #define _Z_UTIL_H Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infutil.h 2002-11-09 12:31:12.000000000 -0800 @@ -1,5 +1,5 @@ /* infutil.h -- types and macros common to blocks and codes - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/trees.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/trees.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/trees.c 2002-11-09 12:31:13.000000000 -0800 @@ -1,5 +1,5 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-1998 Jean-loup Gailly + * Copyright (C) 1995-2002 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -29,7 +29,7 @@ * Addison-Wesley, 1983. ISBN 0-201-06672-6. */ -/* @(#) $Id$ */ +/* @(#) $Id: trees.c,v 1.1 2002/03/12 06:52:11 oetiker Exp $ */ /* #define GEN_TREES_H */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zconf.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zconf.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zconf.h 2002-11-09 12:31:13.000000000 -0800 @@ -1,9 +1,9 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ +/* @(#) $Id: zconf.h,v 1.1 2002/03/12 06:52:12 oetiker Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H @@ -71,9 +71,6 @@ # define UNALIGNED_OK #endif -/* RRDtool will not compile without them anyway */ -#define STDC - #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) # define STDC #endif Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.c 2002-11-09 12:31:14.000000000 -0800 @@ -1,5 +1,5 @@ /* infblock.c -- interpret and process block types to last block - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -249,10 +249,12 @@ &s->sub.trees.tb, s->hufts, z); if (t != Z_OK) { - ZFREE(z, s->sub.trees.blens); r = t; if (r == Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); s->mode = BAD; + } LEAVE } s->sub.trees.index = 0; @@ -313,11 +315,13 @@ t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), s->sub.trees.blens, &bl, &bd, &tl, &td, s->hufts, z); - ZFREE(z, s->sub.trees.blens); if (t != Z_OK) { if (t == (uInt)Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); s->mode = BAD; + } r = t; LEAVE } @@ -329,6 +333,7 @@ } s->sub.decode.codes = c; } + ZFREE(z, s->sub.trees.blens); s->mode = CODES; case CODES: UPDATE Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.c 2002-11-09 12:31:14.000000000 -0800 @@ -1,5 +1,5 @@ /* inffast.c -- process literals and length/distance pairs fast - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -93,28 +93,41 @@ /* do the copy */ m -= c; - if ((uInt)(q - s->window) >= d) /* offset before dest */ - { /* just copy */ - r = q - d; - *q++ = *r++; c--; /* minimum count is three, */ - *q++ = *r++; c--; /* so unroll loop a little */ - } - else /* else offset after destination */ + r = q - d; + if (r < s->window) /* wrap if needed */ { - e = d - (uInt)(q - s->window); /* bytes from offset to end */ - r = s->end - e; /* pointer to offset */ - if (c > e) /* if source crosses, */ + do { + r += s->end - s->window; /* force pointer in window */ + } while (r < s->window); /* covers invalid distances */ + e = s->end - r; + if (c > e) { - c -= e; /* copy to end of window */ + c -= e; /* wrapped copy */ do { - *q++ = *r++; + *q++ = *r++; } while (--e); - r = s->window; /* copy rest from start of window */ + r = s->window; + do { + *q++ = *r++; + } while (--c); } + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); + } + } + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); } - do { /* copy all or what's left */ - *q++ = *r++; - } while (--c); break; } else if ((e & 64) == 0) Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/compress.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/compress.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/compress.c 2002-11-09 12:31:14.000000000 -0800 @@ -1,9 +1,9 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ +/* @(#) $Id: compress.c,v 1.1 2002/03/12 06:52:06 oetiker Exp $ */ #include "zlib.h" Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infblock.h 2002-11-09 12:31:15.000000000 -0800 @@ -1,5 +1,5 @@ /* infblock.h -- header to use infblock.c - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inffast.h 2002-11-09 12:31:15.000000000 -0800 @@ -1,5 +1,5 @@ /* inffast.h -- header to use inffast.c - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.h 2002-11-09 12:31:15.000000000 -0800 @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.1.3, July 9th, 1998 + version 1.1.4, March 11th, 2002 - Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,7 +37,7 @@ extern "C" { #endif -#define ZLIB_VERSION "1.1.3" +#define ZLIB_VERSION "1.1.4" /* The 'zlib' compression library provides in-memory compression and Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/ChangeLog ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/ChangeLog (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/ChangeLog 2002-11-09 12:31:16.000000000 -0800 @@ -1,6 +1,16 @@ ChangeLog file for zlib +Changes in 1.1.4 (11 March 2002) +- ZFREE was repeated on same allocation on some error conditions. + This creates a security problem described in + http://www.zlib.org/advisory-2002-03-11.txt +- Returned incorrect error (Z_MEM_ERROR) on some invalid data +- Avoid accesses before window for invalid distances with inflate window + less than 32K. +- force windowBits > 8 to avoid a bug in the encoder for a window size + of 256 bytes. (A complete fix will be available in 1.1.5). + Changes in 1.1.3 (9 July 1998) - fix "an inflate input buffer bug that shows up on rare but persistent occasions" (Mark) @@ -215,7 +225,7 @@ - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) - added makelcc.bat for lcc-win32 (Tom St Denis) - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- Avoid expanded $Id: ChangeLog,v 1.1 2002/03/12 06:52:03 oetiker Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. - check for unistd.h in configure (for off_t) - remove useless check parameter in inflate_blocks_free - avoid useless assignment of s->check to itself in inflate_blocks_new Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/README ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/README (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/README 2002-11-09 12:31:16.000000000 -0800 @@ -1,7 +1,7 @@ -zlib 1.1.3 is a general purpose data compression library. All the code +zlib 1.1.4 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files -ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate +http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). These documents are also available in other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html @@ -14,51 +14,50 @@ To compile all files and run the test program, follow the instructions given at the top of Makefile. In short "make test; make install" -should work for most machines. For Unix: "configure; make test; make install" +should work for most machines. For Unix: "./configure; make test; make install" For MSDOS, use one of the special makefiles such as Makefile.msc. For VMS, use Make_vms.com or descrip.mms. -Questions about zlib should be sent to , or to +Questions about zlib should be sent to , or to Gilles Vollant for the Windows DLL version. -The zlib home page is http://www.cdrom.com/pub/infozip/zlib/ -The official zlib ftp site is ftp://ftp.cdrom.com/pub/infozip/zlib/ -Before reporting a problem, please check those sites to verify that +The zlib home page is http://www.zlib.org or http://www.gzip.org/zlib/ +Before reporting a problem, please check this site to verify that you have the latest version of zlib; otherwise get the latest version and check whether the problem still exists or not. -Mark Nelson wrote an article about zlib for the Jan. 1997 +PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html +before asking for help. + +Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available in -http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm +http://dogma.net/markn/articles/zlibtool/zlibtool.htm -The changes made in version 1.1.3 are documented in the file ChangeLog. -The main changes since 1.1.2 are: +The changes made in version 1.1.4 are documented in the file ChangeLog. +The only changes made since 1.1.3 are bug corrections: -- fix "an inflate input buffer bug that shows up on rare but persistent - occasions" (Mark) -- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) -- fix gzseek(..., SEEK_SET) in write mode -- fix crc check after a gzeek (Frank Faubert) -- fix miniunzip when the last entry in a zip file is itself a zip file - (J Lillge) -- add contrib/asm586 and contrib/asm686 (Brian Raiter) - See http://www.muppetlabs.com/~breadbox/software/assembly.html -- add support for Delphi 3 in contrib/delphi (Bob Dellaca) -- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) -- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) -- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) -- added a FAQ file +- ZFREE was repeated on same allocation on some error conditions. + This creates a security problem described in + http://www.zlib.org/advisory-2002-03-11.txt +- Returned incorrect error (Z_MEM_ERROR) on some invalid data +- Avoid accesses before window for invalid distances with inflate window + less than 32K. +- force windowBits > 8 to avoid a bug in the encoder for a window size + of 256 bytes. (A complete fix will be available in 1.1.5). + +The beta version 1.1.5beta includes many more changes. A new official +version 1.1.5 will be released as soon as extensive testing has been +completed on it. -plus many changes for portability. Unsupported third party contributions are provided in directory "contrib". -A Java implementation of zlib is available in the Java Development Kit 1.1 +A Java implementation of zlib is available in the Java Development Kit http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html -See the zlib home page http://www.cdrom.com/pub/infozip/zlib/ for details. +See the zlib home page http://www.zlib.org for details. A Perl interface to zlib written by Paul Marquess -is in the CPAN (Comprehensive Perl Archive Network) sites, such as: -ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib* +is in the CPAN (Comprehensive Perl Archive Network) sites +http://www.cpan.org/modules/by-module/Compress/ A Python interface to zlib written by A.M. Kuchling is available in Python 1.5 and later versions, see @@ -117,7 +116,7 @@ Copyright notice: - (C) 1995-1998 Jean-loup Gailly and Mark Adler + (C) 1995-2002 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.c 2002-11-09 12:31:17.000000000 -0800 @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -11,7 +11,7 @@ #endif const char inflate_copyright[] = - " inflate 1.1.3 Copyright 1995-1998 Mark Adler "; + " inflate 1.1.4 Copyright 1995-2002 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -104,8 +104,7 @@ /* Given a list of code lengths and a maximum table size, make a set of tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR if the given code set is incomplete (the tables are still built in this - case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of - lengths), or Z_MEM_ERROR if not enough memory. */ + case), or Z_DATA_ERROR if the input is invalid. */ { uInt a; /* counter for codes of length k */ @@ -231,7 +230,7 @@ /* allocate new table */ if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ - return Z_MEM_ERROR; /* not enough memory */ + return Z_DATA_ERROR; /* overflow of MANY */ u[h] = q = hp + *hn; *hn += z; Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.3 ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.3 (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.3 2002-11-09 12:31:17.000000000 -0800 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "9 July 1998" +.TH ZLIB 3 "11 March 2002" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -81,8 +81,8 @@ .IP ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html .SH AUTHORS -Version 1.1.3 -Copyright (C) 1995-1998 Jean-loup Gailly (jloup at gzip.org) +Version 1.1.4 +Copyright (C) 1995-2002 Jean-loup Gailly (jloup at gzip.org) and Mark Adler (madler at alumni.caltech.edu). .LP This software is provided "as-is," Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inflate.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inflate.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inflate.c 2002-11-09 12:31:18.000000000 -0800 @@ -1,5 +1,5 @@ /* inflate.c -- zlib interface to inflate modules - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/uncompr.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/uncompr.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/uncompr.c 2002-11-09 12:31:18.000000000 -0800 @@ -1,9 +1,9 @@ /* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ +/* @(#) $Id: uncompr.c,v 1.1 2002/03/12 06:52:12 oetiker Exp $ */ #include "zlib.h" Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/inftrees.h 2002-11-09 12:31:18.000000000 -0800 @@ -1,5 +1,5 @@ /* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/FAQ ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/FAQ (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/FAQ 2002-11-09 12:31:19.000000000 -0800 @@ -3,70 +3,98 @@ If your question is not there, please check the zlib home page -http://www.cdrom.com/pub/infozip/zlib/ which may have more recent information. +http://www.zlib.org which may have more recent information. +The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html -1) I need a Windows DLL -2) I need a Visual Basic interface to zlib -3) compress() returns Z_BUF_ERROR -4) deflate or inflate returns Z_BUF_ERROR -5) Where is the zlib documentation (man pages, etc...)? -6) Why don't you use GNU autoconf, libtool, etc...? -7) There is a bug in zlib. -8) I get "undefined reference to gzputc" + 1. Is zlib Y2K-compliant? + Yes. zlib doesn't handle dates. + 2. Where can I get a Windows DLL version? -1) I need a Windows DLL + The zlib sources can be compiled without change to produce a DLL. If you + want a precompiled DLL, see http://www.winimage.com/zLibDll/ . Questions + about the zlib DLL should be sent to Gilles Vollant (info at winimage.com). - The zlib sources can be compiled without change to produce a DLL. - If you want a precompiled DLL, see http://www.winimage.com/zLibDll + 3. Where can I get a Visual Basic interface to zlib? + See + * http://www.winimage.com/zLibDll/cmp-z-it.zip + * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm + * contrib/visual-basic.txt in the zlib distribution -2) I need a Visual Basic interface to zlib + 4. compress() returns Z_BUF_ERROR - See http://www.tcfb.com/dowseware/cmp-z-it.zip - http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm - and contrib/visual-basic.txt + Make sure that before the call of compress, the length of the compressed + buffer is equal to the total size of the compressed buffer and not + zero. For Visual Basic, check that this parameter is passed by reference + ("as any"), not by value ("as long"). -3) compress() returns Z_BUF_ERROR + 5. deflate() or inflate() returns Z_BUF_ERROR - Make sure that before the call of compress, the length of the - compressed buffer is equal to the total size of the compressed buffer - and not zero. For Visual Basic, check that this parameter is passed - by reference ("as any"), not by value ("as long"). + Before making the call, make sure that avail_in and avail_out are not + zero. When setting the parameter flush equal to Z_FINISH, also make sure + that avail_out is big enough to allow processing all pending input. + 6. Where's the zlib documentation (man pages, etc.)? -4) deflate or inflate returns Z_BUF_ERROR + It's in zlib.h for the moment, and Francis S. Lin has converted it to a + web page zlib.html. Volunteers to transform this to Unix-style man pages, + please contact Jean-loup Gailly (jloup at gzip.org). Examples of zlib usage + are in the files example.c and minigzip.c. - Make sure that before the call avail_in and avail_out are not zero. + 7. Why don't you use GNU autoconf or libtool or ...? + Because we would like to keep zlib as a very small and simple + package. zlib is rather portable and doesn't need much configuration. -5) Where is the zlib documentation (man pages, etc...)? + 8. I found a bug in zlib. - It's in zlib.h for the moment. Volunteers to transform this - to man pages, please contact jloup at gzip.org. Examples of zlib usage - are in the files example.c and minigzip.c. + Most of the time, such problems are due to an incorrect usage of + zlib. Please try to reproduce the problem with a small program and send + the corresponding source to us at zlib at gzip.org . Do not send + multi-megabyte data files without prior agreement. + 9. Why do I get "undefined reference to gzputc"? -6) Why don't you use GNU autoconf, libtool, etc...? + If "make test" produces something like - Because we would like to keep zlib as a very small and simple package. - zlib is rather portable and doesn't need much configuration. + example.o(.text+0x154): undefined reference to `gzputc' + + check that you don't have old files libz.* in /usr/lib, /usr/local/lib or + /usr/X11R6/lib. Remove any old versions, then do "make install". +10. I need a Delphi interface to zlib. -7) There is a bug in zlib. + See the directories contrib/delphi and contrib/delphi2 in the zlib + distribution. - Most of the time, such problems are due to an incorrect usage - of zlib. Please try to reproduce the problem with a small - program and send us the corresponding source at zlib at quest.jpl.nasa.gov - Do not send multi-megabyte data files without prior agreement. +11. Can zlib handle .zip archives? + See the directory contrib/minizip in the zlib distribution. -8) I get "undefined reference to gzputc" +12. Can zlib handle .Z files? - If "make test" produces something like - example.o(.text+0x174): - check that you don't have old files libz.* in /usr/lib, /usr/local/lib - or /usr/X11R6/lib. Remove old versions then do "make install". + No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt + the code of uncompress on your own. +13. How can I make a Unix shared library? + + make clean + ./configure -s + make + +14. Why does "make test" fail on Mac OS X? + + Mac OS X already includes zlib as a shared library, and so -lz links the + shared library instead of the one that the "make" compiled. For zlib + 1.1.3, the two are incompatible due to different compile-time + options. Simply change the -lz in the Makefile to libz.a, and it will use + the compiled library instead of the shared one and the "make test" will + succeed. + +15. I have a question about OttoPDF + + We are not the authors of OttoPDF. The real author is on the OttoPDF web + site Joel Hainley jhainley at myndkryme.com. Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.am ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.am (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/Makefile.am 2002-11-09 12:31:19.000000000 -0800 @@ -6,7 +6,9 @@ #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config -EXTRA_DIST= ChangeLog FAQ INDEX README README.rrdtool algorithm.txt zlib.dsp zlib.dsw zlib.3 +EXTRA_DIST= ChangeLog FAQ INDEX README README.rrdtool algorithm.txt zlib.3 + +CFLAGS=$(ZLIB_CFLAGS) noinst_LTLIBRARIES = librrd_z.la @@ -27,3 +29,6 @@ zutil.c \ deflate.h infcodes.h inffixed.h infutil.h zconf.h zutil.h \ infblock.h inffast.h inftrees.h trees.h zlib.h + + + Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/infcodes.c 2002-11-09 12:31:19.000000000 -0800 @@ -1,5 +1,5 @@ /* infcodes.c -- process literals and length/distance pairs - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -196,15 +196,9 @@ Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); c->mode = COPY; case COPY: /* o: copying bytes in window, waiting for space */ -#ifndef __TURBOC__ /* Turbo C bug for following expression */ - f = (uInt)(q - s->window) < c->sub.copy.dist ? - s->end - (c->sub.copy.dist - (q - s->window)) : - q - c->sub.copy.dist; -#else f = q - c->sub.copy.dist; - if ((uInt)(q - s->window) < c->sub.copy.dist) - f = s->end - (c->sub.copy.dist - (uInt)(q - s->window)); -#endif + while (f < s->window) /* modulo window size-"while" instead */ + f += s->end - s->window; /* of "if" handles invalid distances */ while (c->len) { NEEDOUT Modified: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/adler32.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/adler32.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/adler32.c 2002-11-09 12:31:19.000000000 -0800 @@ -1,9 +1,9 @@ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ +/* @(#) $Id: adler32.c,v 1.1 2002/03/12 06:52:05 oetiker Exp $ */ #include "zlib.h" Deleted: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.dsp Deleted: trunk/orca/packages/rrdtool-1.0.40/zlib-1.1.4/zlib.dsw Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/rrdview.cgi ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/rrdview.cgi (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/rrdview.cgi 2002-11-09 12:31:20.000000000 -0800 @@ -14,7 +14,7 @@ use strict; use vars qw($VERSION); -my $rcs = ' $Id: rrdview.cgi,v 1.16 2000/09/22 23:20:40 gilles Exp $ ' ; +my $rcs = ' $Id: rrdview.cgi,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $ ' ; $rcs =~ m/,v (\d+\.\d+)/; $VERSION = ($1) ? $1 : "UNKNOWN"; Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Repository 2002-11-09 12:31:20.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/rrdview Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Root 2002-11-09 12:31:21.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdview/CVS/Entries 2002-11-09 12:31:21.000000000 -0800 @@ -0,0 +1,3 @@ +/README/1.1.1.1/Tue Feb 26 10:21:20 2002// +/rrdview.cgi/1.1.1.1/Tue Feb 26 10:21:20 2002// +D Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/Makefile.in 2002-11-09 12:31:21.000000000 -0800 @@ -84,6 +84,7 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ SUBDIRS = trytime Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/rrdfetchnames.pl ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/rrdfetchnames.pl (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/rrdfetchnames.pl 2002-11-09 12:31:21.000000000 -0800 @@ -6,7 +6,7 @@ use lib qw( ../../perl-shared/blib/lib ../../perl-shared/blib/arch ); #makes programm work AFTER install -use lib qw( /usr/local/rrdtool-1.0.30/lib/perl ../lib/perl ); +use lib qw( /usr/local/rrdtool-1.0.39/lib/perl ../lib/perl ); use vars qw(@ISA $loaded); Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Repository 2002-11-09 12:31:22.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/rrdfetchnames Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Root 2002-11-09 12:31:22.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdfetchnames/CVS/Entries 2002-11-09 12:31:22.000000000 -0800 @@ -0,0 +1,4 @@ +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrdfetchnames.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrdfetchnames.pl.in/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl 2002-11-09 12:31:23.000000000 -0800 @@ -1,7 +1,7 @@ -#! /usr/sepp/bin/perl -w +#! /usr/bin/perl -w -# $Id: killspike.pl,v 1.3 2000/06/11 22:08:08 bertd Exp $ -# $Source: /cvs-mis/local/support/killspike/killspike.pl,v $ +# $Id: killspike.pl.in,v 1.1.1.1 2002/02/26 10:21:19 oetiker Exp $ +# $Source: /home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/killspike/killspike.pl.in,v $ # This script will read an XML file produced by # rrdtool dump foo.rrd >in.xml Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/killspike.pl.in 2002-11-09 12:31:23.000000000 -0800 @@ -1,7 +1,7 @@ #! @PERL@ -w -# $Id: killspike.pl,v 1.3 2000/06/11 22:08:08 bertd Exp $ -# $Source: /cvs-mis/local/support/killspike/killspike.pl,v $ +# $Id: killspike.pl.in,v 1.1.1.1 2002/02/26 10:21:19 oetiker Exp $ +# $Source: /home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/killspike/killspike.pl.in,v $ # This script will read an XML file produced by # rrdtool dump foo.rrd >in.xml Added: trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Repository 2002-11-09 12:31:23.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/killspike Added: trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Root 2002-11-09 12:31:24.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/killspike/CVS/Entries 2002-11-09 12:31:24.000000000 -0800 @@ -0,0 +1,4 @@ +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/killspike.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +/killspike.pl.in/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Repository 2002-11-09 12:31:24.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/rrd-file-icon Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Root 2002-11-09 12:31:25.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrd-file-icon/CVS/Entries 2002-11-09 12:31:25.000000000 -0800 @@ -0,0 +1,3 @@ +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrd.png/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Added: trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Repository 2002-11-09 12:31:25.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/snmpstats Added: trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Root 2002-11-09 12:31:25.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/snmpstats/CVS/Entries 2002-11-09 12:31:26.000000000 -0800 @@ -0,0 +1,3 @@ +/README/1.1.1.1/Tue Feb 26 10:21:20 2002// +/SNMPstats.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.in 2002-11-09 12:31:26.000000000 -0800 @@ -84,15 +84,16 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -INCLUDES = -I../../src -I../../gd1.3 +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/gd1.3 EXTRA_DIST = trytime.c contribdir = $(prefix)/contrib/trytime contrib_DATA = README trytime.c bin_PROGRAMS = trytime trytime_SOURCES = trytime.c -trytime_LDADD = ../../src/librrd.la +trytime_LDADD = $(top_srcdir)/src/librrd.la mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = ../../config/config.h CONFIG_CLEAN_FILES = @@ -104,7 +105,7 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ trytime_OBJECTS = trytime.o -trytime_DEPENDENCIES = ../../src/librrd.la +trytime_DEPENDENCIES = $(top_srcdir)/src/librrd.la trytime_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -129,7 +130,7 @@ .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps contrib/trytime/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps contrib/trytime/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.am ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.am (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/trytime/Makefile.am 2002-11-09 12:31:26.000000000 -0800 @@ -1,8 +1,8 @@ ## Process this file with automake to produce Makefile.in -INCLUDES = -I../../src -I../../gd1.3 +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/gd1.3 EXTRA_DIST = trytime.c contribdir = $(prefix)/contrib/trytime contrib_DATA = README trytime.c bin_PROGRAMS = trytime trytime_SOURCES = trytime.c -trytime_LDADD = ../../src/librrd.la +trytime_LDADD = $(top_srcdir)/src/librrd.la Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in 2002-11-09 12:31:27.000000000 -0800 @@ -7,7 +7,7 @@ # # Jan 8th, 2000 # -# $Id: rrdlastds.in,v 1.15 2000/01/27 21:35:16 rader Exp $ +# $Id: rrdlastds.pl.in,v 1.1.1.1 2002/02/26 10:21:19 oetiker Exp $ # #makes things work when run without install Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Repository 2002-11-09 12:31:27.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/rrdlastds Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Root 2002-11-09 12:31:27.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/CVS/Entries 2002-11-09 12:31:28.000000000 -0800 @@ -0,0 +1,4 @@ +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrdlastds.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrdlastds.pl.in/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl 2002-11-09 12:31:28.000000000 -0800 @@ -1,4 +1,4 @@ -#! /usr/sepp/bin/perl +#! /usr/bin/perl # # rrdlastds - report the latest DS values from the RRA with # the shortest time resolution @@ -7,13 +7,13 @@ # # Jan 8th, 2000 # -# $Id: rrdlastds.in,v 1.15 2000/01/27 21:35:16 rader Exp $ +# $Id: rrdlastds.pl.in,v 1.1.1.1 2002/02/26 10:21:19 oetiker Exp $ # #makes things work when run without install use lib qw( ../../perl-shared/blib/lib ../../perl-shared/blib/arch ); # this is for after install -use lib qw( /usr/local/rrdtool-1.0.30/lib/perl ../lib/perl ); +use lib qw( /usr/local/rrdtool-1.0.39/lib/perl ../lib/perl ); use RRDs; Deleted: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in.orig Deleted: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdlastds/rrdlastds.pl.in.rej Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Repository 2002-11-09 12:31:28.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/rrdexplorer Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Root 2002-11-09 12:31:29.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdexplorer/CVS/Entries 2002-11-09 12:31:29.000000000 -0800 @@ -0,0 +1,4 @@ +/README.txt/1.1.1.1/Tue Feb 26 10:21:21 2002// +/map.cgi/1.1.1.1/Tue Feb 26 10:21:21 2002// +/png.cgi/1.1.1.1/Tue Feb 26 10:21:21 2002// +D Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Repository 2002-11-09 12:31:29.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/php3 Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Root 2002-11-09 12:31:29.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/CVS/Entries 2002-11-09 12:31:30.000000000 -0800 @@ -0,0 +1,8 @@ +/INSTALL/1.1.1.1/Tue Feb 26 10:21:19 2002// +/Makefile/1.1.1.1/Tue Feb 26 10:21:19 2002// +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/USAGE/1.1.1.1/Tue Feb 26 10:21:19 2002// +/VERSION/1.1.1.1/Tue Feb 26 10:21:19 2002// +/php3_rrdtool.c/1.1.1.1/Tue Feb 26 10:21:19 2002// +/php3_rrdtool.h/1.1.1.1/Tue Feb 26 10:21:19 2002// +D/examples//// Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Repository 2002-11-09 12:31:30.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/php3/examples Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Root 2002-11-09 12:31:30.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php3/examples/CVS/Entries 2002-11-09 12:31:31.000000000 -0800 @@ -0,0 +1,6 @@ +/rrd_create.php/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrd_fetch.php/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrd_graph.php/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrd_last.php/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrd_update.php/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Deleted: trunk/orca/packages/rrdtool-1.0.40/contrib/php3/Makefile Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/log2rrd.pl ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/log2rrd.pl (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/log2rrd.pl 2002-11-09 12:31:31.000000000 -0800 @@ -1,4 +1,4 @@ -#! /usr/sepp/bin/perl +#! /usr/bin/perl # # Log 2 RRD. This script translates a MRTG 2.x log file # into a RRD archive. The original version was written by Added: trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Repository 2002-11-09 12:31:31.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/log2rrd Added: trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Root 2002-11-09 12:31:32.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/log2rrd/CVS/Entries 2002-11-09 12:31:32.000000000 -0800 @@ -0,0 +1,4 @@ +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/log2rrd.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +/log2rrd.pl.in/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Repository 2002-11-09 12:31:32.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/rrdproc Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Root 2002-11-09 12:31:32.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/rrdproc/CVS/Entries 2002-11-09 12:31:33.000000000 -0800 @@ -0,0 +1,3 @@ +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/rrdproc.c/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile.in 2002-11-09 12:31:33.000000000 -0800 @@ -1,7 +1,6 @@ -# $Id: Makefile.in,v 1.1 2000/07/19 17:22:46 joeym Exp joeym $ -LTLIBRARY_NAME = librrdtool.la -LTLIBRARY_SOURCES = rrdtool.c +LTLIBRARY_NAME = librrdtool.la +LTLIBRARY_SOURCES = rrdtool.c LTLIBRARY_SHARED_NAME = rrdtool.la LTLIBRARY_SHARED_LIBADD = $(RRDTOOL_SHARED_LIBADD) Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/php_rrdtool.h ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/php_rrdtool.h (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/php_rrdtool.h 2002-11-09 12:31:34.000000000 -0800 @@ -5,7 +5,7 @@ * * Joe Miller, ,, 7/19/2000 * - * $Id: php_rrdtool.h,v 1.1 2000/07/19 17:24:08 joeym Exp joeym $ + * $Id: php_rrdtool.h,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $ * */ Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/config.m4 ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/config.m4 (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/config.m4 2002-11-09 12:31:34.000000000 -0800 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.1 2000/07/19 17:23:35 joeym Exp joeym $ +dnl $Id: config.m4,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $ PHP_ARG_WITH(rrdtool, for RRDTool support, [ --with-rrdtool[=DIR] Include RRDTool support. DIR is the rrdtool Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Repository 2002-11-09 12:31:34.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/php4 Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Root 2002-11-09 12:31:34.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CVS/Entries 2002-11-09 12:31:35.000000000 -0800 @@ -0,0 +1,23 @@ +/.cvsignore/1.1.1.1/Tue Feb 26 10:21:20 2002// +/INSTALL/1.1.1.1/Tue Feb 26 10:21:20 2002// +/Makefile.in/1.1.1.1/Tue Feb 26 10:21:20 2002// +/README/1.1.1.1/Tue Feb 26 10:21:20 2002// +/USAGE/1.1.1.1/Tue Feb 26 10:21:20 2002// +/acinclude.m4/1.1.1.1/Tue Feb 26 10:21:20 2002// +/aclocal.m4/1.1.1.1/Tue Feb 26 10:21:20 2002// +/config.guess/1.1.1.1/Tue Feb 26 10:21:20 2002// +/config.m4/1.1.1.1/Tue Feb 26 10:21:20 2002// +/config.sub/1.1.1.1/Tue Feb 26 10:21:20 2002// +/configure/1.1.1.1/Tue Feb 26 10:21:20 2002// +/configure.in/1.1.1.1/Tue Feb 26 10:21:20 2002// +/dynlib.m4/1.1.1.1/Tue Feb 26 10:21:20 2002// +/install-sh/1.1.1.1/Tue Feb 26 10:21:20 2002// +/ltconfig/1.1.1.1/Tue Feb 26 10:21:20 2002// +/ltmain.sh/1.1.1.1/Tue Feb 26 10:21:20 2002// +/missing/1.1.1.1/Tue Feb 26 10:21:20 2002// +/mkinstalldirs/1.1.1.1/Tue Feb 26 10:21:20 2002// +/php_config.h.in/1.1.1.1/Tue Feb 26 10:21:20 2002// +/php_rrdtool.h/1.1.1.1/Tue Feb 26 10:21:20 2002// +/rrdtool.c/1.1.1.1/Tue Feb 26 10:21:20 2002// +D/build//// +D/examples//// Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CREDITS ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CREDITS (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/CREDITS 2002-11-09 12:31:35.000000000 -0800 @@ -0,0 +1 @@ +rrdtool \ No newline at end of file Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/README ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/README (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/README 2002-11-09 12:31:35.000000000 -0800 @@ -1,71 +1,11 @@ -$Id: README,v 1.4 2000/08/28 23:24:08 joeym Exp joeym $ +This is an adapted version of rrdtool for the php-4.0.6 version +of the RedHat sourcecode. Just go into the main php +Directory, say php-4.0.6, go into the ext Directory and untar this +tar-file. -UPDATES for php4: +call: ./buildconf in the Main php-4.0.6 directory +add "--with-rrdtool" to the general ./configure call. - This version of the module will only build for php4/zend. It will -not build for php3. Get php3_rrdtool from the rrdtool distribution -if you need the rrd_* functions in php3. +And you'r done. - The module now contains two ways to install. The first is as -a self-contained extension (much like the php3_rrdtool module), -and the second is as a php4 embedded extension. See the INSTALL -file for instructions on how to install in both ways. - - Also fixed some of the scripts in the 'examples' directory. -A few of them were checking the return value for -1 on some -of the rrd_* function calls. Most calls will return 0 or 1 to -indicate failure or success, not -1. Sorry about that. - - - ------------------------------------- - -PHP bindings for RRD Tool. - - Contained herein are bindings to allow you to interface -php scripts with RRD tool directly via RRD tool's 'librrd' library, -thus avoiding the need to use system() calls to the rrdtool binary. - - RRD Tool is an AMAZING package of tools to faciliate -the easy storage, retrieval, and graphing of statistics (usually -but not limited to bit/byte counts from routers, switches, and -hubs). It was written by the author of MRTG, Tobias Oetiker -(oetiker at ee.ethz.ch). The primary web site for RRD Tool is: -http://www.caida.org/Tools/RRDtool - - -Reason I wrote this: Wanted to use PHP to create fairly real-time / -dynamic web pages w/ RRD tool, but the only way was to use system() -and popen() with PHP, since there was no direct interface to RRD -Tool from PHP. The fork()ing would have been slow and tedious -so that was pretty much out of the question. I could have used the -Perl library (RRDs) to interface ePerl, or mod_perl, or even -'rrdcgi', but I didn't really want to. I wanted to use PHP and -there was nothing to change my mind. - - -You are free to redistribute the source provided my name is -kept at the top of the source files as credit for the original -author. I make no warranties to the usability of this software, -nor I am responsible if your machine explodes (although it -shouldn't). - - -BUGS: - There might be some. Let me know: joeym at inficad.com. -Patches to fix bugs you find are more welcome than simple -reports of bugs (I don't have a lot of time to maintain -this code). - - You must include OS, apache version, and method of use -(embedded or self-contained extension) in bug reports. This -info is important. Also, give as much detail and examples -as possible so I can figure out what is wrong =) - -THANKS: - I'd like to thank Jeroen Roodnat for generously helping -debug the PHP4/Zend version of this module. - - -Joe Miller, ,, -2/12/2000 (updated: 8/28/2000) +NOTE: You need rrdtool-1.0.38 to be installed forthis to compile properly. Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/EXPERIMENTAL ============================================================================== Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/libs.mk ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/libs.mk (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/libs.mk 2002-11-09 12:31:36.000000000 -0800 @@ -0,0 +1,7 @@ +include $(top_builddir)/config_vars.mk +LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X) +LTLIBRARY_SHARED_OBJECTS = $(LTLIBRARY_OBJECTS:.lo=.slo) +$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES) + $(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD) + +targets = $(LTLIBRARY_NAME) Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/fastgen.sh ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/fastgen.sh (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/fastgen.sh 2002-11-09 12:31:36.000000000 -0800 @@ -23,7 +23,7 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## -# $Id: fastgen.sh,v 1.7 2000/06/11 10:33:39 sas Exp $ +# $Id: fastgen.sh,v 1.1.1.1 2002/02/26 10:21:21 oetiker Exp $ # srcdir=$1 Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/rules.mk ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/rules.mk (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/rules.mk 2002-11-09 12:31:37.000000000 -0800 @@ -21,7 +21,7 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## -# $Id: rules_pear.mk,v 1.9 2000/06/11 19:53:19 rasmus Exp $ +# $Id: rules.mk,v 1.1.1.1 2002/02/26 10:21:21 oetiker Exp $ # include $(top_builddir)/config_vars.mk Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/library.mk ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/library.mk (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/library.mk 2002-11-09 12:31:37.000000000 -0800 @@ -21,7 +21,7 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## -# $Id: library.mk,v 1.6 2000/05/01 02:57:24 sas Exp $ +# $Id: library.mk,v 1.1.1.1 2002/02/26 10:21:21 oetiker Exp $ # LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Repository 2002-11-09 12:31:37.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/php4/build Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Root 2002-11-09 12:31:37.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/CVS/Entries 2002-11-09 12:31:38.000000000 -0800 @@ -0,0 +1,8 @@ +/dynlib.mk/1.1.1.1/Tue Feb 26 10:21:21 2002// +/fastgen.sh/1.1.1.1/Tue Feb 26 10:21:21 2002// +/library.mk/1.1.1.1/Tue Feb 26 10:21:21 2002// +/ltlib.mk/1.1.1.1/Tue Feb 26 10:21:21 2002// +/program.mk/1.1.1.1/Tue Feb 26 10:21:21 2002// +/rules.mk/1.1.1.1/Tue Feb 26 10:21:21 2002// +/shtool/1.1.1.1/Tue Feb 26 10:21:21 2002// +D Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/ltlib.mk ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/ltlib.mk (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/ltlib.mk 2002-11-09 12:31:38.000000000 -0800 @@ -21,7 +21,7 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## -# $Id: ltlib.mk,v 1.4 2000/04/30 03:10:34 sas Exp $ +# $Id: ltlib.mk,v 1.1.1.1 2002/02/26 10:21:21 oetiker Exp $ # targets = $(LTLIBRARY_NAME) Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/program.mk ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/program.mk (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/build/program.mk 2002-11-09 12:31:38.000000000 -0800 @@ -21,7 +21,7 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## -# $Id: program.mk,v 1.2 2000/01/01 20:48:42 sas Exp $ +# $Id: program.mk,v 1.1.1.1 2002/02/26 10:21:21 oetiker Exp $ # PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo) Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/USAGE ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/USAGE (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/USAGE 2002-11-09 12:31:39.000000000 -0800 @@ -1,4 +1,4 @@ -$Id: USAGE,v 1.1 2000/07/19 17:23:14 joeym Exp $ +$Id: USAGE,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $ -------------------------------------------------- Usage: Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/INSTALL ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/INSTALL (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/INSTALL 2002-11-09 12:31:39.000000000 -0800 @@ -1,46 +1,3 @@ -$Id: INSTALL,v 1.2 2000/08/07 16:48:48 joeym Exp joeym $ - -* Installing rrdtool module as a self-contained extension: - -There are two ways to install the rrdtool module for php4/zend. -The first involves simply compiling the rrdtool module as a -'self-contained extension'. This is similar to the previous -rrdtool module for php3 in that to use the rrd_* functions you -must first load the module in each script that will use the -rrd_* functions with a dl() call. See the USAGE file for -more info on this. - -To install as a self-contained extension: - - 1. Install rrdtool. (Tested with rrdtool-1.0.25) - Make sure you build shared and static libraries, if - your system lets you. - - rrdtool% ./configure --enable-shared - - 2. Make sure Apache is installed. - - 3. Make sure PHP4 is installed (tested with php-4.0.1pl2) - - 4. Now we can build the rrdtool module. - - rrdtool-module% ./configure --with-rrdtool=/usr/local/rrdtool \ - --with-php-config=/usr/local/bin/php-config - - 'php-config' is usually installed in /usr/local/bin, and is often - readable/executable only by root, so you will have to run the - configure script as root. - - rrdtool-module% make - rrdtool-module% make install - - This should build and install 'rrdtool.so' into the correct - directory on your system. - - Now you can access the rrd_* functions from your php4 scripts - by first calling " dl("rrdtool.so"); ". See the README and USAGE - for more info on the rrd_* functions. - * Installing the rrdtool module as an embedded extension @@ -52,28 +9,23 @@ you will need to have autoconf/automake and friends installed. 1. make sure you have the php4 sources untarred somewhere, lets - call it /src/php-4.0.1pl2/ - - 2. create a home for our embedded extension in the php4 source - tree. + call it /src/php-4.2.3/ - % mkdir /src/php-4.0.1pl2/ext/rrdtool + 2. untar php-rrdtool.tar in the extension directory of the php + source tree. - 3. from the rrdtool module directory, do: + % cd /src/php-4.2.3/ext + % tar zxvf php-rrdtool.tar.gz - % cp config.m4 Makefile.in php_rrdtool.h rrdtool.c \ - /src/php-4.0.1pl2/ext/rrdtool/ - - 4. Now we must recreate the configure scripts, etc for php4. + 3. recreate the configure scripts for php4. - % cd /src/php-4.0.1pl2 + % cd /src/php-4.2.3 % ./buildconf - 5. If all goes well, you should be ready to run configure for - php4. Make sure you include "--with-rrdtool" in the options - to configure. - - 6. make, make install. and you're ready to go. + 4. you should now be ready to run configure for php4. + make sure you include "--with-rrdtool=path" in the options + where path is the path to where rrdtool is installed to configure. + % ./configure --with-rrdtool=/usr/local -- Joe Miller, , 7/19/2000 + 5. now run make, and then make install. you should be ready to go. Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/acinclude.m4 ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/acinclude.m4 (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/acinclude.m4 2002-11-09 12:31:40.000000000 -0800 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.98 2000/06/17 16:13:11 andrei Exp $ +dnl $Id: acinclude.m4,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $ dnl dnl This file contains local autoconf functions. Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.c (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.c 2002-11-09 12:31:40.000000000 -0800 @@ -9,10 +9,12 @@ * iBIZ Technology Corp, SkyLynx / Inficad Communications * 2/12/2000 & 7/18/2000 * + * Jeffrey Wheat - 10/01/2002 + * - Fixed to build with php-4.2.3 * * See README, INSTALL, and USAGE files for more details. * - * $Id: rrdtool.c,v 1.2 2000/08/22 17:30:34 joeym Exp $ + * $Id: rrdtool.c,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $ * */ @@ -34,6 +36,7 @@ }; zend_module_entry rrdtool_module_entry = { + STANDARD_MODULE_HEADER, "RRDTool", rrdtool_functions, NULL, @@ -41,6 +44,7 @@ NULL, NULL, PHP_MINFO(rrdtool), + NO_VERSION_YET, STANDARD_MODULE_PROPERTIES, }; Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.php ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.php (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/rrdtool.php 2002-11-09 12:31:40.000000000 -0800 @@ -0,0 +1,10 @@ + Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/aclocal.m4 ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/aclocal.m4 (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/aclocal.m4 2002-11-09 12:31:41.000000000 -0800 @@ -10,7 +10,7 @@ dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. -dnl $Id: acinclude.m4,v 1.98 2000/06/17 16:13:11 andrei Exp $ +dnl $Id: aclocal.m4,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $ dnl dnl This file contains local autoconf functions. Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/Makefile 2002-11-09 12:31:41.000000000 -0800 @@ -0,0 +1,12 @@ +top_srcdir = /export/home/jeff/projects/php/php-4.2.3 +top_builddir = /export/home/jeff/projects/php/php-4.2.3 +srcdir = /export/home/jeff/projects/php/php-4.2.3/ext/rrdtool +builddir = /export/home/jeff/projects/php/php-4.2.3/ext/rrdtool +VPATH = /export/home/jeff/projects/php/php-4.2.3/ext/rrdtool + +LTLIBRARY_NAME = librrdtool.la +LTLIBRARY_SOURCES = rrdtool.c +LTLIBRARY_SHARED_NAME = rrdtool.la +LTLIBRARY_SHARED_LIBADD = $(RRDTOOL_SHARED_LIBADD) + +include $(top_srcdir)/build/dynlib.mk Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Repository 2002-11-09 12:31:42.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/php4/examples Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Root 2002-11-09 12:31:42.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/php4/examples/CVS/Entries 2002-11-09 12:31:42.000000000 -0800 @@ -0,0 +1,6 @@ +/rrd_create.php/1.1.1.1/Tue Feb 26 10:21:20 2002// +/rrd_fetch.php/1.1.1.1/Tue Feb 26 10:21:20 2002// +/rrd_graph.php/1.1.1.1/Tue Feb 26 10:21:20 2002// +/rrd_last.php/1.1.1.1/Tue Feb 26 10:21:21 2002// +/rrd_update.php/1.1.1.1/Tue Feb 26 10:21:21 2002// +D Deleted: trunk/orca/packages/rrdtool-1.0.40/contrib/php4/.deps Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds.pl ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds.pl (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds.pl 2002-11-09 12:31:43.000000000 -0800 @@ -1,4 +1,4 @@ -#! /usr/sepp/bin/perl +#! /usr/bin/perl # add_ds.pl, program to add datasources to an existing RRD # Modified: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/batch.pl ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/batch.pl (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/batch.pl 2002-11-09 12:31:43.000000000 -0800 @@ -1,4 +1,4 @@ -#! /usr/sepp/bin/perl +#! /usr/bin/perl # batch.pl, simple program to help add datasources to an existing RRD # goes with add_ds.pl @@ -43,7 +43,7 @@ ########### USER CONFIGURABLE SECTION ####################### my $newdir = "xml"; -my $rrdtool = "/usr/local/rrdtool-1.0.30/bin/rrdtool"; +my $rrdtool = "/usr/local/rrdtool-1.0.39/bin/rrdtool"; my $add_ds = "./add_ds.pl"; # path to add_ds.pl script ########### END CONFIGURE SECTION ########################### Added: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Repository 2002-11-09 12:31:43.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/add_ds Added: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Root 2002-11-09 12:31:44.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/CVS/Entries 2002-11-09 12:31:44.000000000 -0800 @@ -0,0 +1,6 @@ +/README/1.1.1.1/Tue Feb 26 10:21:19 2002// +/add_ds.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +/add_ds.pl.in/1.1.1.1/Tue Feb 26 10:21:19 2002// +/batch.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +/batch.pl.in/1.1.1.1/Tue Feb 26 10:21:19 2002// +D/add_ds//// Added: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Repository ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Repository (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Repository 2002-11-09 12:31:44.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo/AABN-rrdtool/contrib/add_ds/add_ds Added: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Root ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Root (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Root 2002-11-09 12:31:45.000000000 -0800 @@ -0,0 +1 @@ +/home/oetiker/data/cvs-repo Added: trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Entries ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Entries (original) +++ trunk/orca/packages/rrdtool-1.0.40/contrib/add_ds/add_ds/CVS/Entries 2002-11-09 12:31:46.000000000 -0800 @@ -0,0 +1,3 @@ +/add_ds.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +/batch.pl/1.1.1.1/Tue Feb 26 10:21:19 2002// +D Modified: trunk/orca/packages/rrdtool-1.0.40/perl-piped/RRDp.pm ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/perl-piped/RRDp.pm (original) +++ trunk/orca/packages/rrdtool-1.0.40/perl-piped/RRDp.pm 2002-11-09 12:31:47.000000000 -0800 @@ -110,7 +110,7 @@ sub end (); sub read (); -$VERSION = 1.000331 ; +$VERSION = 1.000401 ; sub start ($){ croak "rrdtool is already running" Modified: trunk/orca/packages/rrdtool-1.0.40/config/mkinstalldirs ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/config/mkinstalldirs (original) +++ trunk/orca/packages/rrdtool-1.0.40/config/mkinstalldirs 2002-11-09 12:31:47.000000000 -0800 @@ -4,7 +4,7 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ +# $Id: mkinstalldirs,v 1.1.1.1 2002/02/26 10:21:18 oetiker Exp $ errstatus=0 Modified: trunk/orca/packages/rrdtool-1.0.40/config/config.h.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/config/config.h.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/config/config.h.in 2002-11-09 12:31:47.000000000 -0800 @@ -32,6 +32,12 @@ /* realloc does not support NULL as argument */ #undef NO_NULL_REALLOC +/* Define if you have the chdir function. */ +#undef HAVE_CHDIR + +/* Define if you have the chroot function. */ +#undef HAVE_CHROOT + /* Define if you have the class function. */ #undef HAVE_CLASS @@ -53,6 +59,9 @@ /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY +/* Define if you have the getuid function. */ +#undef HAVE_GETUID + /* Define if you have the isinf function. */ #undef HAVE_ISINF @@ -65,6 +74,15 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME +/* Define if you have the opendir function. */ +#undef HAVE_OPENDIR + +/* Define if you have the readdir function. */ +#undef HAVE_READDIR + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + /* Define if you have the snprintf function. */ #undef HAVE_SNPRINTF @@ -74,6 +92,9 @@ /* Define if you have the strerror function. */ #undef HAVE_STRERROR +/* Define if you have the tzset function. */ +#undef HAVE_TZSET + /* Define if you have the vsnprintf function. */ #undef HAVE_VSNPRINTF @@ -89,6 +110,9 @@ /* Define if you have the header file. */ #undef HAVE_IEEEFP_H +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + /* Define if you have the header file. */ #undef HAVE_MALLOC_H @@ -101,12 +125,21 @@ /* Define if you have the header file. */ #undef HAVE_SYS_RESOURCE_H +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TIMES_H +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the header file. */ +#undef HAVE_TIME_H + /* Define if you have the header file. */ #undef HAVE_UNISTD_H Modified: trunk/orca/packages/rrdtool-1.0.40/config/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/config/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/config/Makefile.in 2002-11-09 12:31:48.000000000 -0800 @@ -90,6 +90,7 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ AUTOHEADER = @AUTOHEADER@ --localdir=config Modified: trunk/orca/packages/rrdtool-1.0.40/config/ltconfig ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/config/ltconfig (original) +++ trunk/orca/packages/rrdtool-1.0.40/config/ltconfig 2002-11-09 12:31:49.000000000 -0800 @@ -53,7 +53,7 @@ # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. -if test "X${PATH_SEPARATOR+set}" != "Xset"; then +if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) PATH_SEPARATOR=';' ;; @@ -63,9 +63,9 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -if test "X${echo_test_string+set}" != "Xset"; then +if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... @@ -169,10 +169,10 @@ # Constants: PROGRAM=ltconfig PACKAGE=libtool -VERSION=1.3.3 -TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)" -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' +VERSION=1.3.4 +TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)" +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." @@ -369,8 +369,8 @@ # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi +if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi if test -n "$cache_file" && test -r "$cache_file"; then echo "loading cache $cache_file within ltconfig" @@ -462,7 +462,7 @@ # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "${COLLECT_NAMES+set}" != set; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -663,7 +663,7 @@ link_static_flag='-static' case "$host_os" in - beos* | irix5* | irix6* | osf3* | osf4* | bsdi3* ) + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; aix*) @@ -718,7 +718,7 @@ # We can build DLLs from non-PIC. ;; - osf3* | osf4*) + osf3* | osf4* | osf5*) # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' @@ -1187,7 +1187,7 @@ ;; netbsd*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else @@ -1196,7 +1196,7 @@ fi ;; - solaris*) + solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 @@ -1244,7 +1244,12 @@ whole_archive_flag_spec= ;; *) - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi ;; esac fi @@ -1405,7 +1410,7 @@ old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; - osf3* | osf4*) + osf3*) if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' @@ -1417,6 +1422,18 @@ hardcode_libdir_separator=: ;; + osf4* | osf5*) # As osf3* with the addition of the -msym flag + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no @@ -1461,6 +1478,18 @@ export_dynamic_flag_spec='-Bexport' ;; + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' @@ -1474,14 +1503,28 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then - # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' - archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs' + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' + hardcode_direct=yes + hardcode_minus_L=no hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH hardcode_runpath_var=yes - ld_shlibs=yes - fi + runpath_var=LD_RUN_PATH + ;; + + unixware7*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no ;; *) @@ -1589,11 +1632,11 @@ main(){nm_test_var='a';nm_test_func();return(0);} EOF - echo "$progname:1592: checking if global_symbol_pipe works" >&5 - if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then + echo "$progname:1635: checking if global_symbol_pipe works" >&5 + if { (eval echo $progname:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm - if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + if { echo "$progname:1639: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -1645,7 +1688,7 @@ save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo $progname:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 @@ -1787,8 +1830,9 @@ bsdi4*) version_type=linux - library_names_spec='${libname}.so$major ${libname}.so' - soname_spec='${libname}.so' + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' @@ -1796,6 +1840,7 @@ file_magic_test_file=/shlib/libc.so sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + export_dynamic_flag_spec=-rdynamic # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs @@ -1841,10 +1886,9 @@ need_version=yes ;; esac - finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH case "$host_os" in - freebsd2* | freebsd3.[01]*) + freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes ;; *) # from 3.2 on @@ -1896,8 +1940,6 @@ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH @@ -1972,7 +2014,7 @@ shlibpath_var=LIBPATH ;; -osf3* | osf4*) +osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so' @@ -2167,7 +2209,7 @@ if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then lt_cv_dlopen=no lt_cv_dlopen_libs= echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:2170: checking for dlopen in -ldl" >&5 +echo "$progname:2212: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2175,17 +2217,20 @@ ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2204,18 +2249,21 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:2207: checking for dlopen" >&5 +echo "$progname:2252: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen(); int main() { @@ -2231,7 +2279,7 @@ ; return 0; } EOF -if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else @@ -2248,7 +2296,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:2251: checking for dld_link in -ldld" >&5 +echo "$progname:2299: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2256,17 +2304,20 @@ ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2285,18 +2336,21 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:2288: checking for shl_load" >&5 +echo "$progname:2339: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load(); int main() { @@ -2312,7 +2366,7 @@ ; return 0; } EOF -if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else @@ -2330,7 +2384,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:2333: checking for shl_load in -ldld" >&5 +echo "$progname:2387: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2338,18 +2392,21 @@ ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2392,17 +2449,17 @@ for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:2395: checking for $ac_hdr" >&5 +echo "$progname:2452: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int fnord = 0; EOF -ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_try="$ac_compile >/dev/null 2>conftest.out" +{ (eval echo $progname:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2430,7 +2487,7 @@ LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2433: checking whether a program can dlopen itself" >&5 +echo "$progname:2490: checking whether a program can dlopen itself" >&5 if test "${lt_cv_dlopen_self+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2438,7 +2495,7 @@ lt_cv_dlopen_self=cross else cat > conftest.c < @@ -2484,7 +2541,7 @@ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self=yes else @@ -2503,7 +2560,7 @@ if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5 +echo "$progname:2563: checking whether a statically linked program can dlopen itself" >&5 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2511,7 +2568,7 @@ lt_cv_dlopen_self_static=cross else cat > conftest.c < @@ -2557,7 +2614,7 @@ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self_static=yes else @@ -2649,7 +2706,7 @@ # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 +# Originally by Gordon Matzigkeit , 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 @@ -2675,7 +2732,7 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ### BEGIN LIBTOOL CONFIG EOF @@ -2938,7 +2995,7 @@ # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "${COLLECT_NAMES+set}" != set; then +if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -2948,6 +3005,10 @@ # Append the ltmain.sh script. sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? chmod +x "$ofile" ;; Modified: trunk/orca/packages/rrdtool-1.0.40/config/config.guess ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/config/config.guess (original) +++ trunk/orca/packages/rrdtool-1.0.40/config/config.guess 2002-11-09 12:31:50.000000000 -0800 @@ -1,8 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. -# + +version='2000-06-13' + # 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 @@ -23,8 +25,7 @@ # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# Please send patches to the Autoconf mailing list . +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -37,6 +38,46 @@ # (but try to keep the structure clean). # +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of this system. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit" + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case "$1" in + --version | --vers* | -V ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + echo "$me: invalid option $1" + echo "$help" + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + # Use $HOST_CC if defined. $CC may point to a cross-compiler if test x"$CC_FOR_BUILD" = x; then if test x"$HOST_CC" != x; then @@ -68,6 +109,43 @@ # 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. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-cbm ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format. + 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 + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # 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 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -77,41 +155,51 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac fi rm -f $dummy.s $dummy @@ -129,9 +217,6 @@ Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -156,12 +241,12 @@ wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; @@ -218,15 +303,12 @@ aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # 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 + # "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 @@ -250,15 +332,9 @@ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -271,9 +347,6 @@ powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; @@ -289,6 +362,7 @@ mips:*:*:UMIPS | mips:*:*:RISCos) 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[]; { @@ -328,15 +402,18 @@ AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + 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 + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -402,7 +479,7 @@ ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -423,6 +500,8 @@ 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE #include #include @@ -453,7 +532,7 @@ exit (0); } EOF - ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` @@ -547,10 +626,13 @@ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) - echo t3e-cray-unicosmk${UNAME_RELEASE} + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos @@ -563,13 +645,10 @@ F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) @@ -579,17 +658,8 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - if test -x /usr/bin/objformat; then - if test "elf" = "`/usr/bin/objformat`"; then - echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` - exit 0 - fi - fi echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; @@ -617,13 +687,10 @@ *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - armv*) UNAME_MACHINE=$UNAME_MACHINE ;; - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac # 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 @@ -636,12 +703,43 @@ s/ .*// p'` case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) + *ia64) + echo "${UNAME_MACHINE}-unknown-linux" + exit 0 + ;; + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i?86) + echo "${UNAME_MACHINE}-pc-linux" + exit 0 + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + sparclinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + armlinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32arm*) + echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" + exit 0 + ;; + armelf_linux*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + m68klinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32ppc | elf32ppclinux) # Determine Lib Version cat >$dummy.c < @@ -668,49 +766,65 @@ if test "$?" = 0 ; then LIBC="libc1" fi - fi + fi rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 + ;; + shelf_linux) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <$dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac objdump --private-headers $dummy | \ @@ -724,6 +838,7 @@ elif test "${UNAME_MACHINE}" = "mips" ; then cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -739,6 +854,8 @@ EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy + elif test "${UNAME_MACHINE}" = "s390"; then + echo s390-ibm-linux && exit 0 else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. @@ -752,6 +869,9 @@ i?86) VENDOR=pc; ;; + ia64) + VENDOR=Intel; + ;; *) VENDOR=unknown; ;; @@ -760,6 +880,7 @@ cat >$dummy.c < #ifdef __cplusplus +#include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -797,19 +918,21 @@ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; 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_RELEASE} + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i?86:*:5:7*) - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585 - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -829,7 +952,11 @@ echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + i?86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; 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 @@ -837,6 +964,9 @@ Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; + ia64:linux:*:*) + echo IA64-Linux + exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; @@ -943,6 +1073,27 @@ *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-W:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1082,6 +1233,47 @@ esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess version = $version + +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: "version='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Modified: trunk/orca/packages/rrdtool-1.0.40/config/ltmain.sh ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/config/ltmain.sh (original) +++ trunk/orca/packages/rrdtool-1.0.40/config/ltmain.sh 2002-11-09 12:31:51.000000000 -0800 @@ -54,8 +54,8 @@ # Constants. PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.3.3 -TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)" +VERSION=1.3.4 +TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)" default_mode= help="Try \`$progname --help' for more information." @@ -435,7 +435,7 @@ fbsd_hideous_sh_bug=$base_compile # All platforms use -DPIC, to notify preprocessed assembler code. - command="$base_compile $pic_flag -DPIC $srcfile" + command="$base_compile $srcfile $pic_flag -DPIC" if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` @@ -521,9 +521,17 @@ exit $error fi + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` + libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` # Now arrange that obj and lo_libobj become the same file - $show "$LN_S $obj $lo_libobj" - if $run $LN_S $obj $lo_libobj; then + $show "(cd $xdir && $LN_S $baseobj $libobj)" + if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then exit 0 else error=$? @@ -613,8 +621,6 @@ # libtool link mode link) modename="$modename: link" - C_compiler="$CC" # save it, to compile generated C sources - CC="$nonopt" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) # It is impossible to link a dll without this setting, and @@ -802,8 +808,8 @@ allow_undefined=yes ;; esac - compile_command="$CC" - finalize_command="$CC" + compile_command="$nonopt" + finalize_command="$nonopt" compile_rpath= finalize_rpath= @@ -1851,7 +1857,7 @@ int main() { return 0; } EOF $rm conftest - $C_compiler -o conftest conftest.c $deplibs + $CC -o conftest conftest.c $deplibs if test $? -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do @@ -1884,7 +1890,7 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" ; then $rm conftest - $C_compiler -o conftest conftest.c $i + $CC -o conftest conftest.c $i # Did it work? if test $? -eq 0 ; then ldd_output=`ldd conftest` @@ -2047,12 +2053,19 @@ done # Ensure that we have .o objects for linkers which dislike .lo - # (e.g. aix) incase we are running --disable-static + # (e.g. aix) in case we are running --disable-static for obj in $libobjs; do - oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"` - if test ! -f $oldobj; then - $show "${LN_S} $obj $oldobj" - $run ${LN_S} $obj $oldobj || exit $? + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + if test ! -f $xdir/$oldobj; then + $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" + $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? fi done @@ -2311,8 +2324,16 @@ # Just create a symlink. $show $rm $libobj $run $rm $libobj - $show "$LN_S $obj $libobj" - $run $LN_S $obj $libobj || exit $? + xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$libobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + $show "(cd $xdir && $LN_S $oldobj $baseobj)" + $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? fi if test -n "$gentop"; then @@ -2598,16 +2619,21 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*) + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC";; esac esac # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" @@ -2776,7 +2802,7 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" @@ -2865,7 +2891,7 @@ fi" else echo >> $output "\ - program='$outputname$exeext' + program='$outputname' progdir=\"\$thisdir/$objdir\" " fi @@ -2995,14 +3021,21 @@ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else - # Ensure that we have .o objects in place incase we decided + # Ensure that we have .o objects in place in case we decided # not to build a shared library, and have fallen back to building # static libs even though --disable-static was passed! for oldobj in $oldobjs; do if test ! -f $oldobj; then - obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"` - $show "${LN_S} $obj $oldobj" - $run ${LN_S} $obj $oldobj || exit $? + xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$oldobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` + obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + $show "(cd $xdir && ${LN_S} $obj $baseobj)" + $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? fi done @@ -3672,8 +3705,10 @@ done if test -z "$run"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi # Restore saved enviroment variables if test "${save_LC_ALL+set}" = set; then @@ -3690,8 +3725,10 @@ exit 1 else # Display what would be done. - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi $echo "$cmd$args" exit 0 fi Modified: trunk/orca/packages/rrdtool-1.0.40/config/config.sub ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/config/config.sub (original) +++ trunk/orca/packages/rrdtool-1.0.40/config/config.sub 2002-11-09 12:31:52.000000000 -0800 @@ -1,6 +1,10 @@ #! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. + +version='2000-06-20' + # 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. @@ -25,6 +29,8 @@ # 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 . +# # 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. @@ -45,33 +51,68 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi +me=`echo "$0" | sed -e 's,.*/,,'` -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit" + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case "$1" in + --version | --vers* | -V ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + echo "$me: invalid option $1" + echo "$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + 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 - linux-gnu*) + nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + msc-linux*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -94,7 +135,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) + -apple | -axis) os= basic_machine=$1 ;; @@ -105,7 +146,7 @@ -scout) ;; -wrs) - os=vxworks + os=-vxworks basic_machine=$1 ;; -hiux*) @@ -156,33 +197,41 @@ -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. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ - | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el \ + | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v) + | thumb | d10v | fr30 | avr) basic_machine=$basic_machine-unknown ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) ;; # 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[34567]86) + i[234567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -191,23 +240,28 @@ exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ - | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* \ - | f301-* | armv*-* | t3e-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -305,6 +359,9 @@ crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -425,7 +482,6 @@ ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) @@ -474,6 +530,9 @@ basic_machine=m68k-isi os=-sysv ;; + ia64* ) + basic_machine=ia64 + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -488,7 +547,7 @@ miniframe) basic_machine=m68000-convergent ;; - *mint | *MiNT) + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; @@ -506,6 +565,10 @@ mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -514,6 +577,10 @@ basic_machine=i386-unknown os=-msdos ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -523,7 +590,7 @@ os=-netbsd ;; netwinder) - basic_machine=armv4l-corel + basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) @@ -574,6 +641,9 @@ np1) basic_machine=np1-gould ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -606,7 +676,7 @@ pentium | p5 | k5 | k6 | nexen) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86) + pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) @@ -615,7 +685,7 @@ pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-* | 6x86-*) + pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) @@ -718,6 +788,10 @@ sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix @@ -726,6 +800,10 @@ basic_machine=t3e-cray os=-unicos ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -827,6 +905,9 @@ we32k) basic_machine=we32k-att ;; + sh3 | sh4) + base_machine=sh-unknown + ;; sparc | sparcv9) basic_machine=sparc-sun ;; @@ -907,12 +988,25 @@ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mon960* | -lnews*) + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` @@ -920,12 +1014,21 @@ -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; + -msc-linux*) + os=`echo $os | sed -e 's|msc-linux|linux-gnu|'` + ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -950,6 +1053,9 @@ -ns2 ) os=-nextstep2 ;; + -nsk) + os=-nsk + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -1012,7 +1118,7 @@ *-acorn) os=-riscix1.2 ;; - arm*-corel) + arm*-rebel) os=-linux ;; arm*-semi) @@ -1186,7 +1292,7 @@ -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) @@ -1213,3 +1319,11 @@ esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "version='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Modified: trunk/orca/packages/rrdtool-1.0.40/doc/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/Makefile.in 2002-11-09 12:31:53.000000000 -0800 @@ -84,9 +84,10 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -SUFFIXES = .pod .1 .man .html .txt .pm .pdf +SUFFIXES = .pod .1 .man .html .txt .pm .pdf .ps #AUTOMAKE_OPTIONS = foreign @@ -94,7 +95,7 @@ CLEANFILES = *.1 *.html *.txt *-dircache *.pm *.pdf *~ core *itemcache *.rej *.orig -POD = rrdtool.pod rrdlast.pod rrdcreate.pod rrdupdate.pod rrdtutorial.es.pod cdeftutorial.pod rpntutorial.pod rrdgraph.pod bin_dec_hex.pod rrdfetch.pod rrdrestore.pod rrddump.pod rrdtune.pod rrdresize.pod rrdcgi.pod rrdtutorial.pod rrdinfo.pod +POD = rrdtool.pod rrdlast.pod rrdcreate.pod rrdupdate.pod rrdtutorial.es.pod cdeftutorial.pod rpntutorial.pod rrdgraph.pod bin_dec_hex.pod rrdfetch.pod rrdrestore.pod rrddump.pod rrdtune.pod rrdresize.pod rrdcgi.pod rrdtutorial.pod rrdinfo.pod rrdxport.pod PMP = RRDs.pm RRDp.pm @@ -102,6 +103,7 @@ MAN = $(POD:.pod=.1) $(PMP:.pm=.1) TXT = $(MAN:.1=.txt) HTML = $(POD:.pod=.html) $(PMP:.pm=.html) +PS = $(MAN:.1=.ps) PDF = $(MAN:.1=.pdf) # what should go into the distribution @@ -117,6 +119,11 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = ../config/config.h CONFIG_CLEAN_FILES = +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DATA = $(idoc_DATA) $(ihtml_DATA) $(iman_DATA) DIST_COMMON = Makefile.am Makefile.in @@ -130,7 +137,7 @@ GZIP_ENV = --best all: all-redirect .SUFFIXES: -.SUFFIXES: .1 .html .man .pdf .pm .pod .txt +.SUFFIXES: .1 .html .man .pdf .pm .pod .ps .txt $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile @@ -288,8 +295,11 @@ .1.txt: @NROFF@ -man -Tlp $< > $@ -.1.pdf: - @TROFF@ -man $< | ps2pdf - $@ +.1.ps: + @TROFF@ -man $< > $@ + +.ps.pdf: + distill $< .pm.html .pod.html .pl.html: pod2html --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$* Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.txt 2002-11-09 12:31:53.000000000 -0800 @@ -1,66 +1,47 @@ - - - -rrdtool RRDRESIZE(1) +RRDRESIZE(1) rrdtool RRDRESIZE(1) NNNNAAAAMMMMEEEE - rrdtool resize - alters the size of an RRA. + rrdtool resize - alters the size of an RRA and creates new + .rrd file SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll rrrreeeessssiiiizzzzeeee _f_i_l_e_n_a_m_e _r_r_a_-_n_u_m GGGGRRRROOOOWWWW_|SSSSHHHHRRRRIIIINNNNKKKK _r_o_w_s + rrrrrrrrddddttttoooooooollll rrrreeeessssiiiizzzzeeee _f_i_l_e_n_a_m_e _r_r_a_-_n_u_m GGGGRRRROOOOWWWW_|SSSSHHHHRRRRIIIINNNNKKKK _r_o_w_s DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The rrrreeeessssiiiizzzzeeee function is used to modify the number of rows in - an RRRRRRRRAAAA. + The rrrreeeessssiiiizzzzeeee function is used to modify the number of rows + in an RRRRRRRRAAAA. - _f_i_l_e_n_a_m_e - the name of the RRRRRRRRDDDD you want to alter. + _f_i_l_e_n_a_m_e + the name of the RRRRRRRRDDDD you want to alter. - _r_r_a_-_n_u_m the RRRRRRRRAAAA you want to alter. You can find the number - using rrrrrrrrddddttttoooooooollll iiiinnnnffffoooo. + _r_r_a_-_n_u_m the RRRRRRRRAAAA you want to alter. You can find the number + using rrrrrrrrddddttttoooooooollll iiiinnnnffffoooo. - GGGGRRRROOOOWWWW used if you want to add extra rows to an RRA. The - extra rows will be inserted as the rows that are - oldest. + GGGGRRRROOOOWWWW used if you want to add extra rows to an RRA. The + extra rows will be inserted as the rows that are + oldest. - SSSSHHHHRRRRIIIINNNNKKKK used if you want to remove rows from an RRA. The - rows that will be removed are the oldest rows. + SSSSHHHHRRRRIIIINNNNKKKK used if you want to remove rows from an RRA. The + rows that will be removed are the oldest rows. - _r_o_w_s the number of rows you want to add or remove. + _r_o_w_s the number of rows you want to add or remove. NNNNOOOOTTTTEEEESSSS - It is possible to abuse this tool and get strange results by - first removing some rows and then reinsert the same amount - (effectively clearing them to be Unknown). You may thus end - up with unknown data in one RRA while at the same timestamp - this data is available in another RRA. + The new .rrd file, with the modified RRAm, is written to + the file rrrreeeessssiiiizzzzeeee....rrrrrrrrdddd in the current directory. The origi- + nal .rrd file is not modified. + + It is possible to abuse this tool and get strange results + by first removing some rows and then reinsert the same + amount (effectively clearing them to be Unknown). You may + thus end up with unknown data in one RRA while at the same + timestamp this data is available in another RRA. AAAAUUUUTTTTHHHHOOOORRRR - Alex van den Bogaerdt - - - - - - - - - - - - - - - - - - - - - -2001-02-20 Last change: 1.0.33 1 + Alex van den Bogaerdt +2002-07-05 1.0.40 RRDRESIZE(1) Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.txt 2002-11-09 12:31:54.000000000 -0800 @@ -1,330 +1,251 @@ - - - -rrdtool RRDCREATE(1) +RRDCREATE(1) rrdtool RRDCREATE(1) NNNNAAAAMMMMEEEE - rrdtool create - Set up a new Round Robin Database + rrdtool create - Set up a new Round Robin Database SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll ccccrrrreeeeaaaatttteeee _f_i_l_e_n_a_m_e [--------ssssttttaaaarrrrtttt|----bbbb _s_t_a_r_t _t_i_m_e] - [--------sssstttteeeepppp|----ssss _s_t_e_p] [DDDDSSSS::::_d_s_-_n_a_m_e::::_D_S_T::::_h_e_a_r_t_b_e_a_t::::_m_i_n::::_m_a_x] - [RRRRRRRRAAAA::::_C_F::::_x_f_f::::_s_t_e_p_s::::_r_o_w_s] + rrrrrrrrddddttttoooooooollll ccccrrrreeeeaaaatttteeee _f_i_l_e_n_a_m_e [--------ssssttttaaaarrrrtttt|----bbbb _s_t_a_r_t _t_i_m_e] + [--------sssstttteeeepppp|----ssss _s_t_e_p] [DDDDSSSS::::_d_s_-_n_a_m_e::::_D_S_T::::_h_e_a_r_t_b_e_a_t::::_m_i_n::::_m_a_x] + [RRRRRRRRAAAA::::_C_F::::_x_f_f::::_s_t_e_p_s::::_r_o_w_s] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The create function of the RRDtool lets you set up new Round - Robin Database (RRRRRRRRDDDD) files. The file is created at its - final, full size and filled with _*_U_N_K_N_O_W_N_* data. - - _f_i_l_e_n_a_m_e - The name of the RRRRRRRRDDDD you want to create. RRRRRRRRDDDD files - should end with the extension _._r_r_d. However, rrrrrrrrddddttttoooooooollll - will accept any filename. - - --------ssssttttaaaarrrrtttt|----bbbb _s_t_a_r_t _t_i_m_e (default: now - 10s) - Specifies the time in seconds since 1970-01-01 UTC - when the first value should be added to the RRRRRRRRDDDD. - rrrrrrrrddddttttoooooooollll will not accept any data timed before or at - the time specified. - - See also AT-STYLE TIME SPECIFICATION section in the - _r_r_d_f_e_t_c_h documentation for more ways to specify - time. - - --------sssstttteeeepppp|----ssss _s_t_e_p (default: 300 seconds) - Specifies the base interval in seconds with which - data will be fed into the RRRRRRRRDDDD. - - DDDDSSSS::::_d_s_-_n_a_m_e::::_D_S_T::::_h_e_a_r_t_b_e_a_t::::_m_i_n::::_m_a_x - A single RRRRRRRRDDDD can accept input from several data - sources (DDDDSSSS). (e.g. Incoming and Outgoing traffic - on a specific communication line). With the DDDDSSSS - configuration option you must define some basic - properties of each data source you want to use to - feed the RRRRRRRRDDDD. - - _d_s_-_n_a_m_e is the name you will use to reference this - particular data source from an RRRRRRRRDDDD. A _d_s_-_n_a_m_e must - be 1 to 19 characters long in the characters [a-zA- - Z0-9_]. - - _D_S_T defines the Data Source Type. See the section on - "How to Measure" below for further insight. The - Datasource Type must be onw of the following: - - GGGGAAAAUUUUGGGGEEEE - is for things like temperatures or number of - people in a room or value of a RedHat share. - - - -2001-02-20 Last change: 1.0.33 1 - - - - - - -rrdtool RRDCREATE(1) - - - - CCCCOOOOUUUUNNNNTTTTEEEERRRR - is for continuous incrementing counters like the - InOctets counter in a router. The CCCCOOOOUUUUNNNNTTTTEEEERRRR data - source assumes that the counter never decreases, - except when a counter overflows. The update - function takes the overflow into account. The - counter is stored as a per-second rate. When the - counter overflows, RRDtool checks if the - overflow happened at the 32bit or 64bit border - and acts accordingly by adding an appropriate - value to the result. - - DDDDEEEERRRRIIIIVVVVEEEE - will store the derivative of the line going from - the last to the current value of the data - source. This can be useful for gauges, for - example, to measure the rate of people entering - or leaving a room. Internally, derive works - exaclty like COUNTER but without overflow - checks. So if your counter does not reset at 32 - or 64 bit you might want to use DERIVE and - combine it with a MIN value of 0. - - AAAABBBBSSSSOOOOLLLLUUUUTTTTEEEE - is for counters which get reset upon reading. - This is used for fast counters which tend to - overflow. So instead of reading them normally - you reset them after every read to make sure you - have a maximal time available before the next - overflow. Another usage is for things you count - like number of messages since the last update. - - _h_e_a_r_t_b_e_a_t defines the maximum number of seconds that - may pass between two updates of this data source - before the value of the data source is assumed to be - _*_U_N_K_N_O_W_N_*. + The create function of the RRDtool lets you set up new + Round Robin Database (RRRRRRRRDDDD) files. The file is created at + its final, full size and filled with _*_U_N_K_N_O_W_N_* data. + + _f_i_l_e_n_a_m_e + The name of the RRRRRRRRDDDD you want to create. RRRRRRRRDDDD files + should end with the extension _._r_r_d. However, rrrrrrrrdddd---- + ttttoooooooollll will accept any filename. + + --------ssssttttaaaarrrrtttt|----bbbb _s_t_a_r_t _t_i_m_e (default: now - 10s) + Specifies the time in seconds since 1970-01-01 UTC + when the first value should be added to the RRRRRRRRDDDD. + rrrrrrrrddddttttoooooooollll will not accept any data timed before or + at the time specified. + + See also AT-STYLE TIME SPECIFICATION section in + the _r_r_d_f_e_t_c_h documentation for more ways to spec- + ify time. + + --------sssstttteeeepppp|----ssss _s_t_e_p (default: 300 seconds) + Specifies the base interval in seconds with which + data will be fed into the RRRRRRRRDDDD. + + DDDDSSSS::::_d_s_-_n_a_m_e::::_D_S_T::::_h_e_a_r_t_b_e_a_t::::_m_i_n::::_m_a_x + A single RRRRRRRRDDDD can accept input from several data + sources (DDDDSSSS). (e.g. Incoming and Outgoing traffic + on a specific communication line). With the DDDDSSSS + configuration option you must define some basic + properties of each data source you want to use to + feed the RRRRRRRRDDDD. + + _d_s_-_n_a_m_e is the name you will use to reference this + particular data source from an RRRRRRRRDDDD. A _d_s_-_n_a_m_e must + be 1 to 19 characters long in the characters [a- + zA-Z0-9_]. + + _D_S_T defines the Data Source Type. See the section + on "How to Measure" below for further insight. + The Datasource Type must be one of the following: + + GGGGAAAAUUUUGGGGEEEE + is for things like temperatures or number of + people in a room or value of a RedHat share. + + CCCCOOOOUUUUNNNNTTTTEEEERRRR + is for continuous incrementing counters like + the InOctets counter in a router. The CCCCOOOOUUUUNNNNTTTTEEEERRRR + data source assumes that the counter never + decreases, except when a counter overflows. + The update function takes the overflow into + account. The counter is stored as a per-sec- + ond rate. When the counter overflows, RRDtool + checks if the overflow happened at the 32bit + or 64bit border and acts accordingly by adding + an appropriate value to the result. + + DDDDEEEERRRRIIIIVVVVEEEE + will store the derivative of the line going + from the last to the current value of the data + source. This can be useful for gauges, for + example, to measure the rate of people enter- + ing or leaving a room. Internally, derive + works exaclty like COUNTER but without over- + flow checks. So if your counter does not reset + at 32 or 64 bit you might want to use DERIVE + and combine it with a MIN value of 0. + + AAAABBBBSSSSOOOOLLLLUUUUTTTTEEEE + is for counters which get reset upon reading. + This is used for fast counters which tend to + overflow. So instead of reading them normally + you reset them after every read to make sure + you have a maximal time available before the + next overflow. Another usage is for things you + count like number of messages since the last + update. + + _h_e_a_r_t_b_e_a_t defines the maximum number of seconds + that may pass between two updates of this data + source before the value of the data source is + assumed to be _*_U_N_K_N_O_W_N_*. + + _m_i_n and _m_a_x are optional entries defining the + expected range of the data supplied by this data + source. If _m_i_n and/or _m_a_x are defined, any value + outside the defined range will be regarded as + _*_U_N_K_N_O_W_N_*. If you do not know or care about min + and max, set them to U for unknown. Note that min + and max always refer to the processed values of + the DS. For a traffic-CCCCOOOOUUUUNNNNTTTTEEEERRRR type DS this would + be the max and min data-rate expected from the + device. + + _I_f _i_n_f_o_r_m_a_t_i_o_n _o_n _m_i_n_i_m_a_l_/_m_a_x_i_m_a_l _e_x_p_e_c_t_e_d _v_a_l_u_e_s + _i_s _a_v_a_i_l_a_b_l_e_, _a_l_w_a_y_s _s_e_t _t_h_e _m_i_n _a_n_d_/_o_r _m_a_x _p_r_o_p_- + _e_r_t_i_e_s_. _T_h_i_s _w_i_l_l _h_e_l_p _R_R_D_t_o_o_l _i_n _d_o_i_n_g _a _s_i_m_p_l_e + _s_a_n_i_t_y _c_h_e_c_k _o_n _t_h_e _d_a_t_a _s_u_p_p_l_i_e_d _w_h_e_n _r_u_n_n_i_n_g + _u_p_d_a_t_e_. + + RRRRRRRRAAAA::::_C_F::::_x_f_f::::_s_t_e_p_s::::_r_o_w_s + The purpose of an RRRRRRRRDDDD is to store data in the + round robin archives (RRRRRRRRAAAA). An archive consists of + a number of data values from all the defined data- + sources (DDDDSSSS) and is defined with an RRRRRRRRAAAA line. + + When data is entered into an RRRRRRRRDDDD, it is first fit + into time slots of the length defined with the ----ssss + option becoming a _p_r_i_m_a_r_y _d_a_t_a _p_o_i_n_t. + + The data is also consolidated with the consolida- + tion function (_C_F) of the archive. The following + consolidation functions are defined: AAAAVVVVEEEERRRRAAAAGGGGEEEE, MMMMIIIINNNN, + MMMMAAAAXXXX, LLLLAAAASSSSTTTT. + + _x_f_f The xfiles factor defines what part of a con- + solidation interval may be made up from _*_U_N_K_N_O_W_N_* + data while the consolidated value is still + regarded as known. + + _s_t_e_p_s defines how many of these _p_r_i_m_a_r_y _d_a_t_a + _p_o_i_n_t_s are used to build a _c_o_n_s_o_l_i_d_a_t_e_d _d_a_t_a _p_o_i_n_t + which then goes into the archive. - _m_i_n and _m_a_x are optional entries defining the - expected range of the data supplied by this data - source. If _m_i_n and/or _m_a_x are defined, any value - outside the defined range will be regarded as - _*_U_N_K_N_O_W_N_*. If you do not know or care about min and - max, set them to U for unknown. Note that min and - max always refer to the processed values of the DS. - For a traffic-CCCCOOOOUUUUNNNNTTTTEEEERRRR type DS this would be the max - and min data-rate expected from the device. - - _I_f _i_n_f_o_r_m_a_t_i_o_n _o_n _m_i_n_i_m_a_l_/_m_a_x_i_m_a_l _e_x_p_e_c_t_e_d _v_a_l_u_e_s _i_s - _a_v_a_i_l_a_b_l_e_, _a_l_w_a_y_s _s_e_t _t_h_e _m_i_n _a_n_d_/_o_r _m_a_x _p_r_o_p_e_r_t_i_e_s_. - _T_h_i_s _w_i_l_l _h_e_l_p _R_R_D_t_o_o_l _i_n _d_o_i_n_g _a _s_i_m_p_l_e _s_a_n_i_t_y - _c_h_e_c_k _o_n _t_h_e _d_a_t_a _s_u_p_p_l_i_e_d _w_h_e_n _r_u_n_n_i_n_g _u_p_d_a_t_e_. - - - - -2001-02-20 Last change: 1.0.33 2 - - - - - - -rrdtool RRDCREATE(1) - - - - RRRRRRRRAAAA::::_C_F::::_x_f_f::::_s_t_e_p_s::::_r_o_w_s - The purpose of an RRRRRRRRDDDD is to store data in the round - robin archives (RRRRRRRRAAAA). An archive consists of a - number of data values from all the defined data- - sources (DDDDSSSS) and is defined with an RRRRRRRRAAAA line. - - When data is entered into an RRRRRRRRDDDD, it is first fit - into time slots of the length defined with the ----ssss - option becoming a _p_r_i_m_a_r_y _d_a_t_a _p_o_i_n_t. - - The data is also consolidated with the consolidation - function (_C_F) of the archive. The following - consolidation functions are defined: AAAAVVVVEEEERRRRAAAAGGGGEEEE, MMMMIIIINNNN, - MMMMAAAAXXXX, LLLLAAAASSSSTTTT. - - _x_f_f The xfiles factor defines what part of a - consolidation interval may be made up from _*_U_N_K_N_O_W_N_* - data while the consolidated value is still regarded - as known. - - _s_t_e_p_s defines how many of these _p_r_i_m_a_r_y _d_a_t_a _p_o_i_n_t_s - are used to build a _c_o_n_s_o_l_i_d_a_t_e_d _d_a_t_a _p_o_i_n_t which - then goes into the archive. - - _r_o_w_s defines how many generations of data values are - kept in an RRRRRRRRAAAA. + _r_o_w_s defines how many generations of data values + are kept in an RRRRRRRRAAAA. TTTThhhheeee HHHHEEEEAAAARRRRTTTTBBBBEEEEAAAATTTT aaaannnndddd tttthhhheeee SSSSTTTTEEEEPPPP - Here is an explanation by Don Baarda on the inner workings - of rrdtool. It may help you to sort out why all this - *UNKNOWN* data is popping up in your databases: - - RRD gets fed samples at arbitrary times. From these it - builds Primary Data Points (PDPs) at exact times every - "step" interval. The PDPs are then accumulated into RRAs. - - The "heartbeat" defines the maximum acceptable interval - between samples. If the interval between samples is less - than "heartbeat", then an average rate is calculated and - applied for that interval. If the interval between samples - is longer than "heartbeat", then that entire interval is - considered "unknown". Note that there are other things that - can make a sample interval "unknown", such as the rate - exceeding limits, or even an "unknown" input sample. - - The known rates during a PDP's "step" interval are used to - calculate an average rate for that PDP. Also, if the total - "unknown" time during the "step" interval exceeds the - "heartbeat", the entire PDP is marked as "unknown". This - means that a mixture of known and "unknown" sample time in a - single PDP "step" may or may not add up to enough "unknown" - time to exceed "heartbeat" and hence mark the whole PDP - - - -2001-02-20 Last change: 1.0.33 3 - - - - - - -rrdtool RRDCREATE(1) - - - - "unknown". So "heartbeat" is not only the maximum acceptable - interval between samples, but also the maximum acceptable - amount of "unknown" time per PDP (obviously this is only - significant if you have "heartbeat" less than "step"). - - The "heartbeat" can be short (unusual) or long (typical) - relative to the "step" interval between PDPs. A short - "heartbeat" means you require multiple samples per PDP, and - if you don't get them mark the PDP unknown. A long heartbeat - can span multiple "steps", which means it is acceptable to - have multiple PDPs calculated from a single sample. An - extreme example of this might be a "step" of 5mins and a - "heartbeat" of one day, in which case a single sample every - day will result in all the PDPs for that entire day period - being set to the same average rate. _-_- _D_o_n _B_a_a_r_d_a - _<_d_o_n_._b_a_a_r_d_a_@_b_a_e_s_y_s_t_e_m_s_._c_o_m_> + Here is an explanation by Don Baarda on the inner workings + of rrdtool. It may help you to sort out why all this + *UNKNOWN* data is popping up in your databases: + + RRD gets fed samples at arbitrary times. From these it + builds Primary Data Points (PDPs) at exact times every + "step" interval. The PDPs are then accumulated into RRAs. + + The "heartbeat" defines the maximum acceptable interval + between samples. If the interval between samples is less + than "heartbeat", then an average rate is calculated and + applied for that interval. If the interval between samples + is longer than "heartbeat", then that entire interval is + considered "unknown". Note that there are other things + that can make a sample interval "unknown", such as the + rate exceeding limits, or even an "unknown" input sample. + + The known rates during a PDP's "step" interval are used to + calculate an average rate for that PDP. Also, if the total + "unknown" time during the "step" interval exceeds the + "heartbeat", the entire PDP is marked as "unknown". This + means that a mixture of known and "unknown" sample time in + a single PDP "step" may or may not add up to enough + "unknown" time to exceed "heartbeat" and hence mark the + whole PDP "unknown". So "heartbeat" is not only the maxi- + mum acceptable interval between samples, but also the max- + imum acceptable amount of "unknown" time per PDP (obvi- + ously this is only significant if you have "heartbeat" + less than "step"). + + The "heartbeat" can be short (unusual) or long (typical) + relative to the "step" interval between PDPs. A short + "heartbeat" means you require multiple samples per PDP, + and if you don't get them mark the PDP unknown. A long + heartbeat can span multiple "steps", which means it is + acceptable to have multiple PDPs calculated from a single + sample. An extreme example of this might be a "step" of + 5mins and a "heartbeat" of one day, in which case a single + sample every day will result in all the PDPs for that + entire day period being set to the same average rate. _-_- + _D_o_n _B_a_a_r_d_a _<_d_o_n_._b_a_a_r_d_a_@_b_a_e_s_y_s_t_e_m_s_._c_o_m_> HHHHOOOOWWWW TTTTOOOO MMMMEEEEAAAASSSSUUUURRRREEEE - Here are a few hints on how to measure: - - Temperature - Normally you have some type of meter you can read to get - the temperature. The temperature is not realy connected - with a time. The only connection is that the temperature - reading happened at a certain time. You can use the - GGGGAAAAUUUUGGGGEEEE data source type for this. RRRtool will the record - your reading together with the time. - - Mail Messages - Assume you have a methode to count the number of - messages transported by your mailserver in a certain - amount of time, this give you data like '5 messages in - the last 65 seconds'. If you look at the count of 5 like - and AAAABBBBSSSSOOOOLLLLUUUUTTTTEEEE datatype you can simply update the rrd with - the number 5 and the end time of your monitoring period. - RRDtool will then record the number of messages per - second. If at some later stage you want to know the - number of messages transported in a day, you can get the - average messages per second from RRDtool for the day in - question and multiply this number with the number of - seconds in a day. Because all math is run with Doubles, - the precision should be acceptable. - - It's always a Rate - RRDtool stores rates in amount/second for COUNTER, - DERIVE and ABSOLUTE data. When you plot the data, you - will get on the y axis amount/second which you might be - tempted to convert to absolute amount volume by - multiplying by the delta-time between the points. - RRDtool plots continuous data, and as such is not - appropriate for plotting absolute volumes as for example - "total bytes" sent and received in a router. What you + Here are a few hints on how to measure: - - -2001-02-20 Last change: 1.0.33 4 - - - - - - -rrdtool RRDCREATE(1) - - - - probably want is plot rates that you can scale to for - example bytes/hour or plot volumes with another tool - that draws bar-plots, where the delta-time is clear on - the plot for each point (such that when you read the - graph you see for example GB on the y axis, days on the - x axis and one bar for each day). + Temperature + Normally you have some type of meter you can read to + get the temperature. The temperature is not realy + connected with a time. The only connection is that the + temperature reading happened at a certain time. You + can use the GGGGAAAAUUUUGGGGEEEE data source type for this. RRRtool + will the record your reading together with the time. + + Mail Messages + Assume you have a method to count the number of mes- + sages transported by your mailserver in a certain + amount of time, this give you data like '5 messages in + the last 65 seconds'. If you look at the count of 5 + like and AAAABBBBSSSSOOOOLLLLUUUUTTTTEEEE datatype you can simply update the + rrd with the number 5 and the end time of your moni- + toring period. RRDtool will then record the number of + messages per second. If at some later stage you want + to know the number of messages transported in a day, + you can get the average messages per second from RRD- + tool for the day in question and multiply this number + with the number of seconds in a day. Because all math + is run with Doubles, the precision should be accept- + able. + + It's always a Rate + RRDtool stores rates in amount/second for COUNTER, + DERIVE and ABSOLUTE data. When you plot the data, you + will get on the y axis amount/second which you might + be tempted to convert to absolute amount volume by + multiplying by the delta-time between the points. RRD- + tool plots continuous data, and as such is not appro- + priate for plotting absolute volumes as for example + "total bytes" sent and received in a router. What you + probably want is plot rates that you can scale to for + example bytes/hour or plot volumes with another tool + that draws bar-plots, where the delta-time is clear on + the plot for each point (such that when you read the + graph you see for example GB on the y axis, days on + the x axis and one bar for each day). EEEEXXXXAAAAMMMMPPPPLLLLEEEE - `rrdtool create temperature.rrd --step 300 - DS:temp:GAUGE:600:-273:5000 RRA:AVERAGE:0.5:1:1200 - RRA:MIN:0.5:12:2400 RRA:MAX:0.5:12:2400 - RRA:AVERAGE:0.5:12:2400' - - This sets up an RRRRRRRRDDDD called _t_e_m_p_e_r_a_t_u_r_e_._r_r_d which accepts one - temperature value every 300 seconds. If no new data is - supplied for more than 600 seconds, the temperature becomes - _*_U_N_K_N_O_W_N_*. The minimum acceptable value is -273 and the - maximum is 5000. - - A few archives areas are also defined. The first stores the - temperatures supplied for 100 hours (1200 * 300 seconds = - 100 hours). The second RRA stores the minimum temperature - recorded over every hour (12 * 300 seconds = 1 hour), for - 100 days (2400 hours). The third and the fourth RRA's do the - same with the for the maximum and average temperature, - respectively. + "rrdtool create temperature.rrd --step 300 + DS:temp:GAUGE:600:-273:5000 RRA:AVERAGE:0.5:1:1200 + RRA:MIN:0.5:12:2400 RRA:MAX:0.5:12:2400 RRA:AVER- + AGE:0.5:12:2400" + + This sets up an RRRRRRRRDDDD called _t_e_m_p_e_r_a_t_u_r_e_._r_r_d which accepts + one temperature value every 300 seconds. If no new data is + supplied for more than 600 seconds, the temperature + becomes _*_U_N_K_N_O_W_N_*. The minimum acceptable value is -273 + and the maximum is 5000. + + A few archives areas are also defined. The first stores + the temperatures supplied for 100 hours (1200 * 300 sec- + onds = 100 hours). The second RRA stores the minimum tem- + perature recorded over every hour (12 * 300 seconds = 1 + hour), for 100 days (2400 hours). The third and the fourth + RRA's do the same for the maximum and average temperature, + respectively. AAAAUUUUTTTTHHHHOOOORRRR - Tobias Oetiker - - - - - - - - - - - - - - - - - - - - - - - - - - -2001-02-20 Last change: 1.0.33 5 + Tobias Oetiker +2002-05-02 1.0.40 RRDCREATE(1) Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.pod ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.pod (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.pod 2002-11-09 12:31:54.000000000 -0800 @@ -1,6 +1,6 @@ =head1 NAME -rrdtool resize - alters the size of an RRA. +rrdtool resize - alters the size of an RRA and creates new .rrd file =for html
PDF version.
@@ -41,6 +41,10 @@ =head1 NOTES +The new .rrd file, with the modified RRAm, is written to the file +B in the current directory. The original .rrd file is not +modified. + It is possible to abuse this tool and get strange results by first removing some rows and then reinsert the same amount (effectively clearing them to be Unknown). You may thus end up with unknown data in one Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.pod ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.pod (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.pod 2002-11-09 12:31:54.000000000 -0800 @@ -53,7 +53,7 @@ the characters [a-zA-Z0-9_]. I defines the Data Source Type. See the section on "How to Measure" below for further insight. -The Datasource Type must be onw of the following: +The Datasource Type must be one of the following: =over 4 @@ -187,7 +187,7 @@ =item Mail Messages -Assume you have a methode to count the number of messages transported by +Assume you have a method to count the number of messages transported by your mailserver in a certain amount of time, this give you data like '5 messages in the last 65 seconds'. If you look at the count of 5 like and B datatype you can simply update the rrd with the number 5 and the @@ -229,7 +229,7 @@ temperatures supplied for 100 hours (1200 * 300 seconds = 100 hours). The second RRA stores the minimum temperature recorded over every hour (12 * 300 seconds = 1 hour), for 100 days (2400 hours). The -third and the fourth RRA's do the same with the for the maximum and +third and the fourth RRA's do the same for the maximum and average temperature, respectively. =head1 AUTHOR Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdupdate.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdupdate.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdupdate.html 2002-11-09 12:31:55.000000000 -0800 @@ -67,7 +67,7 @@ U (eg. N:0.1:U:1) can be defined.

The format of the value acquired from the data source is dependent of the data source type chosen. Normally it will be numeric, but the data acquisition -modules my impose their very own parsing of this parameter as long as the colon +modules may impose their very own parsing of this parameter as long as the colon (:) remains the data source value separator.

Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.es.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.es.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.es.txt 2002-11-09 12:31:56.000000000 -0800 @@ -1,1650 +1,1272 @@ +RRDTUTORIAL.ES(1) rrdtool RRDTUTORIAL.ES(1) -rrdtool RRDTUTORIAL.ES(1) - - - -NNNNAAAAMMMMEEEE - rrdtutorial - Tutorial sobre RRDtool por Alex van den - Bogaerdt (Traducido al castellano por Jes'us Couto Fandi~no) - -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN //// DDDDEEEESSSSCCCCRRRRIIIIPPPPCCCCIIII''OO''OONNNN - RRDtool es un programa escrito por Tobias Oetiker con la - colaboraci'on de muchas personas en diversas partes del - mundo. Alex van den Bogaerdt escribi'o este documento para - ayudarte a entender que es RRDtool y que es lo que puede - hacer por ti. - - La documentaci'on que viene con RRDtool puede ser demasiado - t'ecnica para algunos. Este tutorial existe para ayudarte a - entender las funciones b'asicas de RRdtool. Debe servirte de - preparaci'on para leer la documentaci'on, y adem'as explica - algunas ideas generales sobre estad'istica, con un enfoque - particular hacia las redes. - -TTTTUUUUTTTTOOOORRRRIIIIAAAALLLL - IIIImmmmppppoooorrrrttttaaaannnntttteeee - - ,iPor favor, no te adelantes en la lectura de este documento! - Esta primera parte explica los fundamentos b'asicos. Puede - ser aburrida, pero si te saltas los fundamentos, los - ejemplos no te van a tener mucho sentido. - - ''cc''ccQQQQuuuu''ee''ee eeeessss RRRRRRRRDDDDttttoooooooollll???? - - RRDtool significa "herramienta de bases de datos en round - robin". "Round robin" es una t'ecnica que implica un n'umero - fijo de datos, y un apuntador al elemento m'as reciente. - Piensa en un circulo con unos cuantos puntos dibujados - alrededor del borde; estos puntos son los lugares donde se - pueden guardar los datos. Dibuja ahora una flecha desde el - centro del c'irculo a uno de los puntos; este es el - apuntador. Cuando se lee o escribe el dato actualmente - apuntado, la flecha se mueve al pr'oximo elemento. Como - estamos en un c'irculo, no hay ni principio ni fin; siempre - puedes seguir, eternamente. Al cabo de un tiempo ya se - habr'an usado todas las posiciones disponibles y el proceso - empieza a reutilizar las antiguas. De esta forma, la base de - datos no crece en tama~no y, por lo tanto, no requiere ning'un - mantenimiento. RRDtool trabaja con estas bases de datos en - "round-robin", guardando y recuperando datos de ellas. - - ''cc''ccQQQQuuuu''ee''ee ddddaaaattttoooossss ppppuuuueeeeddddeeeennnn gggguuuuaaaarrrrddddaaaarrrrsssseeee eeeennnn uuuunnnnaaaa RRRRRRRRDDDD???? - - Lo que se te ocurra. Debes poder medir alg'un valor dado en - distintos momentos en el tiempo y proveer a RRDtool de estos - valores. Si puedes hacer esto, RRDtool puede guardar los - datos. Los valores tienen que ser num'ericos, pero no - necesariamente enteros, como en MRTG. - - - -2001-02-20 Last change: 1.0.33 1 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - Muchos ejemplos mencionan SNMP, que es el acr'onimo de - "Simple Network Management Protocol" (Protocolo Simple de - Administraci'on de Redes). Lo de "simple" se refiere al - protocolo - no se supone que sea f'acil administrar o - monitorizar una red. Cuando hayas terminado con este - documento, deber'as saber lo suficiente para entender cuando - oigas a otros hablar sobre SNMP. Por ahora, simplemente - considera a SNMP como una forma de preguntarle a los - dispositivos por los valores de ciertos contadores que - mantienen. Son estos valores de estos contadores los que - vamos a almacenar en la RRD. - - ''cc''ccQQQQuuuu''ee''ee ppppuuuueeeeddddoooo hhhhaaaacccceeeerrrr ccccoooonnnn eeeessssttttaaaa hhhheeeerrrrrrrraaaammmmiiiieeeennnnttttaaaa???? - - RRDtool se deriva de MRTG (Multi Router Traffic Grapher, - Graficador De Tr'afico de M'ultiples Enrutadores). MRTG - empez'o como un peque~no script para poder graficar el uso de - una conexi'on a la Internet. Luego evolucion'o, permitiendo - graficar otras fuentes de datos, como temperatura, - velocidad, voltajes, cantidad de p'aginas impresas, etc... Lo - m'as probable es que empieces a usar RRDtool para guardar y - procesar datos conseguidos a trav'es de SNMP, y que los datos - sean el n'umero de bytes (o bits) transferidos desde y hacia - una red u ordenador. RRDtool te permite crear una base de - datos, guardar los datos en ellas, recuperarlos y crear - gr'aficos en formato GIF o PNG, para mostrarlos en un - navegador web. Esas im'agenes dependen de los datos que hayas - guardado y pueden, por ejemplo, ser un sumario del promedio - de uso de la red, o los picos de tr'afico que ocurrieron. - Tambi'en lo puedes usar para mostrar el nivel de las mareas, - la radiaci'on solar, el consumo de electricidad, el n'umero de - visitantes en una exposici'on en un momento dado, los niveles - de ruido cerca del aeropuerto, la temperatura en tu lugar de - vacaciones favorito, o en la nevera, o cualquier otra cosa - que te puedas imaginar, mientras tengas alg'un sensor con el - cual medir los datos y seas capaz de pasarle los n'umeros a - RRDtool. - - ''cc''ccYYYY ssssiiii aaaa''uu''uunnnn tttteeeennnnggggoooo pppprrrroooobbbblllleeeemmmmaaaassss ddddeeeessssppppuuuu''ee''eessss ddddeeee lllleeeeeeeerrrr eeeesssstttteeee ddddooooccccuuuummmmeeeennnnttttoooo???? - - Lo primero, ,il'eelo otra vez!. Puede que te hayas perdido de - algo. Si no puedes compilar el c'odigo fuente y usas un - sistema operativo bastante com'un, casi seguro que no es la - culpa de RRDtool. Probablemente consigas versiones pre- - compiladas por la Internet. Si provienen de una fuente - confiable, 'usalas. Si, por otro lado, el programa funciona, - pero no te da los resultados que tu esperabas, puede ser un - problema con la configuraci'on; rev'isala y comp'arala con los - ejemplos. - - Hay una lista de correo electr'onico y una archivo de la - misma. Lee la lista durante unas cuantas semanas, y busca en - - - -2001-02-20 Last change: 1.0.33 2 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - el archivo. Es descort'es hacer una pregunta sin haber - revisado el archivo; ,ipuede que tu problema ya haya sido - resuelto antes! Normalmente ocurre as'i en todas las listas - de correo, no s'olo esta. Examina la documentaci'on que vino - con RRDtool para ver donde est'a el archivo y como usarlo. - - Te sugiero que te tomes un momento y te subscribas a la - lista ahora mismo, enviando un mensaje a rrd-users- - request at list.ee.ethz.ch con t'itulo `subscribe'. Si - eventualmente deseas salirte de la lista, env'ia otro correo - a la misma direcci'on, con t'itulo `unsubscribe'. - - ''cc''ccCCCC''oo''oommmmoooo mmmmeeee vvvvaaaassss aaaa aaaayyyyuuuuddddaaaarrrr???? - - D'andote descripciones y ejemplos detallados. Asumimos que el - seguir las instrucciones en el orden en que se presentan - aqu'i te dar'a suficiente conocimiento de RRDtool como para - que experimentes por tu cuenta. Si no funciona a la primera, - puede que te hallas saltado algo; siguiendo los ejemplos - obtendr'as algo de experiencia pr'actica y, lo que es m'as - importante, un poco de informaci'on sobre como funciona el - programa. - - Necesitar'as saber algo sobre n'umeros hexadecimales. Si no, - empieza por leer "bin_dec_hex" antes de continuar. - - TTTTuuuu pppprrrriiiimmmmeeeerrrraaaa bbbbaaaasssseeee ddddeeee ddddaaaattttoooossss eeeennnn rrrroooouuuunnnndddd----rrrroooobbbbiiiinnnn - - En mi opini'on, la mejor forma de aprender algo es - haci'endolo. 'cPor qu'e no empezamos ya? Vamos a crear una base - de datos, poner unos cuantos valores en ella y extraerlos - despu'es. La salida que obtengas debe ser igual a la que - aparece en este documento. - - Empezaremos con algo f'acil, comparando un coche con un - enrutador, o por decirlo de otra forma, comparando - kil'ometros con bits y bytes. A nosotros nos da lo mismo; son - unos n'umeros obtenidos en un espacio de tiempo. - - Asumamos que tenemos un dispositivo que transfiere bytes - desde y hacia la Internet. Este dispositivo tiene un - contador que empieza en 0 al encenderse y se incrementa con - cada byte transferido. Este contador tiene un valor m'aximo; - si ese valor se alcanza y se cuenta un byte m'as, el contador - vuelve a empezar desde cero. Esto es exactamente lo mismo - que pasa con muchos contadores, como el cuentakil'ometros del - coche. En muchas de las disertaciones sobre redes se habla - de bits por segundo, as'i que empezaremos por acostumbrarnos - a esto. Asumamos que un byte son 8 bits y empecemos a pensar - en bits y no en bytes. ,iEl contador, sin embargo, sigue - contando en bytes! En el mundo SNMP, la mayor'ia de los - contadores tienen una longitud de 32 bits. Esto significa - - - -2001-02-20 Last change: 1.0.33 3 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - que pueden contar desde 0 hasta 4294967295. Usaremos estos - valores en los ejemplos. El dispositivo, cuando le - preguntamos, retorna el valor actual del contador. Como - sabemos el tiempo transcurrido desde la 'ultima vez que le - preguntamos, sabemos cuantos bytes se han transferido `***en - promedio***' por segundo. Esto no es muy dif'icil de - calcular; primero en palabras, luego en operaciones: - - 1. Toma el valor actual del contador y r'estale el valor - anterior - - 2. Haz lo mismo con la fecha - - 3. Divide el resultado del paso (1) por el resultado del - paso (2). El resultado es la cantidad de bytes por - segundo. Si lo multiplicas por ocho obtienes la cantidad - de bits por segundo - - bps = (contador_actual - contador_anterior) / (fecha_actual - fecha_anterior) * 8 - - Para algunos ser'a de ayuda traducir esto a un ejemplo - automotor. No prueben estas velocidades en la pr'actica, y - si lo hacen, no me echen la culpa por los resultados. - - Usaremos las siguientes abreviaturas: - - M: metros - KM: kil'ometros (= 1000 metros). - H: horas - S: segundos - KM/H: kil'ometros por hora - M/S: metros por segundo - - Vas conduciendo un coche. A las 12:05, miras el contador en - el salpicadero y ves que el coche ha recorrido 12345 KM. A - las 12:10 vuelves a mirar otra vez, y dice 12357 KM. Quiere - decir, que has recorrido 12 KM en cinco minutos. Un - cient'ifico convertir'ia esto en metros por segundos; esto es - bastante parecido al problema de pasar de bytes transferidos - en 5 minutos a bits por segundo. - - Viajamos 12 kil'ometros, que son 12000 metros. Tardamos 5 - minutos, o sea 300 segundos. Nuestra velocidad es 12000M / - 300S igual a 40 M/S. - - Tambi'en podemos calcular la velocidad en KM/H: 12 veces 5 - minutos es una hora, as'i que multiplicando los 12 KM por 12 - obtenemos 144 KM/H. No intentes esto en casa, o por donde - vivo :-) - - Recuerda que estos n'umeros son tan s'olo promedios. No hay - forma de deducir, viendo s'olo los n'umeros, si fuiste a una - - - -2001-02-20 Last change: 1.0.33 4 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - velocidad constante. Hay un ejemplo m'as adelante en el - tutorial que explica esto. - - Espero que entiendas que no hay diferencia entre calcular la - velocidad en M/S o bps; s'olo la forma en que recogemos los - datos es distinta. Inclusive, la K de kilo en este caso es - exactamente la misma, ya que en redes k es 1000 - - Ahora vamos a crear una base de datos en la que guardar - todos estos interesantes valores. El m'etodo a usar para - arrancar el programa puede variar de un sistema de operaci'on - a otro, pero asumamos que lo puedes resolver tu mismo en - caso que se diferente en el sistema que usas. Aseg'urate de - no sobreescribir ning'un archivo en tu sistema al ejecutarlo - y escribe todo como una sola l'inea (tuve que partirlo para - que fuera legible), salt'andote todos los caracteres '\' - - rrdtool create test.rrd \ - --start 920804400 \ - DS:speed:COUNTER:600:U:U \ - RRA:AVERAGE:0.5:1:24 \ - RRA:AVERAGE:0.5:6:10 - - (o sea, escribe: `rrdtool create test.rrd --start 920804400 - DS ...') - - ''cc''ccQQQQuuuu''ee''ee hhhheeeemmmmoooossss ccccrrrreeeeaaaaddddoooo???? - - Hemos creado una base de datos en round robin llamada test - (test.rrd), que empieza desde el mediod'ia del d'ia en que - empec'e a escribir este documento (7 de marzo de 1999). En - ella se guarda una fuente de datos (DS), llamada "speed", - que se lee de un contador. En la misma base de datos se - guardan dos archivos en round robin (RRAs), uno promedia los - datos cada vez que se leen (o sea, no hay nada que - promediar), y mantiene 24 muestras (24 por 5 minutos = 2 - horas de muestras). El otro promedia 6 muestras (media - hora), y guarda 10 de estos promedios (o sea, 5 horas). Las - opciones restantes las veremos m'as adelante. - - RRDtool usa un formato de "fecha" especial que viene del - mundo de UNIX. Estas "fechas" son el n'umero de segundos que - han pasado desde el primero de enero de 1970, zona UTC. Este - n'umero de segundos se convierte luego en la fecha local, por - lo que varia seg'un la franja horaria. - - Lo m'as probable es que tu no vivas en la misma parte del - mundo que yo, por lo que tu franja horaria ser'a diferente. - En los ejemplos, cuando mencione horas, puede que no sean - las mismas para ti; esto no afecta mucho los resultados, - s'olo tienes que corregir las horas mientras lees. Por - ejemplo, las 12:05 para m'i son las 11:05 para los amigos en - - - -2001-02-20 Last change: 1.0.33 5 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - la Gran Breta~na. - - Ahora tenemos que llenar nuestra base de datos con valores. - Vamos a suponer que le'imos estos datos: - - 12:05 12345 KM - 12:10 12357 KM - 12:15 12363 KM - 12:20 12363 KM - 12:25 12363 KM - 12:30 12373 KM - 12:35 12383 KM - 12:40 12393 KM - 12:45 12399 KM - 12:50 12405 KM - 12:55 12411 KM - 13:00 12415 KM - 13:05 12420 KM - 13:10 12422 KM - 13:15 12423 KM - - Llenaremos la base de datos as'i: - - rrdtool update test.rrd 920804700:12345 920805000:12357 920805300:12363 - rrdtool update test.rrd 920805600:12363 920805900:12363 920806200:12373 - rrdtool update test.rrd 920806500:12383 920806800:12393 920807100:12399 - rrdtool update test.rrd 920807400:12405 920807700:12411 920808000:12415 - rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423 - - Lo que significa: actualiza nuestra base de datos test con - los siguientes valores: - - fecha 920804700, valor 12345 - fecha 920805000, valor 12357 - - etc'etera. - - Como ves, pueden introducirse m'as de un valor en la base de - datos por ejecuci'on del comando. Yo los agrupo de tres en - tres para hacerlo legible, pero en realidad el m'aximo - depende del sistema de operaci'on. - - Ahora podemos recuperar los datos usando ``rrdtool fetch'': - - rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200 - - Debes obtener esto como salida: - - speed - - - - - - -2001-02-20 Last change: 1.0.33 6 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - 920804400: NaN - 920804700: NaN - 920805000: 4.0000000000e-02 - 920805300: 2.0000000000e-02 - 920805600: 0.0000000000e+00 - 920805900: 0.0000000000e+00 - 920806200: 3.3333333333e-02 - 920806500: 3.3333333333e-02 - 920806800: 3.3333333333e-02 - 920807100: 2.0000000000e-02 - 920807400: 2.0000000000e-02 - 920807700: 2.0000000000e-02 - 920808000: 1.3333333333e-02 - 920808300: 1.6666666667e-02 - 920808600: 6.6666666667e-03 - 920808900: 3.3333333333e-03 - 920809200: NaN - - Si no, hay algo mal. Probablemente tu sistema de operaci'on - muestre ``NaN'' de otra forma; representa "Not a Number", o - sea "No es un n'umero". Si aparece ``U'' o ``UNKN'' o algo - parecido, es lo mismo. Si hay alguna otra diferencia, - probablemente te equivocaste al introducir alg'un P valor - (asumiendo que mi tutorial est'a bien, por supuesto :-). En - ese caso, borra la base de datos y prueba de nuevo. - - Lo que representa exactamente esta salida lo vamos m'as - adelante en el tutorial. - - HHHHoooorrrraaaa ddddeeee hhhhaaaacccceeeerrrr aaaallllgggguuuunnnnoooossss ggggrrrr''aa''aaffffiiiiccccoooossss - - Prueba este comando: - - rrdtool graph speed.gif \ - --start 920804400 --end 920808000 \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - LINE2:myspeed#FF0000 - - Este comando crea speed.gif, un gr'afico de los datos desde - las 12:00 hasta las 13:00. Contiene una definici'on de la - variable myspeed y define el color como rojo. Notar'as que el - gr'afico no comienza exactamente a las 12:00 sino a las - 12:05, y es porque no tenemos datos suficientes como para - calcular el promedio de velocidad antes de ese momento. Esto - s'olo ocurre en caso de que se pierdan alg'un muestreo, lo que - esperamos que no debe ocurrir muy a menudo. - - Si ha funcionado, ,ifelicitaciones!. Si no, revisa qu'e puede - estar mal. - - La definici'on de colores se construye a partir del rojo, - verde y azul. Especificas cuanto de cada uno de estos - - - -2001-02-20 Last change: 1.0.33 7 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - componentes vas a usar en hexadecimal: 00 significa "nada de - este color" y FF significa "este color a m'axima intensidad". - El "color" blanco es la mezcla del rojo, verde y azul a toda - intensidad: FFFFFF; el negro es la ausencia de todos los - colores: 000000. - - rojo #FF0000 - verde #00FF00 - azul #0000FF - violeta #FF00FF (mezcla de rojo y azul) - gris #555555 (un tercio de cada uno de los colores) - - El archivo GIF que acabas de crear puede verse con tu visor - de archivos de imagen favorito. Los navegadores lo mostrar'an - usando la URL - ``file://el/camino/de/directorios/hasta/speed.gif'' - - GGGGrrrr''aa''aaffffiiiiccccoooossss ccccoooonnnn uuuunnnn ppppooooccccoooo ddddeeee mmmmaaaatttteeeemmmm''aa''aattttiiiiccccaaaa - - Cuando veas la imagen, notar'as que el eje horizontal tiene - unas etiquetas marcando las 12:10, 12:20, 12:30, 12:40 y - 12:50. Los otros dos momentos (12:00 y 13:00) no se pueden - mostrar bien por falta de datos, as'i que el programa se los - salta. El eje vertical muestra el rango de los valores que - entramos. Introdujimos los kil'ometros y luego dividimos - entre 300 segundos, por lo que obtuvimos valores bastante - bajos. Para ser exactos, el primer valor, 12 (12357-12345), - dividido entre 300 da 0.04, lo que RRDtool muestra como - ``40m'', o sea ``40/1000''. ,iLa ``m''' no tiene nada que ver - con metros, kil'ometros o mil'imetros!. RRDtool no sabe nada - de unidades, el s'olo trabaja con n'umeros, no con metros. - - Donde nos equivocamos fue en que debimos medir en metros. - As'i, (12357000-12345000)/300 = 12000/300 = 40. - - Vamos a corregirlo. Podr'iamos recrear la base de datos con - los valores correctos, pero hay una forma mejor: ,ihaciendo - los c'alculos mientras creamos el archivo gif! - - rrdtool graph speed2.gif \ - --start 920804400 --end 920808000 \ - --vertical-label m/s \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - CDEF:realspeed=myspeed,1000,* \ - LINE2:realspeed#FF0000 - - Cuando veas esta imagen, notar'as que la ``m'' ha - desaparecido, y ahora tienes los resultados correctos. - Adem'as hemos a~nadido una etiqueta a la imagen. Apartando - esto, el archivo GIF es el mismo. - - - - - -2001-02-20 Last change: 1.0.33 8 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - Las operaciones est'an en la secci'on del CDEF y est'an - escritas en Notaci'on Polaca Inversa (Reverse Polish Notation - o ``RPN''). En palabras, dice: "toma la fuente de datos - myspeed y el numero 1000, y multipl'icalos". No te molestes - en meterte con RPN todav'ia, la veremos con m'as detalle m'as - adelante. Adem'as, puede que quieras leer mi tutorial sobre - los CDEF y el tutorial de Steve Rader sobre RPN, pero - primero terminemos con este. - - ,iUn momento! Si podemos multiplicar los valores por mil, - entonces, ,itambi'en deber'ia ser posible el mostrar la - velocidad en kil'ometros por hora usando los mismos datos! - - Para cambiar el valor que medimos en metros por segundo, - calculamos los metros por hora (valor * 3600) y dividimos - entre 1000 para sacar los kil'ometros por hora. Todo junto - hace valor * (3600/1000) == valor * 3.6. - - Como en nuestra base de datos cometimos un error guardando - los valores en kil'ometros, debemos compensar por ello, - multiplicando por 100, por lo que al aplicar esta correcci'on - nos queda valor * 3600. - - Ahora vamos a crear este gif, agre'andole un poco m'as de - magia... - - rrdtool graph speed3.gif \ - --start 920804400 --end 920808000 \ - --vertical-label km/h \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - "CDEF:kmh=myspeed,3600,*" \ - CDEF:fast=kmh,100,GT,kmh,0,IF \ - CDEF:good=kmh,100,GT,0,kmh,IF \ - HRULE:100#0000FF:"Maximum allowed" \ - AREA:good#00FF00:"Good speed" \ - AREA:fast#FF0000:"Too fast" - - Esto luce mucho mejor. La velocidad en KM/H, y adem'as - tenemos una l'inea extra mostrando la velocidad m'axima - permitida (en el camino por donde conduzco). Tambi'en le - cambie los colores de la velocidad, y ahora paso de ser una - l'inea a un 'area. - - Los c'alculos son m'as complejos ahora. Para calcular la - velocidad "aceptable": - - Verifica si la velocidad en kmh es mayor que 100 ( kmh,100 ) GT - Si es as'i, retorna 0, si no, retorna la velocidad ((( kmh,100 ) GT ), 0, kmh) IF - - Para calcular la parte de velocidad "excesiva": - - - - - -2001-02-20 Last change: 1.0.33 9 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - Verifica si la velocidad en kmh es mayor que 100 ( kmh,100 ) GT - Si es as'i, retorna la velocidad, si no, retorna 0 ((( kmh,100) GT ), kmh, 0) IF - - - MMMMaaaaggggiiiiaaaa ggggrrrr''aa''aaffffiiiiccccaaaa - - Me gusta creer que virtualmente no hay limites para lo que - RRDtool puede hacer con los datos. No voy a explicarlo en - detalle, pero mira este GIF: - - rrdtool graph speed4.gif \ - --start 920804400 --end 920808000 \ - --vertical-label km/h \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - "CDEF:kmh=myspeed,3600,*" \ - CDEF:fast=kmh,100,GT,100,0,IF \ - CDEF:over=kmh,100,GT,kmh,100,-,0,IF \ - CDEF:good=kmh,100,GT,0,kmh,IF \ - HRULE:100#0000FF:"Maximum allowed" \ - AREA:good#00FF00:"Good speed" \ - AREA:fast#550000:"Too fast" \ - STACK:over#FF0000:"Over speed" - - Vamos a crear una p'agina HTML simple para ver los tres - archivos GIF: - - Velocidad - Speed in meters per second -
- Speed in kilometers per hour -
- Traveled too fast? - - - Gu'ardalo como ``speed.html'' o algo parecido, y exam'inalo - con un navegador. - - Ahora, todo lo que tienes que hacer es medir los datos - regularmente y actualizar la base de datos. Cuando quieras - verlos, vuelve a crear los archivos GIF y aseg'urate que se - carguen de nuevo en tu navegador (Nota: presionar el bot'on - de "refrescar" puede no ser suficiente; en particular, - Netscape tiene un problema al respecto, por lo que - necesitaras darle al bot'on mientras presionas la tecla de - may'usculas. - - AAAAccccttttuuuuaaaalllliiiizzzzaaaacccciiiioooonnnneeeessss ddddeeee vvvveeeerrrrddddaaaadddd - - Ya hemos usado el comando ``update''; vimos que recibia uno - o m'as par'ametros en el formato: ``:''. Para - facilitarte las cosas, puedes obtener la fecha actual - colocando ``N'' en la fecha. Tambi'en podr'ias usar la funci'on - - - -2001-02-20 Last change: 1.0.33 10 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - ``time'' de Perl para obtenerla. El ejemplo m'as corto de - todo el tutorial :) - - perl -e 'print time, "\n" ' - - Ahora, la forma de poner a correr un programa a intervalos - regulares de tiempo depende del sistema de operaci'on. La - actualizaci'on, en pseudo-c'odigo, ser'ia: - - Toma el valor, col'ocalo en la variable "$speed" - rrdtool update speed.rrd N:$speed - - (Pero no lo hagas sobre nuestra base de datos de pruebas, - que a'un la vamos a usar en otros ejemplos. - - Eso es todo. Ejecutando este script cada 5 minutos, lo 'unico - que tienes que hacer para ver los gr'aficos actuales es - correr los ejemplos anteriores, que tambi'en puedes poner en - un script. Luego de correrlo, basta con cargar index.html - - UUUUnnnnaaaassss ppppaaaallllaaaabbbbrrrraaaassss ssssoooobbbbrrrreeee SSSSNNNNMMMMPPPP - - Me imagino que muy pocas personas ser'an capaces de obtener - en su ordenador datos reales de su coche cada 5 minutos; los - dem'as nos tendremos que conformar con alg'un otro contador. - Puedes, por ejemplo, medir la cantidad de p'aginas que ha - hecho una impresora, cuanto caf'e has hecho con la cafetera, - el medidor del consumo de electricidad, o cualquier otra - cosa. Cualquier contador incremental puede monitorizarse y - graficarse con lo que has aprendido hasta ahora. M'as - adelante, veremos tambi'en como monitorizar otro tipo de - valores, como la temperatura. La mayor'ia usaremos alguna vez - un contador que lleve la cuenta de cuantos octetos (bytes) a - transferido un dispositivo de red, as'i que vamos a ver como - hacer esto. Empezaremos describiendo como recoger los datos. - Hay quien dir'a que hay herramientas que pueden recoger estos - datos por ti. ,iEs cierto! Pero, creo que es importante darse - cuenta de que no son necesarias. Cuando tienes que - determinar porqu'e algo no funciona, necesitas saber c'omo - funciona en primer lugar. - - Una herramienta que mencionamos brevemente al principio del - documento es SNMP. SNMP es una forma de comunicarse con tus - equipos. La herramienta particular que voy a usar m'as - adelante se llama ``snmpget'', y funciona as'i: - - snmpget dispositivo clave OID - - En "dispositivo" colocas el nombre o direcci'on IP del equipo - a monitorizar. En clave, colocas la "cadena de caracteres de - la comunidad de lectura", como se le denomina en el mundillo - SNMP. Muchos dispositivos aceptar'an "public" como cadena - - - -2001-02-20 Last change: 1.0.33 11 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - por defecto, pero por razones de privacidad y seguridad esta - clave puede estar deshabilitada. Consulta la documentaci'on - correspondiente al dispositivo o programa. - - Luego esta el tercer par'ametro, llamado OID (Object - IDentifier, identificador de objeto). - - Al principio, cuando empiezas a aprender sobre SNMP, parece - muy confuso. No lo es tanto cuando le hechas una ojeada a - los ``MIB'' (Manager Information Base, o Base de Informaci'on - Administrativa). Es un 'arbol invertido que describe los - datos, empezando en un nodo ra'iz desde el que parten varias - ramas. Cada rama termina en otro nodo y puede abrir nuevas - sub-ramas. Cada rama tiene un nombre, y forman un camino que - nos lleva hasta el fondo del 'arbol. En este ejemplo, las - ramas que vamos a tomar se llaman iso, org, dod, internet, - mgmt y mib-2. Tambi'en pueden accederse por su n'umero - relativo; en este caso, estos n'umeros son 1, 3, 6, 1, 2 y 1: - - iso.org.dod.internet.mgmt.mib-2 (1.3.6.1.2.1) - - En algunos programas se usa un punto al iniciar el OID. Esto - puede ser confuso; no hay ning'un punto inicial en la - especificaci'on de los OID... sin embargo, algunos programas - usan por defecto un prefijo inicial. Para indicar la - diferencia entre los OID abreviados (o sea, a los que se le - pondr'a el prefijo inicial) y los completos, estos programas - necesitan que los OID completos empiecen por un punto. Para - empeorar las cosas, se usan varios prefijos distintos... - - De acuerdo, sigamos con el inicio de nuestro OID: ten'iamos - 1.3.6.1.2.1 . Ahora, nos interesa la rama ``interfaces'', - que tiene el n'umero dos (o sea, 1.3.6.1.2.1.2, o - 1.3.6.1.2.1.interfaces). - - Lo primero es hacernos con un programa SNMP. Busca alg'un - paquete pre-compilado para tu plataforma, si no, puedes - buscar el c'odigo fuente y compilarlo tu mismo. En Internet - encontrar'as muchos programas, b'uscalos con un motor de - b'usqueda o como prefieras. Mi sugerencia es que busques el - paquete CMU-SNMP, que esta bastante difundido. - - Asumamos que ya tienes el programa. Empecemos por tomar - ciertos datos que est'an disponibles en la mayor'ia de los - sistemas. Recuerda: hay un nombre abreviado para la parte - del 'arbol que m'as nos interesa. - - Voy a usar la versi'on corta, ya que creo que este documento - ya es lo bastante largo. Si no te funciona, a~n'adele el - prefijo .1.3.6.1.2.1 y prueba de nuevo. O prueba leyendo el - manual; s'altate las partes que no entiendas a'un, y busca las - secciones que hablan de como arrancar y usar el programa. - - - -2001-02-20 Last change: 1.0.33 12 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - snmpget myrouter public system.sysdescr.0 - - El dispositivo deber'a contestarte con una descripci'on, - probablemente vac'ia, de s'i mismo. Si no consigues una - respuesta v'alida, prueba con otra "clave" u otro - dispositivo; no podemos seguir hasta tener un resultado. - - snmpget myrouter public interfaces.ifnumber.0 - - Con suerte, usando este comando obtendr'as un n'umero como - resultado: el n'umero de interfaces del dispositivo. Si es - as'i, seguiremos adelante con otro programa, llamado - "snmpwalk" - - snmpwalk myrouter public interfaces.iftable.ifentry.ifdescr - - Si obtienes una lista de interfaces, ya casi hemos llegado. - Aqu'i tienes un ejemplo del resultado: - - [user at host /home/alex]$ snmpwalk cisco public 2.2.1.2 - interfaces.ifTable.ifEntry.ifDescr.1 = "BRI0: B-Channel 1" - interfaces.ifTable.ifEntry.ifDescr.2 = "BRI0: B-Channel 2" - interfaces.ifTable.ifEntry.ifDescr.3 = "BRI0" Hex: 42 52 49 30 - interfaces.ifTable.ifEntry.ifDescr.4 = "Ethernet0" - interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0" - - En este equipo CISCO, quiero monitorizar la interfaz - "Ethernet0". Viendo que es la cuarta, pruebo con: - - [user at host /home/alex]$ snmpget cisco public 2.2.1.10.4 2.2.1.16.4 - - interfaces.ifTable.ifEntry.ifInOctets.4 = 2290729126 - interfaces.ifTable.ifEntry.ifOutOctets.4 = 1256486519 - - Entonces, tengo 2 OIDs que monitorizar, y son (en el formato - largo, ahora): - - 1.3.6.1.2.1.2.2.1.10 - - y - - 1.3.6.1.2.1.2.2.1.16 - - , ambas con el n'umero de interfaz de 4 - - No te enga~nes, esto no lo logre yo al primer intento. Me - tom'o un tiempo entender lo que significaban todos estos - n'umeros; ayuda cuando se traducen en un texto descriptivo... - por lo menos, cuando oigas hablar de MIBs y OIDs, ahora - sabr'as de qu'e se trata. No te olvides del n'umero de interfaz - (0 si el valor no depende de una interfaz), y prueba con - snmpwalk si no obtienes una respuesta clara con snmpget. - - - -2001-02-20 Last change: 1.0.33 13 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - Si entendiste todo esto, y obtienes resultados del - dispositivo con el que est'as probando, sigue adelante con el - tutorial. Si no, vuelve a leer esta secci'on; es importante - - UUUUnnnn eeeejjjjeeeemmmmpppplllloooo rrrreeeeaaaallll - - Ok, empecemos con la diversi'on. Primero, crea una base de - datos nueva. Vamos a guardar en ella 2 contadores, "input" y - "ouput". Los datos los vamos a guardar en archivos que los - promediar'an, tomando grupos de 1, 6, 24 o 288 muestras. - Tambi'en archivaremos los valores m'aximos. Lo explicaremos - con m'as detalle despu'es. El intervalo de tiempo entre las - muestras ser'a de 300 segundos (5 minutos). - - 1 muestra "promediada" sigue siendo 1 muestra cada 5 minutos - 6 muestras promediadas son un promedio de cada 30 minutos - 24 muestras promediadas son un promedio de cada 2 horas - 288 muestras promediadas son un promedio de cada d'ia - - Vamos a tratar de ser compatibles con MRTG, que guarda m'as o - menos esta cantidad de datos: - - 600 muestras de 5 minutos: 2 d'ias y 2 horas - 600 promedios de 30 minutos: 12.5 d'ias - 600 promedios de 2 horas: 50 d'ias - 600 promedios de 1 d'ia: 732 d'ias - - Uniendo todos estos rangos tenemos que en total guardamos - datos de unos 797 d'ias. RRDtool guarda los datos de una - forma distinta a MRTG; no empieza el archivo "semanal" donde - acaba el "diario", sino que ambos archivos contienen la - informaci'on m'as reciente, ,ipor lo que con RRDtool archivamos - m'as datos que con MRTG! - - Necesitaremos: - - 600 muestras de 5 minutos (2 d'ias y 2 horas) - 700 entradas de 30 minutos (2 d'ias y 2 horas, m'as 12.5 d'ias) - 775 entradas de 2 horas (lo anterior + 50 d'ias) - 797 entradas de 1 d'ia (lo anterior + 732 d'ias, redondeando) - - rrdtool create myrouter.rrd \ - DS:input:COUNTER:600:U:U \ - DS:output:COUNTER:600:U:U \ - RRA:AVERAGE:0.5:1:600 \ - RRA:AVERAGE:0.5:6:700 \ - RRA:AVERAGE:0.5:24:775 \ - RRA:AVERAGE:0.5:288:797 \ - RRA:MAX:0.5:1:600 \ - RRA:MAX:0.5:6:700 \ - RRA:MAX:0.5:24:775 \ - RRA:MAX:0.5:288:797 - - - -2001-02-20 Last change: 1.0.33 14 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - Lo siguiente es recoger los datos y guardarlos, como en el - ejemplo siguiente. Esta parcialmente en pseudo-c'odigo, por - lo que tendr'as que buscar exactamente como hacerlo funcionar - en tu sistema operativo. - - mientras no sea el fin del universo - hacer - tomar el resultado de - snmpget router community 2.2.1.10.4 - en la variable $in - tomar el resultado de - snmpget router community 2.2.1.16.4 - en la variable $out - rrdtool update myrouter.rrd N:$in:$out - esperar 5 minutos - hecho - - Luego, tras recoger datos por un d'ia, crea una imagen, - usando: - - rrdtool graph myrouter-day.gif --start -86400 \ - DEF:inoctets=myrouter.rrd:input:AVERAGE \ - DEF:outoctets=myrouter.rrd:output:AVERAGE \ - AREA:inoctets#00FF00:"In traffic" \ - LINE1:outoctets#0000FF:"Out traffic" - - Este comando debe producir un gr'afico del tr'afico del d'ia. - Un d'ia son 24 horas, de 60 minutos, de 60 segundos: - 24*60*60=86400, o sea que empezamos a "ahora" menos 86400 - segundos. Definimos (con los DEFs) "inoctets" y "outoctets" - como los valores promedio de la base da datos myrouter.rrd, - dibujando un 'area para el tr'afico de entrada y una l'inea - para el tr'afico de salida. - - Mira la imagen y sigue recogiendo datos por unos cuantos - d'ias. Si lo deseas, puedes probar con los ejemplos de la - base de datos de pruebas y ver si puedes hacer trabajar las - diversas opciones y operaciones. - - Sugerencia: - - Haz un gr'afico que muestre el tr'afico en bytes por segundo y - en bits por segundo. Colorea el tr'afico Ethernet rojo si - sobrepasa los cuatro megabits por segundo. - - FFFFuuuunnnncccciiiioooonnnneeeessss ddddeeee ccccoooonnnnssssoooolllliiiiddddaaaacccciiii''oo''oonnnn - - Unos cuantos p'arrafos atr'as habl'abamos sobre la posibilidad - de guardar el valor m'aximo en vez del promedio. - Profundicemos un poco en este tema. - - - - - -2001-02-20 Last change: 1.0.33 15 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - Recordemos lo que habl'abamos sobre la velocidad de un coche. - Supongamos que manejamos a 144 KM/H durante 5 minutos y - luego nos detiene la polic'ia durante unos 25 minutos. Al - finalizar el rega~no, tomamos nuestro port'atil y creamos una - imagen desde nuestra base de datos. Si visualizamos la - segunda RRA que creamos, tendremos el promedio de 6 - muestreos. Las velocidades registradas serian - 144+0+0+0+0+0=144, lo que en promedio nos da una velocidad - de 24 KM/H., con lo que nos igual nos pondr'ian una multa, - s'olo que no por exceso de velocidad. - - Obviamente, en este caso, no deber'iamos tomar en cuenta los - promedios. Estos son 'utiles en varios casos. Por ejemplo, si - queremos ver cuantos KM hemos viajado, este ser'ia el gr'afico - m'as indicado. Pero por otro lado, para ver la velocidad ha - la que hemos viajado, los valores m'aximos son m'as adecuados. - - Es lo mismo con los datos que recogemos. Si quieres saber la - cantidad total, mira los promedios. Si quieres ver la - velocidad, mira los m'aximos. Con el tiempo, ambas cantidades - se separan cada vez m'as. En la 'ultima base de datos que - creamos, hab'ia dos archivos que guardaban los datos de cada - d'ia. El archivo que guarda los promedios mostrar'a valores - bajos, mientras que el de m'aximos mostrar'a valores m'as - altos. Para mi coche, mostrar'ia valores promedio de 96/24=4 - KM/H (viajo unos 96 kil'ometros por d'ia), y m'aximos de 1220 - KM/H (la velocidad m'axima que alcanzo cada d'ia) - - Como ves, una gran diferencia. No mires el segundo gr'afico - para estimar la distancia que recorro, ni al primero para - estimar la velocidad a la que voy. Esto s'olo funciona con - muestras muy cercanas, pero no si sacas promedios. - - Algunas veces, hago un viaje largo. Si hago un recorrido por - Europa, conduciendo por unas 12 horas, el primer gr'afico - subir'a a unos 60 KM/H. El segundo mostrar'a unos 180 KM/H. - Esto significa que recorr'i unos 60 KM/H por 24 horas = 1440 - KM. Muestra adem'as que fui a una velocidad promedio mayor a - la normal y a un m'aximo de 180 KM/H, ,ino que fui 8 horas a - una velocidad fija de 180 KM/H! Este es un ejemplo real: - tengo que seguir la corriente en las autopistas de Alemania, - detenerme por gasolina y caf'e de vez en cuando, manejar m'as - lentamente por Austria y Holanda, e ir con cuidado en las - monta~nas y las villas. Si vi'eramos los gr'aficos de los - promedios de cada 5 minutos, la imagen ser'ia completamente - distinta; ver'iamos los mismos valores de promedio y de - m'axima. (suponiendo que las mediciones fueran cada 300 - segundos). Se podr'ia ver cuando par'e, cuando iba en primera, - cuando iba por las autopistas, etc. La granularidad de los - datos es m'as alta, por lo que se tiene m'as informaci'on. Sin - embargo, esto nos lleva unas 12 muestras por hora, o 288 al - d'ia, lo cual es mucho para guardar por un periodo de tiempo - - - -2001-02-20 Last change: 1.0.33 16 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - largo. Por lo tanto, sacamos el promedio, guardando - eventualmente un solo valor por d'ia. Con este 'unico valor, - no podemos ver mucho. - - Es importante comprender lo que expuesto en estos 'ultimos - p'arrafos. Unos ejes y unas l'ineas no tienen ning'un valor - por si mismos; hay que saber que representan e interpretar - correctamente los valores obtenidos. Sean cuales sean los - datos, esto siempre ser'a cierto. - - El mayor error que puedes cometer es usar los datos - recogidos para algo para lo cual no sirven. En ese caso, - seria hasta mejor no tener gr'afico alguno. - - RRRReeeeppppaaaasssseeeemmmmoooossss lllloooo qqqquuuueeee ssssaaaabbbbeeeemmmmoooossss - - Ahora ya sabes como crear una base de datos. Puedes guardar - valores en ella, extraerlos creando un gr'afico, hacer - operaciones matem'aticas con ellos desde la base de datos y - visualizar los resultados de estas en vez de los datos - originales. Vimos la diferencia entre los promedios y los - m'aximos y cuando debemos usar cada uno (o al menos una idea - de ello) - - RRDtool puede hacer m'as de lo que hemos visto hasta ahora. - Pero antes de continuar, te recomiendo que releas el texto - desde el principio y pruebes a hacerle algunas - modificaciones a los ejemplos. Aseg'urate de entenderlo - todo. El esfuerzo valdr'a la pena, y te ayudar'a, no s'olo con - el resto del documento, sino en tu trabajo diario de - monitorizaci'on, mucho despu'es de terminar con esta - introducci'on. - - TTTTiiiippppoooossss ddddeeee ffffuuuueeeennnntttteeeessss ddddeeee ddddaaaattttoooossss - - De acuerdo, quieres continuar. Bienvenido de vuelta otra vez - y prep'arate; voy a ir m'as r'apido con los ejemplos y - explicaciones. - - Ya vimos que, para ver el cambio de un contador a lo largo - del tiempo, tenemos que tomar dos n'umeros y dividir la - diferencia entre el tiempo transcurrido entre las - mediciones. Para los ejemplos que hemos visto es lo l'ogico, - pero hay otras posibilidades. Por ejemplo, mi enrutador me - puede dar la temperatura actual en tres puntos distintos, la - entrada de aire, el llamado "punto caliente" y la salida de - ventilaci'on. Estos valores no son contadores; si tomo los - valores de dos muestreos y lo divido entre 300 segundos, - obtendr'e el cambio de temperatura por segundo. ,iEsperemos - que sea cero, o tendr'iamos un incendio en el cuarto de - ordenadores! :) - - - - -2001-02-20 Last change: 1.0.33 17 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - Entonces, 'cque hacemos? Podemos decirle a RRDtool que guarde - los valores tal como los medimos (esto no es exactamente - as'i, pero se aproxima bastante a la verdad). As'i, los - gr'aficos se ver'an mucho mejor. Puedo ver cuando el enrutador - est'a trabajando m'as (en serio, funciona; como usa m'as - electricidad, genera m'as calor y sube la temperatura), puedo - saber cuando me he dejado las puertas abiertas (el cuarto de - ordenadores tiene aire acondicionado; con las puertas - abiertas el aire caliente del resto del edificion entra y - sube la temperatura en la entrada de aire del enrutador), - etc. Antes usamos un tipo de datos de "contador", ahora - usaremos un tipo de datos diferente, con un nombre - diferente, GAUGE. Tenemos otros tipos: - - - COUNTER este ya lo conocemos - - GAUGE este acabamos de verlo - - DERIVE - - ABSOLUTE - - Los otros dos tipos son DERIVE y ABSOLUTE. ABSOLUTE puede - usarse igual que COUNTER, con una diferencia; RRDtool asume - que el contador se reinicia cada vez que se lee. O en otras - palabras; el delta entre los valores no hay que calcularlo, - mientras que con COUNTER RRDtool tiene que sacar 'el la - cuenta. Por ejemplo, nuestro primer ejemplo, (12345, 12357, - 12363, 12363), ser'ia (unknown, 12, 6, 0) en ABSOLUTE. El - otro tipo, DERIVE, es como COUNTER, pero al contrario de - COUNTER, este valor tambi'en puede decrecer, por lo que puede - tenerse un delta negativo. - - Vamos a probarlos todos: - - - - - - - - - - - - - - - - - - - - - - - - -2001-02-20 Last change: 1.0.33 18 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - rrdtool create all.rrd --start 978300900 \ - DS:a:COUNTER:600:U:U \ - DS:b:GAUGE:600:U:U \ - DS:c:DERIVE:600:U:U \ - DS:d:ABSOLUTE:600:U:U \ - RRA:AVERAGE:0.5:1:10 - rrdtool update all.rrd \ - 978301200:300:1:600:300 \ - 978301500:600:3:1200:600 \ - 978301800:900:5:1800:900 \ - 978302100:1200:3:2400:1200 \ - 978302400:1500:1:2400:1500 \ - 978302700:1800:2:1800:1800 \ - 978303000:2100:4:0:2100 \ - 978303300:2400:6:600:2400 \ - 978303600:2700:4:600:2700 \ - 978303900:3000:2:1200:3000 - rrdtool graph all1.gif -s 978300600 -e 978304200 -h 400 \ - DEF:linea=all.rrd:a:AVERAGE LINE3:linea#FF0000:"Line A" \ - DEF:lineb=all.rrd:b:AVERAGE LINE3:lineb#00FF00:"Line B" \ - DEF:linec=all.rrd:c:AVERAGE LINE3:linec#0000FF:"Line C" \ - DEF:lined=all.rrd:d:AVERAGE LINE3:lined#000000:"Line D" - - - RRRRRRRRDDDDttttoooooooollll bbbbaaaajjjjoooo eeeellll mmmmiiiiccccrrrroooossssccccooooppppiiiioooo - - +o La l'inea A es un contador, por lo que debe incrementarse - continuamente y RRDtool tiene que calcular las - diferencias. Adem'as RRDtool tiene que dividir la - diferencia entre el tiempo transcurrido. Esto deber'ia - terminar con una l'inea recta en 1 (los deltas son 300, y - los intervalos son de 300) - - +o La l'inea B es de tipo GAUGE. Estos son los valores - "reales", as'i que el gr'afico debe mostrar lo mismo que - los valores que introducimos: una especie de onda - - +o La l'inea C es de tipo DERIVE. Es un contador, y puede - decrecer. Va entre 2400 y 0, con 1800 en el medio. - - +o La l'inea D es de tipo ABSOLUTE. Esto es, es un contador - pero no hay que calcular las diferencias. Los n'umeros - son iguales a la l'inea A, y espero que puedas ver la - diferencia en los gr'aficos. - - Esto equivale a los valores siguientes, empezando a las - 23:10 y terminando a las 00:10 (las U significan - desconocido). - - - - - - - -2001-02-20 Last change: 1.0.33 19 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - - L'inea A: u u 1 1 1 1 1 1 1 1 1 u - - L'inea B: u 1 3 5 3 1 2 4 6 4 2 u - - L'inea C: u u 2 2 2 0 -2 -6 2 0 2 u - - L'inea D: u 1 2 3 4 5 6 7 8 9 10 u - - Si tu archivo GIF muestra todo esto, has entrado los datos - correctamente, tu programa RRDtool est'a funcionando bien, el - visor de gr'aficos no te enga~na y hemos entrado en el 2000 - sin problemas :) Puedes probar el mismo ejemplo cuatro - veces, una por cada l'inea. - - Revisemos los datos otra vez: - - +o L'inea A: 300, 600, 900 , etc. La diferencia del - contador es siempre 300, igual que el intervalo de - tiempo transcurrido entre mediciones. Por lo tanto, el - promedio siempre es 1. Pero, 'cpor qu'e el primer punto - tiene un valor de "desconocido"? 'cAcaso no era conocido - el valor que pusimos en la base de datos? ,iSi! Pero no - ten'iamos un valor inicial para calcular la diferencia. - Ser'ia un error asumir que el contador empezaba en 0, as'i - que no conocemos el valor de la diferencia - - +o L'inea B: No hay nada que calcular, los valores son los - mismos que se introdujeron en la base de datos. - - +o L'inea C: De nuevo, no conocemos el valor inicial antes - de la primera medici'on, as'i que se aplica el mismo - razonamiento que para la l'inea A. En este caso las - diferencias no son constantes, as'i que la l'inea no es - recta. Si hubi'esemos puesto los mismos valores que en la - l'inea A, el gr'afico ser'ia el mismo. Al contrario que - COUNTER, el valor puede decrecer, y espero mostrarte m'as - adelante el por que de la diferencia entre ambos tipos. - - +o L'inea D: En este caso, el dispositivo nos da las - diferencias por s'i mismo. Por lo tanto, conocemos la - diferencia inicial, y podemos graficarla. Tenemos los - mismos valores que en la l'inea A, pero su significado es - distinto, por lo que el gr'afico tambi'en lo es. En este - caso, las diferencias se incrementan en 300 cada vez, - mientras que el intervalo de tiempo permanece constante - en 300 segundos, por lo que la divisi'on nos da - resultados cada vez mayores. - - RRRReeeeiiiinnnniiiicccciiiiaaaalllliiiizzzzaaaacccciiii''oo''oonnnn ddddeeee lllloooossss ccccoooonnnnttttaaaaddddoooorrrreeeessss - - Todav'ia nos quedan algunas cosas por ver. Nos quedan algunas - opciones importantes por cubrir, y aun no hemos hablado de - la reinicializaci'on de contadores. Empecemos por ah'i: - Estamos en nuestro coche, vemos el contador y muestra - 999987. Andamos unos 20 KM, as'i que el contador debe subir a - - - -2001-02-20 Last change: 1.0.33 20 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - 1000007. Desafortunadamente, el contador s'olo tiene 6 - d'igitos, as'i que en realidad nos muestra 000007. Si - estuvi'eramos guardando los valores en un tipo DERIVE, esto - significar'ia que el contador retrocedi'o unos 999980 KM. Por - supuesto esto no es cierto, por lo que necesitamos alguna - protecci'on contra estos casos. Esta protecci'on s'olo la - tenemos para el tipo COUNTER, el cual de todas formas era el - que ten'iamos que haber usado para este tipo de contador. - 'cC'omo funciona? Los valores tipo COUNTER no deben decrecer - nunca, ,ipor lo que RRDtool asume en ese caso que el contador - se ha reinicializado! Si la diferencia es negativa, esto se - compensa sumando el valor m'aximo del contador + 1. Para - nuestro coche, tendr'iamos: - - Delta = 7 - 999987 = -999980 (en vez de 1000007-999987=20) - - Delta real= -999980 + 999999 + 1 = 20 - - Al momento de escribir este documento, RRDtool maneja - contadores de 32 o 64 bits de tama~no. Estos contadores - pueden manejar los siguientes valores: - - - 32 bits: 0 .. 4294967295 - - 64 bits: 0 .. 18446744073709551615 - - Si estos valores te parecen raros, podemos verlos en formato - hexadecimal: - - - 32 bits: 0 .. FFFFFFFF - - 64 bits: 0 .. FFFFFFFFFFFFFFFF - - RRDtool maneja ambos contadores de la misma manera. Si - ocurre un desbordamiento y la diferencia es negativa, - RRDtool le suma primero el m'aximo del contador "menor" (32 - bits) + 1 a la diferencia. Si a'un as'i la diferencia es - negativa, entonces el contador reinicializado era mayor (64 - bits), por lo que se le suma el valor m'aximo del contador - "largo" + 1 y se le resta el m'aximo del contador "peque~no" - que sumamos err'oneamente. Hay un problema con esto: - supongamos que un contador largo se ha reinicializado al - sum'arsele una diferencia muy grande; entonces es posible que - al a~nadir el valor m'aximo del contador peque~no la diferencia - nos d'e positivo. En este caso poco probable, los valores - resultantes no serian correctos. Para que ocurra esto, el - incremento tiene que ser casi tan grande como el valor - m'aximo del contador, por lo que de ocurrir es muy probable - que halla varios problemas m'as en la configuraci'on y no - merezca la pena preocuparse s'olo por este. A'un as'i, he - incluido un ejemplo de este caso para que lo puedas juzgar - por ti mismo. - - - - - -2001-02-20 Last change: 1.0.33 21 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - A continuaci'on, unos ejemplos de reinicializaci'on de los - contadores. Prueba de hacer los c'alculos por ti mismo, o - acepta mis resultados si tu calculadora no puede con los - n'umeros :) - - N'umeros de correcci'on: - - - 32 bits: (4294967295+1) = 4294967296 - - 64 bits: (18446744073709551615+1)-correction1 = 18446744069414584320 - - Antes: 4294967200 - Incremento: 100 - Deber'ia ser: 4294967300 - Pero es: 4 - Diferencia: -4294967196 - Correcci'on #1: -4294967196 + 4294967296 = 100 - - Antes: 18446744073709551000 - Incremento: 800 - Deber'ia ser: 18446744073709551800 - Pero es: 184 - Diferencia: -18446744073709550816 - Correcci'on #1: -18446744073709550816 +4294967296 = -18446744069414583520 - Correcci'on #2: -18446744069414583520 +18446744069414584320 = 800 - - Antes: 18446744073709551615 ( valor m'aximo ) - Incremento: 18446744069414584320 ( incremento absurdo, - Deber'ia ser: 36893488143124135935 m'inimo para que - Pero es: 18446744069414584319 funcione el ejemplo) - Diferencia: -4294967296 - Correcci'on #1: -4294967296 + 4294967296 = 0 (positivo, - por tanto no se hace - la segunda correcci'on) - - Antes: 18446744073709551615 ( valor m'aximo ) - Incremento: 18446744069414584319 - Deber'ia ser: 36893488143124135934 - Pero es: 18446744069414584318 - Diferencia: -4294967297 - Correcci'on #1: -4294967297 +4294967296 = -1 - Correcci'on #2: -1 +18446744069414584320 = 18446744069414584319 - - Como puede verse en los 'ultimos ejemplos, necesitas unos - valores bastante extra~nos para hacer que RRDtool falle - (asumiendo que no tenga ning'un error el programa, por - supuesto), as'i que esto no deber'ia ocurrir. Sin embargo, - SNMP o cualquier otro m'etodo que uses de recogida de datos - puede tambi'en reportar alg'un valor err'oneo ocasionalmente. - No podemos prevenir todos los errores, pero podemos tomar - algunas medidas. El comando "create" de RRDtool tiene dos - par'ametros especialmente para esto, que definen los valores - m'inimo y m'aximo permitidos. Hasta ahora hemos usado "U", - - - -2001-02-20 Last change: 1.0.33 22 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - - - "desconocido". Si le pasas valores para uno o ambos - par'ametros y RRDtool recibe un valor fuera de esos l'imites, - los ignorar'a. Para un term'ometro en grados Celsius, el - m'inimo absoluto es -273. Para mi enrutador, puedo asumir que - ese m'inimo es mucho mayor, digamos que 10. La temperatura - m'axima la pondr'ia en unos 80 grados; m'as alto y el aparato - no funcionar'ia. Para mi coche, nunca esperar'ia obtener - valores negativos, y tampoco esperar'ia valores mayores a - 230. Cualquier otra cosa ser'ia un error. Pero recuerda, lo - contrario no es cierto: si los valores pasan este examen no - quiere decir que sean los correctos. Siempre examina bien el - gr'afico si los valores parecen extra~nos. - - RRRReeeemmmmuuuueeeessssttttrrrreeeeoooo ddddeeee lllloooossss ddddaaaattttoooossss - - Hay una funcionalidad importante de RRDtool que no hemos - explicado todav'ia: es virtualmente imposible recoger los - datos y pasarselos a RRDtool a intervalos exactos de tiempo. - Por tanto, RRDtool interpola los datos a los intervalos - exactos. Si no sabes que significa esto o como se hace, he - aqu'i la ayuda que necesitas: - - Supongamos un contador se incremente exactamente en 1 cada - segundo. Queremos medirlo cada 300 segundos, por lo que - deber'iamos tener valores separados exactamente en 300. Sin - embargo, por varias circunstancias llegamos unos segundos - tarde y el intervalo es 303. La diferencia ser'a por tanto - 303. Obviamente, RRDtool no debe colocar 303 en la base de - datos y dar as'i la impresi'on de que el contador se - increment'o 303 en 300 segundos. Aqu'i es donde RRDtool - interpola: alter'a el valor 303 al valor que tendr'ia 3 - segundos antes y guarda 300 en 300 segundos. Digamos que la - pr'oxima vez llegamos justo a tiempo; por tanto, el intervalo - actual es 297 segundos, por lo que el contador deber'ia ser - 297. De nuevo, RRDtool altera el valor y guarda 300, como - debe ser. - - en RRD en realidad - tiempo+000: 0 delta="U" tiempo+000: 0 delta="U" - tiempo+300: 300 delta=300 tiempo+300: 300 delta=300 - tiempo+600: 600 delta=300 tiempo+603: 603 delta=303 - tiempo+900: 900 delta=300 tiempo+900: 900 delta=297 - - Creemos dos bases de datos id'enticas. He escogido el rango - de tiempo entre 920805000 y 920805900. - - rrdtool create seconds1.rrd \ - --start 920804700 \ - DS:seconds:COUNTER:600:U:U \ - RRA:AVERAGE:0.5:1:24 - - - - - -2001-02-20 Last change: 1.0.33 23 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - +NNNNAAAAMMMMEEEE + rrdtutorial - Tutorial sobre RRDtool por Alex van den + Bogaerdt (Traducido al castellano por Jes'us Couto Fandi~no) - para Unix: cp seconds1.rrd seconds2.rrd - para DOS: copy seconds1.rrd seconds2.rrd - para VMS: y yo que s'e :) +DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN //// DDDDEEEESSSSCCCCRRRRIIIIPPPPCCCCIIII''OO''OONNNN + RRDtool es un programa escrito por Tobias Oetiker con la + colaboraci'on de muchas personas en diversas partes del + mundo. Alex van den Bogaerdt escribi'o este documento para + ayudarte a entender que es RRDtool y que es lo que puede + hacer por ti. + + La documentaci'on que viene con RRDtool puede ser demasiado + t'ecnica para algunos. Este tutorial existe para ayudarte a + entender las funciones b'asicas de RRdtool. Debe servirte + de preparaci'on para leer la documentaci'on, y adem'as + explica algunas ideas generales sobre estad'istica, con un + enfoque particular hacia las redes. - rrdtool update seconds1.rrd \ - 920805000:000 920805300:300 920805600:600 920805900:900 - rrdtool update seconds2.rrd \ - 920805000:000 920805300:300 920805603:603 920805900:900 +TTTTUUUUTTTTOOOORRRRIIIIAAAALLLL + IIIImmmmppppoooorrrrttttaaaannnntttteeee - rrdtool graph seconds1.gif \ - --start 920804700 --end 920806200 \ - --height 200 \ - --upper-limit 1.05 --lower-limit 0.95 --rigid \ - DEF:seconds=seconds1.rrd:seconds:AVERAGE \ - CDEF:unknown=seconds,UN \ - LINE2:seconds#0000FF \ - AREA:unknown#FF0000 - rrdtool graph seconds2.gif \ - --start 920804700 --end 920806200 \ - --height 200 \ - --upper-limit 1.05 --lower-limit 0.95 --rigid \ - DEF:seconds=seconds2.rrd:seconds:AVERAGE \ - CDEF:unknown=seconds,UN \ - LINE2:seconds#0000FF \ - AREA:unknown#FF0000 + ,iPor favor, no te adelantes en la lectura de este docu- + mento! Esta primera parte explica los fundamentos b'asicos. + Puede ser aburrida, pero si te saltas los fundamentos, los + ejemplos no te van a tener mucho sentido. + + ''cc''ccQQQQuuuu''ee''ee eeeessss RRRRRRRRDDDDttttoooooooollll???? + + RRDtool significa "herramienta de bases de datos en round + robin". "Round robin" es una t'ecnica que implica un + n'umero fijo de datos, y un apuntador al elemento m'as + reciente. Piensa en un circulo con unos cuantos puntos + dibujados alrededor del borde; estos puntos son los + lugares donde se pueden guardar los datos. Dibuja ahora + una flecha desde el centro del c'irculo a uno de los pun- + tos; este es el apuntador. Cuando se lee o escribe el + dato actualmente apuntado, la flecha se mueve al pr'oximo + elemento. Como estamos en un c'irculo, no hay ni principio + ni fin; siempre puedes seguir, eternamente. Al cabo de un + tiempo ya se habr'an usado todas las posiciones disponibles + y el proceso empieza a reutilizar las antiguas. De esta + forma, la base de datos no crece en tama~no y, por lo + tanto, no requiere ning'un mantenimiento. RRDtool trabaja + con estas bases de datos en "round-robin", guardando y + recuperando datos de ellas. + + ''cc''ccQQQQuuuu''ee''ee ddddaaaattttoooossss ppppuuuueeeeddddeeeennnn gggguuuuaaaarrrrddddaaaarrrrsssseeee eeeennnn uuuunnnnaaaa RRRRRRRRDDDD???? + + Lo que se te ocurra. Debes poder medir alg'un valor dado en + distintos momentos en el tiempo y proveer a RRDtool de + estos valores. Si puedes hacer esto, RRDtool puede guardar + los datos. Los valores tienen que ser num'ericos, pero no + necesariamente enteros, como en MRTG. + + Muchos ejemplos mencionan SNMP, que es el acr'onimo de + "Simple Network Management Protocol" (Protocolo Simple de + Administraci'on de Redes). Lo de "simple" se refiere al + protocolo - no se supone que sea f'acil administrar o moni- + torizar una red. Cuando hayas terminado con este docu- + mento, deber'as saber lo suficiente para entender cuando + oigas a otros hablar sobre SNMP. Por ahora, simplemente + considera a SNMP como una forma de preguntarle a los + dispositivos por los valores de ciertos contadores que + mantienen. Son estos valores de estos contadores los que + vamos a almacenar en la RRD. + + ''cc''ccQQQQuuuu''ee''ee ppppuuuueeeeddddoooo hhhhaaaacccceeeerrrr ccccoooonnnn eeeessssttttaaaa hhhheeeerrrrrrrraaaammmmiiiieeeennnnttttaaaa???? + + RRDtool se deriva de MRTG (Multi Router Traffic Grapher, + Graficador De Tr'afico de M'ultiples Enrutadores). MRTG + empez'o como un peque~no script para poder graficar el uso + de una conexi'on a la Internet. Luego evolucion'o, permi- + tiendo graficar otras fuentes de datos, como temperatura, + velocidad, voltajes, cantidad de p'aginas impresas, etc... + Lo m'as probable es que empieces a usar RRDtool para + guardar y procesar datos conseguidos a trav'es de SNMP, y + que los datos sean el n'umero de bytes (o bits) transferi- + dos desde y hacia una red u ordenador. RRDtool te permite + crear una base de datos, guardar los datos en ellas, recu- + perarlos y crear gr'aficos en formato GIF o PNG, para + mostrarlos en un navegador web. Esas im'agenes dependen de + los datos que hayas guardado y pueden, por ejemplo, ser un + sumario del promedio de uso de la red, o los picos de + tr'afico que ocurrieron. Tambi'en lo puedes usar para + mostrar el nivel de las mareas, la radiaci'on solar, el + consumo de electricidad, el n'umero de visitantes en una + exposici'on en un momento dado, los niveles de ruido cerca + del aeropuerto, la temperatura en tu lugar de vacaciones + favorito, o en la nevera, o cualquier otra cosa que te + puedas imaginar, mientras tengas alg'un sensor con el cual + medir los datos y seas capaz de pasarle los n'umeros a RRD- + tool. + + ''cc''ccYYYY ssssiiii aaaa''uu''uunnnn tttteeeennnnggggoooo pppprrrroooobbbblllleeeemmmmaaaassss ddddeeeessssppppuuuu''ee''eessss ddddeeee lllleeeeeeeerrrr eeeesssstttteeee ddddooooccccuuuummmmeeeennnnttttoooo???? + + Lo primero, ,il'eelo otra vez!. Puede que te hayas perdido + de algo. Si no puedes compilar el c'odigo fuente y usas un + sistema operativo bastante com'un, casi seguro que no es la + culpa de RRDtool. Probablemente consigas versiones pre- + compiladas por la Internet. Si provienen de una fuente + confiable, 'usalas. Si, por otro lado, el programa fun- + ciona, pero no te da los resultados que tu esperabas, + puede ser un problema con la configuraci'on; rev'isala y + comp'arala con los ejemplos. + + Hay una lista de correo electr'onico y una archivo de la + misma. Lee la lista durante unas cuantas semanas, y busca + en el archivo. Es descort'es hacer una pregunta sin haber + revisado el archivo; ,ipuede que tu problema ya haya sido + resuelto antes! Normalmente ocurre as'i en todas las listas + de correo, no s'olo esta. Examina la documentaci'on que vino + con RRDtool para ver donde est'a el archivo y como usarlo. + + Te sugiero que te tomes un momento y te subscribas a la + lista ahora mismo, enviando un mensaje a rrd-users- + request at list.ee.ethz.ch con t'itulo "subscribe". Si even- + tualmente deseas salirte de la lista, env'ia otro correo a + la misma direcci'on, con t'itulo "unsubscribe". + + ''cc''ccCCCC''oo''oommmmoooo mmmmeeee vvvvaaaassss aaaa aaaayyyyuuuuddddaaaarrrr???? + + D'andote descripciones y ejemplos detallados. Asumimos que + el seguir las instrucciones en el orden en que se presen- + tan aqu'i te dar'a suficiente conocimiento de RRDtool como + para que experimentes por tu cuenta. Si no funciona a la + primera, puede que te hallas saltado algo; siguiendo los + ejemplos obtendr'as algo de experiencia pr'actica y, lo que + es m'as importante, un poco de informaci'on sobre como + funciona el programa. + + Necesitar'as saber algo sobre n'umeros hexadecimales. Si no, + empieza por leer "bin_dec_hex" antes de continuar. + + TTTTuuuu pppprrrriiiimmmmeeeerrrraaaa bbbbaaaasssseeee ddddeeee ddddaaaattttoooossss eeeennnn rrrroooouuuunnnndddd----rrrroooobbbbiiiinnnn + + En mi opini'on, la mejor forma de aprender algo es + haci'endolo. 'cPor qu'e no empezamos ya? Vamos a crear una + base de datos, poner unos cuantos valores en ella y + extraerlos despu'es. La salida que obtengas debe ser igual + a la que aparece en este documento. + + Empezaremos con algo f'acil, comparando un coche con un + enrutador, o por decirlo de otra forma, comparando + kil'ometros con bits y bytes. A nosotros nos da lo mismo; + son unos n'umeros obtenidos en un espacio de tiempo. + + Asumamos que tenemos un dispositivo que transfiere bytes + desde y hacia la Internet. Este dispositivo tiene un con- + tador que empieza en 0 al encenderse y se incrementa con + cada byte transferido. Este contador tiene un valor + m'aximo; si ese valor se alcanza y se cuenta un byte m'as, + el contador vuelve a empezar desde cero. Esto es exacta- + mente lo mismo que pasa con muchos contadores, como el + cuentakil'ometros del coche. En muchas de las disertaciones + sobre redes se habla de bits por segundo, as'i que + empezaremos por acostumbrarnos a esto. Asumamos que un + byte son 8 bits y empecemos a pensar en bits y no en + bytes. ,iEl contador, sin embargo, sigue contando en bytes! + En el mundo SNMP, la mayor'ia de los contadores tienen una + longitud de 32 bits. Esto significa que pueden contar + desde 0 hasta 4294967295. Usaremos estos valores en los + ejemplos. El dispositivo, cuando le preguntamos, retorna + el valor actual del contador. Como sabemos el tiempo tran- + scurrido desde la 'ultima vez que le preguntamos, sabemos + cuantos bytes se han transferido "***en promedio***" por + segundo. Esto no es muy dif'icil de calcular; primero en + palabras, luego en operaciones: + + 1. Toma el valor actual del contador y r'estale el valor + anterior + + 2. Haz lo mismo con la fecha + + 3. Divide el resultado del paso (1) por el resultado del + paso (2). El resultado es la cantidad de bytes por + segundo. Si lo multiplicas por ocho obtienes la canti- + dad de bits por segundo + + bps = (contador_actual - contador_anterior) / (fecha_actual - fecha_anterior) * 8 + + Para algunos ser'a de ayuda traducir esto a un ejemplo + automotor. No prueben estas velocidades en la pr'actica, y + si lo hacen, no me echen la culpa por los resultados. + + Usaremos las siguientes abreviaturas: + + M: metros + KM: kil'ometros (= 1000 metros). + H: horas + S: segundos + KM/H: kil'ometros por hora + M/S: metros por segundo + + Vas conduciendo un coche. A las 12:05, miras el contador + en el salpicadero y ves que el coche ha recorrido 12345 + KM. A las 12:10 vuelves a mirar otra vez, y dice 12357 KM. + Quiere decir, que has recorrido 12 KM en cinco minutos. Un + cient'ifico convertir'ia esto en metros por segundos; esto + es bastante parecido al problema de pasar de bytes trans- + feridos en 5 minutos a bits por segundo. + + Viajamos 12 kil'ometros, que son 12000 metros. Tardamos 5 + minutos, o sea 300 segundos. Nuestra velocidad es 12000M / + 300S igual a 40 M/S. + + Tambi'en podemos calcular la velocidad en KM/H: 12 veces 5 + minutos es una hora, as'i que multiplicando los 12 KM por + 12 obtenemos 144 KM/H. No intentes esto en casa, o por + donde vivo :-) + + Recuerda que estos n'umeros son tan s'olo promedios. No hay + forma de deducir, viendo s'olo los n'umeros, si fuiste a una + velocidad constante. Hay un ejemplo m'as adelante en el + tutorial que explica esto. + + Espero que entiendas que no hay diferencia entre calcular + la velocidad en M/S o bps; s'olo la forma en que recogemos + los datos es distinta. Inclusive, la K de kilo en este + caso es exactamente la misma, ya que en redes k es 1000 + + Ahora vamos a crear una base de datos en la que guardar + todos estos interesantes valores. El m'etodo a usar para + arrancar el programa puede variar de un sistema de + operaci'on a otro, pero asumamos que lo puedes resolver tu + mismo en caso que se diferente en el sistema que usas. + Aseg'urate de no sobreescribir ning'un archivo en tu sistema + al ejecutarlo y escribe todo como una sola l'inea (tuve que + partirlo para que fuera legible), salt'andote todos los + caracteres '\' + + rrdtool create test.rrd \ + --start 920804400 \ + DS:speed:COUNTER:600:U:U \ + RRA:AVERAGE:0.5:1:24 \ + RRA:AVERAGE:0.5:6:10 + + (o sea, escribe: "rrdtool create test.rrd --start + 920804400 DS ...") + + ''cc''ccQQQQuuuu''ee''ee hhhheeeemmmmoooossss ccccrrrreeeeaaaaddddoooo???? + + Hemos creado una base de datos en round robin llamada test + (test.rrd), que empieza desde el mediod'ia del d'ia en que + empec'e a escribir este documento (7 de marzo de 1999). En + ella se guarda una fuente de datos (DS), llamada "speed", + que se lee de un contador. En la misma base de datos se + guardan dos archivos en round robin (RRAs), uno promedia + los datos cada vez que se leen (o sea, no hay nada que + promediar), y mantiene 24 muestras (24 por 5 minutos = 2 + horas de muestras). El otro promedia 6 muestras (media + hora), y guarda 10 de estos promedios (o sea, 5 horas). + Las opciones restantes las veremos m'as adelante. + + RRDtool usa un formato de "fecha" especial que viene del + mundo de UNIX. Estas "fechas" son el n'umero de segundos + que han pasado desde el primero de enero de 1970, zona + UTC. Este n'umero de segundos se convierte luego en la + fecha local, por lo que varia seg'un la franja horaria. + + Lo m'as probable es que tu no vivas en la misma parte del + mundo que yo, por lo que tu franja horaria ser'a diferente. + En los ejemplos, cuando mencione horas, puede que no sean + las mismas para ti; esto no afecta mucho los resultados, + s'olo tienes que corregir las horas mientras lees. Por + ejemplo, las 12:05 para m'i son las 11:05 para los amigos + en la Gran Breta~na. + + Ahora tenemos que llenar nuestra base de datos con val- + ores. Vamos a suponer que le'imos estos datos: + + 12:05 12345 KM + 12:10 12357 KM + 12:15 12363 KM + 12:20 12363 KM + 12:25 12363 KM + 12:30 12373 KM + 12:35 12383 KM + 12:40 12393 KM + 12:45 12399 KM + 12:50 12405 KM + 12:55 12411 KM + 13:00 12415 KM + 13:05 12420 KM + 13:10 12422 KM + 13:15 12423 KM + + Llenaremos la base de datos as'i: + + rrdtool update test.rrd 920804700:12345 920805000:12357 920805300:12363 + rrdtool update test.rrd 920805600:12363 920805900:12363 920806200:12373 + rrdtool update test.rrd 920806500:12383 920806800:12393 920807100:12399 + rrdtool update test.rrd 920807400:12405 920807700:12411 920808000:12415 + rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423 + + Lo que significa: actualiza nuestra base de datos test con + los siguientes valores: + + fecha 920804700, valor 12345 + fecha 920805000, valor 12357 + + etc'etera. + + Como ves, pueden introducirse m'as de un valor en la base + de datos por ejecuci'on del comando. Yo los agrupo de tres + en tres para hacerlo legible, pero en realidad el m'aximo + depende del sistema de operaci'on. + + Ahora podemos recuperar los datos usando ``rrdtool + fetch'': + + rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200 + + Debes obtener esto como salida: + + speed + + + + + + + + + + + + 920804400: NaN + 920804700: NaN + 920805000: 4.0000000000e-02 + 920805300: 2.0000000000e-02 + 920805600: 0.0000000000e+00 + 920805900: 0.0000000000e+00 + 920806200: 3.3333333333e-02 + 920806500: 3.3333333333e-02 + 920806800: 3.3333333333e-02 + 920807100: 2.0000000000e-02 + 920807400: 2.0000000000e-02 + 920807700: 2.0000000000e-02 + 920808000: 1.3333333333e-02 + 920808300: 1.6666666667e-02 + 920808600: 6.6666666667e-03 + 920808900: 3.3333333333e-03 + 920809200: NaN + + Si no, hay algo mal. Probablemente tu sistema de operaci'on + muestre ``NaN'' de otra forma; representa "Not a Number", + o sea "No es un n'umero". Si aparece ``U'' o ``UNKN'' o + algo parecido, es lo mismo. Si hay alguna otra diferencia, + probablemente te equivocaste al introducir alg'un P valor + (asumiendo que mi tutorial est'a bien, por supuesto :-). En + ese caso, borra la base de datos y prueba de nuevo. + + Lo que representa exactamente esta salida lo vamos m'as + adelante en el tutorial. + + HHHHoooorrrraaaa ddddeeee hhhhaaaacccceeeerrrr aaaallllgggguuuunnnnoooossss ggggrrrr''aa''aaffffiiiiccccoooossss + + Prueba este comando: + + rrdtool graph speed.gif \ + --start 920804400 --end 920808000 \ + DEF:myspeed=test.rrd:speed:AVERAGE \ + LINE2:myspeed#FF0000 + + Este comando crea speed.gif, un gr'afico de los datos desde + las 12:00 hasta las 13:00. Contiene una definici'on de la + variable myspeed y define el color como rojo. Notar'as que + el gr'afico no comienza exactamente a las 12:00 sino a las + 12:05, y es porque no tenemos datos suficientes como para + calcular el promedio de velocidad antes de ese momento. + Esto s'olo ocurre en caso de que se pierdan alg'un muestreo, + lo que esperamos que no debe ocurrir muy a menudo. + + Si ha funcionado, ,ifelicitaciones!. Si no, revisa qu'e + puede estar mal. + + La definici'on de colores se construye a partir del rojo, + verde y azul. Especificas cuanto de cada uno de estos com- + ponentes vas a usar en hexadecimal: 00 significa "nada de + este color" y FF significa "este color a m'axima intensi- + dad". El "color" blanco es la mezcla del rojo, verde y + azul a toda intensidad: FFFFFF; el negro es la ausencia de + todos los colores: 000000. + + rojo #FF0000 + verde #00FF00 + azul #0000FF + violeta #FF00FF (mezcla de rojo y azul) + gris #555555 (un tercio de cada uno de los colores) + + El archivo GIF que acabas de crear puede verse con tu + visor de archivos de imagen favorito. Los navegadores lo + mostrar'an usando la URL ``file://el/camino/de/directo- + rios/hasta/speed.gif'' + + GGGGrrrr''aa''aaffffiiiiccccoooossss ccccoooonnnn uuuunnnn ppppooooccccoooo ddddeeee mmmmaaaatttteeeemmmm''aa''aattttiiiiccccaaaa + + Cuando veas la imagen, notar'as que el eje horizontal tiene + unas etiquetas marcando las 12:10, 12:20, 12:30, 12:40 y + 12:50. Los otros dos momentos (12:00 y 13:00) no se pueden + mostrar bien por falta de datos, as'i que el programa se + los salta. El eje vertical muestra el rango de los valores + que entramos. Introdujimos los kil'ometros y luego dividi- + mos entre 300 segundos, por lo que obtuvimos valores bas- + tante bajos. Para ser exactos, el primer valor, 12 + (12357-12345), dividido entre 300 da 0.04, lo que RRDtool + muestra como ``40m'', o sea ``40/1000''. ,iLa ``m''' no + tiene nada que ver con metros, kil'ometros o mil'imetros!. + RRDtool no sabe nada de unidades, el s'olo trabaja con + n'umeros, no con metros. + + Donde nos equivocamos fue en que debimos medir en metros. + As'i, (12357000-12345000)/300 = 12000/300 = 40. + + Vamos a corregirlo. Podr'iamos recrear la base de datos con + los valores correctos, pero hay una forma mejor: ,ihaciendo + los c'alculos mientras creamos el archivo gif! + + rrdtool graph speed2.gif \ + --start 920804400 --end 920808000 \ + --vertical-label m/s \ + DEF:myspeed=test.rrd:speed:AVERAGE \ + CDEF:realspeed=myspeed,1000,* \ + LINE2:realspeed#FF0000 + + Cuando veas esta imagen, notar'as que la ``m'' ha desapare- + cido, y ahora tienes los resultados correctos. Adem'as + hemos a~nadido una etiqueta a la imagen. Apartando esto, el + archivo GIF es el mismo. + + Las operaciones est'an en la secci'on del CDEF y est'an + escritas en Notaci'on Polaca Inversa (Reverse Polish Nota- + tion o ``RPN''). En palabras, dice: "toma la fuente de + datos myspeed y el numero 1000, y multipl'icalos". No te + molestes en meterte con RPN todav'ia, la veremos con m'as + detalle m'as adelante. Adem'as, puede que quieras leer mi + tutorial sobre los CDEF y el tutorial de Steve Rader sobre + RPN, pero primero terminemos con este. + + ,iUn momento! Si podemos multiplicar los valores por mil, + entonces, ,itambi'en deber'ia ser posible el mostrar la + velocidad en kil'ometros por hora usando los mismos datos! + + Para cambiar el valor que medimos en metros por segundo, + calculamos los metros por hora (valor * 3600) y dividimos + entre 1000 para sacar los kil'ometros por hora. Todo junto + hace valor * (3600/1000) == valor * 3.6. + + Como en nuestra base de datos cometimos un error guardando + los valores en kil'ometros, debemos compensar por ello, + multiplicando por 100, por lo que al aplicar esta cor- + recci'on nos queda valor * 3600. + + Ahora vamos a crear este gif, agre'andole un poco m'as de + magia... + + + + rrdtool graph speed3.gif \ + --start 920804400 --end 920808000 \ + --vertical-label km/h \ + DEF:myspeed=test.rrd:speed:AVERAGE \ + "CDEF:kmh=myspeed,3600,*" \ + CDEF:fast=kmh,100,GT,kmh,0,IF \ + CDEF:good=kmh,100,GT,0,kmh,IF \ + HRULE:100#0000FF:"Maximum allowed" \ + AREA:good#00FF00:"Good speed" \ + AREA:fast#FF0000:"Too fast" + + Esto luce mucho mejor. La velocidad en KM/H, y adem'as ten- + emos una l'inea extra mostrando la velocidad m'axima permi- + tida (en el camino por donde conduzco). Tambi'en le cambie + los colores de la velocidad, y ahora paso de ser una l'inea + a un 'area. + + Los c'alculos son m'as complejos ahora. Para calcular la + velocidad "aceptable": + + Verifica si la velocidad en kmh es mayor que 100 ( kmh,100 ) GT + Si es as'i, retorna 0, si no, retorna la velocidad ((( kmh,100 ) GT ), 0, kmh) IF + + Para calcular la parte de velocidad "excesiva": + + Verifica si la velocidad en kmh es mayor que 100 ( kmh,100 ) GT + Si es as'i, retorna la velocidad, si no, retorna 0 ((( kmh,100) GT ), kmh, 0) IF + + + MMMMaaaaggggiiiiaaaa ggggrrrr''aa''aaffffiiiiccccaaaa + + Me gusta creer que virtualmente no hay limites para lo que + RRDtool puede hacer con los datos. No voy a explicarlo en + detalle, pero mira este GIF: + + rrdtool graph speed4.gif \ + --start 920804400 --end 920808000 \ + --vertical-label km/h \ + DEF:myspeed=test.rrd:speed:AVERAGE \ + "CDEF:kmh=myspeed,3600,*" \ + CDEF:fast=kmh,100,GT,100,0,IF \ + CDEF:over=kmh,100,GT,kmh,100,-,0,IF \ + CDEF:good=kmh,100,GT,0,kmh,IF \ + HRULE:100#0000FF:"Maximum allowed" \ + AREA:good#00FF00:"Good speed" \ + AREA:fast#550000:"Too fast" \ + STACK:over#FF0000:"Over speed" + + Vamos a crear una p'agina HTML simple para ver los tres + archivos GIF: + + Velocidad + Speed in meters per second +
+ Speed in kilometers per hour +
+ Traveled too fast? + + + Gu'ardalo como ``speed.html'' o algo parecido, y exam'inalo + con un navegador. + + Ahora, todo lo que tienes que hacer es medir los datos + regularmente y actualizar la base de datos. Cuando quieras + verlos, vuelve a crear los archivos GIF y aseg'urate que se + carguen de nuevo en tu navegador (Nota: presionar el bot'on + de "refrescar" puede no ser suficiente; en particular, + Netscape tiene un problema al respecto, por lo que necesi- + taras darle al bot'on mientras presionas la tecla de + may'usculas. + + AAAAccccttttuuuuaaaalllliiiizzzzaaaacccciiiioooonnnneeeessss ddddeeee vvvveeeerrrrddddaaaadddd + + Ya hemos usado el comando ``update''; vimos que recibia + uno o m'as par'ametros en el formato: ``:''. + Para facilitarte las cosas, puedes obtener la fecha actual + colocando ``N'' en la fecha. Tambi'en podr'ias usar la + funci'on ``time'' de Perl para obtenerla. El ejemplo m'as + corto de todo el tutorial :) + + perl -e 'print time, "\n" ' + + Ahora, la forma de poner a correr un programa a intervalos + regulares de tiempo depende del sistema de operaci'on. La + actualizaci'on, en pseudo-c'odigo, ser'ia: + + Toma el valor, col'ocalo en la variable "$speed" + rrdtool update speed.rrd N:$speed + + (Pero no lo hagas sobre nuestra base de datos de pruebas, + que a'un la vamos a usar en otros ejemplos. + + Eso es todo. Ejecutando este script cada 5 minutos, lo + 'unico que tienes que hacer para ver los gr'aficos actuales + es correr los ejemplos anteriores, que tambi'en puedes + poner en un script. Luego de correrlo, basta con cargar + index.html + + UUUUnnnnaaaassss ppppaaaallllaaaabbbbrrrraaaassss ssssoooobbbbrrrreeee SSSSNNNNMMMMPPPP + + Me imagino que muy pocas personas ser'an capaces de obtener + en su ordenador datos reales de su coche cada 5 minutos; + los dem'as nos tendremos que conformar con alg'un otro con- + tador. Puedes, por ejemplo, medir la cantidad de p'aginas + que ha hecho una impresora, cuanto caf'e has hecho con la + cafetera, el medidor del consumo de electricidad, o + cualquier otra cosa. Cualquier contador incremental puede + monitorizarse y graficarse con lo que has aprendido hasta + ahora. M'as adelante, veremos tambi'en como monitorizar otro + tipo de valores, como la temperatura. La mayor'ia usaremos + alguna vez un contador que lleve la cuenta de cuantos + octetos (bytes) a transferido un dispositivo de red, as'i + que vamos a ver como hacer esto. Empezaremos describiendo + como recoger los datos. Hay quien dir'a que hay herramien- + tas que pueden recoger estos datos por ti. ,iEs cierto! + Pero, creo que es importante darse cuenta de que no son + necesarias. Cuando tienes que determinar porqu'e algo no + funciona, necesitas saber c'omo funciona en primer lugar. + + Una herramienta que mencionamos brevemente al principio + del documento es SNMP. SNMP es una forma de comunicarse + con tus equipos. La herramienta particular que voy a usar + m'as adelante se llama ``snmpget'', y funciona as'i: + + snmpget dispositivo clave OID + + En "dispositivo" colocas el nombre o direcci'on IP del + equipo a monitorizar. En clave, colocas la "cadena de car- + acteres de la comunidad de lectura", como se le denomina + en el mundillo SNMP. Muchos dispositivos aceptar'an "pub- + lic" como cadena por defecto, pero por razones de privaci- + dad y seguridad esta clave puede estar deshabilitada. + Consulta la documentaci'on correspondiente al dispositivo o + programa. + + Luego esta el tercer par'ametro, llamado OID (Object IDen- + tifier, identificador de objeto). + + Al principio, cuando empiezas a aprender sobre SNMP, + parece muy confuso. No lo es tanto cuando le hechas una + ojeada a los ``MIB'' (Manager Information Base, o Base de + Informaci'on Administrativa). Es un 'arbol invertido que + describe los datos, empezando en un nodo ra'iz desde el que + parten varias ramas. Cada rama termina en otro nodo y + puede abrir nuevas sub-ramas. Cada rama tiene un nombre, y + forman un camino que nos lleva hasta el fondo del 'arbol. + En este ejemplo, las ramas que vamos a tomar se llaman + iso, org, dod, internet, mgmt y mib-2. Tambi'en pueden + accederse por su n'umero relativo; en este caso, estos + n'umeros son 1, 3, 6, 1, 2 y 1: + + iso.org.dod.internet.mgmt.mib-2 (1.3.6.1.2.1) + + En algunos programas se usa un punto al iniciar el OID. + Esto puede ser confuso; no hay ning'un punto inicial en la + especificaci'on de los OID... sin embargo, algunos progra- + mas usan por defecto un prefijo inicial. Para indicar la + diferencia entre los OID abreviados (o sea, a los que se + le pondr'a el prefijo inicial) y los completos, estos pro- + gramas necesitan que los OID completos empiecen por un + punto. Para empeorar las cosas, se usan varios prefijos + distintos... + + De acuerdo, sigamos con el inicio de nuestro OID: ten'iamos + 1.3.6.1.2.1 . Ahora, nos interesa la rama ``interfaces'', + que tiene el n'umero dos (o sea, 1.3.6.1.2.1.2, o + 1.3.6.1.2.1.interfaces). + + Lo primero es hacernos con un programa SNMP. Busca alg'un + paquete pre-compilado para tu plataforma, si no, puedes + buscar el c'odigo fuente y compilarlo tu mismo. En Internet + encontrar'as muchos programas, b'uscalos con un motor de + b'usqueda o como prefieras. Mi sugerencia es que busques + el paquete CMU-SNMP, que esta bastante difundido. + + Asumamos que ya tienes el programa. Empecemos por tomar + ciertos datos que est'an disponibles en la mayor'ia de los + sistemas. Recuerda: hay un nombre abreviado para la parte + del 'arbol que m'as nos interesa. + + Voy a usar la versi'on corta, ya que creo que este docu- + mento ya es lo bastante largo. Si no te funciona, a~n'adele + el prefijo .1.3.6.1.2.1 y prueba de nuevo. O prueba + leyendo el manual; s'altate las partes que no entiendas + a'un, y busca las secciones que hablan de como arrancar y + usar el programa. + + snmpget myrouter public system.sysdescr.0 + + El dispositivo deber'a contestarte con una descripci'on, + probablemente vac'ia, de s'i mismo. Si no consigues una + respuesta v'alida, prueba con otra "clave" u otro disposi- + tivo; no podemos seguir hasta tener un resultado. + + snmpget myrouter public interfaces.ifnumber.0 + + Con suerte, usando este comando obtendr'as un n'umero como + resultado: el n'umero de interfaces del dispositivo. Si es + as'i, seguiremos adelante con otro programa, llamado "snmp- + walk" + + snmpwalk myrouter public interfaces.iftable.ifentry.ifdescr + + Si obtienes una lista de interfaces, ya casi hemos lle- + gado. Aqu'i tienes un ejemplo del resultado: + + [user at host /home/alex]$ snmpwalk cisco public 2.2.1.2 + interfaces.ifTable.ifEntry.ifDescr.1 = "BRI0: B-Channel 1" + interfaces.ifTable.ifEntry.ifDescr.2 = "BRI0: B-Channel 2" + interfaces.ifTable.ifEntry.ifDescr.3 = "BRI0" Hex: 42 52 49 30 + interfaces.ifTable.ifEntry.ifDescr.4 = "Ethernet0" + interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0" + + En este equipo CISCO, quiero monitorizar la interfaz "Eth- + ernet0". Viendo que es la cuarta, pruebo con: + + [user at host /home/alex]$ snmpget cisco public 2.2.1.10.4 2.2.1.16.4 + + interfaces.ifTable.ifEntry.ifInOctets.4 = 2290729126 + interfaces.ifTable.ifEntry.ifOutOctets.4 = 1256486519 + + Entonces, tengo 2 OIDs que monitorizar, y son (en el for- + mato largo, ahora): + + 1.3.6.1.2.1.2.2.1.10 + + y + + 1.3.6.1.2.1.2.2.1.16 + + , ambas con el n'umero de interfaz de 4 + + No te enga~nes, esto no lo logre yo al primer intento. Me + tom'o un tiempo entender lo que significaban todos estos + n'umeros; ayuda cuando se traducen en un texto descrip- + tivo... por lo menos, cuando oigas hablar de MIBs y OIDs, + ahora sabr'as de qu'e se trata. No te olvides del n'umero de + interfaz (0 si el valor no depende de una interfaz), y + prueba con snmpwalk si no obtienes una respuesta clara con + snmpget. + + Si entendiste todo esto, y obtienes resultados del dispos- + itivo con el que est'as probando, sigue adelante con el + tutorial. Si no, vuelve a leer esta secci'on; es importante + + UUUUnnnn eeeejjjjeeeemmmmpppplllloooo rrrreeeeaaaallll + + Ok, empecemos con la diversi'on. Primero, crea una base de + datos nueva. Vamos a guardar en ella 2 contadores, "input" + y "ouput". Los datos los vamos a guardar en archivos que + los promediar'an, tomando grupos de 1, 6, 24 o 288 mues- + tras. Tambi'en archivaremos los valores m'aximos. Lo expli- + caremos con m'as detalle despu'es. El intervalo de tiempo + entre las muestras ser'a de 300 segundos (5 minutos). + + 1 muestra "promediada" sigue siendo 1 muestra cada 5 minutos + 6 muestras promediadas son un promedio de cada 30 minutos + 24 muestras promediadas son un promedio de cada 2 horas + 288 muestras promediadas son un promedio de cada d'ia + + Vamos a tratar de ser compatibles con MRTG, que guarda m'as + o menos esta cantidad de datos: + + + 600 muestras de 5 minutos: 2 d'ias y 2 horas + 600 promedios de 30 minutos: 12.5 d'ias + 600 promedios de 2 horas: 50 d'ias + 600 promedios de 1 d'ia: 732 d'ias + + Uniendo todos estos rangos tenemos que en total guardamos + datos de unos 797 d'ias. RRDtool guarda los datos de una + forma distinta a MRTG; no empieza el archivo "semanal" + donde acaba el "diario", sino que ambos archivos contienen + la informaci'on m'as reciente, ,ipor lo que con RRDtool + archivamos m'as datos que con MRTG! + + Necesitaremos: + + 600 muestras de 5 minutos (2 d'ias y 2 horas) + 700 entradas de 30 minutos (2 d'ias y 2 horas, m'as 12.5 d'ias) + 775 entradas de 2 horas (lo anterior + 50 d'ias) + 797 entradas de 1 d'ia (lo anterior + 732 d'ias, redondeando) + + rrdtool create myrouter.rrd \ + DS:input:COUNTER:600:U:U \ + DS:output:COUNTER:600:U:U \ + RRA:AVERAGE:0.5:1:600 \ + RRA:AVERAGE:0.5:6:700 \ + RRA:AVERAGE:0.5:24:775 \ + RRA:AVERAGE:0.5:288:797 \ + RRA:MAX:0.5:1:600 \ + RRA:MAX:0.5:6:700 \ + RRA:MAX:0.5:24:775 \ + RRA:MAX:0.5:288:797 + + Lo siguiente es recoger los datos y guardarlos, como en el + ejemplo siguiente. Esta parcialmente en pseudo-c'odigo, por + lo que tendr'as que buscar exactamente como hacerlo fun- + cionar en tu sistema operativo. + + mientras no sea el fin del universo + hacer + tomar el resultado de + snmpget router community 2.2.1.10.4 + en la variable $in + tomar el resultado de + snmpget router community 2.2.1.16.4 + en la variable $out + rrdtool update myrouter.rrd N:$in:$out + esperar 5 minutos + hecho + + Luego, tras recoger datos por un d'ia, crea una imagen, + usando: + + rrdtool graph myrouter-day.gif --start -86400 \ + DEF:inoctets=myrouter.rrd:input:AVERAGE \ + DEF:outoctets=myrouter.rrd:output:AVERAGE \ + AREA:inoctets#00FF00:"In traffic" \ + LINE1:outoctets#0000FF:"Out traffic" + + Este comando debe producir un gr'afico del tr'afico del d'ia. + Un d'ia son 24 horas, de 60 minutos, de 60 segundos: + 24*60*60=86400, o sea que empezamos a "ahora" menos 86400 + segundos. Definimos (con los DEFs) "inoctets" y "out- + octets" como los valores promedio de la base da datos + myrouter.rrd, dibujando un 'area para el tr'afico de entrada + y una l'inea para el tr'afico de salida. + + Mira la imagen y sigue recogiendo datos por unos cuantos + d'ias. Si lo deseas, puedes probar con los ejemplos de la + base de datos de pruebas y ver si puedes hacer trabajar + las diversas opciones y operaciones. + + Sugerencia: + + Haz un gr'afico que muestre el tr'afico en bytes por segundo + y en bits por segundo. Colorea el tr'afico Ethernet rojo si + sobrepasa los cuatro megabits por segundo. + + FFFFuuuunnnncccciiiioooonnnneeeessss ddddeeee ccccoooonnnnssssoooolllliiiiddddaaaacccciiii''oo''oonnnn + + Unos cuantos p'arrafos atr'as habl'abamos sobre la posibili- + dad de guardar el valor m'aximo en vez del promedio. Pro- + fundicemos un poco en este tema. + + Recordemos lo que habl'abamos sobre la velocidad de un + coche. Supongamos que manejamos a 144 KM/H durante 5 min- + utos y luego nos detiene la polic'ia durante unos 25 minu- + tos. Al finalizar el rega~no, tomamos nuestro port'atil y + creamos una imagen desde nuestra base de datos. Si visual- + izamos la segunda RRA que creamos, tendremos el promedio + de 6 muestreos. Las velocidades registradas serian + 144+0+0+0+0+0=144, lo que en promedio nos da una velocidad + de 24 KM/H., con lo que nos igual nos pondr'ian una multa, + s'olo que no por exceso de velocidad. + + Obviamente, en este caso, no deber'iamos tomar en cuenta + los promedios. Estos son 'utiles en varios casos. Por ejem- + plo, si queremos ver cuantos KM hemos viajado, este ser'ia + el gr'afico m'as indicado. Pero por otro lado, para ver la + velocidad ha la que hemos viajado, los valores m'aximos son + m'as adecuados. + + Es lo mismo con los datos que recogemos. Si quieres saber + la cantidad total, mira los promedios. Si quieres ver la + velocidad, mira los m'aximos. Con el tiempo, ambas canti- + dades se separan cada vez m'as. En la 'ultima base de datos + que creamos, hab'ia dos archivos que guardaban los datos de + cada d'ia. El archivo que guarda los promedios mostrar'a + valores bajos, mientras que el de m'aximos mostrar'a valores + m'as altos. Para mi coche, mostrar'ia valores promedio de + 96/24=4 KM/H (viajo unos 96 kil'ometros por d'ia), y m'aximos + de 1220 KM/H (la velocidad m'axima que alcanzo cada d'ia) + + Como ves, una gran diferencia. No mires el segundo gr'afico + para estimar la distancia que recorro, ni al primero para + estimar la velocidad a la que voy. Esto s'olo funciona con + muestras muy cercanas, pero no si sacas promedios. + + Algunas veces, hago un viaje largo. Si hago un recorrido + por Europa, conduciendo por unas 12 horas, el primer + gr'afico subir'a a unos 60 KM/H. El segundo mostrar'a unos + 180 KM/H. Esto significa que recorr'i unos 60 KM/H por 24 + horas = 1440 KM. Muestra adem'as que fui a una velocidad + promedio mayor a la normal y a un m'aximo de 180 KM/H, ,ino + que fui 8 horas a una velocidad fija de 180 KM/H! Este es + un ejemplo real: tengo que seguir la corriente en las + autopistas de Alemania, detenerme por gasolina y caf'e de + vez en cuando, manejar m'as lentamente por Austria y + Holanda, e ir con cuidado en las monta~nas y las villas. Si + vi'eramos los gr'aficos de los promedios de cada 5 minutos, + la imagen ser'ia completamente distinta; ver'iamos los mis- + mos valores de promedio y de m'axima. (suponiendo que las + mediciones fueran cada 300 segundos). Se podr'ia ver cuando + par'e, cuando iba en primera, cuando iba por las + autopistas, etc. La granularidad de los datos es m'as alta, + por lo que se tiene m'as informaci'on. Sin embargo, esto nos + lleva unas 12 muestras por hora, o 288 al d'ia, lo cual es + mucho para guardar por un periodo de tiempo largo. Por lo + tanto, sacamos el promedio, guardando eventualmente un + solo valor por d'ia. Con este 'unico valor, no podemos ver + mucho. + + Es importante comprender lo que expuesto en estos 'ultimos + p'arrafos. Unos ejes y unas l'ineas no tienen ning'un valor + por si mismos; hay que saber que representan e interpretar + correctamente los valores obtenidos. Sean cuales sean los + datos, esto siempre ser'a cierto. + + El mayor error que puedes cometer es usar los datos + recogidos para algo para lo cual no sirven. En ese caso, + seria hasta mejor no tener gr'afico alguno. + + RRRReeeeppppaaaasssseeeemmmmoooossss lllloooo qqqquuuueeee ssssaaaabbbbeeeemmmmoooossss + + Ahora ya sabes como crear una base de datos. Puedes + guardar valores en ella, extraerlos creando un gr'afico, + hacer operaciones matem'aticas con ellos desde la base de + datos y visualizar los resultados de estas en vez de los + datos originales. Vimos la diferencia entre los promedios + y los m'aximos y cuando debemos usar cada uno (o al menos + una idea de ello) + + RRDtool puede hacer m'as de lo que hemos visto hasta ahora. + Pero antes de continuar, te recomiendo que releas el texto + desde el principio y pruebes a hacerle algunas modifica- + ciones a los ejemplos. Aseg'urate de entenderlo todo. El + esfuerzo valdr'a la pena, y te ayudar'a, no s'olo con el + resto del documento, sino en tu trabajo diario de monitor- + izaci'on, mucho despu'es de terminar con esta introducci'on. + + TTTTiiiippppoooossss ddddeeee ffffuuuueeeennnntttteeeessss ddddeeee ddddaaaattttoooossss + + De acuerdo, quieres continuar. Bienvenido de vuelta otra + vez y prep'arate; voy a ir m'as r'apido con los ejemplos y + explicaciones. + + Ya vimos que, para ver el cambio de un contador a lo largo + del tiempo, tenemos que tomar dos n'umeros y dividir la + diferencia entre el tiempo transcurrido entre las medi- + ciones. Para los ejemplos que hemos visto es lo l'ogico, + pero hay otras posibilidades. Por ejemplo, mi enrutador me + puede dar la temperatura actual en tres puntos distintos, + la entrada de aire, el llamado "punto caliente" y la sal- + ida de ventilaci'on. Estos valores no son contadores; si + tomo los valores de dos muestreos y lo divido entre 300 + segundos, obtendr'e el cambio de temperatura por segundo. + ,iEsperemos que sea cero, o tendr'iamos un incendio en el + cuarto de ordenadores! :) + + Entonces, 'cque hacemos? Podemos decirle a RRDtool que + guarde los valores tal como los medimos (esto no es exac- + tamente as'i, pero se aproxima bastante a la verdad). As'i, + los gr'aficos se ver'an mucho mejor. Puedo ver cuando el + enrutador est'a trabajando m'as (en serio, funciona; como + usa m'as electricidad, genera m'as calor y sube la temper- + atura), puedo saber cuando me he dejado las puertas abier- + tas (el cuarto de ordenadores tiene aire acondicionado; + con las puertas abiertas el aire caliente del resto del + edificion entra y sube la temperatura en la entrada de + aire del enrutador), etc. Antes usamos un tipo de datos de + "contador", ahora usaremos un tipo de datos diferente, con + un nombre diferente, GAUGE. Tenemos otros tipos: + + - COUNTER este ya lo conocemos + - GAUGE este acabamos de verlo + - DERIVE + - ABSOLUTE + + Los otros dos tipos son DERIVE y ABSOLUTE. ABSOLUTE puede + usarse igual que COUNTER, con una diferencia; RRDtool + asume que el contador se reinicia cada vez que se lee. O + en otras palabras; el delta entre los valores no hay que + calcularlo, mientras que con COUNTER RRDtool tiene que + sacar 'el la cuenta. Por ejemplo, nuestro primer ejemplo, + (12345, 12357, 12363, 12363), ser'ia (unknown, 12, 6, 0) en + ABSOLUTE. El otro tipo, DERIVE, es como COUNTER, pero al + contrario de COUNTER, este valor tambi'en puede decrecer, + por lo que puede tenerse un delta negativo. + + Vamos a probarlos todos: + + rrdtool create all.rrd --start 978300900 \ + DS:a:COUNTER:600:U:U \ + DS:b:GAUGE:600:U:U \ + DS:c:DERIVE:600:U:U \ + DS:d:ABSOLUTE:600:U:U \ + RRA:AVERAGE:0.5:1:10 + rrdtool update all.rrd \ + 978301200:300:1:600:300 \ + 978301500:600:3:1200:600 \ + 978301800:900:5:1800:900 \ + 978302100:1200:3:2400:1200 \ + 978302400:1500:1:2400:1500 \ + 978302700:1800:2:1800:1800 \ + 978303000:2100:4:0:2100 \ + 978303300:2400:6:600:2400 \ + 978303600:2700:4:600:2700 \ + 978303900:3000:2:1200:3000 + rrdtool graph all1.gif -s 978300600 -e 978304200 -h 400 \ + DEF:linea=all.rrd:a:AVERAGE LINE3:linea#FF0000:"Line A" \ + DEF:lineb=all.rrd:b:AVERAGE LINE3:lineb#00FF00:"Line B" \ + DEF:linec=all.rrd:c:AVERAGE LINE3:linec#0000FF:"Line C" \ + DEF:lined=all.rrd:d:AVERAGE LINE3:lined#000000:"Line D" + + + RRRRRRRRDDDDttttoooooooollll bbbbaaaajjjjoooo eeeellll mmmmiiiiccccrrrroooossssccccooooppppiiiioooo + + + +o La l'inea A es un contador, por lo que debe incremen- + tarse continuamente y RRDtool tiene que calcular las + diferencias. Adem'as RRDtool tiene que dividir la + diferencia entre el tiempo transcurrido. Esto deber'ia + terminar con una l'inea recta en 1 (los deltas son 300, + y los intervalos son de 300) + + +o La l'inea B es de tipo GAUGE. Estos son los valores + "reales", as'i que el gr'afico debe mostrar lo mismo que + los valores que introducimos: una especie de onda + + +o La l'inea C es de tipo DERIVE. Es un contador, y puede + decrecer. Va entre 2400 y 0, con 1800 en el medio. + + +o La l'inea D es de tipo ABSOLUTE. Esto es, es un conta- + dor pero no hay que calcular las diferencias. Los + n'umeros son iguales a la l'inea A, y espero que puedas + ver la diferencia en los gr'aficos. + + Esto equivale a los valores siguientes, empezando a las + 23:10 y terminando a las 00:10 (las U significan descono- + cido). + + - L'inea A: u u 1 1 1 1 1 1 1 1 1 u + - L'inea B: u 1 3 5 3 1 2 4 6 4 2 u + - L'inea C: u u 2 2 2 0 -2 -6 2 0 2 u + - L'inea D: u 1 2 3 4 5 6 7 8 9 10 u + + Si tu archivo GIF muestra todo esto, has entrado los datos + correctamente, tu programa RRDtool est'a funcionando bien, + el visor de gr'aficos no te enga~na y hemos entrado en el + 2000 sin problemas :) Puedes probar el mismo ejemplo cua- + tro veces, una por cada l'inea. + + Revisemos los datos otra vez: + + +o L'inea A: 300, 600, 900 , etc. La diferencia del con- + tador es siempre 300, igual que el intervalo de tiempo + transcurrido entre mediciones. Por lo tanto, el prome- + dio siempre es 1. Pero, 'cpor qu'e el primer punto tiene + un valor de "desconocido"? 'cAcaso no era conocido el + valor que pusimos en la base de datos? ,iSi! Pero no + ten'iamos un valor inicial para calcular la diferencia. + Ser'ia un error asumir que el contador empezaba en 0, + as'i que no conocemos el valor de la diferencia + + +o L'inea B: No hay nada que calcular, los valores son los + mismos que se introdujeron en la base de datos. + + +o L'inea C: De nuevo, no conocemos el valor inicial antes + de la primera medici'on, as'i que se aplica el mismo + razonamiento que para la l'inea A. En este caso las + diferencias no son constantes, as'i que la l'inea no es + recta. Si hubi'esemos puesto los mismos valores que en + la l'inea A, el gr'afico ser'ia el mismo. Al contrario + que COUNTER, el valor puede decrecer, y espero + mostrarte m'as adelante el por que de la diferencia + entre ambos tipos. + + +o L'inea D: En este caso, el dispositivo nos da las + diferencias por s'i mismo. Por lo tanto, conocemos la + diferencia inicial, y podemos graficarla. Tenemos los + mismos valores que en la l'inea A, pero su significado + es distinto, por lo que el gr'afico tambi'en lo es. En + este caso, las diferencias se incrementan en 300 cada + vez, mientras que el intervalo de tiempo permanece + constante en 300 segundos, por lo que la divisi'on nos + da resultados cada vez mayores. + + RRRReeeeiiiinnnniiiicccciiiiaaaalllliiiizzzzaaaacccciiii''oo''oonnnn ddddeeee lllloooossss ccccoooonnnnttttaaaaddddoooorrrreeeessss + + Todav'ia nos quedan algunas cosas por ver. Nos quedan algu- + nas opciones importantes por cubrir, y aun no hemos + hablado de la reinicializaci'on de contadores. Empecemos + por ah'i: Estamos en nuestro coche, vemos el contador y + muestra 999987. Andamos unos 20 KM, as'i que el contador + debe subir a 1000007. Desafortunadamente, el contador s'olo + tiene 6 d'igitos, as'i que en realidad nos muestra 000007. + Si estuvi'eramos guardando los valores en un tipo DERIVE, + esto significar'ia que el contador retrocedi'o unos 999980 + KM. Por supuesto esto no es cierto, por lo que necesitamos + alguna protecci'on contra estos casos. Esta protecci'on s'olo + la tenemos para el tipo COUNTER, el cual de todas formas + era el que ten'iamos que haber usado para este tipo de + contador. 'cC'omo funciona? Los valores tipo COUNTER no + deben decrecer nunca, ,ipor lo que RRDtool asume en ese + caso que el contador se ha reinicializado! Si la diferen- + cia es negativa, esto se compensa sumando el valor m'aximo + del contador + 1. Para nuestro coche, tendr'iamos: + + Delta = 7 - 999987 = -999980 (en vez de 1000007-999987=20) + + Delta real= -999980 + 999999 + 1 = 20 + + Al momento de escribir este documento, RRDtool maneja con- + tadores de 32 o 64 bits de tama~no. Estos contadores pueden + manejar los siguientes valores: + + - 32 bits: 0 .. 4294967295 + - 64 bits: 0 .. 18446744073709551615 + + Si estos valores te parecen raros, podemos verlos en for- + mato hexadecimal: + + - 32 bits: 0 .. FFFFFFFF + - 64 bits: 0 .. FFFFFFFFFFFFFFFF + + RRDtool maneja ambos contadores de la misma manera. Si + ocurre un desbordamiento y la diferencia es negativa, RRD- + tool le suma primero el m'aximo del contador "menor" (32 + bits) + 1 a la diferencia. Si a'un as'i la diferencia es + negativa, entonces el contador reinicializado era mayor + (64 bits), por lo que se le suma el valor m'aximo del con- + tador "largo" + 1 y se le resta el m'aximo del contador + "peque~no" que sumamos err'oneamente. Hay un problema con + esto: supongamos que un contador largo se ha reinicial- + izado al sum'arsele una diferencia muy grande; entonces es + posible que al a~nadir el valor m'aximo del contador peque~no + la diferencia nos d'e positivo. En este caso poco probable, + los valores resultantes no serian correctos. Para que + ocurra esto, el incremento tiene que ser casi tan grande + como el valor m'aximo del contador, por lo que de ocurrir + es muy probable que halla varios problemas m'as en la con- + figuraci'on y no merezca la pena preocuparse s'olo por este. + A'un as'i, he incluido un ejemplo de este caso para que lo + puedas juzgar por ti mismo. + + A continuaci'on, unos ejemplos de reinicializaci'on de los + contadores. Prueba de hacer los c'alculos por ti mismo, o + acepta mis resultados si tu calculadora no puede con los + n'umeros :) + + N'umeros de correcci'on: + + - 32 bits: (4294967295+1) = 4294967296 + - 64 bits: (18446744073709551615+1)-correction1 = 18446744069414584320 + + Antes: 4294967200 + Incremento: 100 + Deber'ia ser: 4294967300 + Pero es: 4 + Diferencia: -4294967196 + Correcci'on #1: -4294967196 + 4294967296 = 100 + + + + + + + + Antes: 18446744073709551000 + Incremento: 800 + Deber'ia ser: 18446744073709551800 + Pero es: 184 + Diferencia: -18446744073709550816 + Correcci'on #1: -18446744073709550816 +4294967296 = -18446744069414583520 + Correcci'on #2: -18446744069414583520 +18446744069414584320 = 800 + + Antes: 18446744073709551615 ( valor m'aximo ) + Incremento: 18446744069414584320 ( incremento absurdo, + Deber'ia ser: 36893488143124135935 m'inimo para que + Pero es: 18446744069414584319 funcione el ejemplo) + Diferencia: -4294967296 + Correcci'on #1: -4294967296 + 4294967296 = 0 (positivo, + por tanto no se hace + la segunda correcci'on) + + Antes: 18446744073709551615 ( valor m'aximo ) + Incremento: 18446744069414584319 + Deber'ia ser: 36893488143124135934 + Pero es: 18446744069414584318 + Diferencia: -4294967297 + Correcci'on #1: -4294967297 +4294967296 = -1 + Correcci'on #2: -1 +18446744069414584320 = 18446744069414584319 + + Como puede verse en los 'ultimos ejemplos, necesitas unos + valores bastante extra~nos para hacer que RRDtool falle + (asumiendo que no tenga ning'un error el programa, por + supuesto), as'i que esto no deber'ia ocurrir. Sin embargo, + SNMP o cualquier otro m'etodo que uses de recogida de datos + puede tambi'en reportar alg'un valor err'oneo ocasionalmente. + No podemos prevenir todos los errores, pero podemos tomar + algunas medidas. El comando "create" de RRDtool tiene dos + par'ametros especialmente para esto, que definen los val- + ores m'inimo y m'aximo permitidos. Hasta ahora hemos usado + "U", "desconocido". Si le pasas valores para uno o ambos + par'ametros y RRDtool recibe un valor fuera de esos + l'imites, los ignorar'a. Para un term'ometro en grados Cel- + sius, el m'inimo absoluto es -273. Para mi enrutador, puedo + asumir que ese m'inimo es mucho mayor, digamos que 10. La + temperatura m'axima la pondr'ia en unos 80 grados; m'as alto + y el aparato no funcionar'ia. Para mi coche, nunca + esperar'ia obtener valores negativos, y tampoco esperar'ia + valores mayores a 230. Cualquier otra cosa ser'ia un + error. Pero recuerda, lo contrario no es cierto: si los + valores pasan este examen no quiere decir que sean los + correctos. Siempre examina bien el gr'afico si los valores + parecen extra~nos. + + RRRReeeemmmmuuuueeeessssttttrrrreeeeoooo ddddeeee lllloooossss ddddaaaattttoooossss + + Hay una funcionalidad importante de RRDtool que no hemos + explicado todav'ia: es virtualmente imposible recoger los + datos y pasarselos a RRDtool a intervalos exactos de + tiempo. Por tanto, RRDtool interpola los datos a los + intervalos exactos. Si no sabes que significa esto o como + se hace, he aqu'i la ayuda que necesitas: + + Supongamos un contador se incremente exactamente en 1 cada + segundo. Queremos medirlo cada 300 segundos, por lo que + deber'iamos tener valores separados exactamente en 300. Sin + embargo, por varias circunstancias llegamos unos segundos + tarde y el intervalo es 303. La diferencia ser'a por tanto + 303. Obviamente, RRDtool no debe colocar 303 en la base de + datos y dar as'i la impresi'on de que el contador se incre- + ment'o 303 en 300 segundos. Aqu'i es donde RRDtool + interpola: alter'a el valor 303 al valor que tendr'ia 3 + segundos antes y guarda 300 en 300 segundos. Digamos que + la pr'oxima vez llegamos justo a tiempo; por tanto, el + intervalo actual es 297 segundos, por lo que el contador + deber'ia ser 297. De nuevo, RRDtool altera el valor y + guarda 300, como debe ser. + + en RRD en realidad + tiempo+000: 0 delta="U" tiempo+000: 0 delta="U" + tiempo+300: 300 delta=300 tiempo+300: 300 delta=300 + tiempo+600: 600 delta=300 tiempo+603: 603 delta=303 + tiempo+900: 900 delta=300 tiempo+900: 900 delta=297 + + Creemos dos bases de datos id'enticas. He escogido el rango + de tiempo entre 920805000 y 920805900. + + rrdtool create seconds1.rrd \ + --start 920804700 \ + DS:seconds:COUNTER:600:U:U \ + RRA:AVERAGE:0.5:1:24 + + para Unix: cp seconds1.rrd seconds2.rrd + para DOS: copy seconds1.rrd seconds2.rrd + para VMS: y yo que s'e :) + + rrdtool update seconds1.rrd \ + 920805000:000 920805300:300 920805600:600 920805900:900 + rrdtool update seconds2.rrd \ + 920805000:000 920805300:300 920805603:603 920805900:900 + + rrdtool graph seconds1.gif \ + --start 920804700 --end 920806200 \ + --height 200 \ + --upper-limit 1.05 --lower-limit 0.95 --rigid \ + DEF:seconds=seconds1.rrd:seconds:AVERAGE \ + CDEF:unknown=seconds,UN \ + LINE2:seconds#0000FF \ + AREA:unknown#FF0000 + rrdtool graph seconds2.gif \ + --start 920804700 --end 920806200 \ + --height 200 \ + --upper-limit 1.05 --lower-limit 0.95 --rigid \ + DEF:seconds=seconds2.rrd:seconds:AVERAGE \ + CDEF:unknown=seconds,UN \ + LINE2:seconds#0000FF \ + AREA:unknown#FF0000 - Los dos gr'aficos debe ser iguales. + Los dos gr'aficos debe ser iguales. RRRREEEESSSSUUUUMMMMEEEENNNN - Es hora de concluir este documento. Ahora debes conocer lo - b'asico como para trabajar con RRDtool y leer la - documentaci'on. A'un hay mucho m'as por descubrir acerca de - RRDtool, y le encontrar'as; m'as y m'as usos para la - herramienta. Con los ejemplos y la herramienta puedes crear - f'acilmente muchos gr'aficos; tambi'en puedes usar las - interfaces disponibles. + Es hora de concluir este documento. Ahora debes conocer lo + b'asico como para trabajar con RRDtool y leer la docu- + mentaci'on. A'un hay mucho m'as por descubrir acerca de RRD- + tool, y le encontrar'as; m'as y m'as usos para la her- + ramienta. Con los ejemplos y la herramienta puedes crear + f'acilmente muchos gr'aficos; tambi'en puedes usar las inter- + faces disponibles. LLLLIIIISSSSTTTTAAAA DDDDEEEE CCCCOOOORRRRRRRREEEEOOOO - Recuerda subscribirte a la lista de correo. Aunque no - contestes los correos que aparecen en ella, te servir'a de - ayuda a ti y a los dem'as. Mucho de lo que se sobre MRTG (y - por tanto sobre RRDtool), lo aprend'i tan s'olo con leer la - lista, sin escribir. No hay por que preguntar las preguntas - b'asicas, que ya tienen su respuesta en la FAQ (,il'eela!). Con - miles de usuarios a lo largo del mundo, siempre hay - preguntas que tu puedes responder con lo aprendido en este y - otros documentos. + Recuerda subscribirte a la lista de correo. Aunque no con- + testes los correos que aparecen en ella, te servir'a de + ayuda a ti y a los dem'as. Mucho de lo que se sobre MRTG + (y por tanto sobre RRDtool), lo aprend'i tan s'olo con leer + la lista, sin escribir. No hay por que preguntar las pre- + guntas b'asicas, que ya tienen su respuesta en la FAQ + (,il'eela!). Con miles de usuarios a lo largo del mundo, + siempre hay preguntas que tu puedes responder con lo + aprendido en este y otros documentos. VVVVEEEERRRR TTTTAAAAMMMMBBBBIIII''EE''EENNNN - Las p'aginas del manual de RRDtool - - - - - -2001-02-20 Last change: 1.0.33 24 - - - - - - -rrdtool RRDTUTORIAL.ES(1) - - + Las p'aginas del manual de RRDtool AAAAUUUUTTTTOOOORRRR - Espero que hayas disfrutado con los ejemplos y las - descripciones. Si es as'i, ayuda a otros refiri'endolos a - este documento cuando te hagan preguntas b'asicas. No s'olo - obtendr'an la respuesta, sino que aprender'an muchas otras - cosas. - - Alex van den Bogaerdt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Espero que hayas disfrutado con los ejemplos y las + descripciones. Si es as'i, ayuda a otros refiri'endolos a + este documento cuando te hagan preguntas b'asicas. No s'olo + obtendr'an la respuesta, sino que aprender'an muchas otras + cosas. -2001-02-20 Last change: 1.0.33 25 + Alex van den Bogaerdt +2002-02-26 1.0.40 RRDTUTORIAL.ES(1) Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdtune.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtune.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdtune.txt 2002-11-09 12:31:56.000000000 -0800 @@ -1,132 +1,67 @@ - - - -rrdtool RRDTUNE(1) +RRDTUNE(1) rrdtool RRDTUNE(1) NNNNAAAAMMMMEEEE - rrdtool tune - Modify some basic properties of a Round Robin - Database + rrdtool tune - Modify some basic properties of a Round + Robin Database SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll ttttuuuunnnneeee _f_i_l_e_n_a_m_e [--------hhhheeeeaaaarrrrttttbbbbeeeeaaaatttt|----hhhh _d_s_-_n_a_m_e:_h_e_a_r_t_b_e_a_t] - [--------mmmmiiiinnnniiiimmmmuuuummmm|----iiii _d_s_-_n_a_m_e:_m_i_n] [--------mmmmaaaaxxxxiiiimmmmuuuummmm|----aaaa _d_s_-_n_a_m_e:_m_a_x] - [--------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee----ttttyyyyppppeeee|----dddd _d_s_-_n_a_m_e:_D_S_T] - [--------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee----rrrreeeennnnaaaammmmeeee|----rrrr _o_l_d_-_n_a_m_e:_n_e_w_-_n_a_m_e] + rrrrrrrrddddttttoooooooollll ttttuuuunnnneeee _f_i_l_e_n_a_m_e [--------hhhheeeeaaaarrrrttttbbbbeeeeaaaatttt|----hhhh _d_s_-_n_a_m_e:_h_e_a_r_t_b_e_a_t] + [--------mmmmiiiinnnniiiimmmmuuuummmm|----iiii _d_s_-_n_a_m_e:_m_i_n] [--------mmmmaaaaxxxxiiiimmmmuuuummmm|----aaaa _d_s_-_n_a_m_e:_m_a_x] + [--------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee----ttttyyyyppppeeee|----dddd _d_s_-_n_a_m_e:_D_S_T] [--------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee---- + rrrreeeennnnaaaammmmeeee|----rrrr _o_l_d_-_n_a_m_e:_n_e_w_-_n_a_m_e] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The tune option allows you to alter some of the basic - configuration values stored in the header area of a Round - Robin Database (RRRRRRRRDDDD). All these tunable parameters together - decide when data fed into an RRRRRRRRDDDD is to be regarded as - invalid. Invalid data is entered into the database as - *UNKNOWN*. - - The main application of the ttttuuuunnnneeee function is to relax the - validation rules on an RRRRRRRRDDDD. This allows to fill a new RRRRRRRRDDDD - with data available in larger intervals than what you would - normally want to permit. - - _f_i_l_e_n_a_m_e - The name of the RRRRRRRRDDDD you want to tune. - - --------hhhheeeeaaaarrrrttttbbbbeeeeaaaatttt|----hhhh _d_s_-_n_a_m_e:_h_e_a_r_t_b_e_a_t - modify the _h_e_a_r_t_b_e_a_t of a data source. By setting - this to a high value the rrd will accept things like - one value per day ... - - --------mmmmiiiinnnniiiimmmmuuuummmm|----iiii _d_s_-_n_a_m_e:_m_i_n - alter the minimum value acceptable as input from the - data source. Setting _m_i_n to 'U' will disable this - limit. - - --------mmmmaaaaxxxxiiiimmmmuuuummmm|----aaaa _d_s_-_n_a_m_e:_m_a_x - alter the maximum value acceptable as input from the - data source. Setting _m_a_x to 'U' will disable this - limit. + The tune option allows you to alter some of the basic con- + figuration values stored in the header area of a Round + Robin Database (RRRRRRRRDDDD). All these tunable parameters + together decide when data fed into an RRRRRRRRDDDD is to be + regarded as invalid. Invalid data is entered into the + database as *UNKNOWN*. + + The main application of the ttttuuuunnnneeee function is to relax the + validation rules on an RRRRRRRRDDDD. This allows to fill a new RRRRRRRRDDDD + with data available in larger intervals than what you + would normally want to permit. + + _f_i_l_e_n_a_m_e + The name of the RRRRRRRRDDDD you want to tune. + + --------hhhheeeeaaaarrrrttttbbbbeeeeaaaatttt|----hhhh _d_s_-_n_a_m_e:_h_e_a_r_t_b_e_a_t + modify the _h_e_a_r_t_b_e_a_t of a data source. By setting + this to a high value the rrd will accept things + like one value per day ... + + --------mmmmiiiinnnniiiimmmmuuuummmm|----iiii _d_s_-_n_a_m_e:_m_i_n + alter the minimum value acceptable as input from + the data source. Setting _m_i_n to 'U' will disable + this limit. + + --------mmmmaaaaxxxxiiiimmmmuuuummmm|----aaaa _d_s_-_n_a_m_e:_m_a_x + alter the maximum value acceptable as input from + the data source. Setting _m_a_x to 'U' will disable + this limit. - --------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee----ttttyyyyppppeeee|----dddd _d_s_-_n_a_m_e:_D_S_T - alter the type DDDDSSSSTTTT of a data source. + --------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee----ttttyyyyppppeeee|----dddd _d_s_-_n_a_m_e:_D_S_T + alter the type DDDDSSSSTTTT of a data source. - [--------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee----rrrreeeennnnaaaammmmeeee|----rrrr _o_l_d_-_n_a_m_e:_n_e_w_-_n_a_m_e] - rename a data source + [--------ddddaaaattttaaaa----ssssoooouuuurrrrcccceeee----rrrreeeennnnaaaammmmeeee|----rrrr _o_l_d_-_n_a_m_e:_n_e_w_-_n_a_m_e] + rename a data source EEEEXXXXAAAAMMMMPPPPLLLLEEEE - `rrdtool tune data.rrd -h in:100000 -h out:100000 -h - through:100000' - - - - - -2001-02-20 Last change: 1.0.33 1 - - - - - - -rrdtool RRDTUNE(1) - - + "rrdtool tune data.rrd -h in:100000 -h out:100000 -h + through:100000" - Set the minimum required heartbeat for data sources 'in', - 'out' and 'through' to 10000 seconds which is a little over - one day in data.rrd. This would allow to feed old data from - mrtg-2.0 right into rrdtool without generating *UNKNOWN* - entries. + Set the minimum required heartbeat for data sources 'in', + 'out' and 'through' to 10000 seconds which is a little + over one day in data.rrd. This would allow to feed old + data from mrtg-2.0 right into rrdtool without generating + *UNKNOWN* entries. AAAAUUUUTTTTHHHHOOOORRRR - Tobias Oetiker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -2001-02-20 Last change: 1.0.33 2 + Tobias Oetiker +2002-02-26 1.0.40 RRDTUNE(1) Added: trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.txt 2002-11-09 12:31:57.000000000 -0800 @@ -0,0 +1,131 @@ +RRDXPORT(1) rrdtool RRDXPORT(1) + + + +NNNNAAAAMMMMEEEE + rrdtool xport - Export data in XML format based on data + from one or several RRD + +SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS + rrrrrrrrddddttttoooooooollll xxxxppppoooorrrrtttt [----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s] [----eeee|--------eeeennnndddd _s_e_c_o_n_d_s] + [----mmmm|--------mmmmaaaaxxxxrrrroooowwwwssss _r_o_w_s] [--------sssstttteeeepppp _v_a_l_u_e] [DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s_- + _n_a_m_e::::_C_F] [CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n_-_e_x_p_r_e_s_s_i_o_n] [XXXXPPPPOOOORRRRTTTT::::_v_n_a_m_e[::::_l_e_g_- + _e_n_d]] + +DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN + The xxxxppppoooorrrrtttt functions main purpose is to write XML formatted + representation of the data stored in one or several RRRRRRRRDDDDs. + It can also extract numerical reports. + + If no _X_P_O_R_T statements are found, there will be no output. + + ----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s (default end-1day) + The time when the exported range should begin. Time in + seconds since epoch (1970-01-01) is required. Negative + numbers are relative to the current time. By default + one day worth of data will be printed. See also AT- + STYLE TIME SPECIFICATION section in the _r_r_d_f_e_t_c_h docu- + mentation for a detailed explanation on how to specify + time. + + ----eeee|--------eeeennnndddd _s_e_c_o_n_d_s (default now) + The time when the exported range should end. Time in + seconds since epoch. See also AT-STYLE TIME SPECIFI- + CATION section in the _r_r_d_f_e_t_c_h documentation for a + detailed explanation of ways to specify time. + + ----mmmm|--------mmmmaaaaxxxxrrrroooowwwwssss _r_o_w_s (default 400 rows) + This works like the ----wwww|--------wwwwiiiiddddtttthhhh parameter of _r_r_d_g_r_a_p_h. + In fact it is exactly the same, but the parameter was + renamed to describe its purpose in this module. See + _r_r_d_g_r_a_p_h documentation for details. + + --------sssstttteeeepppp _v_a_l_u_e (default automatic) + See _r_r_d_g_r_a_p_h documentation. + + DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s_-_n_a_m_e::::_C_F + See _r_r_d_g_r_a_p_h documentation. + + CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n_-_e_x_p_r_e_s_s_i_o_n + See _r_r_d_g_r_a_p_h documentation. + + XXXXPPPPOOOORRRRTTTT::::_v_n_a_m_e::::::::_l_e_g_e_n_d + At least one _X_P_O_R_T statement should be present. The + values referenced by _v_n_a_m_e are printed. Optionally add + a legend. + + OOOOuuuuttttppppuuuutttt ffffoooorrrrmmmmaaaatttt + + The output is enclosed in a xxxxppppoooorrrrtttt element and contains two + blocks. The first block is enclosed by a mmmmeeeettttaaaa element and + contains some meta data. The second block is enclosed by a + ddddaaaattttaaaa element and contains the data rows. + + Let's assume that the _x_p_o_r_t command looks like this: + + + rrdtool xport \ + --start now-1h --end now \ + DEF:xx=host-inout.lo.rrd:output:AVERAGE \ + DEF:yy=host-inout.lo.rrd:input:AVERAGE \ + CDEF:aa=xx,yy,+,8,* \ + XPORT:xx:"out bytes" \ + XPORT:aa:"in and out bits" + + The resulting meta data section (the values will depend on + the RRD characteristics): + + + 1020611700 + 300 + 1020615600 + 14 + 2 + + out bytes + in and out bits + + + + The resulting data section: + + + 10206117003.4000000000e+005.4400000000e+01 + 10206120003.4000000000e+005.4400000000e+01 + 10206123003.4000000000e+005.4400000000e+01 + 10206126003.4113333333e+005.4581333333e+01 + 10206129003.4000000000e+005.4400000000e+01 + 10206132003.4000000000e+005.4400000000e+01 + 10206135003.4000000000e+005.4400000000e+01 + 10206138003.4000000000e+005.4400000000e+01 + 10206141003.4000000000e+005.4400000000e+01 + 10206144003.4000000000e+005.4400000000e+01 + 10206147003.7333333333e+005.9733333333e+01 + 10206150003.4000000000e+005.4400000000e+01 + 10206153003.4000000000e+005.4400000000e+01 + 1020615600NaNNaN + + + +EEEEXXXXAAAAMMMMPPPPLLLLEEEE 1111 + rrdtool xport \ + DEF:out=if1-inouts.rrd:outoctets:AVERAGE \ + XPORT:out:"out bytes" + + +EEEEXXXXAAAAMMMMPPPPLLLLEEEE 2222 + rrdtool xport \ + DEF:out1=if1-inouts.rrd:outoctets:AVERAGE \ + DEF:out2=if2-inouts.rrd:outoctets:AVERAGE \ + CDEF:sum=out1,out2,+ \ + XPORT:out1:"if1 out bytes" \ + XPORT:out2:"if2 out bytes" \ + XPORT:sum:"output sum" + + +AAAAUUUUTTTTHHHHOOOORRRR + Tobias Oetiker + + + +2002-05-29 1.0.40 RRDXPORT(1) Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.html 2002-11-09 12:31:57.000000000 -0800 @@ -17,6 +17,7 @@

  • DESCRIPTION
    • +
    • RESOLUTION INTERVAL
    • AT-STYLE TIME SPECIFICATION
    • TIME REFERENCE SPECIFICATION
    • TIME OFFSET SPECIFICATION
    • @@ -61,7 +62,7 @@
      what interval should the values have (seconds per value). rrdfetch will try to match your request, but it will return data even if no absolute -match is possible. +match is possible. NB. See note below.

      --start|-s start (default end-1day)
      @@ -77,6 +78,48 @@ end time.

      +

      RESOLUTION INTERVAL

      +

      In order to get rrdtool to fetch anything other than the finest resolution RRA +both the start and end time must be specified on boundaries that are +multiples of the wanted resolution. Consider the following example:

      +
      + rrdtool create subdata.rrd -s 10 DS:ds0:GAUGE:300:0:U \
      +  RRA:AVERAGE:0.5:30:3600 \
      +  RRA:AVERAGE:0.5:90:1200 \
      +  RRA:AVERAGE:0.5:360:1200 \
      +  RRA:MAX:0.5:360:1200 \
      +  RRA:AVERAGE:0.5:8640:600 \
      +  RRA:MAX:0.5:8640:600
      +

      This RRD collects data every 10 seconds and stores its averages over 5 minutes, +15 minutes, 1 hour and 1 day as well as the maxima for 1 hour and 1 day.

      +

      Consider now that you want too fetch the 15 minute average data for last hour. +So you might try

      +
      + rrdtool fetch subdata.rrd AVERAGE -r 900 -s -1h
      +

      However, this will almost always result in a time series that is NOT in the 15 +minute RRA. Therefore the highest resolution RRA, i.e. 5 minute averages, will +be chosen which, in this case, is not what you want.

      +

      Hence, make sure that

      +
        +
      1. +both start and end time are a multiple of 900 +

        +
      2. +both start and end time are within the wanted RRA +

      +

      So, if time now is called ``t'',

      +
      + do end time == int(t/900)*900,
      + start time == end time -1hour, resolution == 900.
      +

      In e.g. bash this could look as:

      +
      + TIME=$(date +%s); RRDRES=900; rrdtool fetch subdata.rrd AVERAGE -r $RRDRES \
      + -e $(echo $(($TIME/$RRDRES*$RRDRES))) -s e-1h
      +

      Or in perl:

      +
      + perl -e '$ctime = time; $rrdres = 900; system "rrdtool fetch subdata.rrd AVERAGE \
      + -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"'
      +

      AT-STYLE TIME SPECIFICATION

      Apart from the traditional Seconds since epoch, rrdtool does also understand at-style time specification. The specification is called Modified: trunk/orca/packages/rrdtool-1.0.40/doc/bin_dec_hex.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/bin_dec_hex.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/bin_dec_hex.txt 2002-11-09 12:31:58.000000000 -0800 @@ -1,528 +1,414 @@ - - - -rrdtool BIN_DEC_HEX(1) +BIN_DEC_HEX(1) rrdtool BIN_DEC_HEX(1) NNNNAAAAMMMMEEEE - Binary Decimal Hexadecimal - How does it work + Binary Decimal Hexadecimal - How does it work DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - Most people use the decimal numbering system. This system - uses ten symbols to represent numbers. When those ten - symbols are used up, they start all over again and increment - the position just before this. The digit 0 is only shown if - it is the only symbol in the sequence, or if it is not the - first one. - - If this sounds as crypto to you, this is what I've said in - numbers: - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - - and so on. - - Each time the digit nine should be incremented, it is reset - to 0 and the position before is incremented. Then number 9 - can be seen as "00009" and when we should increment 9, we - reset it to zero and increment the digit just before the 9 - so the number becomes "00010". For zero's we write a space - if it is not the only digit (so: number 0) and if it is the - first digit: "00010" -> " 0010" -> " 010" -> " 10". It is - not " 1 ". - - This was pretty basic, you already knew this. Why did I tell - it ? Well, computers do not represent numbers with 10 - different digits. They know of only two different symbols, - being 0 and 1. Apply the same rules to this set of digits - and you get the binary numbering system: - - - - - - - - - - -2001-02-20 Last change: 1.0.33 1 - - - - - - -rrdtool BIN_DEC_HEX(1) - - - - 0 - 1 - 10 - 11 - 100 - 101 - 110 - 111 - 1000 - 1001 - 1010 - 1011 - 1100 - 1101 - - and so on. - - If you count the number of rows, you'll see that these are - again 14 different numbers. The numbers are the same and - mean the same. It is only a different representation. This - means that you have to know the representation used, or as - it is called the numbering system or base. Normally if we - do not speak about the numbering system used, we're using - the decimal system. If we are talking about another - numbering system, we'll have to make that clear. There are a - few wide-spread methods to do so. One common form is to - write _1_0_1_0(2) which means that you wrote down a number in - the binary form. It is the number ten. If you would write - 1010 it means the number one thousand and ten. - - In books, another form is most used. It uses subscript - (little chars, more or less in between two rows). You can - leave out the parentheses in that case and write down the - number in normal characters followed with a little two just - behind it. - - The numbering system used is also called the base. We talk - of the number 1100 base 2, the number 12 base 10. - - For the binary system, is is common to write leading zero's. - The numbers are written down in series of four, eight or - sixteen depending on the context. - - We can use the binary form when talking to computers - (...programming...) but the numbers will have large - representations. The number 65535 would be written down as - _1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1(2) which is 16 times the digit 1. This is - difficult and prone to errors. Therefore we normally would - use another base, called hexadecimal. It uses 16 different - symbols. First the symbols from the decimal system are used, - thereafter we continue with the alphabetic characters. We - get 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. This - - - -2001-02-20 Last change: 1.0.33 2 - - - - - - -rrdtool BIN_DEC_HEX(1) - - - - system is chosen because the hexadecimal form can be - converted into the binary system very easy (and back). - - There is yet another system in use, called the octal system. - This was more common in the old days but not anymore. You - will find it in use on some places so get used to it. The - same story applies, but now with only eight different - symbols. - - Binary (2) - Octal (8) - Decimal (10) - Hexadecimal (16) - - (2) (8) (10) (16) - 00000 0 0 0 - 00001 1 1 1 - 00010 2 2 2 - 00011 3 3 3 - 00100 4 4 4 - 00101 5 5 5 - 00110 6 6 6 - 00111 7 7 7 - 01000 10 8 8 - 01001 11 9 9 - 01010 12 10 A - 01011 13 11 B - 01100 14 12 C - 01101 15 13 D - 01110 16 14 E - 01111 17 15 F - 10000 20 16 10 - 10001 21 17 11 - 10010 22 18 12 - 10011 23 19 13 - 10100 24 20 14 - 10101 25 21 15 - - Most computers used nowadays are using bytes of eight bits. - This means that they store eight bits at a time. You can see - why the octal system is not the most preferred for that: - You'd need three digits to represent the eight bits and this - means that you'd have to use one complete digit to represent - only two bits (2+3+3=8). This is a waste. For hexadecimal - digits, you need only two digits which are used completely: - - (2) (8) (10) (16) - 11111111 377 255 FF - - You can see why binary and hexadecimal can be converted - quickly: For each hexadecimal digit there are exactly four - binary digits. Take a binary number. Each time take four - - - -2001-02-20 Last change: 1.0.33 3 - - - - - - -rrdtool BIN_DEC_HEX(1) - - - - digits from the right and make a hexadecimal digit from it - (see the table above). Stop when there are no more digits. - Other way around: Take a hexadecimal number. For each digit, - write down its binary equivalent. - - Computers (or rather the parsers running on them) would have - a hard time converting a number like 1234(16). Therefore - hexadecimal numbers get a prefix. This prefix depends on the - language you're writing in. Some of the prefixes are "0x" - for C, "$" for Pascal, "#" for HTML. It is common to assume - that if a number starts with a zero, it is octal. It does - not matter what is used as long as you know what it is. I - will use "0x" for hexadecimal, "%" for binary and "0" for - octal. The following numbers are all the same, just the way - they are written is different: 021 0x11 17 %00010001 - - To do arithmetics and conversions you need to understand one - more thing. It is something you already know but perhaps - you do not "see" it yet: - - If you write down 1234, (so it is decimal) you are talking - about the number one thousand, two hundred and thirty four. - In sort of a formula: - - 1 * 1000 = 1000 - 2 * 100 = 200 - 3 * 10 = 30 - 4 * 1 = 4 - - This can also be written as: - - 1 * 10^3 - 2 * 10^2 - 3 * 10^1 - 4 * 10^0 - - where ^ means "to the power of". - - We are using the base 10, and the positions 0,1,2 and 3. - The right-most position should NOT be multiplied with 10. - The second from the right should be multiplied one time with - 10. The third from the right is multiplied with 10 two - times. This continues for whatever positions are used. - - It is the same in all other representations: - - 0x1234 will be - - 1 * 16^3 - 2 * 16^2 - 3 * 16^1 - 4 * 16^0 - - - -2001-02-20 Last change: 1.0.33 4 - - - - - - -rrdtool BIN_DEC_HEX(1) + Most people use the decimal numbering system. This system + uses ten symbols to represent numbers. When those ten sym- + bols are used up, they start all over again and increment + the position just before this. The digit 0 is only shown + if it is the only symbol in the sequence, or if it is not + the first one. + + If this sounds as crypto to you, this is what I've said in + numbers: + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + + and so on. + + Each time the digit nine should be incremented, it is + reset to 0 and the position before is incremented. Then + number 9 can be seen as "00009" and when we should incre- + ment 9, we reset it to zero and increment the digit just + before the 9 so the number becomes "00010". For zero's we + write a space if it is not the only digit (so: number 0) + and if it is the first digit: "00010" -> " 0010" -> " + 010" -> " 10". It is not " 1 ". + + This was pretty basic, you already knew this. Why did I + tell it ? Well, computers do not represent numbers with + 10 different digits. They know of only two different sym- + bols, being 0 and 1. Apply the same rules to this set of + digits and you get the binary numbering system: + + 0 + 1 + 10 + 11 + 100 + 101 + 110 + 111 + 1000 + 1001 + 1010 + 1011 + 1100 + 1101 + + and so on. + + If you count the number of rows, you'll see that these are + again 14 different numbers. The numbers are the same and + mean the same. It is only a different representation. This + means that you have to know the representation used, or as + it is called the numbering system or base. Normally if we + do not speak about the numbering system used, we're using + the decimal system. If we are talking about another num- + bering system, we'll have to make that clear. There are a + few wide-spread methods to do so. One common form is to + write _1_0_1_0(2) which means that you wrote down a number in + the binary form. It is the number ten. If you would write + 1010 it means the number one thousand and ten. + + In books, another form is most used. It uses subscript + (little chars, more or less in between two rows). You can + leave out the parentheses in that case and write down the + number in normal characters followed with a little two + just behind it. + + The numbering system used is also called the base. We talk + of the number 1100 base 2, the number 12 base 10. + + For the binary system, is is common to write leading + zero's. The numbers are written down in series of four, + eight or sixteen depending on the context. + + We can use the binary form when talking to computers + (...programming...) but the numbers will have large rep- + resentations. The number 65535 would be written down as + _1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1(2) which is 16 times the digit 1. This + is difficult and prone to errors. Therefore we normally + would use another base, called hexadecimal. It uses 16 + different symbols. First the symbols from the decimal sys- + tem are used, thereafter we continue with the alphabetic + characters. We get 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, + D, E and F. This system is chosen because the hexadecimal + form can be converted into the binary system very easy + (and back). + + There is yet another system in use, called the octal sys- + tem. This was more common in the old days but not anymore. + You will find it in use on some places so get used to it. + The same story applies, but now with only eight different + symbols. + + Binary (2) + Octal (8) + Decimal (10) + Hexadecimal (16) - 01234 would be - 1 * 8^3 - 2 * 8^2 - 3 * 8^1 - 4 * 8^0 - This example can not be done for binary as that system can - only use two symbols. Another example: - %1010 would be - 1 * 2^3 - 0 * 2^2 - 1 * 2^1 - 0 * 2^0 - It would have been more easy to convert it to its - hexadecimal form and just translate %1010 into 0xA. After a - while you get used to it. You will not need to do any - calculations anymore but just know that 0xA means 10. - To convert a decimal number into a hexadecimal one you could - use the next method. It will take some time to be able to do - the estimates but it will be more and more easy when you use - the system more frequent. Another way is presented to you - thereafter. - First you will need to know how many positions will be used - in the other system. To do so, you need to know the maximum - numbers. Well, that's not so hard as it looks. In decimal, - the maximum number that you can form with two digits is - "99". The maximum for three: "999". The next number would - need an extra position. Reverse this idea and you will see - that the number can be found by taking 10^3 (10*10*10 is - 1000) minus 1 or 10^2 minus one. - This can be done for hexadecimal too: - 16^4 = 0x10000 = 65536 - 16^3 = 0x1000 = 4096 - 16^2 = 0x100 = 256 - 16^1 = 0x10 = 16 - If a number is smaller than 65536 it will thus fit in four - positions. If the number is bigger than 4095, you will need - to use position 4. How many times can you take 4096 from - the number without going below zero is the first digit you - write down. This will always be a number from 1 to 15 (0x1 - to 0xF). Do the same for the other positions. - - -2001-02-20 Last change: 1.0.33 5 - - - - - - -rrdtool BIN_DEC_HEX(1) - - - - Number is 41029. It is smaller than 16^4 but bigger than - 16^3-1. This means that we have to use four positions. We - can subtract 16^3 from 41029 ten times without going below - zero. The leftmost digit will be "A" so we have 0xA????. - The number is reduced to 41029 - 10*4096 = 41029-40960 = 69. - 69 is smaller than 16^3 but not bigger than 16^2-1. The - second digit is therefore "0" and we know 0xA0??. 69 is - smaller than 16^2 and bigger than 16^1-1. We can subtract - 16^1 (which is just plain 16) four times and write down "4" - to get 0xA04?. Take 64 from 69 (69 - 4*16) and the last - digit is 5 --> 0xA045. - - The other method builds the number from the right. Take - again 41029. Divide by 16 and do not use fractions (only - whole numbers). - - 41029 / 16 is 2564 with a remainder of 5. Write down 5. - 2564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. - 160 / 16 is 10 with no remainder. Prepend 45 with 0. - 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045. - - Which method to use is up to you. Use whatever works for - you. Personally I use them both without being able to tell - what method I use in each case, it just depends on the - number, I think. Fact is, some numbers will occur frequently - while programming, if the number is close then I will use - the first method (like 32770, translate into 32768 + 2 and - just know that it is 0x8000 + 0x2 = 0x8002). - - For binary the same approach can be used. The base is 2 and - not 16, and the number of positions will grow rapidly. Using - the second method has the advantage that you can see very - simple if you should write down a zero or a one: if you - divide by two the remainder will be zero if it was an even - number and one if it was an odd number: - - 41029 / 2 = 20514 remainder 1 - 20514 / 2 = 10257 remainder 0 - 10257 / 2 = 5128 remainder 1 - 5128 / 2 = 2564 remainder 0 - 2564 / 2 = 1282 remainder 0 - 1282 / 2 = 641 remainder 0 - 641 / 2 = 320 remainder 1 - 320 / 2 = 160 remainder 0 - 160 / 2 = 80 remainder 0 - 80 / 2 = 40 remainder 0 - 40 / 2 = 20 remainder 0 - 20 / 2 = 10 remainder 0 - 10 / 2 = 5 remainder 0 - 5 / 2 = 2 remainder 1 - 2 / 2 = 1 remainder 0 - 1 / 2 below 0 remainder 1 - - - -2001-02-20 Last change: 1.0.33 6 - - - - - - -rrdtool BIN_DEC_HEX(1) - - - - Write down the results from right to left: %1010000001000101 - - Group by four: - - %1010000001000101 - %101000000100 0101 - %10100000 0100 0101 - %1010 0000 0100 0101 - - Convert into hexadecimal: 0xA045 - - Group %1010000001000101 by three and convert into octal: - - %1010000001000101 - %1010000001000 101 - %1010000001 000 101 - %1010000 001 000 101 - %1010 000 001 000 101 - %1 010 000 001 000 101 - %001 010 000 001 000 101 - 1 2 0 1 0 5 --> 0120105 - - So: %1010000001000101 = 0120105 = 0xA045 = 41029 - Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029(10) - Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029 - - At first while adding numbers, you'll convert them to their - decimal form and then back into their original form after - doing the addition. If you use the other numbering system - often, you will see that you'll be able to do arithmetics in - the base that is used. In any representation it is the - same, add the numbers on the right, write down the rightmost - digit from the result, remember the other digits and use - them in the next round. Continue with the second digits from - the right and so on: - - %1010 + %0111 --> 10 + 7 --> 17 --> %00010001 - - will become - - %1010 - %0111 + - |||| - |||+-- add 0 + 1, result is 1, nothing to remember - ||+--- add 1 + 1, result is %10, write down 0 and remember 1 - |+---- add 0 + 1 + 1(remembered), result = 0, remember 1 - +----- add 1 + 0 + 1(remembered), result = 0, remember 1 - nothing to add, 1 remembered, result = 1 - -------- - %10001 is the result, I like to write it as %00010001 - - For low values, try to do the calculations yourself, check - - - -2001-02-20 Last change: 1.0.33 7 - - - - - - -rrdtool BIN_DEC_HEX(1) - - - - them with a calculator. The more you do the calculations - yourself, the more you find that you didn't make mistakes. - In the end, you'll do calculi in other bases as easy as you - do in decimal. - - When the numbers get bigger, you'll have to realize that a - computer is not called a computer just to have a nice name. - There are many different calculators available. Use them. - For Unix you could use "bc" which is called so as it is - short for Binary Calculator. It calculates not only in - decimal, but in all bases you'll ever use (among them - Binary). - - For people on Windows: Start the calculator - (start->programs->accessories->calculator) and if necessary - click view->scientific. You now have a scientific calculator - and can compute in binary or hexadecimal. + (2) (8) (10) (16) + 00000 0 0 0 + 00001 1 1 1 + 00010 2 2 2 + 00011 3 3 3 + 00100 4 4 4 + 00101 5 5 5 + 00110 6 6 6 + 00111 7 7 7 + 01000 10 8 8 + 01001 11 9 9 + 01010 12 10 A + 01011 13 11 B + 01100 14 12 C + 01101 15 13 D + 01110 16 14 E + 01111 17 15 F + 10000 20 16 10 + 10001 21 17 11 + 10010 22 18 12 + 10011 23 19 13 + 10100 24 20 14 + 10101 25 21 15 + + Most computers used nowadays are using bytes of eight + bits. This means that they store eight bits at a time. You + can see why the octal system is not the most preferred for + that: You'd need three digits to represent the eight bits + and this means that you'd have to use one complete digit + to represent only two bits (2+3+3=8). This is a waste. For + hexadecimal digits, you need only two digits which are + used completely: + + (2) (8) (10) (16) + 11111111 377 255 FF + + You can see why binary and hexadecimal can be converted + quickly: For each hexadecimal digit there are exactly four + binary digits. Take a binary number. Each time take four + digits from the right and make a hexadecimal digit from it + (see the table above). Stop when there are no more digits. + Other way around: Take a hexadecimal number. For each + digit, write down its binary equivalent. + + Computers (or rather the parsers running on them) would + have a hard time converting a number like 1234(16). There- + fore hexadecimal numbers get a prefix. This prefix depends + on the language you're writing in. Some of the prefixes + are "0x" for C, "$" for Pascal, "#" for HTML. It is com- + mon to assume that if a number starts with a zero, it is + octal. It does not matter what is used as long as you + know what it is. I will use "0x" for hexadecimal, "%" for + binary and "0" for octal. The following numbers are all + the same, just the way they are written is different: 021 + 0x11 17 %00010001 + + To do arithmetics and conversions you need to understand + one more thing. It is something you already know but per- + haps you do not "see" it yet: + + If you write down 1234, (so it is decimal) you are talking + about the number one thousand, two hundred and thirty + four. In sort of a formula: + + + + 1 * 1000 = 1000 + 2 * 100 = 200 + 3 * 10 = 30 + 4 * 1 = 4 + + This can also be written as: + + 1 * 10^3 + 2 * 10^2 + 3 * 10^1 + 4 * 10^0 + + where ^ means "to the power of". + + We are using the base 10, and the positions 0,1,2 and 3. + The right-most position should NOT be multiplied with 10. + The second from the right should be multiplied one time + with 10. The third from the right is multiplied with 10 + two times. This continues for whatever positions are used. + + It is the same in all other representations: + + 0x1234 will be + + 1 * 16^3 + 2 * 16^2 + 3 * 16^1 + 4 * 16^0 + + 01234 would be + + 1 * 8^3 + 2 * 8^2 + 3 * 8^1 + 4 * 8^0 + + This example can not be done for binary as that system can + only use two symbols. Another example: + + %1010 would be + + 1 * 2^3 + 0 * 2^2 + 1 * 2^1 + 0 * 2^0 + + It would have been more easy to convert it to its hexadec- + imal form and just translate %1010 into 0xA. After a while + you get used to it. You will not need to do any calcula- + tions anymore but just know that 0xA means 10. + + To convert a decimal number into a hexadecimal one you + could use the next method. It will take some time to be + able to do the estimates but it will be more and more easy + when you use the system more frequent. Another way is pre- + sented to you thereafter. + + First you will need to know how many positions will be + used in the other system. To do so, you need to know the + maximum numbers. Well, that's not so hard as it looks. In + decimal, the maximum number that you can form with two + digits is "99". The maximum for three: "999". The next + number would need an extra position. Reverse this idea and + you will see that the number can be found by taking 10^3 + (10*10*10 is 1000) minus 1 or 10^2 minus one. + + This can be done for hexadecimal too: + + 16^4 = 0x10000 = 65536 + 16^3 = 0x1000 = 4096 + 16^2 = 0x100 = 256 + 16^1 = 0x10 = 16 + + If a number is smaller than 65536 it will thus fit in four + positions. If the number is bigger than 4095, you will + need to use position 4. How many times can you take 4096 + from the number without going below zero is the first + digit you write down. This will always be a number from 1 + to 15 (0x1 to 0xF). Do the same for the other positions. + + Number is 41029. It is smaller than 16^4 but bigger than + 16^3-1. This means that we have to use four positions. We + can subtract 16^3 from 41029 ten times without going below + zero. The leftmost digit will be "A" so we have 0xA????. + The number is reduced to 41029 - 10*4096 = 41029-40960 = + 69. 69 is smaller than 16^3 but not bigger than 16^2-1. + The second digit is therefore "0" and we know 0xA0??. 69 + is smaller than 16^2 and bigger than 16^1-1. We can sub- + tract 16^1 (which is just plain 16) four times and write + down "4" to get 0xA04?. Take 64 from 69 (69 - 4*16) and + the last digit is 5 --> 0xA045. + + The other method builds the number from the right. Take + again 41029. Divide by 16 and do not use fractions (only + whole numbers). + + 41029 / 16 is 2564 with a remainder of 5. Write down 5. + 2564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. + 160 / 16 is 10 with no remainder. Prepend 45 with 0. + 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045. + + Which method to use is up to you. Use whatever works for + you. Personally I use them both without being able to tell + what method I use in each case, it just depends on the + number, I think. Fact is, some numbers will occur fre- + quently while programming, if the number is close then I + will use the first method (like 32770, translate into + 32768 + 2 and just know that it is 0x8000 + 0x2 = 0x8002). + + For binary the same approach can be used. The base is 2 + and not 16, and the number of positions will grow rapidly. + Using the second method has the advantage that you can see + very simple if you should write down a zero or a one: if + you divide by two the remainder will be zero if it was an + even number and one if it was an odd number: + + 41029 / 2 = 20514 remainder 1 + 20514 / 2 = 10257 remainder 0 + 10257 / 2 = 5128 remainder 1 + 5128 / 2 = 2564 remainder 0 + 2564 / 2 = 1282 remainder 0 + 1282 / 2 = 641 remainder 0 + 641 / 2 = 320 remainder 1 + 320 / 2 = 160 remainder 0 + 160 / 2 = 80 remainder 0 + 80 / 2 = 40 remainder 0 + 40 / 2 = 20 remainder 0 + 20 / 2 = 10 remainder 0 + 10 / 2 = 5 remainder 0 + 5 / 2 = 2 remainder 1 + 2 / 2 = 1 remainder 0 + 1 / 2 below 0 remainder 1 + + Write down the results from right to left: + %1010000001000101 + + Group by four: + + %1010000001000101 + %101000000100 0101 + %10100000 0100 0101 + %1010 0000 0100 0101 + + Convert into hexadecimal: 0xA045 + + Group %1010000001000101 by three and convert into octal: + + %1010000001000101 + %1010000001000 101 + %1010000001 000 101 + %1010000 001 000 101 + %1010 000 001 000 101 + %1 010 000 001 000 101 + %001 010 000 001 000 101 + 1 2 0 1 0 5 --> 0120105 + + So: %1010000001000101 = 0120105 = 0xA045 = 41029 + Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029(10) + Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029 + + At first while adding numbers, you'll convert them to + their decimal form and then back into their original form + after doing the addition. If you use the other numbering + system often, you will see that you'll be able to do + arithmetics in the base that is used. In any representa- + tion it is the same, add the numbers on the right, write + down the rightmost digit from the result, remember the + other digits and use them in the next round. Continue with + the second digits from the right and so on: + + %1010 + %0111 --> 10 + 7 --> 17 --> %00010001 + + will become + + %1010 + %0111 + + |||| + |||+-- add 0 + 1, result is 1, nothing to remember + ||+--- add 1 + 1, result is %10, write down 0 and remember 1 + |+---- add 0 + 1 + 1(remembered), result = 0, remember 1 + +----- add 1 + 0 + 1(remembered), result = 0, remember 1 + nothing to add, 1 remembered, result = 1 + -------- + %10001 is the result, I like to write it as %00010001 + + For low values, try to do the calculations yourself, check + them with a calculator. The more you do the calculations + yourself, the more you find that you didn't make mistakes. + In the end, you'll do calculi in other bases as easy as + you do in decimal. + + When the numbers get bigger, you'll have to realize that a + computer is not called a computer just to have a nice + name. There are many different calculators available. Use + them. For Unix you could use "bc" which is called so as it + is short for Binary Calculator. It calculates not only in + decimal, but in all bases you'll ever use (among them + Binary). + + For people on Windows: Start the calculator (start->pro- + grams->accessories->calculator) and if necessary click + view->scientific. You now have a scientific calculator and + can compute in binary or hexadecimal. AAAAUUUUTTTTHHHHOOOORRRR - I hope you enjoyed the examples and their descriptions. If - you do, help other people by pointing them to this document - when they are asking basic questions. They will not only get - their answer but at the same time learn a whole lot more. - - Alex van den Bogaerdt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + I hope you enjoyed the examples and their descriptions. If + you do, help other people by pointing them to this docu- + ment when they are asking basic questions. They will not + only get their answer but at the same time learn a whole + lot more. -2001-02-20 Last change: 1.0.33 8 + Alex van den Bogaerdt +2002-02-26 1.0.40 BIN_DEC_HEX(1) Added: trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.pod ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.pod (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.pod 2002-11-09 12:31:58.000000000 -0800 @@ -0,0 +1,140 @@ +=head1 NAME + +rrdtool xport - Export data in XML format based on data from one or several RRD + +=for html

      PDF version.
      + +=head1 SYNOPSIS + +B B +S<[B<-s>|B<--start> I]> +S<[B<-e>|B<--end> I]> +S<[B<-m>|B<--maxrows> I]> +S<[B<--step> I]> +S<[BIB<=>IB<:>IB<:>I]> +S<[BIB<=>I]> +S<[BB<:>I[B<:>I]]> + +=head1 DESCRIPTION + +The B functions main purpose is to write XML formatted +representation of the data stored in one or several Bs. It +can also extract numerical reports. + +If no I statements are found, there will be no output. + +=over + +=item B<-s>|B<--start> I (default end-1day) + +The time when the exported range should begin. Time in seconds since +epoch (1970-01-01) is required. Negative numbers are relative to the +current time. By default one day worth of data will be printed. +See also AT-STYLE TIME SPECIFICATION section in the I +documentation for a detailed explanation on how to specify time. + +=item B<-e>|B<--end> I (default now) + +The time when the exported range should end. Time in seconds since epoch. +See also AT-STYLE TIME SPECIFICATION section in the I +documentation for a detailed explanation of ways to specify time. + +=item B<-m>|B<--maxrows> I (default 400 rows) + +This works like the B<-w>|B<--width> parameter of I. +In fact it is exactly the same, but the parameter was renamed to +describe its purpose in this module. See I documentation +for details. + +=item B<--step> I (default automatic) + +See I documentation. + +=item BIB<=>IB<:>IB<:>I + +See I documentation. + +=item BIB<=>I + +See I documentation. + +=item BIB<:>B<:>I + +At least one I statement should be present. The values +referenced by I are printed. Optionally add a legend. + +=back + +=head2 Output format + +The output is enclosed in a B element and contains two +blocks. The first block is enclosed by a B element and +contains some meta data. The second block is enclosed by a +B element and contains the data rows. + +Let's assume that the I command looks like this: + + rrdtool xport \ + --start now-1h --end now \ + DEF:xx=host-inout.lo.rrd:output:AVERAGE \ + DEF:yy=host-inout.lo.rrd:input:AVERAGE \ + CDEF:aa=xx,yy,+,8,* \ + XPORT:xx:"out bytes" \ + XPORT:aa:"in and out bits" + +The resulting meta data section (the values will depend on the +RRD characteristics): + + + 1020611700 + 300 + 1020615600 + 14 + 2 + + out bytes + in and out bits + + + +The resulting data section: + + + 10206117003.4000000000e+005.4400000000e+01 + 10206120003.4000000000e+005.4400000000e+01 + 10206123003.4000000000e+005.4400000000e+01 + 10206126003.4113333333e+005.4581333333e+01 + 10206129003.4000000000e+005.4400000000e+01 + 10206132003.4000000000e+005.4400000000e+01 + 10206135003.4000000000e+005.4400000000e+01 + 10206138003.4000000000e+005.4400000000e+01 + 10206141003.4000000000e+005.4400000000e+01 + 10206144003.4000000000e+005.4400000000e+01 + 10206147003.7333333333e+005.9733333333e+01 + 10206150003.4000000000e+005.4400000000e+01 + 10206153003.4000000000e+005.4400000000e+01 + 1020615600NaNNaN + + + +=head1 EXAMPLE 1 + + rrdtool xport \ + DEF:out=if1-inouts.rrd:outoctets:AVERAGE \ + XPORT:out:"out bytes" + +=head1 EXAMPLE 2 + + rrdtool xport \ + DEF:out1=if1-inouts.rrd:outoctets:AVERAGE \ + DEF:out2=if2-inouts.rrd:outoctets:AVERAGE \ + CDEF:sum=out1,out2,+ \ + XPORT:out1:"if1 out bytes" \ + XPORT:out2:"if2 out bytes" \ + XPORT:sum:"output sum" + + +=head1 AUTHOR + +Tobias Oetiker Eoetiker at ee.ethz.chE + Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.html 2002-11-09 12:31:59.000000000 -0800 @@ -44,6 +44,7 @@ [-x|--x-grid x-axis grid and label] [-y|--y-grid y-axis grid and label] [--alt-y-grid] +[--alt-y-mrtg] [--alt-autoscale] [--alt-autoscale-max] [--units-exponent] value]> @@ -52,11 +53,15 @@ [-h|--height pixels] [-i|--interlaced] [-f|--imginfo formatstring] -[-a|--imgformat GIF|PNG] +[-a|--imgformat GIF|PNG|GD] +[-B|--background value] +[-O|--overlay value] +[-U|--unit value] [-z|--lazy] [-o|--logarithmic] [-u|--upper-limit value] [-l|--lower-limit value] +[-g|--no-legend] [-r|--rigid] [--step value] [-b|--base value] @@ -132,6 +137,9 @@ day and not Monday morning 00:00. Thus the label should be positioned at noon. By defining a precision of 24 hours or rather 86400 seconds, you make sure that this happens.

      +

      If you want to alter the genertated text to another language, use the +LC_TIME environment variable to set the locale you prefere prior to calling +the graph function.

      -y|--y-grid grid step:label factor (default autoconfigure)
      @@ -147,6 +155,11 @@ grid lines and the grid is metric. That is grid lines are placed every 1, 2, 5 or 10 units. (contributed by Sasha Mikheev)

      +
      --alt-y-mrtg
      +
      +Y grid placed on graph Y range mimmics mrtg's (rateup-generated) graphs. +Currently axis is split into 4 parts, just as rateup does. +

      --alt-autoscale
      Compute Y range based on function absolute minimum and @@ -213,9 +226,25 @@
        --imginfo '<IMG SRC="/img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'

      -
      -a|--imgformat GIF|PNG (default: GIF)
      +
      -a|--imgformat GIF|PNG|GD (default: GIF)
      +
      +Allows you to produce PNG or GD output from rrdtool. +

      +
      -B|--background value
      +
      +You could use image in (currently only) GD format for background. It is +used as background at the very beginning of graph creation. +

      +
      -O|--overlay value
      +
      +You could use image in (currently only) GD format as overlay. It is +placed over created graph so that white pixel (color 255,255,255) is +considered transparent, all other is replacing corresponding pixel in created graph. +

      +
      -U|--unit value
      -Allows you to produce PNG output from rrdtool. +You could use unit to be displayed on y axis. It is wise to use only short +units on graph, however.

      -z|--lazy (default: false)
      @@ -373,6 +402,12 @@ the value of this CDEF at the previous time step. This allows you to perform calculations across the data.

      +
      PREV(vname)
      +
      +Push *UNKNOWN* if its at the first value of the data set named vname +or otherwise the value of the CDEF named vname at the previous time step. +This allows you to perform complex calculations across the data. +

      INF, NEGINF
      Push a positive or negative infinite (oo) value onto the stack. When @@ -531,7 +566,7 @@ CDEF:agginput=idat1,UN,0,idat1,IF,idat2,UN,0,idat2,IF,+,8,* \ CDEF:aggoutput=odat1,UN,0,odat1,IF,odat2,UN,0,odat2,IF,+,8,* \ AREA:agginput#00cc00:Input Aggregate \ - LINE1:agginput#0000FF:Output Aggregate + LINE1:aggoutput#0000FF:Output Aggregate
       
      
      Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.html
      ==============================================================================
      --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.html	(original)
      +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.html	2002-11-09 12:32:00.000000000 -0800
      @@ -521,12 +521,12 @@
       understand yet, you should be able to find out how to start the
       program and use it.

      -   snmpget myrouter public system.sysdescr.0
      + snmpget myrouter public system.sysDescr.0

      The device should answer with a description of itself, perhaps empty. Until you got a valid answer from a device, perhaps using a different ``password'', or a different device, there is no point in continuing.

      -   snmpget myrouter public interfaces.ifnumber.0
      + snmpget myrouter public interfaces.ifNumber.0

      Hopefully you get a number as a result, the number of interfaces. If so, you can carry on and try a different program called ``snmpwalk''.

      
      Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.txt
      ==============================================================================
      --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.txt	(original)
      +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.txt	2002-11-09 12:32:00.000000000 -0800
      @@ -1,264 +1,253 @@
      -
      -
      -
      -rrdtool                                               RRDFETCH(1)
      +RRDFETCH(1)                  rrdtool                  RRDFETCH(1)
       
       
       
       NNNNAAAAMMMMEEEE
      -     rrdtool fetch - fetch data from an rrd.
      +       rrdtool fetch - fetch data from an rrd.
       
       SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
      -     rrrrrrrrddddttttoooooooollll ffffeeeettttcccchhhh _f_i_l_e_n_a_m_e _C_F [--------rrrreeeessssoooolllluuuuttttiiiioooonnnn|----rrrr _r_e_s_o_l_u_t_i_o_n]
      -     [--------ssssttttaaaarrrrtttt|----ssss _s_t_a_r_t] [--------eeeennnndddd|----eeee _e_n_d]
      +       rrrrrrrrddddttttoooooooollll ffffeeeettttcccchhhh _f_i_l_e_n_a_m_e _C_F [--------rrrreeeessssoooolllluuuuttttiiiioooonnnn|----rrrr _r_e_s_o_l_u_t_i_o_n]
      +       [--------ssssttttaaaarrrrtttt|----ssss _s_t_a_r_t] [--------eeeennnndddd|----eeee _e_n_d]
       
       DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
      -     The ffffeeeettttcccchhhh function is normally used internally by the graph
      -     function, to get data from RRRRRRRRDDDDs. ffffeeeettttcccchhhh will analyze the RRRRRRRRDDDD
      -     and will try to retrieve the data in the resolution
      -     requested.  The data fetched is printed to stdout. _*_U_N_K_N_O_W_N_*
      -     data is often represented by the string "NaN" depending on
      -     your OSs printf function.
      -
      -     _f_i_l_e_n_a_m_e
      -             the name of the RRRRRRRRDDDD you want to fetch the data from.
      -
      -     _C_F      which consolidation function should have been
      -             applied to the data you want to fetch?
      -             (AVERAGE,MIN,MAX,LAST)
      -
      -     --------rrrreeeessssoooolllluuuuttttiiiioooonnnn|----rrrr _r_e_s_o_l_u_t_i_o_n (default is the highest
      -             resolution)
      -             what interval should the values have (seconds per
      -             value). rrrrrrrrddddffffeeeettttcccchhhh will try to match your request, but
      -             it will return data even if no absolute match is
      -             possible.
      -
      -     --------ssssttttaaaarrrrtttt|----ssss _s_t_a_r_t (default end-1day)
      -             when should the data begin. A time in seconds since
      -             epoch (1970-01-01) is required. Negative numbers are
      -             relative to the current time. By default one day
      -             worth of data will be fetched. See also AT-STYLE
      -             TIME SPECIFICATION section for a detailed
      -             explanation on  ways to specify start time.
      -
      -     --------eeeennnndddd|----eeee _e_n_d (default now)
      -             when should the data end. Time in seconds since
      -             epoch. See also AT-STYLE TIME SPECIFICATION section
      -             for a detailed explanation of how to specify end
      -             time.
      -
      -     AAAATTTT----SSSSTTTTYYYYLLLLEEEE TTTTIIIIMMMMEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
      -
      -     Apart from the traditional _S_e_c_o_n_d_s _s_i_n_c_e _e_p_o_c_h, rrdtool does
      -     also understand at-style time specification.  The
      -     specification is called "at-style" after Unix command _a_t(1)
      -     that has moderately complex ways to specify time to run your
      -     job at.  The at-style specification consists of two parts:
      -     TTTTIIIIMMMMEEEE RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEE specification and TTTTIIIIMMMMEEEE OOOOFFFFFFFFSSSSEEEETTTT specification.
      -
      -
      -
      -
      -2001-02-20             Last change: 1.0.33                      1
      -
      -
      -
      -
      -
      -
      -rrdtool                                               RRDFETCH(1)
      -
      -
      -
      -     TTTTIIIIMMMMEEEE RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
      -
      -     Time reference specification is used, well,... to establish
      -     a reference moment in time (for time offset to be applied
      -     to). When present, it should come first, when omitted, it
      -     defaults to nnnnoooowwww. On its own part, time reference consists of
      -     _t_i_m_e_-_o_f_-_d_a_y reference (which should come first, if present)
      -     and _d_a_y reference.
      -
      -     _T_i_m_e_-_o_f_-_d_a_y can be specified as HHHHHHHH::::MMMMMMMM, HHHHHHHH....MMMMMMMM, or just HHHHHHHH,
      -     you can suffix it with aaaammmm or ppppmmmm or use 24-hours clock. The
      -     few special times of day are understood as well, these
      -     include mmmmiiiiddddnnnniiiigggghhhhtttt (00:00), nnnnoooooooonnnn (12:00) and British tttteeeeaaaattttiiiimmmmeeee
      -     (16:00).
      -
      -     The _d_a_y can be specified as _m_o_n_t_h_-_n_a_m_e _d_a_y_-_o_f_-_t_h_e_-_m_o_n_t_h and
      -     optional 2- or 4-digit _y_e_a_r number (e.g. March 8 1999).
      -     Alternatively, you can use _d_a_y_-_o_f_-_w_e_e_k_-_n_a_m_e (e.g. Monday),
      -     or one of the words: yyyyeeeesssstttteeeerrrrddddaaaayyyy, ttttooooddddaaaayyyy, ttttoooommmmoooorrrrrrrroooowwww.  You can
      -     also specify _d_a_y as a full date in several numerical
      -     formats; these include: MMMMMMMM////DDDDDDDD////[[[[YYYYYYYY]]]]YYYYYYYY, DDDDDDDD....MMMMMMMM....[[[[YYYYYYYY]]]]YYYYYYYY,
      -     YYYYYYYYYYYYYYYYMMMMMMMMDDDDDDDD.
      -
      -     _N_O_T_E_1: this is different from the original _a_t(1) behavior,
      -     which interprets a single-number date as MMDD[YY]YY.
      -
      -     _N_O_T_E_2: if you specify _d_a_y this way, the _t_i_m_e_-_o_f_-_d_a_y is
      -     REQUIRED to be present.
      -
      -     Finally, you can use words nnnnoooowwww, ssssttttaaaarrrrtttt, or eeeennnndddd as your time
      -     reference. NNNNoooowwww refers to the current moment (and is also a
      -     default time reference). SSSSttttaaaarrrrtttt (eeeennnndddd) can be used to specify
      -     time relative to the start (end) time for those tools that
      -     use these categories (rrdfetch, rrdgraph).
      -
      -     Month and weekday names can be used in their naturally
      -     abbreviated form (e.g., Dec for December, Sun for Sunday,
      -     etc.). The words nnnnoooowwww, ssssttttaaaarrrrtttt, eeeennnndddd can be abbreviated to nnnn, ssss,
      -     eeee.
      -
      -     TTTTIIIIMMMMEEEE OOOOFFFFFFFFSSSSEEEETTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
      -
      -     Time offset specification is used to add (or subtract)
      -     certain time interval to (from) the time reference moment.
      -     It consists of _s_i_g_n (++++ or ----) and _a_m_o_u_n_t. The following time
      -     units can be used to specify the _a_m_o_u_n_t: yyyyeeeeaaaarrrrssss, mmmmoooonnnntttthhhhssss,
      -     wwwweeeeeeeekkkkssss, ddddaaaayyyyssss, hhhhoooouuuurrrrssss, mmmmiiiinnnnuuuutttteeeessss, sssseeeeccccoooonnnnddddssss, these can be used in
      -     singular or plural form, and abbreviated naturally or to a
      -     single letter (e.g. +3days, -1wk, -3y). Several time units
      -     can be combined together (e.g., -5mon1w2d), as well as
      -     several time offsets can be concatenated (e.g., -5h45min =
      -     -5h-45min = -6h+15min = -7h+1h30m-15min, etc.)
      -
      -
      -
      -2001-02-20             Last change: 1.0.33                      2
      -
      -
      -
      -
      -
      -
      -rrdtool                                               RRDFETCH(1)
      -
      -
      -
      -     _N_O_T_E_3: If you specify time offset in days, weeks, months, or
      -     years, you will end with the time offset that may vary
      -     depending on you time reference, because all those time
      -     units have no single well defined time interval value
      -     (1 year contains either 365 or 366 days, 1 month is 28 to 31
      -     days long, and even 1 day may be not equal to 24 hours twice
      -     a year, when DST-related clock adjustments take place).  To
      -     cope with this, when you use days, weeks, months, or years
      -     as your time offset units your time reference date is
      -     adjusted accordingly without taking too much further effort
      -     to ensure anything about it (in the hope that _m_k_t_i_m_e(3) will
      -     take care of this later).  This may lead to some surprising
      -     (or even invalid!) results, e.g. 'May 31 -1month' = 'Apr 31'
      -     (meaningless) = 'May 1' (after _m_k_t_i_m_e(3) normalization); in
      -     the EET timezone '3:30am Mar 29 1999 -1 day' yields '3:30am
      -     Mar 28 1999' (Sunday) which is invalid time/date combination
      -     (because of 3am -> 4am DST forward clock adjustment, see the
      -     below example).  On the other hand, hours, minutes, and
      -     seconds are well defined time intervals, and these are
      -     guaranteed to always produce time offsets exactly as
      -     specified (e.g. for EET timezone, '8:00 Mar 27 1999 +2 days'
      -     = '8:00 Mar 29 1999', but since there is 1-hour DST forward
      -     clock adjustment takes place around 3:00 Mar 28 1999, the
      -     actual time interval between 8:00 Mar 27 1999 and
      -     8:00 Mar 29 1999 equals 47 hours; on the other hand,
      -     '8:00 Mar 27 1999 +48 hours' = '9:00 Mar 29 1999', as
      -     expected)
      -
      -     _N_O_T_E_4: The single-letter abbreviation for both mmmmoooonnnntttthhhhssss and
      -     mmmmiiiinnnnuuuutttteeeessss is mmmm. To disambiguate, the parser tries to read your
      -     mind :) by applying the following two heuristics:
      -
      -     1  If mmmm is used in context of (i.e. right after the) years,
      -        months, weeks, or days it is assumed to mean mmmmoooonnnntttthhhhssss,
      -        while in the context of hours, minutes, and seconds it
      -        means minutes.  (e.g., in -1y6m or +3w1m mmmm means mmmmoooonnnntttthhhhssss,
      -        while in -3h20m or +5s2m mmmm means mmmmiiiinnnnuuuutttteeeessss)
      +       The ffffeeeettttcccchhhh function is normally used internally by the
      +       graph function, to get data from RRRRRRRRDDDDs. ffffeeeettttcccchhhh will analyze
      +       the RRRRRRRRDDDD and will try to retrieve the data in the resolu-
      +       tion requested.  The data fetched is printed to stdout.
      +       _*_U_N_K_N_O_W_N_* data is often represented by the string "NaN"
      +       depending on your OSs printf function.
      +
      +       _f_i_l_e_n_a_m_e
      +               the name of the RRRRRRRRDDDD you want to fetch the data
      +               from.
      +
      +       _C_F      which consolidation function should have been
      +               applied to the data you want to fetch? (AVER-
      +               AGE,MIN,MAX,LAST)
      +
      +       --------rrrreeeessssoooolllluuuuttttiiiioooonnnn|----rrrr _r_e_s_o_l_u_t_i_o_n (default is the highest resolu-
      +       tion)
      +               what interval should the values have (seconds per
      +               value). rrrrrrrrddddffffeeeettttcccchhhh will try to match your request,
      +               but it will return data even if no absolute match
      +               is possible. NNNNBBBB.... See note below.
      +
      +       --------ssssttttaaaarrrrtttt|----ssss _s_t_a_r_t (default end-1day)
      +               when should the data begin. A time in seconds
      +               since epoch (1970-01-01) is required. Negative
      +               numbers are relative to the current time. By
      +               default one day worth of data will be fetched. See
      +               also AT-STYLE TIME SPECIFICATION section for a
      +               detailed explanation on  ways to specify start
      +               time.
      +
      +       --------eeeennnndddd|----eeee _e_n_d (default now)
      +               when should the data end. Time in seconds since
      +               epoch. See also AT-STYLE TIME SPECIFICATION sec-
      +               tion for a detailed explanation of how to specify
      +               end time.
      +
      +       RRRREEEESSSSOOOOLLLLUUUUTTTTIIIIOOOONNNN IIIINNNNTTTTEEEERRRRVVVVAAAALLLL
      +
      +       In order to get rrdtool to fetch anything other than the
      +       finest resolution RRA bbbbooootttthhhh the start and end time must be
      +       specified on boundaries that are multiples of the wanted
      +       resolution. Consider the following example:
      +
      +        rrdtool create subdata.rrd -s 10 DS:ds0:GAUGE:300:0:U \
      +         RRA:AVERAGE:0.5:30:3600 \
      +         RRA:AVERAGE:0.5:90:1200 \
      +         RRA:AVERAGE:0.5:360:1200 \
      +         RRA:MAX:0.5:360:1200 \
      +         RRA:AVERAGE:0.5:8640:600 \
      +         RRA:MAX:0.5:8640:600
      +
      +       This RRD collects data every 10 seconds and stores its
      +       averages over 5 minutes, 15 minutes, 1 hour and 1 day as
      +       well as the maxima for 1 hour and 1 day.
      +
      +       Consider now that you want too fetch the 15 minute average
      +       data for last hour.  So you might try
      +
      +        rrdtool fetch subdata.rrd AVERAGE -r 900 -s -1h
      +
      +       However, this will almost always result in a time series
      +       that is NNNNOOOOTTTT in the 15 minute RRA. Therefore the highest
      +       resolution RRA, i.e. 5 minute averages, will be chosen
      +       which, in this case, is not what you want.
      +
      +       Hence, make sure that
      +
      +       1. both start and end time are a multiple of 900
      +
      +       2. both start and end time are within the wanted RRA
      +
      +       So, if time now is called "t",
      +
      +        do end time == int(t/900)*900,
      +        start time == end time -1hour, resolution == 900.
      +
      +       In e.g. bash this could look as:
      +
      +        TIME=$(date +%s); RRDRES=900; rrdtool fetch subdata.rrd AVERAGE -r $RRDRES \
      +        -e $(echo $(($TIME/$RRDRES*$RRDRES))) -s e-1h
      +
      +       Or in perl:
      +
      +        perl -e '$ctime = time; $rrdres = 900; system "rrdtool fetch subdata.rrd AVERAGE \
      +        -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"'
      +
      +
      +       AAAATTTT----SSSSTTTTYYYYLLLLEEEE TTTTIIIIMMMMEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
      +
      +       Apart from the traditional _S_e_c_o_n_d_s _s_i_n_c_e _e_p_o_c_h, rrdtool
      +       does also understand at-style time specification.  The
      +       specification is called "at-style" after Unix command
      +       _a_t(1) that has moderately complex ways to specify time to
      +       run your job at.  The at-style specification consists of
      +       two parts: TTTTIIIIMMMMEEEE RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEE specification and TTTTIIIIMMMMEEEE OOOOFFFFFFFFSSSSEEEETTTT
      +       specification.
      +
      +       TTTTIIIIMMMMEEEE RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
      +
      +       Time reference specification is used, well,... to estab-
      +       lish a reference moment in time (for time offset to be
      +       applied to). When present, it should come first, when
      +       omitted, it defaults to nnnnoooowwww. On its own part, time refer-
      +       ence consists of _t_i_m_e_-_o_f_-_d_a_y reference (which should come
      +       first, if present) and _d_a_y reference.
      +
      +       _T_i_m_e_-_o_f_-_d_a_y can be specified as HHHHHHHH::::MMMMMMMM, HHHHHHHH....MMMMMMMM, or just HHHHHHHH,
      +       you can suffix it with aaaammmm or ppppmmmm or use 24-hours clock. The
      +       few special times of day are understood as well, these
      +       include mmmmiiiiddddnnnniiiigggghhhhtttt (00:00), nnnnoooooooonnnn (12:00) and British tttteeeeaaaattttiiiimmmmeeee
      +       (16:00).
      +
      +       The _d_a_y can be specified as _m_o_n_t_h_-_n_a_m_e _d_a_y_-_o_f_-_t_h_e_-_m_o_n_t_h
      +       and optional 2- or 4-digit _y_e_a_r number (e.g. March 8
      +       1999).  Alternatively, you can use _d_a_y_-_o_f_-_w_e_e_k_-_n_a_m_e (e.g.
      +       Monday), or one of the words: yyyyeeeesssstttteeeerrrrddddaaaayyyy, ttttooooddddaaaayyyy, ttttoooommmmoooorrrrrrrroooowwww.
      +       You can also specify _d_a_y as a full date in several numeri-
      +       cal formats; these include: MMMMMMMM////DDDDDDDD////[[[[YYYYYYYY]]]]YYYYYYYY, DDDDDDDD....MMMMMMMM....[[[[YYYYYYYY]]]]YYYYYYYY,
      +       YYYYYYYYYYYYYYYYMMMMMMMMDDDDDDDD.
      +
      +       _N_O_T_E_1: this is different from the original _a_t(1) behavior,
      +       which interprets a single-number date as MMDD[YY]YY.
      +
      +       _N_O_T_E_2: if you specify _d_a_y this way, the _t_i_m_e_-_o_f_-_d_a_y is
      +       REQUIRED to be present.
      +
      +       Finally, you can use words nnnnoooowwww, ssssttttaaaarrrrtttt, or eeeennnndddd as your time
      +       reference. NNNNoooowwww refers to the current moment (and is also a
      +       default time reference). SSSSttttaaaarrrrtttt (eeeennnndddd) can be used to spec-
      +       ify time relative to the start (end) time for those tools
      +       that use these categories (rrdfetch, rrdgraph).
      +
      +       Month and weekday names can be used in their naturally
      +       abbreviated form (e.g., Dec for December, Sun for Sunday,
      +       etc.). The words nnnnoooowwww, ssssttttaaaarrrrtttt, eeeennnndddd can be abbreviated to nnnn,
      +       ssss, eeee.
      +
      +       TTTTIIIIMMMMEEEE OOOOFFFFFFFFSSSSEEEETTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
      +
      +       Time offset specification is used to add (or subtract)
      +       certain time interval to (from) the time reference moment.
      +       It consists of _s_i_g_n (++++ or ----) and _a_m_o_u_n_t. The following
      +       time units can be used to specify the _a_m_o_u_n_t: yyyyeeeeaaaarrrrssss,
      +       mmmmoooonnnntttthhhhssss, wwwweeeeeeeekkkkssss, ddddaaaayyyyssss, hhhhoooouuuurrrrssss, mmmmiiiinnnnuuuutttteeeessss, sssseeeeccccoooonnnnddddssss, these can be
      +       used in singular or plural form, and abbreviated naturally
      +       or to a single letter (e.g. +3days, -1wk, -3y). Several
      +       time units can be combined together (e.g., -5mon1w2d), as
      +       well as several time offsets can be concatenated (e.g.,
      +       -5h45min = -5h-45min = -6h+15min = -7h+1h30m-15min, etc.)
      +
      +       _N_O_T_E_3: If you specify time offset in days, weeks, months,
      +       or years, you will end with the time offset that may vary
      +       depending on you time reference, because all those time
      +       units have no single well defined time interval value
      +       (1 year contains either 365 or 366 days, 1 month is 28 to
      +       31 days long, and even 1 day may be not equal to 24 hours
      +       twice a year, when DST-related clock adjustments take
      +       place).  To cope with this, when you use days, weeks,
      +       months, or years as your time offset units your time ref-
      +       erence date is adjusted accordingly without taking too
      +       much further effort to ensure anything about it (in the
      +       hope that _m_k_t_i_m_e(3) will take care of this later).  This
      +       may lead to some surprising (or even invalid!) results,
      +       e.g. 'May 31 -1month' = 'Apr 31' (meaningless) = 'May 1'
      +       (after _m_k_t_i_m_e(3) normalization); in the EET timezone
      +       '3:30am Mar 29 1999 -1 day' yields '3:30am Mar 28 1999'
      +       (Sunday) which is invalid time/date combination (because
      +       of 3am -> 4am DST forward clock adjustment, see the below
      +       example).  On the other hand, hours, minutes, and seconds
      +       are well defined time intervals, and these are guaranteed
      +       to always produce time offsets exactly as specified (e.g.
      +       for EET timezone, '8:00 Mar 27 1999 +2 days' =
      +       '8:00 Mar 29 1999', but since there is 1-hour DST forward
      +       clock adjustment takes place around 3:00 Mar 28 1999, the
      +       actual time interval between 8:00 Mar 27 1999 and
      +       8:00 Mar 29 1999 equals 47 hours; on the other hand,
      +       '8:00 Mar 27 1999 +48 hours' = '9:00 Mar 29 1999', as
      +       expected)
      +
      +       _N_O_T_E_4: The single-letter abbreviation for both mmmmoooonnnntttthhhhssss and
      +       mmmmiiiinnnnuuuutttteeeessss is mmmm. To disambiguate, the parser tries to read
      +       your mind :) by applying the following two heuristics:
      +
      +       1  If mmmm is used in context of (i.e. right after the)
      +          years, months, weeks, or days it is assumed to mean
      +          mmmmoooonnnntttthhhhssss, while in the context of hours, minutes, and
      +          seconds it means minutes.  (e.g., in -1y6m or +3w1m mmmm
      +          means mmmmoooonnnntttthhhhssss, while in -3h20m or +5s2m mmmm means mmmmiiiinnnnuuuutttteeeessss)
      +
      +       2  Out of context (i.e. right after the ++++ or ---- sign) the
      +          meaning of mmmm is guessed from the number it directly
      +          follows.  Currently, if the number absolute value is
      +          below 25 it is assumed that mmmm means mmmmoooonnnntttthhhhssss, otherwise
      +          it is treated as mmmmiiiinnnnuuuutttteeeessss.  (e.g., -25m == -25 minutes,
      +          while +24m == +24 months)
      +
      +       _F_i_n_a_l _N_O_T_E_S: Time specification is case-insensitive.
      +       Whitespace can be inserted freely or omitted altogether,
      +       there are, however, cases when whitespace is required
      +       (e.g., 'midnight Thu'). In this case you should either
      +       quote the whole phrase to prevent it from being taken
      +       apart by your shell or use '_' (underscore) or ',' (comma)
      +       which also count as whitespace (e.g., midnight_Thu or mid-
      +       night,Thu)
      +
      +       TTTTIIIIMMMMEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
      +
      +       _O_c_t _1_2 -- October 12 this year
      +
      +       _-_1_m_o_n_t_h or _-_1_m -- current time of day, only a month before
      +       (may yield surprises, see the NOTE3 above)
      +
      +       _n_o_o_n _y_e_s_t_e_r_d_a_y _-_3_h_o_u_r_s -- yesterday morning; can be put
      +       also as _9_a_m_-_1_d_a_y
      +
      +       _2_3_:_5_9 _3_1_._1_2_._1_9_9_9 -- 1 minute to the year 2000
      +
      +       _1_2_/_3_1_/_9_9 _1_1_:_5_9_p_m -- 1 minute to the year 2000 for imperi-
      +       alists
      +
      +       _1_2_a_m _0_1_/_0_1_/_0_1 -- start of the new millennium
      +
      +       _e_n_d_-_3_w_e_e_k_s or _e_-_3_w -- 3 weeks before end time (may be used
      +       as start time specification)
       
      -     2  Out of context (i.e. right after the ++++ or ---- sign) the
      -        meaning of mmmm is guessed from the number it directly
      -        follows.  Currently, if the number absolute value is
      -        below 25 it is assumed that mmmm means mmmmoooonnnntttthhhhssss, otherwise it
      -        is treated as mmmmiiiinnnnuuuutttteeeessss.  (e.g., -25m == -25 minutes, while
      -        +24m == +24 months)
      +       _s_t_a_r_t_+_6_h_o_u_r_s or _s_+_6_h -- 6 hours after start time (may be
      +       used as end time specification)
       
      -     _F_i_n_a_l _N_O_T_E_S: Time specification is case-insensitive.
      -     Whitespace can be inserted freely or omitted altogether,
      -     there are, however, cases when whitespace is required (e.g.,
      -     'midnight Thu'). In this case you should either quote the
      -     whole phrase to prevent it from being taken apart by your
      -     shell or use '_' (underscore) or ',' (comma) which also
      -     count as whitespace (e.g., midnight_Thu or midnight,Thu)
      +       _9_3_1_2_2_5_5_3_7 -- 18:45  July 5th, 1999 (yes, seconds since
      +       1970 are valid as well)
       
      -
      -
      -2001-02-20             Last change: 1.0.33                      3
      -
      -
      -
      -
      -
      -
      -rrdtool                                               RRDFETCH(1)
      -
      -
      -
      -     TTTTIIIIMMMMEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
      -
      -     _O_c_t _1_2 -- October 12 this year
      -
      -     _-_1_m_o_n_t_h or _-_1_m -- current time of day, only a month before
      -     (may yield surprises, see the NOTE3 above)
      -
      -     _n_o_o_n _y_e_s_t_e_r_d_a_y _-_3_h_o_u_r_s -- yesterday morning; can be put also
      -     as _9_a_m_-_1_d_a_y
      -
      -     _2_3_:_5_9 _3_1_._1_2_._1_9_9_9 -- 1 minute to the year 2000
      -
      -     _1_2_/_3_1_/_9_9 _1_1_:_5_9_p_m -- 1 minute to the year 2000 for
      -     imperialists
      -
      -     _1_2_a_m _0_1_/_0_1_/_0_1 -- start of the new millennium
      -
      -     _e_n_d_-_3_w_e_e_k_s or _e_-_3_w -- 3 weeks before end time (may be used
      -     as start time specification)
      -
      -     _s_t_a_r_t_+_6_h_o_u_r_s or _s_+_6_h -- 6 hours after start time (may be
      -     used as end time specification)
      -
      -     _9_3_1_2_2_5_5_3_7 -- 18:45  July 5th, 1999 (yes, seconds since 1970
      -     are valid as well)
      -
      -     _1_9_9_7_0_7_0_3 _1_2_:_4_5 -- 12:45  July 3th, 1997 (not quote standard,
      -     but I love this ...)
      +       _1_9_9_7_0_7_0_3 _1_2_:_4_5 -- 12:45  July 3th, 1997 (not quote stan-
      +       dard, but I love this ...)
       
       AAAAUUUUTTTTHHHHOOOORRRR
      -     Tobias Oetiker 
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -2001-02-20             Last change: 1.0.33                      4
      +       Tobias Oetiker 
       
       
       
      +2002-07-31                    1.0.40                  RRDFETCH(1)
      
      Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdinfo.txt
      ==============================================================================
      --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdinfo.txt	(original)
      +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdinfo.txt	2002-11-09 12:32:01.000000000 -0800
      @@ -1,66 +1,60 @@
      -
      -
      -
      -rrdtool                                                RRDINFO(1)
      +RRDINFO(1)                   rrdtool                   RRDINFO(1)
       
       
       
       NNNNAAAAMMMMEEEE
      -     rrdtool info - extract header information from an rrd
      +       rrdtool info - extract header information from an rrd
       
       SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
      -     rrrrrrrrddddttttoooooooollll iiiinnnnffffoooo _f_i_l_e_n_a_m_e_._r_r_d
      +       rrrrrrrrddddttttoooooooollll iiiinnnnffffoooo _f_i_l_e_n_a_m_e_._r_r_d
       
       DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
      -     The iiiinnnnffffoooo function prints the header information from an rrd
      -     in a parsing friendly format.
      +       The iiiinnnnffffoooo function prints the header information from an
      +       rrd in a parsing friendly format.
       
      -     Check the rrdcreate manpage if you are uncertain about the
      -     meaning of the individual keys.
      +       Check the rrdcreate manpage if you are uncertain about the
      +       meaning of the individual keys.
       
       EEEEXXXXAAAAMMMMPPPPLLLLEEEE
      -     This is the output generated by running iiiinnnnffffoooo on a simple rrd
      -     which contains two datasources and one rra. Note that the
      -     number after the _l_a_s_t___u_p_d_a_t_e keyword is in seconds since
      -     1970. The string NNNNaaaaNNNN stands for _*_U_N_K_N_O_W_N_* data. In the
      -     example it means that this rrd has neither minimum not
      -     maximum values defined for either of its datasources.
      -
      -      filename = "randome.rrd"
      -      rrd_version = "0001"
      -      step = 300
      -      last_update = 955892996
      -      ds[a].type = "GAUGE"
      -      ds[a].minimal_heartbeat = 600
      -      ds[a].min = NaN
      -      ds[a].max = NaN
      -      ds[a].last_ds = "UNKN"
      -      ds[a].value = 2.1824421548e+04
      -      ds[a].unknown_sec = 0
      -      ds[b].type = "GAUGE"
      -      ds[b].minimal_heartbeat = 600
      -      ds[b].min = NaN
      -      ds[b].max = NaN
      -      ds[b].last_ds = "UNKN"
      -      ds[b].value = 3.9620838224e+03
      -      ds[b].unknown_sec = 0
      -      rra[0].cf = "AVERAGE"
      -      rra[0].pdp_per_row = 1
      -      rra[0].cdp_prep[0].value = nan
      -      rra[0].cdp_prep[0].unknown_datapoints = 0
      -      rra[0].cdp_prep[1].value = nan
      -      rra[0].cdp_prep[1].unknown_datapoints = 0
      +       This is the output generated by running iiiinnnnffffoooo on a simple
      +       rrd which contains two datasources and one rra. Note that
      +       the number after the _l_a_s_t___u_p_d_a_t_e keyword is in seconds
      +       since 1970. The string NNNNaaaaNNNN stands for _*_U_N_K_N_O_W_N_* data. In
      +       the example it means that this rrd has neither minimum not
      +       maximum values defined for either of its datasources.
      +
      +        filename = "randome.rrd"
      +        rrd_version = "0001"
      +        step = 300
      +        last_update = 955892996
      +        ds[a].type = "GAUGE"
      +        ds[a].minimal_heartbeat = 600
      +        ds[a].min = NaN
      +        ds[a].max = NaN
      +        ds[a].last_ds = "UNKN"
      +        ds[a].value = 2.1824421548e+04
      +        ds[a].unknown_sec = 0
      +        ds[b].type = "GAUGE"
      +        ds[b].minimal_heartbeat = 600
      +        ds[b].min = NaN
      +        ds[b].max = NaN
      +        ds[b].last_ds = "UNKN"
      +        ds[b].value = 3.9620838224e+03
      +        ds[b].unknown_sec = 0
      +        rra[0].cf = "AVERAGE"
      +        rra[0].pdp_per_row = 1
      +        rra[0].cdp_prep[0].value = nan
      +        rra[0].cdp_prep[0].unknown_datapoints = 0
      +        rra[0].cdp_prep[1].value = nan
      +        rra[0].cdp_prep[1].unknown_datapoints = 0
       
       
      -     _f_i_l_e_n_a_m_e_._r_r_d
      -             The name of the RRRRRRRRDDDD you want to dump.
      +       _f_i_l_e_n_a_m_e_._r_r_d
      +               The name of the RRRRRRRRDDDD you want to dump.
       
       AAAAUUUUTTTTHHHHOOOORRRR
      -     Tobias Oetiker 
      -
      -
      -
      -2001-02-20             Last change: 1.0.33                      1
      +       Tobias Oetiker 
       
       
       
      +2002-02-26                    1.0.40                   RRDINFO(1)
      
      Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.pod
      ==============================================================================
      --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.pod	(original)
      +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.pod	2002-11-09 12:32:02.000000000 -0800
      @@ -35,7 +35,7 @@
       
       what interval should the values have (seconds per value). B will try
       to match your request, but it will return data even if no absolute
      -match is possible.
      +match is possible. B See note below.
       
       =item B<--start>|B<-s> I (default end-1day)
       
      @@ -52,6 +52,62 @@
       
       =back
       
      +=head2 RESOLUTION INTERVAL
      +
      +In order to get rrdtool to fetch anything other than the finest resolution RRA 
      +B the start and end time must be specified on boundaries that are 
      +multiples of the wanted resolution. Consider the following example:
      +
      + rrdtool create subdata.rrd -s 10 DS:ds0:GAUGE:300:0:U \
      +  RRA:AVERAGE:0.5:30:3600 \
      +  RRA:AVERAGE:0.5:90:1200 \
      +  RRA:AVERAGE:0.5:360:1200 \
      +  RRA:MAX:0.5:360:1200 \
      +  RRA:AVERAGE:0.5:8640:600 \
      +  RRA:MAX:0.5:8640:600
      +
      +This RRD collects data every 10 seconds and stores its averages over 5 minutes, 
      +15 minutes, 1 hour and 1 day as well as the maxima for 1 hour and 1 day.
      +
      +Consider now that you want too fetch the 15 minute average data for last hour. 
      +So you might try
      +
      + rrdtool fetch subdata.rrd AVERAGE -r 900 -s -1h
      +
      +However, this will almost always result in a time series that is B in the 15 
      +minute RRA. Therefore the highest resolution RRA, i.e. 5 minute averages, will 
      +be chosen which, in this case, is not what you want.
      +
      +Hence, make sure that
      +
      +=over 3
      +
      +=item 1.
      +
      +both start and end time are a multiple of 900
      +
      +=item 2.
      +
      +both start and end time are within the wanted RRA
      +
      +=back
      +
      +So, if time now is called "t",
      +
      + do end time == int(t/900)*900,
      + start time == end time -1hour, resolution == 900.
      +
      +In e.g. bash this could look as:
      +
      + TIME=$(date +%s); RRDRES=900; rrdtool fetch subdata.rrd AVERAGE -r $RRDRES \
      + -e $(echo $(($TIME/$RRDRES*$RRDRES))) -s e-1h
      +
      +Or in perl:
      +
      + perl -e '$ctime = time; $rrdres = 900; system "rrdtool fetch subdata.rrd AVERAGE \
      + -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"'
      +
      +
       =head2 AT-STYLE TIME SPECIFICATION
       
       Apart from the traditional I, rrdtool does also
      
      Modified: trunk/orca/packages/rrdtool-1.0.40/doc/RRDp.txt
      ==============================================================================
      --- trunk/orca/packages/rrdtool-1.0.40/doc/RRDp.txt	(original)
      +++ trunk/orca/packages/rrdtool-1.0.40/doc/RRDp.txt	2002-11-09 12:32:02.000000000 -0800
      @@ -1,132 +1,93 @@
      -
      -
      -
      -rrdtool                                                   RRDp(3)
      +RRDp(3)                      rrdtool                      RRDp(3)
       
       
       
       NNNNAAAAMMMMEEEE
      -     RRDp - Attach rrdtool from within a perl script via a set of
      -     pipes;
      +       RRDp - Attach rrdtool from within a perl script via a set
      +       of pipes;
       
       SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
      -     use RRRRRRRRDDDDpppp
      +       use RRRRRRRRDDDDpppp
       
      -     RRRRRRRRDDDDpppp::::::::ssssttttaaaarrrrtttt _p_a_t_h _t_o _r_r_d_t_o_o_l _e_x_e_c_u_t_a_b_l_e
      +       RRRRRRRRDDDDpppp::::::::ssssttttaaaarrrrtttt _p_a_t_h _t_o _r_r_d_t_o_o_l _e_x_e_c_u_t_a_b_l_e
       
      -     RRRRRRRRDDDDpppp::::::::ccccmmmmdddd  _r_r_d_t_o_o_l _c_o_m_m_a_n_d_l_i_n_e
      +       RRRRRRRRDDDDpppp::::::::ccccmmmmdddd  _r_r_d_t_o_o_l _c_o_m_m_a_n_d_l_i_n_e
       
      -     $answer = RRRRRRRRDDDD::::::::rrrreeeeaaaadddd
      +       $answer = RRRRRRRRDDDD::::::::rrrreeeeaaaadddd
       
      -     $status = RRRRRRRRDDDD::::::::eeeennnndddd
      +       $status = RRRRRRRRDDDD::::::::eeeennnndddd
       
      -     $$$$RRRRRRRRDDDDpppp::::::::uuuusssseeeerrrr,  $$$$RRRRRRRRDDDDpppp::::::::ssssyyyyssss, $$$$RRRRRRRRDDDDpppp::::::::rrrreeeeaaaallll
      +       $$$$RRRRRRRRDDDDpppp::::::::uuuusssseeeerrrr,  $$$$RRRRRRRRDDDDpppp::::::::ssssyyyyssss, $$$$RRRRRRRRDDDDpppp::::::::rrrreeeeaaaallll
       
       DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
      -     With this module you can safely communicate with the
      -     rrdtool.
      -
      -     After every RRRRRRRRDDDDpppp::::::::ccccmmmmdddd you have to issue an RRRRRRRRDDDDpppp::::::::rrrreeeeaaaadddd
      -     command to get rrrrrrrrddddttttoooooooolllls answer to your command. The answer
      -     is returned as a pointer, in order to speed things up. If
      -     the last command did not return any data, RRRRRRRRDDDDpppp::::::::rrrreeeeaaaadddd will
      -     return an undefined variable.
      -
      -     If you import the PERFORMANCE variables into your namespace,
      -     you can access rrdtools internal performance measurements.
      -
      -     use RRRRRRRRDDDDpppp
      -             Load the RRDp::pipe module.
      -
      -     RRRRRRRRDDDDpppp::::::::ssssttttaaaarrrrtttt _p_a_t_h _t_o _r_r_d_t_o_o_l _e_x_e_c_u_t_a_b_l_e
      -             start rrdtool. The argument must be the path to the
      -             rrdtool executable
      -
      -     RRRRRRRRDDDDpppp::::::::ccccmmmmdddd _r_r_d_t_o_o_l _c_o_m_m_a_n_d_l_i_n_e
      -             pass commands on to rrdtool. check the rrdtool
      -             documentation for more info on the rrdtool commands.
      -
      -     $answer = RRRRRRRRDDDDpppp::::::::rrrreeeeaaaadddd
      -             read rrdtools response to your command. Note that
      -             the $answer variable will only contain a pointer to
      -             the returned data. The reason for this is, that
      -             rrdtool can potentially return quite excessive
      -             amounts of data and we don't want to copy this
      -             around in memory. So when you want to access the
      -             contents of $answer you have to use $$answer which
      -             dereferences the variable.
      -
      -
      -
      -
      -
      -2001-02-22             Last change: 1.0.33                      1
      -
      -
      -
      -
      -
      -
      -rrdtool                                                   RRDp(3)
      -
      -
      -
      -     $status = RRRRRRRRDDDDpppp::::::::eeeennnndddd
      -             terminates rrdtool and returns rrdtools status ...
      -
      -     $$$$RRRRRRRRDDDDpppp::::::::uuuusssseeeerrrr,  $$$$RRRRRRRRDDDDpppp::::::::ssssyyyyssss, $$$$RRRRRRRRDDDDpppp::::::::rrrreeeeaaaallll
      -             these variables will contain totals of the user
      -             time, system time and real time as seen by rrdtool.
      -             User time is the time rrdtool is running, System
      -             time is the time spend in system calls and real time
      -             is the total time rrdtool has been running.
      +       With this module you can safely communicate with the rrd-
      +       tool.
       
      -             The difference between user + system and real is the
      -             time spent waiting for things like the hard disk and
      -             new input from the perl script.
      +       After every RRRRRRRRDDDDpppp::::::::ccccmmmmdddd you have to issue an RRRRRRRRDDDDpppp::::::::rrrreeeeaaaadddd com-
      +       mand to get rrrrrrrrddddttttoooooooolllls answer to your command. The answer is
      +       returned as a pointer, in order to speed things up. If the
      +       last command did not return any data, RRRRRRRRDDDDpppp::::::::rrrreeeeaaaadddd will
      +       return an undefined variable.
      +
      +       If you import the PERFORMANCE variables into your names-
      +       pace, you can access rrdtools internal performance mea-
      +       surements.
      +
      +       use RRRRRRRRDDDDpppp
      +               Load the RRDp::pipe module.
      +
      +       RRRRRRRRDDDDpppp::::::::ssssttttaaaarrrrtttt _p_a_t_h _t_o _r_r_d_t_o_o_l _e_x_e_c_u_t_a_b_l_e
      +               start rrdtool. The argument must be the path to
      +               the rrdtool executable
      +
      +       RRRRRRRRDDDDpppp::::::::ccccmmmmdddd _r_r_d_t_o_o_l _c_o_m_m_a_n_d_l_i_n_e
      +               pass commands on to rrdtool. check the rrdtool
      +               documentation for more info on the rrdtool com-
      +               mands.
      +
      +       $answer = RRRRRRRRDDDDpppp::::::::rrrreeeeaaaadddd
      +               read rrdtools response to your command. Note that
      +               the $answer variable will only contain a pointer
      +               to the returned data. The reason for this is, that
      +               rrdtool can potentially return quite excessive
      +               amounts of data and we don't want to copy this
      +               around in memory. So when you want to access the
      +               contents of $answer you have to use $$answer which
      +               dereferences the variable.
      +
      +       $status = RRRRRRRRDDDDpppp::::::::eeeennnndddd
      +               terminates rrdtool and returns rrdtools status ...
      +
      +       $$$$RRRRRRRRDDDDpppp::::::::uuuusssseeeerrrr,  $$$$RRRRRRRRDDDDpppp::::::::ssssyyyyssss, $$$$RRRRRRRRDDDDpppp::::::::rrrreeeeaaaallll
      +               these variables will contain totals of the user
      +               time, system time and real time as seen by rrd-
      +               tool.  User time is the time rrdtool is running,
      +               System time is the time spend in system calls and
      +               real time is the total time rrdtool has been
      +               running.
      +
      +               The difference between user + system and real is
      +               the time spent waiting for things like the hard
      +               disk and new input from the perl script.
       
       EEEEXXXXAAAAMMMMPPPPLLLLEEEE
      -      use RRDp;
      -      RRDp::start "/usr/local/bin/rrdtool";
      -      RRDp::cmd   qw(create demo.rrd --step 100
      -                    DS:in:GAUGE:100:U:U
      -                    RRA:AVERAGE:0.5:1:10);
      -      $answer = RRDp::read;
      -      print $$answer;
      -      ($usertime,$systemtime,$realtime) =  ($RRDp::user,$RRDp::sys,$RRDp::real);
      +        use RRDp;
      +        RRDp::start "/usr/local/bin/rrdtool";
      +        RRDp::cmd   qw(create demo.rrd --step 100
      +                      DS:in:GAUGE:100:U:U
      +                      RRA:AVERAGE:0.5:1:10);
      +        $answer = RRDp::read;
      +        print $$answer;
      +        ($usertime,$systemtime,$realtime) =  ($RRDp::user,$RRDp::sys,$RRDp::real);
       
       
       SSSSEEEEEEEE AAAALLLLSSSSOOOO
      -     For more information on how to use rrdtool, check the
      -     manpages.
      +       For more information on how to use rrdtool, check the man-
      +       pages.
       
       AAAAUUUUTTTTHHHHOOOORRRR
      -     Tobias Oetiker 
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -2001-02-22             Last change: 1.0.33                      2
      +       Tobias Oetiker 
       
       
       
      +2002-10-11                    1.0.40                      RRDp(3)
      
      Added: trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.html
      ==============================================================================
      --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.html	(original)
      +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.html	2002-11-09 12:32:03.000000000 -0800
      @@ -0,0 +1,166 @@
      +
      +
      +rrdxport
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      +

      NAME

      +

      rrdtool xport - Export data in XML format based on data from one or several RRD

      +
      PDF version.

      +


      +

      SYNOPSIS

      +

      rrdtool xport +[-s|--start seconds] +[-e|--end seconds] +[-m|--maxrows rows] +[--step value] +[DEF:vname=rrd:ds-name:CF] +[CDEF:vname=rpn-expression] +[XPORT:vname[:legend]]

      +

      +


      +

      DESCRIPTION

      +

      The xport functions main purpose is to write XML formatted +representation of the data stored in one or several RRDs. It +can also extract numerical reports.

      +

      If no XPORT statements are found, there will be no output.

      +
      +
      -s|--start seconds (default end-1day)
      +
      +The time when the exported range should begin. Time in seconds since +epoch (1970-01-01) is required. Negative numbers are relative to the +current time. By default one day worth of data will be printed. +See also AT-STYLE TIME SPECIFICATION section in the rrdfetch +documentation for a detailed explanation on how to specify time. +

      +
      -e|--end seconds (default now)
      +
      +The time when the exported range should end. Time in seconds since epoch. +See also AT-STYLE TIME SPECIFICATION section in the rrdfetch +documentation for a detailed explanation of ways to specify time. +

      +
      -m|--maxrows rows (default 400 rows)
      +
      +This works like the -w|--width parameter of rrdgraph. +In fact it is exactly the same, but the parameter was renamed to +describe its purpose in this module. See rrdgraph documentation +for details. +

      +
      --step value (default automatic)
      +
      +See rrdgraph documentation. +

      +
      DEF:vname=rrd:ds-name:CF
      +
      +See rrdgraph documentation. +

      +
      CDEF:vname=rpn-expression
      +
      +See rrdgraph documentation. +

      +
      XPORT:vname::legend
      +
      +At least one XPORT statement should be present. The values +referenced by vname are printed. Optionally add a legend. +

      +

      +

      Output format

      +

      The output is enclosed in a xport element and contains two +blocks. The first block is enclosed by a meta element and +contains some meta data. The second block is enclosed by a +data element and contains the data rows.

      +

      Let's assume that the xport command looks like this:

      +
      +  rrdtool xport \
      +          --start now-1h --end now \
      +          DEF:xx=host-inout.lo.rrd:output:AVERAGE \
      +          DEF:yy=host-inout.lo.rrd:input:AVERAGE \
      +          CDEF:aa=xx,yy,+,8,* \
      +          XPORT:xx:"out bytes" \
      +          XPORT:aa:"in and out bits"
      +

      The resulting meta data section (the values will depend on the +RRD characteristics): +

      +
      +
      +  <meta>
      +    <start>1020611700</start>
      +    <step>300</step>
      +    <end>1020615600</end>
      +    <rows>14</rows>
      +    <columns>2</columns>
      +    <legend>
      +      <entry>out bytes</entry>
      +      <entry>in and out bits</entry>
      +    </legend>
      +  </meta>
      +
      +
      +The resulting data section:
      +
      +  <data>
      +    <row><t>1020611700</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020612000</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020612300</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020612600</t><v>3.4113333333e+00</v><v>5.4581333333e+01</v></row>
      +    <row><t>1020612900</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020613200</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020613500</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020613800</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020614100</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020614400</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020614700</t><v>3.7333333333e+00</v><v>5.9733333333e+01</v></row>
      +    <row><t>1020615000</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020615300</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
      +    <row><t>1020615600</t><v>NaN</v><v>NaN</v></row>
      +  </data>
      +

      +


      +

      EXAMPLE 1

      +
      +  rrdtool xport \
      +          DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
      +          XPORT:out:"out bytes"
      +

      +


      +

      EXAMPLE 2

      +
      +  rrdtool xport \
      +          DEF:out1=if1-inouts.rrd:outoctets:AVERAGE \
      +          DEF:out2=if2-inouts.rrd:outoctets:AVERAGE \
      +          CDEF:sum=out1,out2,+ \
      +          XPORT:out1:"if1 out bytes" \
      +          XPORT:out2:"if2 out bytes" \
      +          XPORT:sum:"output sum"
      +

      +


      +

      AUTHOR

      +

      Tobias Oetiker <oetiker at ee.ethz.ch>

      + + + + Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.txt 2002-11-09 12:32:03.000000000 -0800 @@ -1,792 +1,639 @@ - - - -rrdtool RRDGRAPH(1) +RRDGRAPH(1) rrdtool RRDGRAPH(1) NNNNAAAAMMMMEEEE - rrdtool graph - Create a graph based on data from one or - several RRD + rrdtool graph - Create a graph based on data from one or + several RRD SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll ggggrrrraaaapppphhhh _f_i_l_e_n_a_m_e [----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s] - [----eeee|--------eeeennnndddd _s_e_c_o_n_d_s] [----xxxx|--------xxxx----ggggrrrriiiidddd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] - [----yyyy|--------yyyy----ggggrrrriiiidddd _y_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] [--------aaaalllltttt----yyyy----ggggrrrriiiidddd] [--------aaaalllltttt---- - aaaauuuuttttoooossssccccaaaalllleeee] [--------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee----mmmmaaaaxxxx] [--------uuuunnnniiiittttssss----eeeexxxxppppoooonnnneeeennnntttt] _v_a_l_u_e]> - [----vvvv|--------vvvveeeerrrrttttiiiiccccaaaallll----llllaaaabbbbeeeellll _t_e_x_t] [----wwww|--------wwwwiiiiddddtttthhhh _p_i_x_e_l_s] - [----hhhh|--------hhhheeeeiiiigggghhhhtttt _p_i_x_e_l_s] [----iiii|--------iiiinnnntttteeeerrrrllllaaaacccceeeedddd] - [----ffff|--------iiiimmmmggggiiiinnnnffffoooo _f_o_r_m_a_t_s_t_r_i_n_g] [----aaaa|--------iiiimmmmggggffffoooorrrrmmmmaaaatttt GGGGIIIIFFFF|PPPPNNNNGGGG] - [----zzzz|--------llllaaaazzzzyyyy] [----oooo|--------llllooooggggaaaarrrriiiitttthhhhmmmmiiiicccc] [----uuuu|--------uuuuppppppppeeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e] - [----llll|--------lllloooowwwweeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e] [----rrrr|--------rrrriiiiggggiiiidddd] [--------sssstttteeeepppp _v_a_l_u_e] - [----bbbb|--------bbbbaaaasssseeee _v_a_l_u_e] [----cccc|--------ccccoooolllloooorrrr _C_O_L_O_R_T_A_G####_r_r_g_g_b_b] - [----tttt|--------ttttiiiittttlllleeee _t_i_t_l_e] [DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s_-_n_a_m_e::::_C_F] - [CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n_-_e_x_p_r_e_s_s_i_o_n] [PPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t] - [GGGGPPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t] [CCCCOOOOMMMMMMMMEEEENNNNTTTT::::_t_e_x_t] - [HHHHRRRRUUUULLLLEEEE::::_v_a_l_u_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] [VVVVRRRRUUUULLLLEEEE::::_t_i_m_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] - [LLLLIIIINNNNEEEE{1111|2222|3333}::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]]] - [AAAARRRREEEEAAAA::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]]] - [SSSSTTTTAAAACCCCKKKK::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]]] + rrrrrrrrddddttttoooooooollll ggggrrrraaaapppphhhh _f_i_l_e_n_a_m_e [----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s] [----eeee|--------eeeennnndddd _s_e_c_- + _o_n_d_s] [----xxxx|--------xxxx----ggggrrrriiiidddd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] [----yyyy|--------yyyy----ggggrrrriiiidddd _y_- + _a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] [--------aaaalllltttt----yyyy----ggggrrrriiiidddd] [--------aaaalllltttt----yyyy----mmmmrrrrttttgggg] [--------aaaalllltttt---- + aaaauuuuttttoooossssccccaaaalllleeee] [--------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee----mmmmaaaaxxxx] [--------uuuunnnniiiittttssss----eeeexxxxppppoooonnnneeeennnntttt] + _v_a_l_u_e]> [----vvvv|--------vvvveeeerrrrttttiiiiccccaaaallll----llllaaaabbbbeeeellll _t_e_x_t] [----wwww|--------wwwwiiiiddddtttthhhh _p_i_x_e_l_s] + [----hhhh|--------hhhheeeeiiiigggghhhhtttt _p_i_x_e_l_s] [----iiii|--------iiiinnnntttteeeerrrrllllaaaacccceeeedddd] [----ffff|--------iiiimmmmggggiiiinnnnffffoooo _f_o_r_- + _m_a_t_s_t_r_i_n_g] [----aaaa|--------iiiimmmmggggffffoooorrrrmmmmaaaatttt GGGGIIIIFFFF|PPPPNNNNGGGG|GGGGDDDD] [----BBBB|--------bbbbaaaacccckkkk---- + ggggrrrroooouuuunnnndddd _v_a_l_u_e] [----OOOO|--------oooovvvveeeerrrrllllaaaayyyy _v_a_l_u_e] [----UUUU|--------uuuunnnniiiitttt _v_a_l_u_e] + [----zzzz|--------llllaaaazzzzyyyy] [----oooo|--------llllooooggggaaaarrrriiiitttthhhhmmmmiiiicccc] [----uuuu|--------uuuuppppppppeeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e] + [----llll|--------lllloooowwwweeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e] [----gggg|--------nnnnoooo----lllleeeeggggeeeennnndddd] [----rrrr|--------rrrriiiiggggiiiidddd] + [--------sssstttteeeepppp _v_a_l_u_e] [----bbbb|--------bbbbaaaasssseeee _v_a_l_u_e] [----cccc|--------ccccoooolllloooorrrr _C_O_L_- + _O_R_T_A_G####_r_r_g_g_b_b] [----tttt|--------ttttiiiittttlllleeee _t_i_t_l_e] [DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s_- + _n_a_m_e::::_C_F] [CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n_-_e_x_p_r_e_s_s_i_o_n] [PPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_- + _m_a_t] [GGGGPPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t] [CCCCOOOOMMMMMMMMEEEENNNNTTTT::::_t_e_x_t] + [HHHHRRRRUUUULLLLEEEE::::_v_a_l_u_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] [VVVVRRRRUUUULLLLEEEE::::_t_i_m_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] + [LLLLIIIINNNNEEEE{1111|2222|3333}::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]]] + [AAAARRRREEEEAAAA::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]]] [SSSSTTTTAAAACCCCKKKK::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_- + _e_n_d]]] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The ggggrrrraaaapppphhhh functions main purpose is to create graphical - representations of the data stored in one or several RRRRRRRRDDDDs. - Apart from generating graphs, it can also extract numerical - reports. - - _f_i_l_e_n_a_m_e - The name of the graph to generate. Since rrrrrrrrddddttttoooooooollll outputs - GIFs and PNGs, it's recommended that the filename end in - either _._g_i_f or _._p_n_g. rrrrrrrrddddttttoooooooollll does not enforce this, - however. If the _f_i_l_e_n_a_m_e is set to '-' the image file - will be written to standard out. All other output will - get suppressed. - - PNG output is recommended, since it takes up to 40% less - disk space and 20-30% less time to generate than a GIF - file. - - If no graph functions are called, the graph will not be - created. - - ----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s (default end-1day) - The time when the graph should begin. Time in seconds - since epoch (1970-01-01) is required. Negative numbers - are relative to the current time. By default one day - worth of data will be graphed. See also AT-STYLE TIME - SPECIFICATION section in the _r_r_d_f_e_t_c_h documentation for - a detailed explanation on how to specify time. - - - - -2001-02-20 Last change: 1.0.33 1 - - - - - - -rrdtool RRDGRAPH(1) - - - - ----eeee|--------eeeennnndddd _s_e_c_o_n_d_s (default now) - The time when the graph should end. Time in seconds - since epoch. See also AT-STYLE TIME SPECIFICATION - section in the _r_r_d_f_e_t_c_h documentation for a detailed - explanation of ways to specify time. - - ----xxxx|--------xxxx----ggggrrrriiiidddd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l (default autoconfigure) - The x-axis label is quite complex to configure. So if - you don't have very special needs, you can rely on the - autoconfiguration to get this right. - - If you want no x-grid at all, use the magic setting - nnnnoooonnnneeee. - - The x-axis label and grid can be configured, using the - following format: - - _G_T_M::::_G_S_T::::_M_T_M::::_M_S_T::::_L_T_M:_L_S_T::::_L_P_R::::_L_F_M - - You have to configure three elements making up the x- - axis labels and grid. The base grid (_G_?_?), the major - grid (_M_?_?) and the labels (_L_?_?). The configuration is - based on the idea that you first specify a well known - amount of time (_?_T_M) and then say how many times it has - to pass between each grid line or label (_?_S_T). For the - label you have to define two additional items: The - precision of the label in seconds (_L_P_R) and the strftime - format used to generate the text of the label (_L_F_M). - - The _?_T_M elements must be one of the following keywords: - SSSSEEEECCCCOOOONNNNDDDD, MMMMIIIINNNNUUUUTTTTEEEE, HHHHOOOOUUUURRRR, DDDDAAAAYYYY, WWWWEEEEEEEEKKKK, MMMMOOOONNNNTTTTHHHH or YYYYEEEEAAAARRRR. - - If you wanted a graph with a base grid every 10 minutes - and a major one every hour, with labels every hour you - would use the following x-axis definition. - - `MINUTE:10:HOUR:1:HOUR:1:0:%X' - - The precision in this example is 0 because the %X format - is exact. If the label was the name of the day, we would - have had a precision of 24 hours, because when you say - something like 'Monday' you mean the whole day and not - Monday morning 00:00. Thus the label should be - positioned at noon. By defining a precision of 24 hours - or rather 86400 seconds, you make sure that this - happens. - - ----yyyy|--------yyyy----ggggrrrriiiidddd _g_r_i_d _s_t_e_p:_l_a_b_e_l _f_a_c_t_o_r (default autoconfigure) - Makes vertical grid lines appear at _g_r_i_d _s_t_e_p interval. - Every _l_a_b_e_l _f_a_c_t_o_r gridstep, a major grid line is - printed, along with label showing the value of the grid - line. - - - -2001-02-20 Last change: 1.0.33 2 - - - - - - -rrdtool RRDGRAPH(1) - - - - If you want no y-grid at all set specify the magic word - nnnnoooonnnneeee. - - --------aaaalllltttt----yyyy----ggggrrrriiiidddd - Place Y grid dynamically based on graph Y range. - Algorithm ensures that you always have grid, that there - are enough but not too many grid lines and the grid is - metric. That is grid lines are placed every 1, 2, 5 or - 10 units. (contributed by Sasha Mikheev) - - --------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee - Compute Y range based on function absolute minimum and - maximum values. Default algorithm uses predefined set of - ranges. This is good in many cases but it fails - miserably when you need to graph something like 260 + - 0.001 * _s_i_n(x). Default algorithm will use Y range from - 250 to 300 and on the graph you will see almost straight - line. With --alt-autoscale Y range will be from slightly - less the 260 - 0.001 to slightly more then 260 + 0.001 - and periodic behavior will be seen. (contributed by - Sasha Mikheev) - - --------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee----mmmmaaaaxxxx - Where --alt-autoscale will modify both the absolute - maximum AND minimum values, this option will only affect - the maximum value. The minimum value, if not defined on - the command line, will be 0. This option can be useful - when graphing router traffic when the WAN line uses - compression, and thus the throughput may be higher than - the WAN line speed. - - --------uuuunnnniiiittttssss----eeeexxxxppppoooonnnneeeennnntttt _v_a_l_u_e (default autoconfigure) - This sets the 10**exponent scaling of the y-axis values. - Normally values will be scaled to the appropriate units - (k, M, etc.). However you may wish to display units - always in k (Kilo, 10e3) even if the data is in the M - (Mega, 10e6) range for instance. Value should be an - integer which is a multiple of 3 between -18 and 18 - inclusive. It is the exponent on the units you which to - use. For example, use 3 to display the y-axis values in - k (Kilo, 10e3, thousands), use -6 to display the y-axis - values in u (Micro, 10e-6, millionths). Use a value of - 0 to prevent any scaling of the y-axis values. - - ----vvvv|--------vvvveeeerrrrttttiiiiccccaaaallll----llllaaaabbbbeeeellll _t_e_x_t - vertical label on the left side of the graph. This is - normally used to specify the units used. - - ----wwww|--------wwwwiiiiddddtttthhhh _p_i_x_e_l_s (default 400 pixel) - Width of the drawing area within the graph. This affects - the size of the gif. - - - - -2001-02-20 Last change: 1.0.33 3 - - - - - - -rrdtool RRDGRAPH(1) - - - - ----hhhh|--------hhhheeeeiiiigggghhhhtttt _p_i_x_e_l_s (default 100 pixel) - Width of the drawing area within the graph. This affects - the size of the gif. - - ----iiii|--------iiiinnnntttteeeerrrrllllaaaacccceeeedddd (default: false) - If you set this option, then the resulting GIF will be - interlaced. Most web browsers display these - incrementally as they load. If you do not use this - option, the GIFs default to being progressive scanned. - The only effect of this option is to control the format - of the GIF on disk. It makes no changes to the layout or - contents of the graph. - - ----ffff|--------iiiimmmmggggiiiinnnnffffoooo _f_o_r_m_a_t_s_t_r_i_n_g - After the image has been created, the graph function - uses printf together with this format string to create - output similar to the PRINT function, only that the - printf is supplied with the parameters _f_i_l_e_n_a_m_e, _x_s_i_z_e - and _y_s_i_z_e. In order to generate an IIIIMMMMGGGG tag suitable for - including the graph into a web page, the command line - would look like this: - - --imginfo 'Demo' - - - ----aaaa|--------iiiimmmmggggffffoooorrrrmmmmaaaatttt GGGGIIIIFFFF|PPPPNNNNGGGG (default: GIF) - Allows you to produce PNG output from rrdtool. - - ----zzzz|--------llllaaaazzzzyyyy (default: false) - Only generate the graph, if the current gif is out of - date or not existent. - - ----uuuu|--------uuuuppppppppeeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e (default autoconfigure) - Defines the value normally located at the upper border - of the graph. If the graph contains higher values, the - upper border will move upwards to accomodate these - values as well. - - If you want to define an upper-limit which will not move - in any event you have to set the --------rrrriiiiggggiiiidddd option as well. - - ----llll|--------lllloooowwwweeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e (default autoconfigure) - This is not the lower limit of a graph. But rather, - this is the maximum lower bound of a graph. For - example, the value -100 will result in a graph that has - a lower limit of -100 or less. Use this keyword to - expand graphs down. - - ----rrrr|--------rrrriiiiggggiiiidddd - rigid boundaries mode. Normally rrdgraph will - automatically expand the lower and upper limit if the - graph contains a value outside the valid range. With the - - - -2001-02-20 Last change: 1.0.33 4 - - - - - - -rrdtool RRDGRAPH(1) - - - - r option you can disable this behavior - - ----bbbb|--------bbbbaaaasssseeee _v_a_l_u_e - if you are graphing memory (and NOT network traffic) - this switch should be set to 1024 so that one Kb is 1024 - byte. For traffic measurement, 1 kb/s is 1000 b/s. - - ----oooo|--------llllooooggggaaaarrrriiiitttthhhhmmmmiiiicccc - logarithmic y-axis scaling - - ----cccc|--------ccccoooolllloooorrrr _C_O_L_O_R_T_A_G####_r_r_g_g_b_b (default colors) - override the colors for the standard elements of the - graph. The _C_O_L_O_R_T_A_G must be one of the following - symbolic names: BBBBAAAACCCCKKKK ground, CCCCAAAANNNNVVVVAAAASSSS, SSSSHHHHAAAADDDDEEEEAAAA left/top - border, SSSSHHHHAAAADDDDEEEEBBBB right/bottom border, GGGGRRRRIIIIDDDD, MMMMGGGGRRRRIIIIDDDD major - grid, FFFFOOOONNNNTTTT, FFFFRRRRAAAAMMMMEEEE and axis of the graph or AAAARRRRRRRROOOOWWWW. This - option can be called multiple times to set several - colors. - - ----gggg|--------nnnnoooo----lllleeeeggggeeeennnndddd - Suppress generation of legend; only render the graph. - - ----tttt|--------ttttiiiittttlllleeee _t_e_x_t (default no title) - Define a title to be written into the graph - - --------sssstttteeeepppp _v_a_l_u_e (default automatic) - By default rrdgraph calculates the width of one pixle in - the time domain and tries to get data at that resolution - from the RRD. With this switch you can override this - behaviour. If you want rrdgraph to get data at 1 hour - resolution from the RRD, then you can set the step to - 3600 seconds. Note, that a step smaller than 1 pixle - will be silently ignored. - - DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s_-_n_a_m_e::::_C_F - Define virtual name for a data source. This name can - then be used in the functions explained below. The DEF - call automatically chooses an RRRRRRRRAAAA which contains _C_F - consolidated data in a resolution appropriate for the - size of the graph to be drawn. Ideally this means that - one data point from the RRRRRRRRAAAA should be represented by one - pixel in the graph. If the resolution of the RRRRRRRRAAAA is - higher than the resolution of the graph, the data in the - RRA will be further consolidated according to the - consolidation function (_C_F) chosen. - - CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n_-_e_x_p_r_e_s_s_i_o_n - Create a new virtual data source by evaluating a - mathematical expression, specified in Reverse Polish - Notation (RPN). If you have ever used a traditional HP - calculator you already know RPN. The idea behind RPN - notation is, that you have a stack and push your data - - - -2001-02-20 Last change: 1.0.33 5 - - - - - - -rrdtool RRDGRAPH(1) - - - - onto this stack. When ever you execute an operation, it - takes as many data values from the stack as needed. The - pushing of data is implicit, so when ever you specify a - number or a variable, it gets pushed automatically. - - If this is all a big load of incomprehensible words for - you, maybe an example helps (a more complete explanation - is given in [1]): The expression _v_n_a_m_e_+_3_/_2 becomes - `vname,3,2,/,+' in RPN. First the three values get - pushed onto the stack (which now contains (the current - value of) vname, a 3 and a 2). Then the / operator pops - two values from the stack (3 and 2), divides the first - argument by the second (3/2) and pushes the result (1.5) - back onto the stack. Then the + operator pops two values - (vname and 1.5) from the stack; both values are added up - and the result gets pushes back onto the stack. In the - end there is only one value left on the stack: The - result of the expression. - - The _r_p_n_-_e_x_p_r_e_s_s_i_o_n in the CCCCDDDDEEEEFFFF function takes both, - constant values as well as _v_n_a_m_e variables. The - following operators can be used on these values: - - +, -, *, /, % - pops two values from the stack applies the selected - operator and pushes the result back onto the stack. - The % operator stands for the modulo operation. - - SIN, COS, LOG, EXP, FLOOR, CEIL - pops one value from the stack, applies the selected - function and pushes the result back onto the stack. - - LT, LE, GT, GE, EQ - pops two values from the stack, compares them - according to the selected condition and pushes - either 1 back onto the stack if the condition is - true and 0 if the condition was not true. - - IF pops three values from the stack. If the last value - is not 0, the second value will be pushed back onto - the stack, otherwise the first value is pushed back. - - If the stack contains the values A, B, C, D, E are - presently on the stack, the IF operator will pop the - values E D and C of the stack. It will look at C and - if it is not 0 it will push D back onto the stack, - otherwise E will be sent back to the stack. - - MIN, MAX - selects the lesser or larger of the two top stack - values respectively - - - - -2001-02-20 Last change: 1.0.33 6 - - - - - - -rrdtool RRDGRAPH(1) - - - - LIMIT - replaces the value with _*_U_N_K_N_O_W_N_* if it is outside - the limits specified by the two values above it on - the stack. - - CDEF:a=alpha,0,100,LIMIT - - - DUP, EXC, POP - These manipulate the stack directly. DUP will - duplicate the top of the stack, pushing the result - back onto the stack. EXC will exchange the top two - elements of the stack, and POP will pop off the top - element of the stack. Having insufficient elements - on the stack for these operations is an error. - - UN Pops one value off the stack, if it is _*_U_N_K_N_O_W_N_*, 1 - will be pushed back otherwise 0. - - UNKN - Push an _*_U_N_K_N_O_W_N_* value onto the stack. - - PREV - Push _*_U_N_K_N_O_W_N_* if its at the first value of a data - set or otherwise the value of this CDEF at the - previous time step. This allows you to perform - calculations across the data. - - INF, NEGINF - Push a positive or negative infinite (oo) value onto - the stack. When drawing an infinite number it - appears right at the top or bottom edge of the - graph, depending whether you have a positive or - negative infinite number. - - NOW Push the current (real world) time onto the stack. - - TIME - Push the time the current sample was taken onto the - stack. This is the number of non-skip seconds since - 0:00:00 January 1, 1970. - - LTIME - This is like TIME ++++ ccccuuuurrrrrrrreeeennnntttt ttttiiiimmmmeeeezzzzoooonnnneeee ooooffffffffsssseeeetttt iiiinnnn - sssseeeeccccoooonnnnddddssss. The current offset takes daylight saving - time into account, given your OS supports this. If - you were looking at a sample, in Zurich, in summer, - the offset would be 2*3600 seconds, as Zurich at - that time of year is 2 hours ahead of UTC. - - Note that the timezone offset is always calculated - for the time the current sample was taken at. It has - - - -2001-02-20 Last change: 1.0.33 7 - - - - - - -rrdtool RRDGRAPH(1) - - - - nuthing todo with the time you are doing the - calculation. - - Please note that you may only use _v_n_a_m_e variables that - you previously defined by either DDDDEEEEFFFF or CCCCDDDDEEEEFFFF. - Furthermore, as of this writing (version 0.99.25), you - must use at least one _v_n_a_m_e per expression, that is - "CDEF:fourtytwo=2,40,+" will yield an error message but - not a _v_n_a_m_e fourtytwo that's always equal to 42. - - PPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t - Calculate the chosen consolidation function _C_F over the - data-source variable _v_n_a_m_e and `printf' the result to - stdout using _f_o_r_m_a_t. In the _f_o_r_m_a_t string there should - be a '%lf' or '%le' marker in the place where the number - should be printed. - - If an additional '%s' is found AFTER the marker, the - value will be scaled and an appropriate SI magnitude - unit will be printed in place of the '%s' marker. The - scaling will take the '--base' argument into - consideration! - - If a '%S' is used instead of a '%s', then instead of - calculating the appropriate SI magnitude unit for this - value, the previously calculated SI magnitude unit will - be used. This is useful if you want all the values in a - PRINT statement to have the same SI magnitude unit. If - there was no previous SI magnitude calculation made, - then '%S' behaves like a '%s', unless the value is 0, in - which case it does not remember a SI magnitude unit and - a SI magnitude unit will only be calculated when the - next '%s' is seen or the next '%S' for a non-zero value. - - If you want to put a '%' into your PRINT string, use - '%%' instead. - - GGGGPPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t - Same as PPPPRRRRIIIINNNNTTTT but the result is printed into the graph - below the legend. - - CCCCaaaavvvveeeeaaaatttt:::: When using the PPPPRRRRIIIINNNNTTTT and GGGGRRRRPPPPRRRRIIIINNNNTTTT functions to - calculate data summaries over time periods bounded by the - current time, it is important to note that the last sample - will almost always yield a value of UNKNOWN as it lies after - the last update time. This can result in slight data - skewing, particularly with the AAAAVVVVEEEERRRRAAAAGGGGEEEE function. In order - to avoid this, make sure that your end time is at least one - heartbeat prior to the current time. - - CCCCOOOOMMMMMMMMEEEENNNNTTTT::::_t_e_x_t - Like GGGGPPPPRRRRIIIINNNNTTTT but the _t_e_x_t is simply printed into the - - - -2001-02-20 Last change: 1.0.33 8 - - - - - - -rrdtool RRDGRAPH(1) - - - - graph. - - HHHHRRRRUUUULLLLEEEE::::_v_a_l_u_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d] - Draw a horizontal rule into the graph and optionally add - a legend - - VVVVRRRRUUUULLLLEEEE::::_t_i_m_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d] - Draw a vertical rule into the graph and optionally add a - legend - - LLLLIIIINNNNEEEE{1111|2222|3333}::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] - Plot for the requested data, using the color specified. - Write a legend into the graph. The 3 possible keywords - LLLLIIIINNNNEEEE1111, LLLLIIIINNNNEEEE2222, and LLLLIIIINNNNEEEE3333 generate increasingly wide - lines. If no color is defined, the drawing is done - 'blind' this is useful in connection with the SSSSTTTTAAAACCCCKKKK - function when you want to ADD the values of two data- - sources without showing it in the graph. - - AAAARRRREEEEAAAA:_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] - Does the same as LLLLIIIINNNNEEEE????, but the area between 0 and the - graph will be filled with the color specified. - - SSSSTTTTAAAACCCCKKKK:_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] - Does the same as LLLLIIIINNNNEEEE????, but the graph gets stacked on - top of the previous LLLLIIIINNNNEEEE????, AAAARRRREEEEAAAA or SSSSTTTTAAAACCCCKKKK graph. - Depending on the type of the previous graph, the SSSSTTTTAAAACCCCKKKK - will be either a LLLLIIIINNNNEEEE???? or an AAAARRRREEEEAAAA. This obviously - implies that the first SSSSTTTTAAAACCCCKKKK must be preceded by an AAAARRRREEEEAAAA - or LLLLIIIINNNNEEEE???? -- you need something to stack something onto - in the first place ;) - - Note, that when you STACK onto *UNKNOWN* data, rrdtool - will not draw any graphics ... *UNKNOWN* is not zero ... - if you want it to zero then you might want to use a CDEF - argument with IF and UN functions to turn *UNKNOWN* into - zero ... + The ggggrrrraaaapppphhhh functions main purpose is to create graphical + representations of the data stored in one or several RRRRRRRRDDDDs. + Apart from generating graphs, it can also extract numeri- + cal reports. + + _f_i_l_e_n_a_m_e + The name of the graph to generate. Since rrrrrrrrddddttttoooooooollll out- + puts GIFs and PNGs, it's recommended that the filename + end in either _._g_i_f or _._p_n_g. rrrrrrrrddddttttoooooooollll does not enforce + this, however. If the _f_i_l_e_n_a_m_e is set to '-' the + image file will be written to standard out. All other + output will get suppressed. + + PNG output is recommended, since it takes up to 40% + less disk space and 20-30% less time to generate than + a GIF file. + + If no graph functions are called, the graph will not + be created. + + ----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s (default end-1day) + The time when the graph should begin. Time in seconds + since epoch (1970-01-01) is required. Negative numbers + are relative to the current time. By default one day + worth of data will be graphed. See also AT-STYLE TIME + SPECIFICATION section in the _r_r_d_f_e_t_c_h documentation + for a detailed explanation on how to specify time. + + ----eeee|--------eeeennnndddd _s_e_c_o_n_d_s (default now) + The time when the graph should end. Time in seconds + since epoch. See also AT-STYLE TIME SPECIFICATION + section in the _r_r_d_f_e_t_c_h documentation for a detailed + explanation of ways to specify time. + + ----xxxx|--------xxxx----ggggrrrriiiidddd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l (default autoconfigure) + The x-axis label is quite complex to configure. So if + you don't have very special needs, you can rely on the + autoconfiguration to get this right. + + If you want no x-grid at all, use the magic setting + nnnnoooonnnneeee. + + The x-axis label and grid can be configured, using the + following format: + + _G_T_M::::_G_S_T::::_M_T_M::::_M_S_T::::_L_T_M:_L_S_T::::_L_P_R::::_L_F_M + + You have to configure three elements making up the x- + axis labels and grid. The base grid (_G_?_?), the major + grid (_M_?_?) and the labels (_L_?_?). The configuration is + based on the idea that you first specify a well known + amount of time (_?_T_M) and then say how many times it + has to pass between each grid line or label (_?_S_T). For + the label you have to define two additional items: The + precision of the label in seconds (_L_P_R) and the strf- + time format used to generate the text of the label + (_L_F_M). + + The _?_T_M elements must be one of the following key- + words: SSSSEEEECCCCOOOONNNNDDDD, MMMMIIIINNNNUUUUTTTTEEEE, HHHHOOOOUUUURRRR, DDDDAAAAYYYY, WWWWEEEEEEEEKKKK, MMMMOOOONNNNTTTTHHHH or YYYYEEEEAAAARRRR. + + If you wanted a graph with a base grid every 10 min- + utes and a major one every hour, with labels every + hour you would use the following x-axis definition. + + "MINUTE:10:HOUR:1:HOUR:1:0:%X" + + The precision in this example is 0 because the %X for- + mat is exact. If the label was the name of the day, we + would have had a precision of 24 hours, because when + you say something like 'Monday' you mean the whole day + and not Monday morning 00:00. Thus the label should be + positioned at noon. By defining a precision of 24 + hours or rather 86400 seconds, you make sure that this + happens. + + If you want to alter the genertated text to another + language, use the LC_TIME environment variable to set + the locale you prefere prior to calling the graph + function. + + ----yyyy|--------yyyy----ggggrrrriiiidddd _g_r_i_d _s_t_e_p:_l_a_b_e_l _f_a_c_t_o_r (default autoconfigure) + Makes vertical grid lines appear at _g_r_i_d _s_t_e_p inter- + val. Every _l_a_b_e_l _f_a_c_t_o_r gridstep, a major grid line is + printed, along with label showing the value of the + grid line. + + If you want no y-grid at all set specify the magic + word nnnnoooonnnneeee. + + --------aaaalllltttt----yyyy----ggggrrrriiiidddd + Place Y grid dynamically based on graph Y range. Algo- + rithm ensures that you always have grid, that there + are enough but not too many grid lines and the grid is + metric. That is grid lines are placed every 1, 2, 5 or + 10 units. (contributed by Sasha Mikheev) + + --------aaaalllltttt----yyyy----mmmmrrrrttttgggg + Y grid placed on graph Y range mimmics mrtg's (rateup- + generated) graphs. Currently axis is split into 4 + parts, just as rateup does. + + + + --------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee + Compute Y range based on function absolute minimum + and maximum values. Default algorithm uses predefined + set of ranges. This is good in many cases but it + fails miserably when you need to graph something like + 260 + 0.001 * _s_i_n(x). Default algorithm will use Y + range from 250 to 300 and on the graph you will see + almost straight line. With --alt-autoscale Y range + will be from slightly less the 260 - 0.001 to slightly + more then 260 + 0.001 and periodic behavior will be + seen. (contributed by Sasha Mikheev) + + --------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee----mmmmaaaaxxxx + Where --alt-autoscale will modify both the absolute + maximum AND minimum values, this option will only + affect the maximum value. The minimum value, if not + defined on the command line, will be 0. This option + can be useful when graphing router traffic when the + WAN line uses compression, and thus the throughput may + be higher than the WAN line speed. + + --------uuuunnnniiiittttssss----eeeexxxxppppoooonnnneeeennnntttt _v_a_l_u_e (default autoconfigure) + This sets the 10**exponent scaling of the y-axis val- + ues. Normally values will be scaled to the appropri- + ate units (k, M, etc.). However you may wish to dis- + play units always in k (Kilo, 10e3) even if the data + is in the M (Mega, 10e6) range for instance. Value + should be an integer which is a multiple of 3 between + -18 and 18 inclusive. It is the exponent on the units + you which to use. For example, use 3 to display the + y-axis values in k (Kilo, 10e3, thousands), use -6 to + display the y-axis values in u (Micro, 10e-6, mil- + lionths). Use a value of 0 to prevent any scaling of + the y-axis values. + + ----vvvv|--------vvvveeeerrrrttttiiiiccccaaaallll----llllaaaabbbbeeeellll _t_e_x_t + vertical label on the left side of the graph. This is + normally used to specify the units used. + + ----wwww|--------wwwwiiiiddddtttthhhh _p_i_x_e_l_s (default 400 pixel) + Width of the drawing area within the graph. This + affects the size of the gif. + + ----hhhh|--------hhhheeeeiiiigggghhhhtttt _p_i_x_e_l_s (default 100 pixel) + Width of the drawing area within the graph. This + affects the size of the gif. + + ----iiii|--------iiiinnnntttteeeerrrrllllaaaacccceeeedddd (default: false) + If you set this option, then the resulting GIF will be + interlaced. Most web browsers display these incremen- + tally as they load. If you do not use this option, the + GIFs default to being progressive scanned. The only + effect of this option is to control the format of the + GIF on disk. It makes no changes to the layout or con- + tents of the graph. + + ----ffff|--------iiiimmmmggggiiiinnnnffffoooo _f_o_r_m_a_t_s_t_r_i_n_g + After the image has been created, the graph function + uses printf together with this format string to create + output similar to the PRINT function, only that the + printf is supplied with the parameters _f_i_l_e_n_a_m_e, _x_s_i_z_e + and _y_s_i_z_e. In order to generate an IIIIMMMMGGGG tag suitable + for including the graph into a web page, the command + line would look like this: + + --imginfo 'Demo' + + + ----aaaa|--------iiiimmmmggggffffoooorrrrmmmmaaaatttt GGGGIIIIFFFF|PPPPNNNNGGGG|GGGGDDDD (default: GIF) + Allows you to produce PNG or GD output from rrdtool. + + ----BBBB|--------bbbbaaaacccckkkkggggrrrroooouuuunnnndddd _v_a_l_u_e + You could use image in (currently only) GD format for + background. It is used as background at the very + beginning of graph creation. + + ----OOOO|--------oooovvvveeeerrrrllllaaaayyyy _v_a_l_u_e + You could use image in (currently only) GD format as + overlay. It is placed over created graph so that white + pixel (color 255,255,255) is considered transparent, + all other is replacing corresponding pixel in created + graph. + + ----UUUU|--------uuuunnnniiiitttt _v_a_l_u_e + You could use unit to be displayed on y axis. It is + wise to use only short units on graph, however. + + ----zzzz|--------llllaaaazzzzyyyy (default: false) + Only generate the graph, if the current gif is out of + date or not existent. + + ----uuuu|--------uuuuppppppppeeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e (default autoconfigure) + Defines the value normally located at the upper border + of the graph. If the graph contains higher values, the + upper border will move upwards to accomodate these + values as well. + + If you want to define an upper-limit which will not + move in any event you have to set the --------rrrriiiiggggiiiidddd option + as well. + + ----llll|--------lllloooowwwweeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e (default autoconfigure) + This is not the lower limit of a graph. But rather, + this is the maximum lower bound of a graph. For exam- + ple, the value -100 will result in a graph that has a + lower limit of -100 or less. Use this keyword to + expand graphs down. + + ----rrrr|--------rrrriiiiggggiiiidddd + rigid boundaries mode. Normally rrdgraph will auto- + matically expand the lower and upper limit if the + graph contains a value outside the valid range. With + the r option you can disable this behavior + + ----bbbb|--------bbbbaaaasssseeee _v_a_l_u_e + if you are graphing memory (and NOT network traffic) + this switch should be set to 1024 so that one Kb is + 1024 byte. For traffic measurement, 1 kb/s is 1000 + b/s. + + ----oooo|--------llllooooggggaaaarrrriiiitttthhhhmmmmiiiicccc + logarithmic y-axis scaling + + ----cccc|--------ccccoooolllloooorrrr _C_O_L_O_R_T_A_G####_r_r_g_g_b_b (default colors) + override the colors for the standard elements of the + graph. The _C_O_L_O_R_T_A_G must be one of the following sym- + bolic names: BBBBAAAACCCCKKKK ground, CCCCAAAANNNNVVVVAAAASSSS, SSSSHHHHAAAADDDDEEEEAAAA left/top bor- + der, SSSSHHHHAAAADDDDEEEEBBBB right/bottom border, GGGGRRRRIIIIDDDD, MMMMGGGGRRRRIIIIDDDD major + grid, FFFFOOOONNNNTTTT, FFFFRRRRAAAAMMMMEEEE and axis of the graph or AAAARRRRRRRROOOOWWWW. This + option can be called multiple times to set several + colors. + + ----gggg|--------nnnnoooo----lllleeeeggggeeeennnndddd + Suppress generation of legend; only render the graph. + + ----tttt|--------ttttiiiittttlllleeee _t_e_x_t (default no title) + Define a title to be written into the graph + + --------sssstttteeeepppp _v_a_l_u_e (default automatic) + By default rrdgraph calculates the width of one pixle + in the time domain and tries to get data at that reso- + lution from the RRD. With this switch you can override + this behaviour. If you want rrdgraph to get data at 1 + hour resolution from the RRD, then you can set the + step to 3600 seconds. Note, that a step smaller than 1 + pixle will be silently ignored. + + DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s_-_n_a_m_e::::_C_F + Define virtual name for a data source. This name can + then be used in the functions explained below. The DEF + call automatically chooses an RRRRRRRRAAAA which contains _C_F + consolidated data in a resolution appropriate for the + size of the graph to be drawn. Ideally this means + that one data point from the RRRRRRRRAAAA should be represented + by one pixel in the graph. If the resolution of the + RRRRRRRRAAAA is higher than the resolution of the graph, the + data in the RRA will be further consolidated according + to the consolidation function (_C_F) chosen. + + CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n_-_e_x_p_r_e_s_s_i_o_n + Create a new virtual data source by evaluating a math- + ematical expression, specified in Reverse Polish Nota- + tion (RPN). If you have ever used a traditional HP + calculator you already know RPN. The idea behind RPN + notation is, that you have a stack and push your data + onto this stack. When ever you execute an operation, + it takes as many data values from the stack as needed. + The pushing of data is implicit, so when ever you + specify a number or a variable, it gets pushed auto- + matically. + + If this is all a big load of incomprehensible words + for you, maybe an example helps (a more complete + explanation is given in [1]): The expression _v_n_a_m_e_+_3_/_2 + becomes "vname,3,2,/,+" in RPN. First the three values + get pushed onto the stack (which now contains (the + current value of) vname, a 3 and a 2). Then the / + operator pops two values from the stack (3 and 2), + divides the first argument by the second (3/2) and + pushes the result (1.5) back onto the stack. Then the + + operator pops two values (vname and 1.5) from the + stack; both values are added up and the result gets + pushes back onto the stack. In the end there is only + one value left on the stack: The result of the expres- + sion. + + The _r_p_n_-_e_x_p_r_e_s_s_i_o_n in the CCCCDDDDEEEEFFFF function takes both, + constant values as well as _v_n_a_m_e variables. The fol- + lowing operators can be used on these values: + + +, -, *, /, % + pops two values from the stack applies the + selected operator and pushes the result back onto + the stack. The % operator stands for the modulo + operation. + + + + SIN, COS, LOG, EXP, FLOOR, CEIL + pops one value from the stack, applies the + selected function and pushes the result back onto + the stack. + + LT, LE, GT, GE, EQ + pops two values from the stack, compares them + according to the selected condition and pushes + either 1 back onto the stack if the condition is + true and 0 if the condition was not true. + + IF pops three values from the stack. If the last + value is not 0, the second value will be pushed + back onto the stack, otherwise the first value is + pushed back. + + If the stack contains the values A, B, C, D, E are + presently on the stack, the IF operator will pop + the values E D and C of the stack. It will look at + C and if it is not 0 it will push D back onto the + stack, otherwise E will be sent back to the stack. + + MIN, MAX + selects the lesser or larger of the two top stack + values respectively + + LIMIT + replaces the value with _*_U_N_K_N_O_W_N_* if it is outside + the limits specified by the two values above it on + the stack. + + CDEF:a=alpha,0,100,LIMIT + + + DUP, EXC, POP + These manipulate the stack directly. DUP will + duplicate the top of the stack, pushing the result + back onto the stack. EXC will exchange the top + two elements of the stack, and POP will pop off + the top element of the stack. Having insufficient + elements on the stack for these operations is an + error. + + UN Pops one value off the stack, if it is _*_U_N_K_N_O_W_N_*, + 1 will be pushed back otherwise 0. + + UNKN + Push an _*_U_N_K_N_O_W_N_* value onto the stack. + + PREV + Push _*_U_N_K_N_O_W_N_* if its at the first value of a data + set or otherwise the value of this CDEF at the + previous time step. This allows you to perform + calculations across the data. + + PREV(vname) + Push _*_U_N_K_N_O_W_N_* if its at the first value of the + data set named vname or otherwise the value of the + CDEF named vname at the previous time step. This + allows you to perform complex calculations across + the data. + + INF, NEGINF + Push a positive or negative infinite (oo) value + onto the stack. When drawing an infinite number it + appears right at the top or bottom edge of the + graph, depending whether you have a positive or + negative infinite number. + + NOW Push the current (real world) time onto the stack. + + TIME + Push the time the current sample was taken onto + the stack. This is the number of non-skip seconds + since 0:00:00 January 1, 1970. + + LTIME + This is like TIME ++++ ccccuuuurrrrrrrreeeennnntttt ttttiiiimmmmeeeezzzzoooonnnneeee ooooffffffffsssseeeetttt iiiinnnn + sssseeeeccccoooonnnnddddssss. The current offset takes daylight saving + time into account, given your OS supports this. If + you were looking at a sample, in Zurich, in sum- + mer, the offset would be 2*3600 seconds, as Zurich + at that time of year is 2 hours ahead of UTC. + + Note that the timezone offset is always calculated + for the time the current sample was taken at. It + has nuthing todo with the time you are doing the + calculation. + + Please note that you may only use _v_n_a_m_e variables that + you previously defined by either DDDDEEEEFFFF or CCCCDDDDEEEEFFFF. Further- + more, as of this writing (version 0.99.25), you must + use at least one _v_n_a_m_e per expression, that is + "CDEF:fourtytwo=2,40,+" will yield an error message + but not a _v_n_a_m_e fourtytwo that's always equal to 42. + + PPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t + Calculate the chosen consolidation function _C_F over + the data-source variable _v_n_a_m_e and "printf" the result + to stdout using _f_o_r_m_a_t. In the _f_o_r_m_a_t string there + should be a '%lf' or '%le' marker in the place where + the number should be printed. + + If an additional '%s' is found AFTER the marker, the + value will be scaled and an appropriate SI magnitude + unit will be printed in place of the '%s' marker. The + scaling will take the '--base' argument into consider- + ation! + + If a '%S' is used instead of a '%s', then instead of + calculating the appropriate SI magnitude unit for this + value, the previously calculated SI magnitude unit + will be used. This is useful if you want all the val- + ues in a PRINT statement to have the same SI magnitude + unit. If there was no previous SI magnitude calcula- + tion made, then '%S' behaves like a '%s', unless the + value is 0, in which case it does not remember a SI + magnitude unit and a SI magnitude unit will only be + calculated when the next '%s' is seen or the next '%S' + for a non-zero value. + + If you want to put a '%' into your PRINT string, use + '%%' instead. + + GGGGPPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t + Same as PPPPRRRRIIIINNNNTTTT but the result is printed into the graph + below the legend. + + CCCCaaaavvvveeeeaaaatttt:::: When using the PPPPRRRRIIIINNNNTTTT and GGGGRRRRPPPPRRRRIIIINNNNTTTT functions to cal- + culate data summaries over time periods bounded by the + current time, it is important to note that the last sample + will almost always yield a value of UNKNOWN as it lies + after the last update time. This can result in slight + data skewing, particularly with the AAAAVVVVEEEERRRRAAAAGGGGEEEE function. In + order to avoid this, make sure that your end time is at + least one heartbeat prior to the current time. + + CCCCOOOOMMMMMMMMEEEENNNNTTTT::::_t_e_x_t + Like GGGGPPPPRRRRIIIINNNNTTTT but the _t_e_x_t is simply printed into the + graph. + + HHHHRRRRUUUULLLLEEEE::::_v_a_l_u_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d] + Draw a horizontal rule into the graph and optionally + add a legend + + VVVVRRRRUUUULLLLEEEE::::_t_i_m_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d] + Draw a vertical rule into the graph and optionally add + a legend + + LLLLIIIINNNNEEEE{1111|2222|3333}::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] + Plot for the requested data, using the color speci- + fied. Write a legend into the graph. The 3 possible + keywords LLLLIIIINNNNEEEE1111, LLLLIIIINNNNEEEE2222, and LLLLIIIINNNNEEEE3333 generate increasingly + wide lines. If no color is defined, the drawing is + done 'blind' this is useful in connection with the + SSSSTTTTAAAACCCCKKKK function when you want to ADD the values of two + data-sources without showing it in the graph. + + AAAARRRREEEEAAAA:_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] + Does the same as LLLLIIIINNNNEEEE????, but the area between 0 and the + graph will be filled with the color specified. + + SSSSTTTTAAAACCCCKKKK:_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] + Does the same as LLLLIIIINNNNEEEE????, but the graph gets stacked on + top of the previous LLLLIIIINNNNEEEE????, AAAARRRREEEEAAAA or SSSSTTTTAAAACCCCKKKK graph. + Depending on the type of the previous graph, the SSSSTTTTAAAACCCCKKKK + will be either a LLLLIIIINNNNEEEE???? or an AAAARRRREEEEAAAA. This obviously + implies that the first SSSSTTTTAAAACCCCKKKK must be preceded by an + AAAARRRREEEEAAAA or LLLLIIIINNNNEEEE???? -- you need something to stack something + onto in the first place ;) + + Note, that when you STACK onto *UNKNOWN* data, rrdtool + will not draw any graphics ... *UNKNOWN* is not zero + ... if you want it to zero then you might want to use + a CDEF argument with IF and UN functions to turn + *UNKNOWN* into zero ... NNNNOOOOTTTTEEEESSSS oooonnnn lllleeeeggggeeeennnndddd aaaarrrrgggguuuummmmeeeennnnttttssss - EEEEssssccccaaaappppiiiinnnngggg tttthhhheeee ccccoooolllloooonnnn - - In a ':' in a _l_e_g_e_n_d argument will mark the end of the - legend. To enter a ':' into a legend, the colon must be - escaped with a backslash '\:'. Beware, that many - environments look for backslashes themselves, so it may be - necessary to write two backslashes so that one is passed - onto rrd_graph. - - SSSSttttrrrriiiinnnngggg FFFFoooorrrrmmmmaaaattttttttiiiinnnngggg - - The text printed below the actual graph can be formated by - appending special escaped characters at the end of a text. - - - -2001-02-20 Last change: 1.0.33 9 - - - - - - -rrdtool RRDGRAPH(1) - + EEEEssssccccaaaappppiiiinnnngggg tttthhhheeee ccccoooolllloooonnnn + In a ':' in a _l_e_g_e_n_d argument will mark the end of the + legend. To enter a ':' into a legend, the colon must be + escaped with a backslash '\:'. Beware, that many environ- + ments look for backslashes themselves, so it may be neces- + sary to write two backslashes so that one is passed onto + rrd_graph. + + SSSSttttrrrriiiinnnngggg FFFFoooorrrrmmmmaaaattttttttiiiinnnngggg + + The text printed below the actual graph can be formated by + appending special escaped characters at the end of a text. + When ever such a character occurs, all pending text is + pushed onto the graph according to the character speci- + fied. + + Valid markers are: \\\\jjjj for justified, \\\\llll for left aligned, + \\\\rrrr for right aligned and \\\\cccc for centered. In the next + section there is an example showing how to use centered + formating. + + Normally there are two space characters inserted between + every two items printed into the graph. The space follow- + ing a string can be suppressed by putting a \\\\gggg at the end + of the string. The \\\\gggg also squshes any space inside the + string if it is at the very end of the string. This can be + used in connection with %%%%ssss to supress empty unit strings. - When ever such a character occurs, all pending text is - pushed onto the graph according to the character specified. + GPRINT:a:MAX:%lf%s\g - Valid markers are: \\\\jjjj for justified, \\\\llll for left aligned, \\\\rrrr - for right aligned and \\\\cccc for centered. In the next section - there is an example showing how to use centered formating. - - Normally there are two space characters inserted between - every two items printed into the graph. The space following - a string can be suppressed by putting a \\\\gggg at the end of the - string. The \\\\gggg also squshes any space inside the string if - it is at the very end of the string. This can be used in - connection with %%%%ssss to supress empty unit strings. - - GPRINT:a:MAX:%lf%s\g - - A special case is COMMENT:\\\\ssss this inserts some additional - vertical space before placing the next row of legends. + A special case is COMMENT:\\\\ssss this inserts some additional + vertical space before placing the next row of legends. NNNNOOOOTTTTEEEE oooonnnn RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss - Whenever rrd_graph gets called, it prints a line telling the - size of the gif it has just created to STDOUT. This line - looks like this: XSIZExYSIZE. + Whenever rrd_graph gets called, it prints a line telling + the size of the gif it has just created to STDOUT. This + line looks like this: XSIZExYSIZE. EEEEXXXXAAAAMMMMPPPPLLLLEEEE 1111 - rrdtool graph demo.gif --title="Demo Graph" \ - DEF:cel=demo.rrd:exhaust:AVERAGE \ - "CDEF:far=cel,1.8,*,32,+"" \ - LINE2:cel#00a000:"D. Celsius" \ - LINE2:far#ff0000:"D. Fahrenheit\c" + rrdtool graph demo.gif --title="Demo Graph" \ + DEF:cel=demo.rrd:exhaust:AVERAGE \ + "CDEF:far=cel,1.8,*,32,+"" \ + LINE2:cel#00a000:"D. Celsius" \ + LINE2:far#ff0000:"D. Fahrenheit\c" EEEEXXXXAAAAMMMMPPPPLLLLEEEE 2222 - This example demonstrates the syntax for using IF and UN to - set _*_U_N_K_N_O_W_N_* values to 0. This technique is useful if you - are aggregating interface data where the start dates of the - data sets doesn't match. - - rrdtool graph demo.gif --title="Demo Graph" \ - DEF:idat1=interface1.rrd:ds0:AVERAGE \ - DEF:idat2=interface2.rrd:ds0:AVERAGE \ - DEF:odat1=interface1.rrd:ds1:AVERAGE \ - DEF:odat2=interface2.rrd:ds1:AVERAGE \ - CDEF:agginput=idat1,UN,0,idat1,IF,idat2,UN,0,idat2,IF,+,8,* \ - CDEF:aggoutput=odat1,UN,0,odat1,IF,odat2,UN,0,odat2,IF,+,8,* \ - AREA:agginput#00cc00:Input Aggregate \ - LINE1:agginput#0000FF:Output Aggregate - - Assuming that idat1 has a data value of _*_U_N_K_N_O_W_N_*, the CDEF - expression - - - - - -2001-02-20 Last change: 1.0.33 10 - - - - - - -rrdtool RRDGRAPH(1) - - - - idat1,UN,0,idat1,IF - - leaves us with a stack with contents of 1,0,NaN and the IF - function will pop off the 3 values and replace them with 0. - If idat1 had a real value like 7942099, then the stack would - have 0,0,7942099 and the real value would be the - replacement. + This example demonstrates the syntax for using IF and UN + to set _*_U_N_K_N_O_W_N_* values to 0. This technique is useful if + you are aggregating interface data where the start dates + of the data sets doesn't match. + + rrdtool graph demo.gif --title="Demo Graph" \ + DEF:idat1=interface1.rrd:ds0:AVERAGE \ + DEF:idat2=interface2.rrd:ds0:AVERAGE \ + DEF:odat1=interface1.rrd:ds1:AVERAGE \ + DEF:odat2=interface2.rrd:ds1:AVERAGE \ + CDEF:agginput=idat1,UN,0,idat1,IF,idat2,UN,0,idat2,IF,+,8,* \ + CDEF:aggoutput=odat1,UN,0,odat1,IF,odat2,UN,0,odat2,IF,+,8,* \ + AREA:agginput#00cc00:Input Aggregate \ + LINE1:aggoutput#0000FF:Output Aggregate + + Assuming that idat1 has a data value of _*_U_N_K_N_O_W_N_*, the + CDEF expression + + idat1,UN,0,idat1,IF + + leaves us with a stack with contents of 1,0,NaN and the IF + function will pop off the 3 values and replace them with + 0. If idat1 had a real value like 7942099, then the stack + would have 0,0,7942099 and the real value would be the + replacement. EEEEXXXXAAAAMMMMPPPPLLLLEEEE 3333 - This example shows two ways to use the INF function. First - it makes the background change color during half of the - hours. Then, it uses AREA and STACK to draw a picture. If - one of the inputs was UNKNOWN, all inputs are overlaid with - another AREA. - - rrdtool graph example.png --title="INF demo" \ - DEF:val1=some.rrd:ds0:AVERAGE \ - DEF:val2=some.rrd:ds1:AVERAGE \ - DEF:val3=some.rrd:ds2:AVERAGE \ - DEF:val4=other.rrd:ds0:AVERAGE \ - CDEF:background=val4,POP,TIME,7200,%,3600,LE,INF,UNKN,IF \ - CDEF:wipeout=val1,val2,val3,val4,+,+,+,UN,INF,UNKN,IF \ - AREA:background#F0F0F0 \ - AREA:val1#0000FF:Value1 \ - STACK:val2#00C000:Value2 \ - STACK:val3#FFFF00:Value3 \ - STACK:val4#FFC000:Value4 \ - AREA:wipeout#FF0000:Unknown - - The first CDEF uses val4 as a dummy value. It's value is - removed immediately from the stack. Then a decision is made - based on the time that a sample was taken. If it is an even - hour (UTC time !) then the area will be filled. If it is - not, the value is set to UNKN and is not plotted. - - The second CDEF looks if any of val1,val2,val3,val4 is - unknown. It does so by checking the outcome of - sum(val1,val2,val3,val4). Again, INF is returned when the - condition is true, UNKN is used to not plot the data. - - The different items are plotted in a particular order. First - do the background, then use a normal area to overlay it with - data. Stack the other data until they are all plotted. Last - but not least, overlay everything with eye-hurting red to - signal any unknown data. - - Note that this example assumes that your data is in the - positive half of the y-axis otherwhise you would would have - to add NEGINF in order to extend the coverage of the rea to - whole graph. - - - - - -2001-02-20 Last change: 1.0.33 11 - - - + This example shows two ways to use the INF function. First + it makes the background change color during half of the + hours. Then, it uses AREA and STACK to draw a picture. If + one of the inputs was UNKNOWN, all inputs are overlaid + with another AREA. -rrdtool RRDGRAPH(1) + rrdtool graph example.png --title="INF demo" \ + DEF:val1=some.rrd:ds0:AVERAGE \ + DEF:val2=some.rrd:ds1:AVERAGE \ + DEF:val3=some.rrd:ds2:AVERAGE \ + DEF:val4=other.rrd:ds0:AVERAGE \ + CDEF:background=val4,POP,TIME,7200,%,3600,LE,INF,UNKN,IF \ + CDEF:wipeout=val1,val2,val3,val4,+,+,+,UN,INF,UNKN,IF \ + AREA:background#F0F0F0 \ + AREA:val1#0000FF:Value1 \ + STACK:val2#00C000:Value2 \ + STACK:val3#FFFF00:Value3 \ + STACK:val4#FFC000:Value4 \ + AREA:wipeout#FF0000:Unknown + + The first CDEF uses val4 as a dummy value. It's value is + removed immediately from the stack. Then a decision is + made based on the time that a sample was taken. If it is + an even hour (UTC time !) then the area will be filled. If + it is not, the value is set to UNKN and is not plotted. + + The second CDEF looks if any of val1,val2,val3,val4 is + unknown. It does so by checking the outcome of + sum(val1,val2,val3,val4). Again, INF is returned when the + condition is true, UNKN is used to not plot the data. + + The different items are plotted in a particular order. + First do the background, then use a normal area to overlay + it with data. Stack the other data until they are all + plotted. Last but not least, overlay everything with eye- + hurting red to signal any unknown data. + + Note that this example assumes that your data is in the + positive half of the y-axis otherwhise you would would + have to add NEGINF in order to extend the coverage of the + rea to whole graph. AAAAUUUUTTTTHHHHOOOORRRR - Tobias Oetiker + Tobias Oetiker RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS - [1] http://www.dotpoint.com/xnumber/rpn_or_adl.htm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -2001-02-20 Last change: 1.0.33 12 + [1] http://www.dotpoint.com/xnumber/rpn_or_adl.htm +2002-06-20 1.0.40 RRDGRAPH(1) Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdtool.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtool.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdtool.html 2002-11-09 12:32:04.000000000 -0800 @@ -106,6 +106,10 @@
      Change the size of individual RRAs ... Dangerous! Check the rrdresize manpage.

      +
      xport
      +
      +Export data retrieved from one or several RRD. Check the rrdxport manpage +

      rrdcgi
      This is a standalone tool for producing rrd graphs on the fly. Check @@ -132,11 +136,11 @@ could do this by simply storing the data in 1 minute interval, for one year. While this would take considerable disk space it would also take a lot of time to analyze the data when you wanted to create a graph -covering the whole year. rrdtool offers a solution to this of this +covering the whole year. rrdtool offers a solution to this problem through its data consolidation feature. When setting up an Round Robin Database (RRD), you can define at which interval this consolidation should occur, and what consolidation function -(CF) (average, minimum, maximum, total, last) should be used to +(CF) (average, minimum, maximum, last) should be used to build the consolidated values (see rrdcreate). You can define any number of different consolidation setups within one RRD. They will all be maintained on the fly when new data is loaded into the RRD. @@ -204,7 +208,7 @@


      SEE ALSO

      -

      rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast

      +

      rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport


      BUGS

      Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.txt 2002-11-09 12:32:04.000000000 -0800 @@ -1,186 +1,127 @@ - - - -rrdtool RRDCGI(1) +RRDCGI(1) rrdtool RRDCGI(1) NNNNAAAAMMMMEEEE - rrdcgi - create web pages containing RRD graphs based on - templates + rrdcgi - create web pages containing RRD graphs based on + templates SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - #!/path/to/rrrrrrrrddddccccggggiiii [--------ggggooooooooddddffffoooorrrr|----gggg _s_e_c_o_n_d_s] [--------ffffiiiilllltttteeeerrrr] - [--------rrrreeeeffffrrrreeeesssshhhh|----rrrr] + #!/path/to/rrrrrrrrddddccccggggiiii [--------ffffiiiilllltttteeeerrrr] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - rrrrrrrrddddccccggggiiii is a sort of very limited script interpreter. Its - purpose is to run as a cgi-program and parse a web page - template containing special - - might give you the name of the remote user given you - are using some sort of access control on the - directory - - PPPPaaaassssssss 2222 - - RRD::GOODFOR _s_e_c_o_n_d_s - Specify the number of seconds this page should - remain valid. This will prompt the rrdcgi to output - a Last-Modified, an Expire and if the number of - seconds is _n_e_g_a_t_i_v_e a Refresh headers. - - RRD::INCLUDE _f_i_l_e_n_a_m_e - Include the contents of the given file into the page - returned from the cgi - - RRD::SETENV _v_a_r_i_a_b_l_e _v_a_l_u_e - If you want to present your graphs in another time - zone than your own, you could use - - - - to make sure everything is presented in Universal - Time. Note that the values permitted to TZ depend on - your OS. - - RRD::TIME::LAST _r_r_d_-_f_i_l_e _s_t_r_f_t_i_m_e_-_f_o_r_m_a_t - This gets replaced by the last modification time of - the selected RRD. The time is _s_t_r_f_t_i_m_e-formated with - the string specified in the second argument. - - RRD::TIME::NOW _s_t_r_f_t_i_m_e_-_f_o_r_m_a_t - This gets replaced by the current time of day. The - time is _s_t_r_f_t_i_m_e-formated with the string specified - in the argument. - - PPPPaaaassssssss 3333 - - RRD::GRAPH _r_r_d_g_r_a_p_h _a_r_g_u_m_e_n_t_s - This tag creates the RRD graph defined in its - argument and then gets replaced by an appropriate - tag referring to the graph. The --------llllaaaazzzzyyyy option - in RRD graph can be used to make sure that graphs - are only regenerated when they are out of date. The - arguments to the RRRRRRRRDDDD::::::::GGGGRRRRAAAAPPPPHHHH tag work as described in - the rrrrrrrrddddggggrrrraaaapppphhhh manual page. - - - - -2001-02-20 Last change: 1.0.33 2 - - - - - - -rrdtool RRDCGI(1) - - - - Use the --------llllaaaazzzzyyyy option in your RRD::GRAPH tags, to - reduce the load on your server. This option makes - sure that graphs are only regenerated when the old - ones are out of date. - - If you do not specify your own --------iiiimmmmggggiiiinnnnffffoooo format, the - following will be used: - - - - Note that %s stands for the filename part of the - graph generated, all directories given in the GIF - file argument will get dropped. - - RRD::PRINT _n_u_m_b_e_r - If the preceding RRRRRRRRDDDD::::::::GGGGRRRRAAAAPPPPHHHH tag contained and PPPPRRRRIIIINNNNTTTT - arguments, then you can access their output with - this tag. The _n_u_m_b_e_r argument refers to the number - of the PPPPRRRRIIIINNNNTTTT argument. This first PPPPRRRRIIIINNNNTTTT has _n_u_m_b_e_r - 0. + rrrrrrrrddddccccggggiiii is a sort of very limited script interpreter. Its + purpose is to run as a cgi-program and parse a web page + template containing special + + might give you the name of the remote user given + you are using some sort of access control on the + directory + + PPPPaaaassssssss 2222 + + + RRD::GOODFOR _s_e_c_o_n_d_s + Specify the number of seconds this page should + remain valid. This will prompt the rrdcgi to out- + put a Last-Modified, an Expire and if the number + of seconds is _n_e_g_a_t_i_v_e a Refresh headers. + + RRD::INCLUDE _f_i_l_e_n_a_m_e + Include the contents of the given file into the + page returned from the cgi + + RRD::SETENV _v_a_r_i_a_b_l_e _v_a_l_u_e + If you want to present your graphs in another time + zone than your own, you could use + + + + to make sure everything is presented in Universal + Time. Note that the values permitted to TZ depend + on your OS. + + RRD::TIME::LAST _r_r_d_-_f_i_l_e _s_t_r_f_t_i_m_e_-_f_o_r_m_a_t + This gets replaced by the last modification time + of the selected RRD. The time is _s_t_r_f_t_i_m_e-formated + with the string specified in the second argument. + + RRD::TIME::NOW _s_t_r_f_t_i_m_e_-_f_o_r_m_a_t + This gets replaced by the current time of day. The + time is _s_t_r_f_t_i_m_e-formated with the string speci- + fied in the argument. + + PPPPaaaassssssss 3333 + + + RRD::GRAPH _r_r_d_g_r_a_p_h _a_r_g_u_m_e_n_t_s + This tag creates the RRD graph defined in its + argument and then gets replaced by an appropriate + tag referring to the graph. The --------llllaaaazzzzyyyy + option in RRD graph can be used to make sure that + graphs are only regenerated when they are out of + date. The arguments to the RRRRRRRRDDDD::::::::GGGGRRRRAAAAPPPPHHHH tag work as + described in the rrrrrrrrddddggggrrrraaaapppphhhh manual page. + + Use the --------llllaaaazzzzyyyy option in your RRD::GRAPH tags, to + reduce the load on your server. This option makes + sure that graphs are only regenerated when the old + ones are out of date. + + If you do not specify your own --------iiiimmmmggggiiiinnnnffffoooo format, + the following will be used: + + + + Note that %s stands for the filename part of the + graph generated, all directories given in the GIF + file argument will get dropped. + + RRD::PRINT _n_u_m_b_e_r + If the preceding RRRRRRRRDDDD::::::::GGGGRRRRAAAAPPPPHHHH tag contained and + PPPPRRRRIIIINNNNTTTT arguments, then you can access their output + with this tag. The _n_u_m_b_e_r argument refers to the + number of the PPPPRRRRIIIINNNNTTTT argument. This first PPPPRRRRIIIINNNNTTTT has + _n_u_m_b_e_r 0. EEEEXXXXAAAAMMMMPPPPLLLLEEEE 1111 - The example below creates a web pages with a single RRD - graph. - - #!/usr/local/bin/rrdcgi - - RRDCGI Demo - -

      RRDCGI Example Page

      -

      - - -

      - - - - -EEEEXXXXAAAAMMMMPPPPLLLLEEEE 2222 - This script is slightly more elaborate, it allows you to run - it from a form which sets RRD_NAME. RRD_NAME is then used to - select which RRD you want to use a source for your graph. + The example below creates a web pages with a single RRD + graph. @@ -189,76 +130,75 @@ + #!/usr/local/bin/rrdcgi + + RRDCGI Demo + +

      RRDCGI Example Page

      +

      + +

      + + -2001-02-20 Last change: 1.0.33 3 - - - - - - -rrdtool RRDCGI(1) - - - - #!/usr/local/bin/rrdcgi - - RRDCGI Demo - -

      RRDCGI Example Page for

      -

      Selection

      -
      Room A, - Room B. -
      -

      Graph

      -

      - .gif --lazy - --title "Temperatures for " - DEF:cel=.rrd:exhaust:AVERAGE - LINE2:cel#00a000:"D. Celsius"> - -

      - - +EEEEXXXXAAAAMMMMPPPPLLLLEEEE 2222 + This script is slightly more elaborate, it allows you to + run it from a form which sets RRD_NAME. RRD_NAME is then + used to select which RRD you want to use a source for your + graph. + + #!/usr/local/bin/rrdcgi + + RRDCGI Demo + +

      RRDCGI Example Page for

      +

      Selection

      +
      Room A, + Room B. +
      +

      Graph

      +

      + .gif --lazy + --title "Temperatures for " + DEF:cel=.rrd:exhaust:AVERAGE + LINE2:cel#00a000:"D. Celsius"> + +

      + + EEEEXXXXAAAAMMMMPPPPLLLLEEEE 3333 - This example shows how to handle the case where the RRD, - graphs and cgi-bins are seperate directories + This example shows how to handle the case where the RRD, + graphs and cgi-bins are seperate directories - #!/.../bin/rrdcgi - - RRDCGI Demo - -

      RRDCGI test Page

      - ' - --lazy --start -1d --end now - DEF:http_src=/.../rrds/test.rrd:http_src:AVERAGE - AREA:http_src#00ff00:http_src - > - - + #!/.../bin/rrdcgi + + RRDCGI Demo + +

      RRDCGI test Page

      + ' + --lazy --start -1d --end now + DEF:http_src=/.../rrds/test.rrd:http_src:AVERAGE + AREA:http_src#00ff00:http_src + > + + - Note 1: Replace /.../ with the relevant directories + Note 1: Replace /.../ with the relevant directories - Note 2: The SRC=/.../gifs should be paths from the view of - the webserver/browser + Note 2: The SRC=/.../gifs should be paths from the view of + the webserver/browser AAAAUUUUTTTTHHHHOOOORRRR - Tobias Oetiker - - - - - - - - -2001-02-20 Last change: 1.0.33 4 + Tobias Oetiker +2002-04-09 1.0.40 RRDCGI(1) Modified: trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.txt 2002-11-09 12:32:05.000000000 -0800 @@ -1,132 +1,121 @@ - - - -rrdtool RRDs(3) +RRDs(3) rrdtool RRDs(3) NNNNAAAAMMMMEEEE - RRDs - Access rrdtool as a shared module + RRDs - Access rrdtool as a shared module SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - use RRDs; - RRDs::error - RRDs::last ... - RRDs::info ... - RRDs::create ... - RRDs::update ... - RRDs::graph ... - RRDs::fetch ... - RRDs::tune ... + use RRDs; + RRDs::error + RRDs::last ... + RRDs::info ... + RRDs::create ... + RRDs::update ... + RRDs::graph ... + RRDs::fetch ... + RRDs::tune ... DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee - - This module accesses rrdtool functionality directly from - within perl. The arguments to the functions listed in the - SYNOPSIS are explained in the regular rrdtool documentation. - The commandline call - - rrdtool update mydemo.rrd --template in:out N:12:13 - - gets turned into - - RRDs::update ("mydemo.rrd", "--template", "in:out", "N:12:13"); - - Note that - - --template=in:out - - is also valid. + CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee - EEEErrrrrrrroooorrrr HHHHaaaannnnddddlllliiiinnnngggg + This module accesses rrdtool functionality directly from + within perl. The arguments to the functions listed in the + SYNOPSIS are explained in the regular rrdtool documenta- + tion. The commandline call - The RRD functions will not abort your program even when they - can not make sense out of the arguments you fed them. + rrdtool update mydemo.rrd --template in:out N:12:13 - The function RRDs::error should be called to get the error - status after each function call. If RRDs::error does not - return anything then the previous function has completed its - task successfully. + gets turned into - use RRDs; - RRDs::update ("mydemo.rrd","N:12:13"); - my $ERR=RRDs::error; - die "ERROR while updating mydemo.rrd: $ERR\n" if $ERR; + RRDs::update ("mydemo.rrd", "--template", "in:out", "N:12:13"); + Note that + --template=in:out + is also valid. + EEEErrrrrrrroooorrrr HHHHaaaannnnddddlllliiiinnnngggg + The RRD functions will not abort your program even when + they can not make sense out of the arguments you fed them. -2001-02-22 Last change: 1.0.33 1 + The function RRDs::error should be called to get the error + status after each function call. If RRDs::error does not + return anything then the previous function has completed + its task successfully. + use RRDs; + RRDs::update ("mydemo.rrd","N:12:13"); + my $ERR=RRDs::error; + die "ERROR while updating mydemo.rrd: $ERR\n" if $ERR; + RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss + The functions RRDs::last, RRDs::graph, RRDs::info and + RRDs::fetch return their findings. + RRRRRRRRDDDDssss::::::::llllaaaasssstttt returns a single INTEGER representing the last + update time. -rrdtool RRDs(3) + $lastupdate = RRDs::last ... + RRRRRRRRDDDDssss::::::::ggggrrrraaaapppphhhh returns an pointer to an ARRAY containing the + x-size and y-size of the created gif and results of the + PRINT arguments. + ($averages,$xsize,$ysize) = RRDs::graph ... + print "Gifsize: ${xsize}x${ysize}\n"; + print "Averages: ", (join ", ", @$averages); - RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss + RRRRRRRRDDDDssss::::::::iiiinnnnffffoooo returns a pointer to a hash. The keys of the + hash represent the property names of the rrd and the val- + ues of the hash are the values of the properties. - The functions RRDs::last, RRDs::graph, RRDs::info and - RRDs::fetch return their findings. + $hash = RRDs::info "example.rrd"; + foreach my $key (keys %$hash){ + print "$key = $$hash{$key}\n"; + } - RRRRRRRRDDDDssss::::::::llllaaaasssstttt returns a single INTEGER representing the last - update time. + RRRRRRRRDDDDssss::::::::ffffeeeettttcccchhhh is the most complex of the pack regarding + return values. There are 4 values. Two normal integers, a + pointer to an array and a pointer to a array of pointers. - $lastupdate = RRDs::last ... - - RRRRRRRRDDDDssss::::::::ggggrrrraaaapppphhhh returns an pointer to an ARRAY containing the x- - size and y-size of the created gif and results of the PRINT - arguments. - - ($averages,$xsize,$ysize) = RRDs::graph ... - print "Gifsize: ${xsize}x${ysize}\n"; - print "Averages: ", (join ", ", @$averages); - - RRRRRRRRDDDDssss::::::::iiiinnnnffffoooo returns a pointer to a hash. The keys of the hash - represent the property names of the rrd and the values of - the hash are the values of the properties. - - $hash = RRDs::info "example.rrd"; - foreach my $key (keys %$hash){ - print "$key = $$hash{$key}\n"; - } - - RRRRRRRRDDDDssss::::::::ffffeeeettttcccchhhh is the most complex of the pack regarding return - values. There are 4 values. Two normal integers, a pointer - to an array and a pointer to a array of pointers. - - my ($start,$step,$names,$data) = RRDs::fetch ... - print "Start: ", scalar localtime($start), " ($start)\n"; - print "Step size: $step seconds\n"; - print "DS names: ", join (", ", @$names)."\n"; - print "Data points: ", $#$data + 1, "\n"; - print "Data:\n"; - foreach my $line (@$data) { - print " ", scalar localtime($start), " ($start) "; - $start += $step; - foreach my $val (@$line) { - printf "%12.1f ", $val; + my ($start,$step,$names,$data) = RRDs::fetch ... + print "Start: ", scalar localtime($start), " ($start)\n"; + print "Step size: $step seconds\n"; + print "DS names: ", join (", ", @$names)."\n"; + print "Data points: ", $#$data + 1, "\n"; + print "Data:\n"; + foreach my $line (@$data) { + print " ", scalar localtime($start), " ($start) "; + $start += $step; + foreach my $val (@$line) { + printf "%12.1f ", $val; + } + print "\n"; } - print "\n"; - } - - See the examples directory for more ways to use this - extension. -AAAAUUUUTTTTHHHHOOOORRRR - Tobias Oetiker + See the examples directory for more ways to use this + extension. +NNNNOOOOTTTTEEEE + If you are manipulating the TZ variable you should also + call the posixs function tzset to initialize all internal + state of the library for properly operating in the time- + zone of your choice. + + use POSIX qw(tzset); + $ENV{TZ} = 'CET'; + POSIX::tzset(); - -2001-02-22 Last change: 1.0.33 2 +AAAAUUUUTTTTHHHHOOOORRRR + Tobias Oetiker +2002-10-11 1.0.40 RRDs(3) Modified: trunk/orca/packages/rrdtool-1.0.40/doc/cdeftutorial.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/cdeftutorial.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/cdeftutorial.html 2002-11-09 12:32:06.000000000 -0800 @@ -52,6 +52,7 @@
    • Infinity demo
    +
  • Out of ideas for now
  • SEE ALSO
  • AUTHOR
  • @@ -83,7 +84,7 @@ other tutorial.

    More reading

    -

    If you have difficulties with the way I try to explain them please read +

    If you have difficulties with the way I try to explain it please read Steve Rader's the rpntutorial manpage. It may help you understand how this all works.


    @@ -747,7 +748,31 @@

     
    -=head1 Out of ideas for now
    +=head2 Filtering data +

    You may do some complex data filtering:

    +
    +  MEDIAN FILTER: filters shot noise
    +
    +    DEF:var=database.rrd:traffic:AVERAGE
    +    CDEF:prev1=PREV(var)
    +    CDEF:prev2=PREV(prev1)
    +    CDEF:prev3=PREV(prev2)
    +    CDEF:median=prev1,prev2,prev3,+,+,3,/
    +    LINE3:median#000077:filtered
    +    LINE1:prev2#007700:'raw data'
    +
    +  DERIVATE:
    +
    +    DEF:var=database.rrd:traffic:AVERAGE
    +    CDEF:prev1=PREV(var)
    +    CDEF:time=TIME
    +    CDEF:prevtime=PREV(time)
    +    CDEF:derivate=var,prev1,-,time,prevtime,-,/
    +    LINE3:derivate#000077:derivate
    +    LINE1:var#007700:'raw data'
    +

    +


    +

    Out of ideas for now

    This document was created from questions asked by either myself or by other people on the list. Please let me know if you find errors in it or if you have trouble understanding it. If you think there Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.txt (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.txt 2002-11-09 12:32:07.000000000 -0800 @@ -1,1584 +1,1248 @@ +RRDTUTORIAL(1) rrdtool RRDTUTORIAL(1) -rrdtool RRDTUTORIAL(1) - - - -NNNNAAAAMMMMEEEE - rrdtutorial - Alex van den Bogaerdt's RRDtool tutorial - -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - RRDtool is written by Tobias Oetiker - with contributions from many people all around the world. - This document is written by Alex van den Bogaerdt - to help you understand what RRDtool - is and what it can do for you. - - The documentation provided with RRDtool can be too technical - for some people. This tutorial is here to help you - understand the basics of RRDtool. It should prepare you to - read the documentation yourself. It also explains the - general things about statistics with a focus on networking. - -TTTTUUUUTTTTOOOORRRRIIIIAAAALLLL - IIIImmmmppppoooorrrrttttaaaannnntttt - - Please don't skip ahead in this document! The first part of - this document explains the basics and may be boring. But if - you don't understand the basics, the examples will not be as - meaningful to you. - - WWWWhhhhaaaatttt iiiissss RRRRRRRRDDDDttttoooooooollll ???? - - RRDtool refers to Round Robin Database tool. Round robin is - a technique that works with a fixed amount of data, and a - pointer to the current element. Think of a circle with some - dots plotted on the edge, these dots are the places where - data can be stored. Draw an arrow from the center of the - circle to one of the dots, this is the pointer. When the - current data is read or written, the pointer moves to the - next element. As we are on a circle there is no beginning - nor an end, you can go on and on. After a while, all the - available places will be used and the process automatically - reuses old locations. This way, the database will not grow - in size and therefore requires no mainenance. RRDtool works - with with Round Robin Databases (RRDs). It stores and - retrieves data from them. - - WWWWhhhhaaaatttt ddddaaaattttaaaa ccccaaaannnn bbbbeeee ppppuuuutttt iiiinnnnttttoooo aaaannnn RRRRDDDDDDDD ???? - - You name it, it will probably fit. You should be able to - measure some value at several points in time and provide - this information to RRDtool. If you can do this, RRDtool - will be able to store it. The values need to be numerical - but don't have to be, as opposed to MRTG, integers. - - Many examples talk about SNMP which is an acronym for Simple - Network Management Protocol. "Simple" refers to the protocol - -- it does not mean it is simple to manage or monitor a - - - -2001-02-22 Last change: 1.0.33 1 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - network. After working your way through this document, you - should know enough to be able to understand what people are - talking about. For now, just realize that SNMP is a way to - ask devices for the values of counters they keep. It is the - value from those counters that are kept in the RRD. - - WWWWhhhhaaaatttt ccccaaaannnn IIII ddddoooo wwwwiiiitttthhhh tttthhhhiiiissss ttttoooooooollll ???? - - RRDtool originated from MRTG (Multi Router Traffic Grapher). - MRTG started as a tiny little script for graphing the use of - a connection to the Internet. MRTG evolved into a tool for - graphing other data sources including temperature, speed, - voltage, number of printouts and the like. Most likely you - will start to use the RRDtool to store and process data - collected via SNMP. The data will most likely be bytes (or - bits) transfered from and to a network or a computer. - RRDtool lets you create a database, store data in it, - retrieve that data and create graphs in GIF format for - display on a web browser. Those GIF images are dependent on - the data you collected and could be, for instance, an - overview of the average network usage, or the peaks that - occurred. It can also be used to display tidal waves, solar - radiation, power consumption, number of visitors at an - exhibition, noise levels near an airport, temperature on - your favorite holiday location, temperature in the fridge - and whatever you imagination can come up with. You need a - sensor to measure the data and be able to feed the numbers - to RRDtool. - - WWWWhhhhaaaatttt iiiiffff IIII ssssttttiiiillllllll hhhhaaaavvvveeee pppprrrroooobbbblllleeeemmmmssss aaaafffftttteeeerrrr rrrreeeeaaaaddddiiiinnnngggg tttthhhhiiiissss ddddooooccccuuuummmmeeeennnntttt ???? - - First of all: read it again! You may have missed something. - If you are unable to compile the sources and you have a - fairly common OS, it will probably not be the fault of - RRDtool. There may be precompiled versions around on the - Internet. If they come from trusted sources, get one of - those. If on the other hand the program works but does not - give you the expected results, it will be a problem with - configuring it. Review your configuration and compare it - with the examples that follow. - - There is a mailing list and an archive of it. Read the list - for a few weeks and search the archive. It is considered - rude to just ask a question without searching the archives: - your problem may already have been solved for somebody else! - This is true for most, if not all, mailing lists and not - only for this particular list! Look in the documentation - that came with RRDtool for the location and usage of the - list. - - I suggest you take a moment to subscribe to the mailing list - right now by sending an email to with a subject of "subscribe". If - you ever want to leave this list, you write an email to the - same address but now with a subject of "unsubscribe". - - HHHHoooowwww wwwwiiiillllllll yyyyoooouuuu hhhheeeellllpppp mmmmeeee ???? - - By giving you some detailed descriptions with detailed - examples. It is assumed that following the instructions in - the order presented will give you enough knowledge of - RRDtool to experiment for yourself. If it doesn't work the - first time, don't give up. Reread the stuff that you did - understand, you may have missed something. By following the - examples you get some hands-on experience and, even more - important, some background information of how it works. - - You will need to know something about hexadecimal numbers. - If you don't then start with reading the bin_dec_hex manpage - before you continue here. - - YYYYoooouuuurrrr ffffiiiirrrrsssstttt RRRRoooouuuunnnndddd RRRRoooobbbbiiiinnnn DDDDaaaattttaaaabbbbaaaasssseeee - - In my opinion the best way to learn something is to actually - do it. Why not start right now? We will create a database, - put some values in it and extract this data again. Your - output should be the same as the output that is included in - this document. - - We will start with some easy stuff and compare a car with a - router, or compare kilometers (miles if you wish) with bits - and bytes. It's all the same: some number over some time. - - Assume we have a device that transfers bytes to and from the - Internet. This device keeps a counter that starts at zero - when it is turned on, increasing with every byte that is - transfered. This counter will have a maximum value, if that - value is reached and an extra byte is counted, the counter - starts all over at zero. This is the same as many counters - in the world such as the mileage counter in a car. Most - discussions about networking talk about bits per second so - lets get used to that right away. Assume a byte is eight - bits and start to think in bits not bytes. The counter, - however, still counts bytes ! In the SNMP world most of the - counters are 32 bits. That means they are counting from 0 to - 4294967295. We will use these values in the examples. The - device, when asked, returns the current value of the - counter. We know the time that has passes since we last - asked so we now know how many bytes have been transfered - ***on average*** per second. This is not very hard to - calculate. First in words, then in calculations: - - 1. Take the current counter, subtract the previous value - from it. - - - -2001-02-22 Last change: 1.0.33 3 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - 2. Do the same with the current time and the previous time. - - 3. Divide the outcome of (1) by the outcome of (2), the - result is the amount of bytes per second. Multiply by - eight to get the number of bits per second (bps). - - bps = (counter_now - counter_before) / (time_now - time_before) * 8 - - For some people it may help to translate this to a - automobile example: Do not try this example, and if you do, - don't blame me for the results. - - People who are not used to think in kilometers per hour can - translate most into miles per hour by dividing km by 1.6 - (close enough). I will use the following abbreviations: - - M: meter - KM: kilometer (= 1000 meters). - H: hour - S: second - KM/H: kilometers per hour - M/S: meters per second - - You're driving a car. At 12:05 you read the counter in the - dashboard and it tells you that the car has moved 12345 KM - until that moment. At 12:10 you look again, it reads 12357 - KM. This means you have traveled 12 KM in five minutes. A - scientist would translate that into meters per second and - this makes a nice comparison towards the problem of (bytes - per five minutes) versus (bits per second). - - We traveled 12 kilometers which is 12000 meters. We did that - in five minutes which translates into 300 seconds. Our speed - is 12000M / 300S equals 40 M/S. - - We could also calculate the speed in KM/H: 12 times five - minutes is an hour so we have to multiply 12 KM by 12 to get - 144 KM/H. For our native English speaking friends: that's - 90 MPH so don't try this example at home or where I live :) - - Remember: these numbers are averages only. There is no way - to figure out from the numbers, if you drove at a constant - speed. There is an example later on in this tutorial that - explains this. - - I hope you understand that there is no difference in - calculating M/S or bps; only the way we collect the data is - different. Even the K from kilo is the same as in networking - terms k also means 1000. - - We will now create a database where we can keep all these - interesting numbers. The method used to start the program - - - -2001-02-22 Last change: 1.0.33 4 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - may differ slightly from OS to OS but I assume you can - figure it out if it works different on your OS. Make sure - you do not overwrite any file on your system when executing - the following command and type the whole line as one long - line (I had to split it for readability) and skip all of the - '\' characters. - - rrdtool create test.rrd \ - --start 920804400 \ - DS:speed:COUNTER:600:U:U \ - RRA:AVERAGE:0.5:1:24 \ - RRA:AVERAGE:0.5:6:10 - - (So enter: `rrdtool create test.rrd --start 920804400 DS - ...') - - WWWWhhhhaaaatttt hhhhaaaassss bbbbeeeeeeeennnn ccccrrrreeeeaaaatttteeeedddd ???? - - We created the round robin database called test (test.rrd) - which starts at noon the day I started (7th of march, 1999) - writing this document. It holds one data source (DS) named - "speed" that gets built from a counter. This counter is read - every five minutes (default) In the same database two round - robin archives (RRAs) are kept, one averages the data every - time it is read (eg there's nothing to average) and keeps 24 - samples (24 times 5 minutes is 2 hours). The other averages - 6 values (half hour) and contains 10 of such averages (eg 5 - hours) The remaining options will be discussed later on. - - RRDtool works with special time stamps coming from the UNIX - world. This time stamp is the number of seconds that passed - since January 1st 1970 UTC. This time stamp is translated - into local time and it will therefore look different for the - different time zones. - - Chances are that you are not in the same part of the world - as I am. This means your time zone is different. In all - examples where I talk about time, the hours may be wrong for - you. This has little effect on the results of the examples, - just correct the hours while reading. As an example: where - I will see "12:05" the UK folks will see "11:05". - - We now have to fill our database with some numbers. We'll - pretend to have read the following numbers: - - - - - - - - - - - -2001-02-22 Last change: 1.0.33 5 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - 12:05 12345 KM - 12:10 12357 KM - 12:15 12363 KM - 12:20 12363 KM - 12:25 12363 KM - 12:30 12373 KM - 12:35 12383 KM - 12:40 12393 KM - 12:45 12399 KM - 12:50 12405 KM - 12:55 12411 KM - 13:00 12415 KM - 13:05 12420 KM - 13:10 12422 KM - 13:15 12423 KM - - We fill the database as follows: - - rrdtool update test.rrd 920804700:12345 920805000:12357 920805300:12363 - rrdtool update test.rrd 920805600:12363 920805900:12363 920806200:12373 - rrdtool update test.rrd 920806500:12383 920806800:12393 920807100:12399 - rrdtool update test.rrd 920807400:12405 920807700:12411 920808000:12415 - rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423 - - This reads: update our test database with the following - numbers - - time 920804700, value 12345 - time 920805000, value 12357 - - etcetera. - - As you can see, it is possible to feed more than one value - into the database in one command. I had to stop at three for - readability but the real maximum is OS dependent. - - We can now retrieve the data from our database using - "rrdtool fetch": - - rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200 - - It should return the following output: - - speed - - - - - - - - - - - -2001-02-22 Last change: 1.0.33 6 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - 920804700: NaN - 920805000: 0.04 - 920805300: 0.02 - 920805600: 0.00 - 920805900: 0.00 - 920806200: 0.03 - 920806500: 0.03 - 920806800: 0.03 - 920807100: 0.02 - 920807400: 0.02 - 920807700: 0.02 - 920808000: 0.01 - 920808300: 0.02 - 920808600: 0.01 - 920808900: 0.00 - 920809200: NaN - - If it doesn't, something may be wrong. Perhaps your OS will - print "NaN" in a different form. It represents "Not A - Number". If your OS writes "U" or "UNKN" or something - similar that's okay. If something else is wrong, it will - probably be due to an error you made (assuming that my - tutorial is correct of course :-). In that case: delete the - database and try again. - - What this output represents will become clear in the rest of - the tutorial. - - IIIItttt iiiissss ttttiiiimmmmeeee ttttoooo ccccrrrreeeeaaaatttteeee ssssoooommmmeeee ggggrrrraaaapppphhhhiiiiccccssss - - Try the following command: - - rrdtool graph speed.gif \ - --start 920804400 --end 920808000 \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - LINE2:myspeed#FF0000 - - This will create speed.gif which starts at 12:00 and ends at - 13:00. There is a definition of variable myspeed, it is the - data from RRA "speed" out of database "test.rrd". The line - drawn is 2 pixels high, and comes from variable myspeed. The - color is red. You'll notice that the start of the graph is - not at 12:00 but at 12:05 and this is because we have - insufficient data to tell the average before that time. This - will only happen when you miss some samples, this will not - happen a lot, hopefully. - - If this has worked: congratulations! If not, check what went - wrong. - - The colors are built up from red, green and blue. For each - of the components, you specify how much to use in - - - -2001-02-22 Last change: 1.0.33 7 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - hexadecimal where 00 means not included and FF means fully - included. The "color" white is a mixture of red, green and - blue: FFFFFF The "color" black is all colors off: 000000 - - red #FF0000 - green #00FF00 - blue #0000FF - magenta #FF00FF (mixed red with blue) - gray #555555 (one third of all components) - - The GIF you just created can be displayed using your - favorite image viewer. Web browsers will display the GIF - via the URL "file://the/path/to/speed.gif" - - GGGGrrrraaaapppphhhhiiiiccccssss wwwwiiiitttthhhh ssssoooommmmeeee mmmmaaaatttthhhh - - When looking at the image, you notice that the horizontal - axis is labeled 12:10, 12:20, 12:30, 12:40 and 12:50. The - two remaining times (12:00 and 13:00) would not be displayed - nicely so they are skipped. The vertical axis displays the - range we entered. We provided kilometers and when divided by - 300 seconds, we get very small numbers. To be exact, the - first value was 12 (12357-12345) and divided by 300 this - makes 0.04, which is displayed by RRDtool as "40 m" meaning - "40/1000". The "m" has nothing to do with meters, kilometers - or millimeters! RRDtool doesn't know about all this, it just - works with numbers and not with meters... - - What we did wrong was that we should have measured in - meters, this would have been (12357000-12345000)/300 = - 12000/300 = 40. - - Let's correct that. We could recreate our database and store - the correct data but there is a better way: do some - calculations while creating the gif file ! - - rrdtool graph speed2.gif \ - --start 920804400 --end 920808000 \ - --vertical-label m/s \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - CDEF:realspeed=myspeed,1000,* \ - LINE2:realspeed#FF0000 - - After viewing this GIF, you notice the "m" has disappeared. - This it what the correct result would be. Also, a label has - been added to the image. Apart from the things mentioned - above, the GIF should be the same. - - The calculations are in the CDEF part and are in Reverse - Polish Notation ("RPN"). What it says is: "take the data - source myspeed and the number 1000; multiply those". Don't - bother with RPN yet, it will be explained later on in more - - - -2001-02-22 Last change: 1.0.33 8 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - detail. Also, you may want to read my tutorial on CDEFs and - Steve Rader's tutorial on RPN. But first finish this - tutorial. - - Hang on! If we can multiply values with 1000, it should also - be possible to display kilometers per hour from the same - data! - - To change a value that is measured in meters per second: - -*- Calculate meters per hour: value * 3600 - -*- Calculate kilometers per hour: value / 1000 - -*- Together this makes: value * (3600/1000) == - value * 3.6 - - In our example database we made a mistake and we need to - compensate for this by multiplying with 1000. Applying that - correction: - -*- value * 3.6 *1000 == value * 3600 - - Now let's create this GIF, and add some more magic ... - - rrdtool graph speed3.gif \ - --start 920804400 --end 920808000 \ - --vertical-label km/h \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - "CDEF:kmh=myspeed,3600,*" \ - CDEF:fast=kmh,100,GT,kmh,0,IF \ - CDEF:good=kmh,100,GT,0,kmh,IF \ - HRULE:100#0000FF:"Maximum allowed" \ - AREA:good#00FF00:"Good speed" \ - AREA:fast#FF0000:"Too fast" - - This looks much better. Speed in KM/H and even an extra line - with the maximum allowed speed (on the road I travel at). I - also changed the colors used to display speed and changed it - from a line into an area. - - The calculations are more complex now. For the "good" speed - they are: - - Check if kmh is greater than 100 ( kmh,100 ) GT - If so, return 0, else kmh ((( kmh,100 ) GT ), 0, kmh) IF - - For the other speed: - - Check if kmh is greater than 100 ( kmh,100 ) GT - If so, return kmh, else return 0 ((( kmh,100) GT ), kmh, 0) IF - - - - - - - - -2001-02-22 Last change: 1.0.33 9 - - - - - - -rrdtool RRDTUTORIAL(1) - - - - GGGGrrrraaaapppphhhhiiiiccccssss MMMMaaaaggggiiiicccc - - I like to believe there are virtually no limits to how - RRDtool graph can manipulate data. I will not explain how it - works, but look at the following GIF: - - rrdtool graph speed4.gif \ - --start 920804400 --end 920808000 \ - --vertical-label km/h \ - DEF:myspeed=test.rrd:speed:AVERAGE \ - "CDEF:kmh=myspeed,3600,*" \ - CDEF:fast=kmh,100,GT,100,0,IF \ - CDEF:over=kmh,100,GT,kmh,100,-,0,IF \ - CDEF:good=kmh,100,GT,0,kmh,IF \ - HRULE:100#0000FF:"Maximum allowed" \ - AREA:good#00FF00:"Good speed" \ - AREA:fast#550000:"Too fast" \ - STACK:over#FF0000:"Over speed" - - Let's create a quick and dirty HTML page to view three GIFs: - - Speed - Speed in meters per second -
    - Speed in kilometers per hour -
    - Traveled too fast? - - - Name the file "speed.html" or similar, and view it. - - Now, all you have to do is measure the values regularly and - update the database. When you want to view the data, - recreate the GIFs and make sure to refresh them in your - browser. (Note: just clicking reload may not be enough; - Netscape in particular has a problem doing so and you'll - need to click reload while pressing the shift key). - - UUUUppppddddaaaatttteeeessss iiiinnnn RRRReeeeaaaalllliiiittttyyyy - - We've already used the "update" command: it took one or more - parameters in the form of "

    NAME

    -

    rrdtool resize - alters the size of an RRA.

    +

    rrdtool resize - alters the size of an RRA and creates new .rrd file

    PDF version.


    SYNOPSIS

    @@ -59,6 +59,9 @@


    NOTES

    +

    The new .rrd file, with the modified RRAm, is written to the file +resize.rrd in the current directory. The original .rrd file is not +modified.

    It is possible to abuse this tool and get strange results by first removing some rows and then reinsert the same amount (effectively clearing them to be Unknown). You may thus end up with unknown data in one Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdcgi.html 2002-11-09 12:32:16.000000000 -0800 @@ -37,9 +37,7 @@


    SYNOPSIS

    #!/path/to/rrdcgi -[--goodfor|-g seconds] -[--filter] -[--refresh|-r]

    +[--filter]


    DESCRIPTION

    @@ -50,16 +48,6 @@

    rrdcgi parses the contents of the template in 2 steps. In each step it looks only for a subset of tags. This allows to nest tags.

    The argument parser uses the same semantics as you are used from your c shell.

    -
    -
    --filter
    -
    -Assume that rrdcgi is being run as a filter and not as a cgi. -

    -
    --refresh|-r
    -
    -If the --goodfor flag is specified, then --refresh will cause rrdcgi -to output a Refresh header with the value of the --goodfor value. -

    Pass 1

    Modified: trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.html 2002-11-09 12:32:17.000000000 -0800 @@ -22,6 +22,7 @@
  • Return Values
  • +
  • NOTE
  • AUTHOR
  • --> @@ -114,6 +115,16 @@

    See the examples directory for more ways to use this extension.


    +

    NOTE

    +

    If you are manipulating the TZ variable you should also call the posixs +function tzset to initialize all internal state of the library for properly +operating in the timezone of your choice.

    +
    + use POSIX qw(tzset);
    + $ENV{TZ} = 'CET';
    + POSIX::tzset();
    +

    +


    AUTHOR

    Tobias Oetiker <oetiker at ee.ethz.ch>

    Modified: trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.html (original) +++ trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.html 2002-11-09 12:32:17.000000000 -0800 @@ -71,7 +71,7 @@ source from an RRD. A ds-name must be 1 to 19 characters long in the characters [a-zA-Z0-9_].

    DST defines the Data Source Type. See the section on ``How to Measure'' below for further insight. -The Datasource Type must be onw of the following:

    +The Datasource Type must be one of the following:

    GAUGE
    @@ -184,7 +184,7 @@

    Mail Messages
    -Assume you have a methode to count the number of messages transported by +Assume you have a method to count the number of messages transported by your mailserver in a certain amount of time, this give you data like '5 messages in the last 65 seconds'. If you look at the count of 5 like and ABSOLUTE datatype you can simply update the rrd with the number 5 and the @@ -222,7 +222,7 @@ temperatures supplied for 100 hours (1200 * 300 seconds = 100 hours). The second RRA stores the minimum temperature recorded over every hour (12 * 300 seconds = 1 hour), for 100 days (2400 hours). The -third and the fourth RRA's do the same with the for the maximum and +third and the fourth RRA's do the same for the maximum and average temperature, respectively.


    Modified: trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.xs ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.xs (original) +++ trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.xs 2002-11-09 12:32:18.000000000 -0800 @@ -138,7 +138,8 @@ } optind=0; opterr=0; rrd_clear_error(); - rrd_graph(items+1,argv,&calcpr,&xsize,&ysize); + + rrd_graph(items+1,argv,&calcpr,&xsize,&ysize); for (i=0; i < items; i++) { free(argv[i+1]); } @@ -217,6 +218,66 @@ PUSHs(sv_2mortal(newRV_noinc((SV*)names))); PUSHs(sv_2mortal(newRV_noinc((SV*)retar))); +int +rrd_xport(...) + PROTOTYPE: @ + PREINIT: + time_t start,end; + int xsize; + unsigned long step, col_cnt,row_cnt,i,ii; + rrd_value_t *data,*ptr; + char **argv; + char **legend_v; + AV *retar,*line,*names; + PPCODE: + argv = (char **) malloc((items+1)*sizeof(char *)); + argv[0] = "dummy"; + for (i = 0; i < items; i++) { + STRLEN len; + char *handle = SvPV(ST(i),len); + /* actually copy the data to make sure possible modifications + on the argv data does not backfire into perl */ + argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); + strcpy(argv[i+1],handle); + } + optind=0; opterr=0; + rrd_clear_error(); + rrd_xport(items+1,argv,&xsize,&start,&end,&step,&col_cnt,&legend_v,&data); + for (i=0; i < items; i++) { + free(argv[i+1]); + } + free(argv); + if (rrd_test_error()) XSRETURN_UNDEF; + + /* convert the legend_v into perl format */ + names=newAV(); + for (ii = 0; ii < col_cnt; ii++){ + av_push(names,newSVpv(legend_v[ii],0)); + free(legend_v[ii]); + } + free(legend_v); + + /* convert the data array into perl format */ + ptr=data; + retar=newAV(); + for (i = start; i < end; i += step){ + line = newAV(); + for (ii = 0; ii < col_cnt; ii++){ + av_push(line,(isnan(*ptr) ? &PL_sv_undef : newSVnv(*ptr))); + ptr++; + } + av_push(retar,newRV_noinc((SV*)line)); + } + free(data); + + EXTEND(sp,7); + PUSHs(sv_2mortal(newSViv(start))); + PUSHs(sv_2mortal(newSViv(end))); + PUSHs(sv_2mortal(newSViv(step))); + PUSHs(sv_2mortal(newSViv(col_cnt))); + PUSHs(sv_2mortal(newRV_noinc((SV*)names))); + PUSHs(sv_2mortal(newRV_noinc((SV*)retar))); + SV* rrd_info(...) Modified: trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.pm ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.pm (original) +++ trunk/orca/packages/rrdtool-1.0.40/perl-shared/RRDs.pm 2002-11-09 12:32:19.000000000 -0800 @@ -7,7 +7,7 @@ require DynaLoader; -$VERSION = 1.000331; +$VERSION = 1.000401; bootstrap RRDs $VERSION; @@ -111,6 +111,16 @@ See the examples directory for more ways to use this extension. +=head1 NOTE + +If you are manipulating the TZ variable you should also call the posixs +function tzset to initialize all internal state of the library for properly +operating in the timezone of your choice. + + use POSIX qw(tzset); + $ENV{TZ} = 'CET'; + POSIX::tzset(); + =head1 AUTHOR Tobias Oetiker Eoetiker at ee.ethz.chE Modified: trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/perl-shared/Makefile.PL.in 2002-11-09 12:32:19.000000000 -0800 @@ -8,9 +8,9 @@ WriteMakefile( 'NAME' => 'RRDs', - 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION + 'VERSION_FROM' => '@top_srcdir@/perl-shared/RRDs.pm', # finds $VERSION 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", - 'INC' => '-I../src -I../gd1.3', + 'INC' => '-I at top_srcdir@/src -I at top_srcdir@/gd1.3', # where to look for the necessary libraries # Perl will figure out which one is valid 'depend' => {'RRDs.c' => "../src/.libs/librrd_private.a"}, Modified: trunk/orca/packages/rrdtool-1.0.40/CHANGES ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/CHANGES (original) +++ trunk/orca/packages/rrdtool-1.0.40/CHANGES 2002-11-09 12:32:20.000000000 -0800 @@ -2,6 +2,131 @@ --------------------------- - bugfix, + enhancement, * contrib, = RELEASE --------------------------------------------- += 1.0.40 2002/10/11 -- Tobi + +- 2002/10/11 Jeffrey Wheat + updated php4 bindings to work with php 4.2.3 + +- 2002/10/07 Tomoyuki Murakami + -z does not take an option + +- 2002/10/03 Gonzalo Augusto Arana Tagle + fix for PREV() operator + +- 2002/08/01 Paul Clifford + fix for segfault in print_calc function + ++ 2002/07/31 "Nenad Antic (EAB)" + rrdfetch manpage update + +- 2002/07/12 Gonzalo Augusto Arana Tagle + PREV(xxx) match with DEF_NAM_FMT + +- 2002/07/12 Joerg Mertin + fixed bindings for php4 + +- 2002/07/02 Philippe.Simonet at swisscom.com + fixed DINF for win32 compile + += 1.0.39 2002/06/20 -- Tobi + ++ 2002/06/20 -- Gonzalo Augusto Arana Tagle + * new CDEF feature PREV(x) which allows for funky new filters + to be created easily + ++ 2002/06/14 -- "Shipway, Steve" + * Improved docs for rrd_resize + +- Tobi + * increassed commandline buffer in rrd_tool.c to 100 kilo Byte + * in rrd_graph replace rint by ceil ...its more portable + * remove // comments and replace with /* .... */ + * due to popular demand change strftime format to %V for weeks + ++ 2002/05/24 -- Joe Griffin + * config.guess and config.sub updates for IA64 + += 1.0.38 2002/05/22 -- Tobi + +- 2002/05/12 -- Tobi + * fix for crash in restore when used with existing file + +- 2002/04/29 -- Alex + * fix for PRINT template parser in rrd_graph ... + +- 2002/04/16 -- Milan Obuch + * fix for --alt-mrtg + ++ 2002/05/01 Wolfgang Schrimm + * new subcommand xport + += 1.0.37 2002/04/13 -- Tobi + +- 2002/04/14 -- Thierry Nkaoua + * do not change LC_ALL but just LC_TIME ... + += 1.0.36 2002/04/13 -- Tobi + ++ 2002/04/13 -- Milan Obuch + * added new options to rrdgraph. Check the manpage for + --overlay, --background, --unit, GD (graph output format) + ++ 2002/04/09 -- Tobi + * added setlocale and tzset calls to rrd_graph + +- 2002/04/09 -- Tobi + * removed description of --goodfor and --refresh from rrdcgi + +- 2002/04/02 -- Paul Vixie + * rrd restore should not burn down existing files + +- 2002/03/23 -- Oliver Cook + * kill segfault in diff code for non digit input + +- 2002/03/23 -- Ashok Mandala + * make sure CDEFs work properly even when none of the contributing + data sources start at start of the cdef. + ++ 2002/03/20 -- David Lee + * Allow link builds through the ../configure syntax + += 1.0.35 2002/03/20 -- Tobi + +- 2002/03/20 -- Tobi + * fixed longstanding off by 1 bug in CDEF for cases where RRDs with + different step sizes were mixed in one CDEF + +- 2002/03/13 -- Tobi + * Deal with cases where Config{cc} contains an absolute path to perls + C compiler. +- 2002/03/14 -- Matt Galvin + * new OS detector config files which can deal with macos X + += 1.0.34 2002/03/12 -- Tobi + +- 2002/02/12 -- Tobi + * replaced zlib 1.1.3 with 1.1.4 + +- 2002/02/06 -- Alexander Schwartz + * allow rrdcgi to deal with umlauts + +- 2001/12/27 -- Tom.Bertelson at gecapital.com + * fix overflow error in rrd_fetch + +- 2001/11/28 -- Richard A. Steenbergen + * allow + - and ' ' in printfsring + +- 2001/03/31 -- Tobi + * added 'all' dependancy to site-perl-install rule as many seem to skip + this step when instaling cricket ... probably an incomplete cricket doku. + +- 2001/03/02 -- Mike Franusich + * filedescriptor leak fixed in rrd_open for faild open attempts. + +- 2001/03/01 -- Tobi + * test if compiler perl wants to use for building its modules is available on the system + * zlib wants to be linked with -fpic on HPUX or it breaks ... + = 1.0.33 2001/02/22 -- Tobi - 2001/02/20 -- Tobi @@ -29,7 +154,7 @@ = Beta 1.0.29 -+ 2001/02/11 -- Roman Hoogant ++ 2001/02/11 -- Roman Hoog Antink add unix time to rrddump comment - 2001/02/11 -- Terminator rAT Modified: trunk/orca/packages/rrdtool-1.0.40/Makefile.am ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/Makefile.am (original) +++ trunk/orca/packages/rrdtool-1.0.40/Makefile.am 2002-11-09 12:32:20.000000000 -0800 @@ -2,7 +2,7 @@ RSYNC = rsync --rsh=ssh # build the following subdirectories -SUBDIRS = cgilib-0.4 config gd1.3 zlib-1.1.3 libpng-1.0.9 \ +SUBDIRS = cgilib-0.4 config gd1.3 zlib-1.1.4 libpng-1.0.9 \ src doc examples contrib tcl # the following files are not mentioned in any other Makefile @@ -10,7 +10,7 @@ perl-piped/MANIFEST perl-piped/README perl-piped/rrdpl.ds? \ perl-piped/RRDp.pm perl-piped/Makefile.PL perl-piped/t/base.t \ perl-shared/MANIFEST perl-shared/README perl-shared/RRDs.xs \ - perl-shared/ntmake.pl perl-shared/Makefile.PL perl-shared/t/base.t \ + perl-shared/ntmake.pl perl-shared/Makefile.PL.in perl-shared/t/base.t \ perl-shared/rrdpl.ds? perl-shared/RRDs.pm CLEANFILES = config.cache @@ -18,7 +18,7 @@ # lets schedule the perl stuff for installation # the special call to install-sh is because the -d switch is not portable install-data-local: - ./config/mkinstalldirs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs + $(top_srcdir)/config/mkinstalldirs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs $(INSTALL) -m 644 perl-piped/RRDp.pm $(DESTDIR)$(prefix)/lib/perl $(INSTALL) -m 644 perl-shared/RRDs.pm $(DESTDIR)$(prefix)/lib/perl $(INSTALL) -m 644 perl-shared/blib/arch/auto/RRDs/RRDs.bs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs @@ -34,13 +34,32 @@ AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config # rules for building the perl module -perl_piped: perl-piped/Makefile + +# This "CLONE" stuff is probably not as clean as it should be. +# But it is only used when the source and build trees are mutually separate. +PERL_CLONE = mkdir \$${P_DIR} \ + && cd \$${P_DIR} \ + && for _perlfile_ in \$${P_FILES} \ + ; do \ + ln -s ../$(top_srcdir)/\$${P_DIR}/\$${_perlfile_} . \ + ; done + +perl_piped:: $(top_builddir)/perl-piped + test -d perl-piped \ + || sh -c "P_DIR='perl-piped'; P_FILES='Makefile.PL RRDp.pm' ; $(PERL_CLONE)" + +perl_piped:: perl-piped/Makefile cd perl-piped && $(MAKE) perl-piped/Makefile: perl-piped/Makefile.PL cd perl-piped && $(PERL) Makefile.PL $(PERL_MAKE_OPTIONS) -perl_shared: perl-shared/Makefile + +perl_shared:: $(top_builddir)/perl-shared + test -d perl-shared \ + || sh -c "P_DIR='perl-shared'; P_FILES='Makefile.PL RRDs.pm RRDs.xs' ; $(PERL_CLONE)" + +perl_shared:: perl-shared/Makefile cd perl-shared && $(MAKE) perl-shared/Makefile: perl-shared/Makefile.PL @@ -68,11 +87,11 @@ site-perl-inst: site-perl-install -site-perl-install: perl-piped/Makefile perl-shared/Makefile +site-perl-install: all perl-piped/Makefile perl-shared/Makefile cd perl-piped && $(MAKE) install cd perl-shared && $(MAKE) install -site-tcl-install: +site-tcl-install: all cd tcl && $(MAKE) tcl-install clean-local: Modified: trunk/orca/packages/rrdtool-1.0.40/gd1.3/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/gd1.3/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/gd1.3/Makefile.in 2002-11-09 12:32:21.000000000 -0800 @@ -84,6 +84,7 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ noinst_LTLIBRARIES = librrd_gd.la Modified: trunk/orca/packages/rrdtool-1.0.40/examples/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/examples/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/examples/Makefile.in 2002-11-09 12:32:22.000000000 -0800 @@ -88,6 +88,7 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ EXTRA_DIST = cgi-demo.cgi.in piped-demo.pl.in shared-demo.pl.in stripes.pl.in bigtops.pl.in minmax.pl.in Modified: trunk/orca/packages/rrdtool-1.0.40/examples/bigtops.pl.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/examples/bigtops.pl.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/examples/bigtops.pl.in 2002-11-09 12:32:22.000000000 -0800 @@ -11,7 +11,7 @@ my $name = $0; $name =~ s/\.pl.*//g; -RRDs::create ($rrd, "--start",$start-1, "--step",300, +RRDs::create ($rrd, "--start",$start-1, "--step",290, "DS:a:GAUGE:600:U:U", "DS:b:GAUGE:600:U:U", "RRA:AVERAGE:0.5:1:300"); Modified: trunk/orca/packages/rrdtool-1.0.40/examples/shared-demo.pl.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/examples/shared-demo.pl.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/examples/shared-demo.pl.in 2002-11-09 12:32:23.000000000 -0800 @@ -172,4 +172,49 @@ } +my ($start,$end,$step,$col_cnt,$legend,$data) = + RRDs::xport ("-m", 400, + "--start", "now-1day", + "--end", "now", + "DEF:alpha=$RRD1:a:AVERAGE", + "DEF:beta=$RRD1:d:AVERAGE", + "CDEF:calc=alpha,beta,+,2,/,100,*,102,/", + "XPORT:alpha:original ds", + "XPORT:calc:calculated values", + ); + +my $ERROR = RRDs::error; +die "$0: unable to xport: $ERROR\n" if $ERROR; + +print "\nrrdxport test:\n\n"; +print "\n\n"; +print "\n"; +print " \n"; +print " $start\n"; +print " $step\n"; +print " $end\n"; +print " ", $#$data + 1, "\n"; +print " $col_cnt\n"; +print " \n"; +foreach my $entry (@$legend) { + print " $entry\n"; +} +print " \n"; +print " \n"; +print " \n"; +my $row_counter = 0; +foreach my $row (@$data) { + $row_counter++; + print " $start"; + $start += $step; + foreach my $val (@$row) { + printf ("%1.10e",$val) if $val ne ''; + print "NaN" if $val eq ''; + } + print "\n"; +} +print " \n"; +print "\n"; + + Modified: trunk/orca/packages/rrdtool-1.0.40/libpng-1.0.9/Makefile.in ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/libpng-1.0.9/Makefile.in (original) +++ trunk/orca/packages/rrdtool-1.0.40/libpng-1.0.9/Makefile.in 2002-11-09 12:32:23.000000000 -0800 @@ -84,6 +84,7 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TROFF = @TROFF@ VERSION = @VERSION@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ @@ -132,7 +133,7 @@ .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps libpng-1.0.9/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps libpng-1.0.9/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -233,36 +234,36 @@ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done -png.lo png.o : png.c png.h ../zlib-1.1.3/zlib.h ../zlib-1.1.3/zconf.h \ +png.lo png.o : png.c png.h ../zlib-1.1.4/zlib.h ../zlib-1.1.4/zconf.h \ pngconf.h -pngerror.lo pngerror.o : pngerror.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngget.lo pngget.o : pngget.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngmem.lo pngmem.o : pngmem.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngpread.lo pngpread.o : pngpread.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngread.lo pngread.o : pngread.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngrio.lo pngrio.o : pngrio.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngrtran.lo pngrtran.o : pngrtran.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngrutil.lo pngrutil.o : pngrutil.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngset.lo pngset.o : pngset.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngtrans.lo pngtrans.o : pngtrans.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngwio.lo pngwio.o : pngwio.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngwrite.lo pngwrite.o : pngwrite.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngwtran.lo pngwtran.o : pngwtran.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h -pngwutil.lo pngwutil.o : pngwutil.c png.h ../zlib-1.1.3/zlib.h \ - ../zlib-1.1.3/zconf.h pngconf.h +pngerror.lo pngerror.o : pngerror.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngget.lo pngget.o : pngget.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngmem.lo pngmem.o : pngmem.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngpread.lo pngpread.o : pngpread.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngread.lo pngread.o : pngread.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngrio.lo pngrio.o : pngrio.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngrtran.lo pngrtran.o : pngrtran.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngrutil.lo pngrutil.o : pngrutil.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngset.lo pngset.o : pngset.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngtrans.lo pngtrans.o : pngtrans.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngwio.lo pngwio.o : pngwio.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngwrite.lo pngwrite.o : pngwrite.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngwtran.lo pngwtran.o : pngwtran.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h +pngwutil.lo pngwutil.o : pngwutil.c png.h ../zlib-1.1.4/zlib.h \ + ../zlib-1.1.4/zconf.h pngconf.h info-am: info: info-am Added: trunk/orca/packages/Storable-2.05/t/make_downgrade.pl ============================================================================== --- trunk/orca/packages/Storable-2.05/t/make_downgrade.pl (original) +++ trunk/orca/packages/Storable-2.05/t/make_downgrade.pl 2002-11-09 12:32:24.000000000 -0800 @@ -0,0 +1,106 @@ +#!/usr/local/bin/perl -w +use strict; + +use 5.007003; +use Hash::Util qw(lock_hash unlock_hash lock_keys); +use Storable qw(nfreeze); + +# If this looks like a hack, it's probably because it is :-) +sub uuencode_it { + my ($data, $name) = @_; + my $frozen = nfreeze $data; + + my $uu = pack 'u', $frozen; + + printf "begin %3o $name\n", ord 'A'; + print $uu; + print "\nend\n\n"; +} + + +my %hash = (perl=>"rules"); + +lock_hash %hash; + +uuencode_it (\%hash, "Locked hash"); + +unlock_hash %hash; + +lock_keys %hash, 'perl', 'rules'; +lock_hash %hash; + +uuencode_it (\%hash, "Locked hash placeholder"); + +unlock_hash %hash; + +lock_keys %hash, 'perl'; + +uuencode_it (\%hash, "Locked keys"); + +unlock_hash %hash; + +lock_keys %hash, 'perl', 'rules'; + +uuencode_it (\%hash, "Locked keys placeholder"); + +unlock_hash %hash; + +my $utf8 = "\x{DF}\x{100}"; +chop $utf8; + +uuencode_it (\$utf8, "Short 8 bit utf8 data"); + +my $utf8b = $utf8; +utf8::encode ($utf8b); + +uuencode_it (\$utf8b, "Short 8 bit utf8 data as bytes"); + +$utf8 x= 256; + +uuencode_it (\$utf8, "Long 8 bit utf8 data"); + +$utf8 = "\x{C0FFEE}"; + +uuencode_it (\$utf8, "Short 24 bit utf8 data"); + +$utf8b = $utf8; +utf8::encode ($utf8b); + +uuencode_it (\$utf8b, "Short 24 bit utf8 data as bytes"); + +$utf8 x= 256; + +uuencode_it (\$utf8, "Long 24 bit utf8 data"); + +# Hash which has the utf8 bit set, but no longer has any utf8 keys +my %uhash = ("\x{100}", "gone", "perl", "rules"); +delete $uhash{"\x{100}"}; + +# use Devel::Peek; Dump \%uhash; +uuencode_it (\%uhash, "Hash with utf8 flag but no utf8 keys"); + +$utf8 = "Schlo\xdf" . chr 256; +chop $utf8; +my $a_circumflex = (ord ('A') == 193 ? "\x47" : "\xe5"); +%uhash = (map {$_, $_} 'castle', "ch${a_circumflex}teau", $utf8, "\x{57CE}"); + +uuencode_it (\%uhash, "Hash with utf8 keys"); + +lock_hash %uhash; + +uuencode_it (\%uhash, "Locked hash with utf8 keys"); + +my (%pre56, %pre58); + +while (my ($key, $val) = each %uhash) { + # hash keys are always stored downgraded to bytes if possible, with a flag + # to say "promote back to utf8" + # Whereas scalars are stored as is. + utf8::encode ($key) if ord $key > 256; + $pre58{$key} = $val; + utf8::encode ($val) unless $val eq "ch\xe5teau"; + $pre56{$key} = $val; + +} +uuencode_it (\%pre56, "Hash with utf8 keys for pre 5.6"); +uuencode_it (\%pre58, "Hash with utf8 keys for 5.6"); Modified: trunk/orca/packages/Storable-2.05/t/freeze.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/freeze.t (original) +++ trunk/orca/packages/Storable-2.05/t/freeze.t 2002-11-09 12:32:24.000000000 -0800 @@ -1,22 +1,26 @@ #!./perl - -# $Id: freeze.t,v 1.0.1.1 2001/07/01 11:25:16 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: freeze.t,v $ -# Revision 1.0.1.1 2001/07/01 11:25:16 ram -# patch12: added test cases for mem corruption during thaw() -# -# Revision 1.0 2000/09/01 19:40:41 ram -# Baseline for first official release. -# -require 't/dump.pl'; -sub ok; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; + sub ok; +} use Storable qw(freeze nfreeze thaw); @@ -132,4 +136,3 @@ thaw $frozen; # used to segfault here ok 19, 1; - Modified: trunk/orca/packages/Storable-2.05/t/blessed.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/blessed.t (original) +++ trunk/orca/packages/Storable-2.05/t/blessed.t 2002-11-09 12:32:25.000000000 -0800 @@ -1,18 +1,26 @@ #!./perl - -# $Id: blessed.t,v 1.0 2000/09/01 19:40:41 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: blessed.t,v $ -# Revision 1.0 2000/09/01 19:40:41 ram -# Baseline for first official release. -# -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + sub ok; use Storable qw(freeze thaw); @@ -90,4 +98,3 @@ do { $good = 0; last } unless ref $y->[4*$i+3] eq "${name}_WITH_HOOK"; } ok 10, $good; - Modified: trunk/orca/packages/Storable-2.05/t/tied.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/tied.t (original) +++ trunk/orca/packages/Storable-2.05/t/tied.t 2002-11-09 12:32:25.000000000 -0800 @@ -1,18 +1,26 @@ #!./perl - -# $Id: tied.t,v 1.0 2000/09/01 19:40:42 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: tied.t,v $ -# Revision 1.0 2000/09/01 19:40:42 ram -# Baseline for first official release. -# -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + sub ok; use Storable qw(freeze thaw); @@ -199,4 +207,3 @@ ok 20, defined $ht; ok 21, $ht->{'x'} == 1; ok 22, $FAULT::fault == 2; - Modified: trunk/orca/packages/Storable-2.05/t/retrieve.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/retrieve.t (original) +++ trunk/orca/packages/Storable-2.05/t/retrieve.t 2002-11-09 12:32:25.000000000 -0800 @@ -1,18 +1,26 @@ #!./perl - -# $Id: retrieve.t,v 1.0 2000/09/01 19:40:42 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: retrieve.t,v $ -# Revision 1.0 2000/09/01 19:40:42 ram -# Baseline for first official release. -# -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + use Storable qw(store retrieve nstore); @@ -26,24 +34,24 @@ @a = ('first', '', undef, 3, -4, -3.14159, 456, 4.5, $b, \$a, $a, $c, \$c, \%a); -print "not " unless defined store(\@a, 't/store'); +print "not " unless defined store(\@a, 'store'); print "ok 1\n"; print "not " if Storable::last_op_in_netorder(); print "ok 2\n"; -print "not " unless defined nstore(\@a, 't/nstore'); +print "not " unless defined nstore(\@a, 'nstore'); print "ok 3\n"; print "not " unless Storable::last_op_in_netorder(); print "ok 4\n"; print "not " unless Storable::last_op_in_netorder(); print "ok 5\n"; -$root = retrieve('t/store'); +$root = retrieve('store'); print "not " unless defined $root; print "ok 6\n"; print "not " if Storable::last_op_in_netorder(); print "ok 7\n"; -$nroot = retrieve('t/nstore'); +$nroot = retrieve('nstore'); print "not " unless defined $nroot; print "ok 8\n"; print "not " unless Storable::last_op_in_netorder(); @@ -63,5 +71,4 @@ print "not " if length $root->[1]; print "ok 14\n"; -unlink 't/store', 't/nstore'; - +END { 1 while unlink('store', 'nstore') } Modified: trunk/orca/packages/Storable-2.05/t/utf8.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/utf8.t (original) +++ trunk/orca/packages/Storable-2.05/t/utf8.t 2002-11-09 12:32:26.000000000 -0800 @@ -1,33 +1,45 @@ -#!./perl - -# $Id: utf8.t,v 1.0.1.2 2000/09/28 21:44:17 ram Exp $ +#!./perl -w # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: utf8.t,v $ -# Revision 1.0.1.2 2000/09/28 21:44:17 ram -# patch2: fixed stupid typo -# -# Revision 1.0.1.1 2000/09/17 16:48:12 ram -# patch1: created. -# -# -use Storable qw(thaw freeze); - -if ($] < 5.006) { - print "1..0\n"; +sub BEGIN { + if ($] < 5.006) { + print "1..0 # Skip: no utf8 support\n"; exit 0; + } + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; } -require 't/dump.pl'; +use strict; sub ok; -print "1..1\n"; +use Storable qw(thaw freeze); + +print "1..3\n"; -$x = chr(1234); +my $x = chr(1234); ok 1, $x eq ${thaw freeze \$x}; +# Long scalar +$x = join '', map {chr $_} (0..1023); +ok 2, $x eq ${thaw freeze \$x}; + +# Char in the range 127-255 (probably) in utf8 +$x = chr (175) . chr (256); +chop $x; +ok 3, $x eq ${thaw freeze \$x}; Modified: trunk/orca/packages/Storable-2.05/t/tied_items.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/tied_items.t (original) +++ trunk/orca/packages/Storable-2.05/t/tied_items.t 2002-11-09 12:32:26.000000000 -0800 @@ -1,22 +1,30 @@ #!./perl - -# $Id: tied_items.t,v 1.0 2000/09/01 19:40:42 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: tied_items.t,v $ -# Revision 1.0 2000/09/01 19:40:42 ram -# Baseline for first official release. -# # # Tests ref to items in tied hash/array structures. # -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + sub ok; $^W = 0; @@ -54,4 +62,3 @@ ok 7, $$ref2 == 8; # I don't understand why it's 3 and not 2 ok 8, $a_fetches == 3; - Modified: trunk/orca/packages/Storable-2.05/t/canonical.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/canonical.t (original) +++ trunk/orca/packages/Storable-2.05/t/canonical.t 2002-11-09 12:32:27.000000000 -0800 @@ -1,18 +1,25 @@ #!./perl - -# $Id: canonical.t,v 1.0 2000/09/01 19:40:41 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: canonical.t,v $ -# Revision 1.0 2000/09/01 19:40:41 ram -# Baseline for first official release. -# -BEGIN { push @INC, "../blib" } +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} + use Storable qw(freeze thaw dclone); use vars qw($debugging $verbose); @@ -55,7 +62,7 @@ for (my $i = 0; $i < $hashsize; $i++) { my($k) = int(rand(1_000_000)); $k = MD5->hexhash($k) if $gotmd5 and int(rand(2)); - $a1{$k} = { key => "$k", value => $i }; + $a1{$k} = { key => "$k", "value" => $i }; # A third of the elements are references to further hashes @@ -88,7 +95,7 @@ # Copy the hash, element by element in order of the keys foreach $k (sort keys %a1) { - $a2{$k} = { key => "$k", value => $a1{$k}->{value} }; + $a2{$k} = { key => "$k", "value" => $a1{$k}->{value} }; } # Deep clone the hash @@ -140,4 +147,3 @@ $$cloned{a} = "blah"; ok 8, $$cloned{''}[0] == \$$cloned{a}; - Modified: trunk/orca/packages/Storable-2.05/t/lock.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/lock.t (original) +++ trunk/orca/packages/Storable-2.05/t/lock.t 2002-11-09 12:32:27.000000000 -0800 @@ -1,37 +1,36 @@ #!./perl - -# $Id: lock.t,v 1.0.1.4 2001/01/03 09:41:00 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: lock.t,v $ -# Revision 1.0.1.4 2001/01/03 09:41:00 ram -# patch7: use new CAN_FLOCK routine to determine whether to run tests -# -# Revision 1.0.1.3 2000/10/26 17:11:27 ram -# patch5: just check $^O, there's no need for the whole Config -# -# Revision 1.0.1.2 2000/10/23 18:03:07 ram -# patch4: protected calls to flock() for dos platform -# -# Revision 1.0.1.1 2000/09/28 21:44:06 ram -# patch2: created. -# -# + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + + require 'st-dump.pl'; +} + +sub ok; use Storable qw(lock_store lock_retrieve); unless (&Storable::CAN_FLOCK) { - print "1..0 # Skip: fcntl/flock emulation broken on this platform\n"; + print "1..0 # Skip: fcntl/flock emulation broken on this platform\n"; exit 0; } -require 't/dump.pl'; -sub ok; - print "1..5\n"; @a = ('first', undef, 3, -4, -3.14159, 456, 4.5); @@ -40,10 +39,10 @@ # We're just ensuring things work, we're not validating locking. # -ok 1, defined lock_store(\@a, 't/store'); +ok 1, defined lock_store(\@a, 'store'); ok 2, $dumped = &dump(\@a); -$root = lock_retrieve('t/store'); +$root = lock_retrieve('store'); ok 3, ref $root eq 'ARRAY'; ok 4, @a == @$root; ok 5, &dump($root) eq $dumped; Modified: trunk/orca/packages/Storable-2.05/t/compat06.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/compat06.t (original) +++ trunk/orca/packages/Storable-2.05/t/compat06.t 2002-11-09 12:32:28.000000000 -0800 @@ -1,21 +1,26 @@ #!./perl - -# $Id: compat-0.6.t,v 1.0.1.1 2001/02/17 12:26:21 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: compat-0.6.t,v $ -# Revision 1.0.1.1 2001/02/17 12:26:21 ram -# patch8: added EBCDIC version of the test, from Peter Prymmer -# -# Revision 1.0 2000/09/01 19:40:41 ram -# Baseline for first official release. -# -require 't/dump.pl'; +BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + sub ok; print "1..8\n"; @@ -79,7 +84,7 @@ package main; my $is_EBCDIC = (ord('A') == 193) ? 1 : 0; - + my $r = ROOT->make; my $data = ''; @@ -100,13 +105,16 @@ my $expected_length = $is_EBCDIC ? 217 : 278; ok 1, length $data == $expected_length; - + my $y = thaw($data); ok 2, 1; ok 3, ref $y eq 'ROOT'; $Storable::canonical = 1; # Prevent "used once" warning $Storable::canonical = 1; +# Allow for long double string conversions. +$y->{num}->[3] += 0; +$r->{num}->[3] += 0; ok 4, nfreeze($y) eq nfreeze($r); ok 5, $y->ref->{key1} eq 'val1'; Added: trunk/orca/packages/Storable-2.05/t/malice.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/malice.t (original) +++ trunk/orca/packages/Storable-2.05/t/malice.t 2002-11-09 12:32:28.000000000 -0800 @@ -0,0 +1,318 @@ +#!./perl -w +# +# Copyright 2002, Larry Wall. +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +# I'm trying to keep this test easily backwards compatible to 5.004, so no +# qr//; + +# This test tries to craft malicious data to test out as many different +# error traps in Storable as possible +# It also acts as a test for read_header + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} + +use strict; +use vars qw($file_magic_str $other_magic $network_magic $byteorder + $major $minor $minor_write $fancy); + +$byteorder = $Config{byteorder}; + +$file_magic_str = 'pst0'; +$other_magic = 7 + length $byteorder; +$network_magic = 2; +$major = 2; +$minor = 6; +$minor_write = $] > 5.007 ? 6 : 4; + +use Test::More; + +# If it's 5.7.3 or later the hash will be stored with flags, which is +# 2 extra bytes. There are 2 * 2 * 2 tests per byte in the body and header +# common to normal and network order serialised objects (hence the 8) +# There are only 2 * 2 tests per byte in the parts of the header not present +# for network order, and 2 tests per byte on the 'pst0' "magic number" only +# present in files, but not in things store()ed to memory +$fancy = ($] > 5.007 ? 2 : 0); + +plan tests => 368 + length ($byteorder) * 4 + $fancy * 8; + +use Storable qw (store retrieve freeze thaw nstore nfreeze); + +my $file = "malice.$$"; +die "Temporary file 'malice.$$' already exists" if -e $file; + +END { while (-f $file) {unlink $file or die "Can't unlink '$file': $!" }} + +# The chr 256 is a hack to force the hash to always have the utf8 keys flag +# set on 5.7.3 and later. Otherwise the test fails if run with -Mutf8 because +# only there does the hash has the flag on, and hence only there is it stored +# as a flagged hash, which is 2 bytes longer +my %hash = (perl => 'rules', chr 256, ''); +delete $hash{chr 256}; + +sub test_hash { + my $clone = shift; + is (ref $clone, "HASH", "Get hash back"); + is (scalar keys %$clone, 1, "with 1 key"); + is ((keys %$clone)[0], "perl", "which is correct"); + is ($clone->{perl}, "rules"); +} + +sub test_header { + my ($header, $isfile, $isnetorder) = @_; + is (!!$header->{file}, !!$isfile, "is file"); + is ($header->{major}, $major, "major number"); + is ($header->{minor}, $minor_write, "minor number"); + is (!!$header->{netorder}, !!$isnetorder, "is network order"); + if ($isnetorder) { + # Network order header has no sizes + } else { + is ($header->{byteorder}, $byteorder, "byte order"); + is ($header->{intsize}, $Config{intsize}, "int size"); + is ($header->{longsize}, $Config{longsize}, "long size"); + is ($header->{ptrsize}, $Config{ptrsize}, "long size"); + is ($header->{nvsize}, $Config{nvsize} || $Config{doublesize} || 8, + "nv size"); # 5.00405 doesn't even have doublesize in config. + } +} + +sub store_and_retrieve { + my $data = shift; + unlink $file or die "Can't unlink '$file': $!"; + open FH, ">$file" or die "Can't open '$file': $!"; + binmode FH; + print FH $data or die "Can't print to '$file': $!"; + close FH or die "Can't close '$file': $!"; + + return eval {retrieve $file}; +} + +sub freeze_and_thaw { + my $data = shift; + return eval {thaw $data}; +} + +sub test_truncated { + my ($data, $sub, $magic_len, $what) = @_; + for my $i (0 .. length ($data) - 1) { + my $short = substr $data, 0, $i; + + my $clone = &$sub($short); + is (defined ($clone), '', "truncated $what to $i should fail"); + if ($i < $magic_len) { + like ($@, "/^Magic number checking on storable $what failed/", + "Should croak with magic number warning"); + } else { + is ($@, "", "Should not set \$\@"); + } + } +} + +sub test_corrupt { + my ($data, $sub, $what, $name) = @_; + + my $clone = &$sub($data); + is (defined ($clone), '', "$name $what should fail"); + like ($@, $what, $name); +} + +sub test_things { + my ($contents, $sub, $what, $isnetwork) = @_; + my $isfile = $what eq 'file'; + my $file_magic = $isfile ? length $file_magic_str : 0; + + my $header = Storable::read_magic ($contents); + test_header ($header, $isfile, $isnetwork); + + # Test that if we re-write it, everything still works: + my $clone = &$sub ($contents); + + is ($@, "", "There should be no error"); + + test_hash ($clone); + + # Now lets check the short version: + test_truncated ($contents, $sub, $file_magic + + ($isnetwork ? $network_magic : $other_magic), $what); + + my $copy; + if ($isfile) { + $copy = $contents; + substr ($copy, 0, 4) = 'iron'; + test_corrupt ($copy, $sub, "/^File is not a perl storable/", + "magic number"); + } + + $copy = $contents; + # Needs to be more than 1, as we're already coding a spread of 1 minor version + # number on writes (2.5, 2.4). May increase to 2 if we figure we can do 2.3 + # on 5.005_03 (No utf8). + # 4 allows for a small safety margin + # (Joke: + # Question: What is the value of pi? + # Mathematician answers "It's pi, isn't it" + # Physicist answers "3.1, within experimental error" + # Engineer answers "Well, allowing for a small safety margin, 18" + # ) + my $minor4 = $header->{minor} + 4; + substr ($copy, $file_magic + 1, 1) = chr $minor4; + { + # Now by default newer minor version numbers are not a pain. + $clone = &$sub($copy); + is ($@, "", "by default no error on higher minor"); + test_hash ($clone); + + local $Storable::accept_future_minor = 0; + test_corrupt ($copy, $sub, + "/^Storable binary image v$header->{major}\.$minor4 more recent than I am \\(v$header->{major}\.$minor\\)/", + "higher minor"); + } + + $copy = $contents; + my $major1 = $header->{major} + 1; + substr ($copy, $file_magic, 1) = chr 2*$major1; + test_corrupt ($copy, $sub, + "/^Storable binary image v$major1\.$header->{minor} more recent than I am \\(v$header->{major}\.$minor\\)/", + "higher major"); + + # Continue messing with the previous copy + my $minor1 = $header->{minor} - 1; + substr ($copy, $file_magic + 1, 1) = chr $minor1; + test_corrupt ($copy, $sub, + "/^Storable binary image v$major1\.$minor1 more recent than I am \\(v$header->{major}\.$minor\\)/", + "higher major, lower minor"); + + my $where; + if (!$isnetwork) { + # All these are omitted from the network order header. + # I'm not sure if it's correct to omit the byte size stuff. + $copy = $contents; + substr ($copy, $file_magic + 3, length $header->{byteorder}) + = reverse $header->{byteorder}; + + test_corrupt ($copy, $sub, "/^Byte order is not compatible/", + "byte order"); + $where = $file_magic + 3 + length $header->{byteorder}; + foreach (['intsize', "Integer"], + ['longsize', "Long integer"], + ['ptrsize', "Pointer integer"], + ['nvsize', "Double"]) { + my ($key, $name) = @$_; + $copy = $contents; + substr ($copy, $where++, 1) = chr 0; + test_corrupt ($copy, $sub, "/^$name size is not compatible/", + "$name size"); + } + } else { + $where = $file_magic + $network_magic; + } + + # Just the header and a tag 255. As 26 is currently the highest tag, this + # is "unexpected" + $copy = substr ($contents, 0, $where) . chr 255; + + test_corrupt ($copy, $sub, + "/^Corrupted storable $what \\(binary v$header->{major}.$header->{minor}\\)/", + "bogus tag"); + + # Now drop the minor version number + substr ($copy, $file_magic + 1, 1) = chr $minor1; + + test_corrupt ($copy, $sub, + "/^Corrupted storable $what \\(binary v$header->{major}.$minor1\\)/", + "bogus tag, minor less 1"); + # Now increase the minor version number + substr ($copy, $file_magic + 1, 1) = chr $minor4; + + # local $Storable::DEBUGME = 1; + # This is the delayed croak + test_corrupt ($copy, $sub, + "/^Storable binary image v$header->{major}.$minor4 contains data of type 255. This Storable is v$header->{major}.$minor and can only handle data types up to 26/", + "bogus tag, minor plus 4"); + # And check again that this croak is not delayed: + { + # local $Storable::DEBUGME = 1; + local $Storable::accept_future_minor = 0; + test_corrupt ($copy, $sub, + "/^Storable binary image v$header->{major}\.$minor4 more recent than I am \\(v$header->{major}\.$minor\\)/", + "higher minor"); + } +} + +sub slurp { + my $file = shift; + local (*FH, $/); + open FH, "<$file" or die "Can't open '$file': $!"; + binmode FH; + my $contents = ; + die "Can't read $file: $!" unless defined $contents; + return $contents; +} + + +ok (defined store(\%hash, $file)); + +my $expected = 20 + length ($file_magic_str) + $other_magic + $fancy; +my $length = -s $file; + +die "Don't seem to have written file '$file' as I can't get its length: $!" + unless defined $file; + +die "Expected file to be $expected bytes (sizeof long is $Config{longsize}) but it is $length" + unless $length == $expected; + +# Read the contents into memory: +my $contents = slurp $file; + +# Test the original direct from disk +my $clone = retrieve $file; +test_hash ($clone); + +# Then test it. +test_things($contents, \&store_and_retrieve, 'file'); + +# And now try almost everything again with a Storable string +my $stored = freeze \%hash; +test_things($stored, \&freeze_and_thaw, 'string'); + +# Network order. +unlink $file or die "Can't unlink '$file': $!"; + +ok (defined nstore(\%hash, $file)); + +$expected = 20 + length ($file_magic_str) + $network_magic + $fancy; +$length = -s $file; + +die "Don't seem to have written file '$file' as I can't get its length: $!" + unless defined $file; + +die "Expected file to be $expected bytes (sizeof long is $Config{longsize}) but it is $length" + unless $length == $expected; + +# Read the contents into memory: +$contents = slurp $file; + +# Test the original direct from disk +$clone = retrieve $file; +test_hash ($clone); + +# Then test it. +test_things($contents, \&store_and_retrieve, 'file', 1); + +# And now try almost everything again with a Storable string +$stored = nfreeze \%hash; +test_things($stored, \&freeze_and_thaw, 'string', 1); Added: trunk/orca/packages/Storable-2.05/t/utf8hash.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/utf8hash.t (original) +++ trunk/orca/packages/Storable-2.05/t/utf8hash.t 2002-11-09 12:32:29.000000000 -0800 @@ -0,0 +1,207 @@ +#!./perl + +sub BEGIN { + if ($] < 5.007) { + print "1..0 # Skip: no utf8 hash key support\n"; + exit 0; + } + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS'; + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE}){ + if($Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + } +} + +use strict; +our $DEBUGME = shift || 0; +use Storable qw(store nstore retrieve thaw freeze); +{ + no warnings; + $Storable::DEBUGME = ($DEBUGME > 1); +} +# Better than no plan, because I was getting out of memory errors, at which +# point Test::More tidily prints up 1..79 as if I meant to finish there. +use Test::More tests=>148; +use bytes (); +use Encode qw(is_utf8); +my %utf8hash; + +$Storable::canonical = $Storable::canonical; # Shut up a used only once warning. + +for $Storable::canonical (0, 1) { + +# first we generate a nasty hash which keys include both utf8 +# on and off with identical PVs + +no utf8; # we have a naked 8-bit byte below (in Latin 1, anyway) + +# In Latin 1 -ese the below ord() should end up 0xc0 (192), +# in EBCDIC 0x64 (100). Both should end up being UTF-8/UTF-EBCDIC. +my @ords = ( + ord("?"), # LATIN CAPITAL LETTER A WITH GRAVE + 0x3000, #IDEOGRAPHIC SPACE + ); + +foreach my $i (@ords){ + my $u = chr($i); utf8::upgrade($u); + # warn sprintf "%d,%d", bytes::length($u), is_utf8($u); + my $b = pack("C*", unpack("C*", $u)); + # warn sprintf "%d,%d" ,bytes::length($b), is_utf8($b); + + isnt($u, $b, + "equivalence - with utf8flag"); + is (pack("C*", unpack("C*", $u)), pack("C*", unpack("C*", $b)), + "equivalence - without utf8flag"); + + $utf8hash{$u} = $utf8hash{$b} = $i; +} + +sub nkeys($){ + my $href = shift; + return scalar keys %$href; +} + +my $nk; +is($nk = nkeys(\%utf8hash), scalar(@ords)*2, + "nasty hash generated (nkeys=$nk)"); + +# now let the show begin! + +my $thawed = thaw(freeze(\%utf8hash)); + +is($nk = nkeys($thawed), + nkeys(\%utf8hash), + "scalar keys \%{\$thawed} (nkeys=$nk)"); +for my $k (sort keys %$thawed){ + is($utf8hash{$k}, $thawed->{$k}, "frozen item chr($utf8hash{$k})"); +} + +my $storage = "utfhash.po"; # po = perl object! +my $retrieved; + +ok((nstore \%utf8hash, $storage), "nstore to $storage"); +ok(($retrieved = retrieve($storage)), "retrieve from $storage"); + +is($nk = nkeys($retrieved), + nkeys(\%utf8hash), + "scalar keys \%{\$retrieved} (nkeys=$nk)"); +for my $k (sort keys %$retrieved){ + is($utf8hash{$k}, $retrieved->{$k}, "nstored item chr($utf8hash{$k})"); +} +unlink $storage; + + +ok((store \%utf8hash, $storage), "store to $storage"); +ok(($retrieved = retrieve($storage)), "retrieve from $storage"); +is($nk = nkeys($retrieved), + nkeys(\%utf8hash), + "scalar keys \%{\$retrieved} (nkeys=$nk)"); +for my $k (sort keys %$retrieved){ + is($utf8hash{$k}, $retrieved->{$k}, "stored item chr($utf8hash{$k})"); +} +$DEBUGME or unlink $storage; + +# On the premis that more tests are good, here are NWC's tests: + +package Hash_Test; + +sub me_second { + return (undef, $_[0]); +} + +package main; + +my $utf8 = "Schlo\xdf" . chr 256; +chop $utf8; + +# Set this to 1 to test the test by bypassing Storable. +my $bypass = 0; + +sub class_test { + my ($object, $package) = @_; + unless ($package) { + is ref $object, 'HASH', "$object is unblessed"; + return; + } + isa_ok ($object, $package); + my ($garbage, $copy) = eval {$object->me_second}; + is $@, "", "check it has correct method"; + cmp_ok $copy, '==', $object, "and that it returns the same object"; +} + +# Thanks to Dan Kogai for the Kanji for "castle" (which he informs me also +# means 'a city' in Mandarin). +my %hash = (map {$_, $_} 'castle', "ch\xe5teau", $utf8, "\x{57CE}"); + +for my $package ('', 'Hash_Test') { + # Run through and sanity check these. + if ($package) { + bless \%hash, $package; + } + for (keys %hash) { + my $l = 0 + /^\w+$/; + my $r = 0 + $hash{$_} =~ /^\w+$/; + cmp_ok ($l, '==', $r); + } + + # Grr. This cperl mode thinks that ${ is a punctuation variable. + # I presume it's punishment for using xemacs rather than emacs. Or OS/2 :-) + my $copy = $bypass ? \%hash : ${thaw freeze \\%hash}; + class_test ($copy, $package); + + for (keys %$copy) { + my $l = 0 + /^\w+$/; + my $r = 0 + $copy->{$_} =~ /^\w+$/; + cmp_ok ($l, '==', $r, sprintf "key length %d", length $_); + } + + + my $bytes = my $char = chr 27182; + utf8::encode ($bytes); + + my $orig = {$char => 1}; + if ($package) { + bless $orig, $package; + } + my $just_utf8 = $bypass ? $orig : ${thaw freeze \$orig}; + class_test ($just_utf8, $package); + cmp_ok (scalar keys %$just_utf8, '==', 1, "1 key in utf8?"); + cmp_ok ($just_utf8->{$char}, '==', 1, "utf8 key present?"); + ok (!exists $just_utf8->{$bytes}, "bytes key absent?"); + + $orig = {$bytes => 1}; + if ($package) { + bless $orig, $package; + } + my $just_bytes = $bypass ? $orig : ${thaw freeze \$orig}; + class_test ($just_bytes, $package); + + cmp_ok (scalar keys %$just_bytes, '==', 1, "1 key in bytes?"); + cmp_ok ($just_bytes->{$bytes}, '==', 1, "bytes key present?"); + ok (!exists $just_bytes->{$char}, "utf8 key absent?"); + + die sprintf "Both have length %d, which is crazy", length $char + if length $char == length $bytes; + + $orig = {$bytes => length $bytes, $char => length $char}; + if ($package) { + bless $orig, $package; + } + my $both = $bypass ? $orig : ${thaw freeze \$orig}; + class_test ($both, $package); + + cmp_ok (scalar keys %$both, '==', 2, "2 keys?"); + cmp_ok ($both->{$bytes}, '==', length $bytes, "bytes key present?"); + cmp_ok ($both->{$char}, '==', length $char, "utf8 key present?"); +} + +} Modified: trunk/orca/packages/Storable-2.05/t/store.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/store.t (original) +++ trunk/orca/packages/Storable-2.05/t/store.t 2002-11-09 12:32:29.000000000 -0800 @@ -1,18 +1,25 @@ #!./perl - -# $Id: store.t,v 1.0 2000/09/01 19:40:42 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: store.t,v $ -# Revision 1.0 2000/09/01 19:40:42 ram -# Baseline for first official release. -# -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} use Storable qw(store retrieve store_fd nstore_fd fd_retrieve); @@ -26,13 +33,13 @@ @a = ('first', undef, 3, -4, -3.14159, 456, 4.5, $b, \$a, $a, $c, \$c, \%a); -print "not " unless defined store(\@a, 't/store'); +print "not " unless defined store(\@a, 'store'); print "ok 1\n"; $dumped = &dump(\@a); print "ok 2\n"; -$root = retrieve('t/store'); +$root = retrieve('store'); print "not " unless defined $root; print "ok 3\n"; @@ -42,7 +49,7 @@ print "not " unless $got eq $dumped; print "ok 5\n"; -unlink 'store'; +1 while unlink 'store'; package FOO; @ISA = qw(Storable); @@ -55,10 +62,10 @@ package main; $foo = FOO->make; -print "not " unless $foo->store('t/store'); +print "not " unless $foo->store('store'); print "ok 6\n"; -print "not " unless open(OUT, '>>t/store'); +print "not " unless open(OUT, '>>store'); print "ok 7\n"; binmode OUT; @@ -72,7 +79,7 @@ print "not " unless close(OUT); print "ok 11\n"; -print "not " unless open(OUT, 't/store'); +print "not " unless open(OUT, 'store'); binmode OUT; $r = fd_retrieve(::OUT); @@ -103,6 +110,5 @@ print "not " unless $@; print "ok 20\n"; -close OUT; -unlink 't/store'; - +close OUT or die "Could not close: $!"; +END { 1 while unlink 'store' } Added: trunk/orca/packages/Storable-2.05/t/integer.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/integer.t (original) +++ trunk/orca/packages/Storable-2.05/t/integer.t 2002-11-09 12:32:30.000000000 -0800 @@ -0,0 +1,171 @@ +#!./perl -w +# +# Copyright 2002, Larry Wall. +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +# I ought to keep this test easily backwards compatible to 5.004, so no +# qr//; + +# This test checks downgrade behaviour on pre-5.8 perls when new 5.8 features +# are encountered. + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} + +use Test::More; +use Storable qw (dclone store retrieve freeze thaw nstore nfreeze); +use strict; + +my $max_uv = ~0; +my $max_uv_m1 = ~0 ^ 1; +# Express it in this way so as not to use any addition, as 5.6 maths would +# do this in NVs on 64 bit machines, and we're overflowing IVs so can't use +# use integer. +my $max_iv_p1 = $max_uv ^ ($max_uv >> 1); +my $lots_of_9C = do { + my $temp = sprintf "%X", ~0; + $temp =~ s/FF/9C/g; + local $^W; + hex $temp; +}; + +my $max_iv = ~0 >> 1; +my $min_iv = do {use integer; -$max_iv-1}; # 2s complement assumption + +my @processes = (["dclone", \&do_clone], + ["freeze/thaw", \&freeze_and_thaw], + ["nfreeze/thaw", \&nfreeze_and_thaw], + ["store/retrieve", \&store_and_retrieve], + ["nstore/retrieve", \&nstore_and_retrieve], + ); +my @numbers = + (# IV bounds of 8 bits + -1, 0, 1, -127, -128, -129, 42, 126, 127, 128, 129, 254, 255, 256, 257, + # IV bounds of 32 bits + -2147483647, -2147483648, -2147483649, 2147483646, 2147483647, 2147483648, + # IV bounds + $min_iv, do {use integer; $min_iv + 1}, do {use integer; $max_iv - 1}, + $max_iv, + # UV bounds at 32 bits + 0x7FFFFFFF, 0x80000000, 0x80000001, 0xFFFFFFFF, 0xDEADBEEF, + # UV bounds + $max_iv_p1, $max_uv_m1, $max_uv, $lots_of_9C, + ); + +plan tests => @processes * @numbers * 5; + +my $file = "integer.$$"; +die "Temporary file '$file' already exists" if -e $file; + +END { while (-f $file) {unlink $file or die "Can't unlink '$file': $!" }} + +sub do_clone { + my $data = shift; + my $copy = eval {dclone $data}; + is ($@, '', 'Should be no error dcloning'); + ok (1, "dlcone is only 1 process, not 2"); + return $copy; +} + +sub freeze_and_thaw { + my $data = shift; + my $frozen = eval {freeze $data}; + is ($@, '', 'Should be no error freezing'); + my $copy = eval {thaw $frozen}; + is ($@, '', 'Should be no error thawing'); + return $copy; +} + +sub nfreeze_and_thaw { + my $data = shift; + my $frozen = eval {nfreeze $data}; + is ($@, '', 'Should be no error nfreezing'); + my $copy = eval {thaw $frozen}; + is ($@, '', 'Should be no error thawing'); + return $copy; +} + +sub store_and_retrieve { + my $data = shift; + my $frozen = eval {store $data, $file}; + is ($@, '', 'Should be no error storing'); + my $copy = eval {retrieve $file}; + is ($@, '', 'Should be no error retrieving'); + return $copy; +} + +sub nstore_and_retrieve { + my $data = shift; + my $frozen = eval {nstore $data, $file}; + is ($@, '', 'Should be no error storing'); + my $copy = eval {retrieve $file}; + is ($@, '', 'Should be no error retrieving'); + return $copy; +} + +foreach (@processes) { + my ($process, $sub) = @$_; + foreach my $number (@numbers) { + # as $number is an alias into @numbers, we don't want any side effects of + # conversion macros affecting later runs, so pass a copy to Storable: + my $copy1 = my $copy0 = $number; + my $copy_s = &$sub (\$copy0); + if (is (ref $copy_s, "SCALAR", "got back a scalar ref?")) { + # Test inside use integer to see if the bit pattern is identical + # and outside to see if the sign is right. + # On 5.8 we don't need this trickery anymore. + # We really do need 2 copies here, as conversion may have side effect + # bugs. In particular, I know that this happens: + # perl5.00503 -le '$a = "-2147483649"; $a & 0; print $a; print $a+1' + # -2147483649 + # 2147483648 + + my $copy_s1 = my $copy_s2 = $$copy_s; + # On 5.8 can do this with a straight ==, due to the integer/float maths + # on 5.6 can't do this with + # my $eq = do {use integer; $copy_s1 == $copy1} && $copy_s1 == $copy1; + # because on builds with IV as long long it tickles bugs. + # (Uncomment it and the Devel::Peek line below to see the messed up + # state of the scalar, with PV showing the correct string for the + # number, and IV holding a bogus value which has been truncated to 32 bits + + # So, check the bit patterns are identical, and check that the sign is the + # same. This works on all the versions in all the sizes. + # $eq = && (($copy_s1 <=> 0) == ($copy1 <=> 0)); + # Split this into 2 tests, to cater for 5.005_03 + + my $bit = ok (($copy_s1 ^ $copy1 == 0), "$process $copy1 (bitpattern)"); + # This is sick. 5.005_03 survives without the IV/UV flag, and somehow + # gets it right, providing you don't have side effects of conversion. +# local $TODO; +# $TODO = "pre 5.6 doesn't have flag to distinguish IV/UV" +# if $[ < 5.005_56 and $copy1 > $max_iv; + my $sign = ok (($copy_s2 <=> 0) == ($copy1 <=> 0), + "$process $copy1 (sign)"); + + unless ($bit and $sign) { + printf "# Passed in %s (%#x, %i)\n# got back '%s' (%#x, %i)\n", + $copy1, $copy1, $copy1, $copy_s1, $copy_s1, $copy_s1; + # use Devel::Peek; Dump $copy_s1; Dump $$copy_s; + } + # unless ($bit) { use Devel::Peek; Dump $copy_s1; Dump $$copy_s; } + } else { + fail ("$process $copy1"); + fail ("$process $copy1"); + } + } +} Added: trunk/orca/packages/Storable-2.05/t/croak.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/croak.t (original) +++ trunk/orca/packages/Storable-2.05/t/croak.t 2002-11-09 12:32:30.000000000 -0800 @@ -0,0 +1,39 @@ +#!./perl -w + +# Please keep this test this simple. (ie just one test.) +# There's some sort of not-croaking properly problem in Storable when built +# with 5.005_03. This test shows it up, whereas malice.t does not. +# In particular, don't use Test; as this covers up the problem. + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} + +use strict; + +BEGIN { + die "Oi! No! Don't change this test so that Carp is used before Storable" + if defined &Carp::carp; +} +use Storable qw(freeze thaw); + +print "1..2\n"; + +for my $test (1,2) { + eval {thaw "\xFF\xFF"}; + if ($@ =~ /Storable binary image v127.255 more recent than I am \(v2\.\d+\)/) + { + print "ok $test\n"; + } else { + chomp $@; + print "not ok $test # Expected a meaningful croak. Got '$@'\n"; + } +} Added: trunk/orca/packages/Storable-2.05/t/interwork56.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/interwork56.t (original) +++ trunk/orca/packages/Storable-2.05/t/interwork56.t 2002-11-09 12:32:31.000000000 -0800 @@ -0,0 +1,200 @@ +#!./perl -w +# +# Copyright 2002, Larry Wall. +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +# I ought to keep this test easily backwards compatible to 5.004, so no +# qr//; + +# This test checks whether the kludge to interwork with 5.6 Storables compiled +# on Unix systems with IV as long long works. + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + unless ($Config{ivsize} and $Config{ivsize} > $Config{longsize}) { + print "1..0 # Skip: Your IVs are no larger than your longs\n"; + exit 0; + } +} + +use Storable qw(freeze thaw); +use strict; +use Test::More tests=>30; + +use vars qw(%tests); + +{ + local $/ = "\n\nend\n"; + while () { + next unless /\S/s; + unless (/begin ([0-7]{3}) ([^\n]*)\n(.*)$/s) { + s/\n.*//s; + warn "Dodgy data in section starting '$_'"; + next; + } + next unless oct $1 == ord 'A'; # Skip ASCII on EBCDIC, and vice versa + my $data = unpack 'u', $3; + $tests{$2} = $data; + } +} + +# perl makes easy things easy, and hard things possible: +my $test = freeze \'Hell'; + +my $header = Storable::read_magic ($test); + +is ($header->{byteorder}, $Config{byteorder}, + "header's byteorder and Config.pm's should agree"); + +my $result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "Check thawing test data"); +is ($@, '', "causes no errors"); +is ($$result, 'Hell', 'and gives the expected data'); + +my $kingdom = $Config{byteorder} =~ /23/ ? "Lillput" : "Belfuscu"; + +my $name = join ',', $kingdom, @$header{qw(intsize longsize ptrsize nvsize)}; + +SKIP: { + my $real_thing = $tests{$name}; + if (!defined $real_thing) { + print << "EOM"; +# No test data for Storable 1.x for: +# +# byteorder '$Config{byteorder}' +# sizeof(int) $$header{intsize} +# sizeof(long) $$header{longsize} +# sizeof(char *) $$header{ptrsize} +# sizeof(NV) $$header{nvsize} + +# If you have Storable 1.x built with perl 5.6.x on this platform, please +# make_56_interwork.pl to generate test data, and append the test data to +# this test. +# You may find that make_56_interwork.pl reports that your platform has no +# interworking problems, in which case you need do nothing. +EOM + skip "# No 1.x test file", 9; + } + my $result = eval {thaw $real_thing}; + is ($result, undef, "By default should not be able to thaw"); + like ($@, qr/Byte order is not compatible/, + "because the header byte order strings differ"); + local $Storable::interwork_56_64bit = 1; + $result = eval {thaw $real_thing}; + isa_ok ($result, 'ARRAY', "With flag should now thaw"); + is ($@, '', "with no errors"); + + # However, as the file is written with Storable pre 2.01, it's a known + # bug that large (positive) UVs become IVs + my $value = (~0 ^ (~0 >> 1) ^ 2); + + is (@$result, 4, "4 elements in array"); + like ($$result[0], + qr/^This file was written with [0-9.]+ on perl [0-9.]+\z/, + "1st element"); + is ($$result[1], "$kingdom was correct", "2nd element"); + cmp_ok ($$result[2] ^ $value, '==', 0, "3rd element") or + printf "# expected %#X, got %#X\n", $value, $$result[2]; + is ($$result[3], "The End", "4th element"); +} + +$result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "CHORUS: check thawing test data"); +is ($@, '', " causes no errors"); +is ($$result, 'Hell', " and gives the expected data"); + +my $test_kludge; +{ + local $Storable::interwork_56_64bit = 1; + $test_kludge = freeze \'Heck'; +} + +my $header_kludge = Storable::read_magic ($test_kludge); + +cmp_ok (length ($header_kludge->{byteorder}), '==', $Config{longsize}, + "With 5.6 interwork kludge byteorder string should be same size as long" + ); +$result = eval {thaw $test_kludge}; +is ($result, undef, "By default should not be able to thaw"); +like ($@, qr/Byte order is not compatible/, + "because the header byte order strings differ"); + +$result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "CHORUS: check thawing test data"); +is ($@, '', " causes no errors"); +is ($$result, 'Hell', " and gives the expected data"); + +{ + local $Storable::interwork_56_64bit = 1; + + $result = eval {thaw $test_kludge}; + isa_ok ($result, 'SCALAR', "should be able to thaw kludge data"); + is ($@, '', "with no errors"); + is ($$result, 'Heck', "and gives expected data"); + + $result = eval {thaw $test}; + is ($result, undef, "But now can't thaw real data"); + like ($@, qr/Byte order is not compatible/, + "because the header byte order strings differ"); +} + +# All together now: +$result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "CHORUS: check thawing test data"); +is ($@, '', " causes no errors"); +is ($$result, 'Hell', " and gives the expected data"); + +__END__ +# A whole run of 1.1.14 freeze data, uuencoded. The "mode bits" are the octal +# value of 'A', the "file name" is the test name. Use make_56_interwork.pl +# with a copy of Storable 1.X generate these. + +# byteorder '1234' +# sizeof(int) 4 +# sizeof(long) 4 +# sizeof(char *) 4 +# sizeof(NV) 8 +begin 101 Lillput,4,4,4,8 +M!`0$,3(S-`0$!`@"!`````HQ5&AI '?', answer => 42, extra => 'junk', undef => undef); +lock_hash %hash; +unlock_value %hash, 'answer'; +unlock_value %hash, 'extra'; +delete $hash{'extra'}; + +my $test; + +package Restrict_Test; + +sub me_second { + return (undef, $_[0]); +} + +package main; + +sub testit { + my $hash = shift; + my $copy = dclone $hash; + + my @in_keys = sort keys %$hash; + my @out_keys = sort keys %$copy; + unless (ok ++$test, "@in_keys" eq "@out_keys") { + print "# Failed: keys mis-match after deep clone.\n"; + print "# Original keys: @in_keys\n"; + print "# Copy's keys: @out_keys\n"; + } + + # $copy = $hash; # used in initial debug of the tests + + ok ++$test, Internals::SvREADONLY(%$copy), "cloned hash restricted?"; + + ok ++$test, Internals::SvREADONLY($copy->{question}), + "key 'question' not locked in copy?"; + + ok ++$test, !Internals::SvREADONLY($copy->{answer}), + "key 'answer' not locked in copy?"; + + eval { $copy->{extra} = 15 } ; + unless (ok ++$test, !$@, "Can assign to reserved key 'extra'?") { + my $diag = $@; + $diag =~ s/\n.*\z//s; + print "# \$\@: $diag\n"; + } + + eval { $copy->{nono} = 7 } ; + ok ++$test, $@, "Can not assign to invalid key 'nono'?"; + + ok ++$test, exists $copy->{undef}, + "key 'undef' exists"; + + ok ++$test, !defined $copy->{undef}, + "value for key 'undef' is undefined"; +} + +for $Storable::canonical (0, 1) { + print "# \$Storable::canonical = $Storable::canonical\n"; + testit (\%hash); + my $object = \%hash; + # bless {}, "Restrict_Test"; +} Modified: trunk/orca/packages/Storable-2.05/t/forgive.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/forgive.t (original) +++ trunk/orca/packages/Storable-2.05/t/forgive.t 2002-11-09 12:32:32.000000000 -0800 @@ -1,6 +1,4 @@ #!./perl - -# $Id: forgive.t,v 1.0.1.1 2000/09/01 19:40:42 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # @@ -10,46 +8,60 @@ # Original Author: Ulrich Pfeifer # (C) Copyright 1997, Universitat Dortmund, all rights reserved. # -# $Log: forgive.t,v $ -# Revision 1.0.1.1 2000/09/01 19:40:42 ram -# Baseline for first official release. -# -# Revision 1.0 2000/09/01 19:40:41 ram -# Baseline for first official release. -# + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require File::Spec; + if ($File::Spec::VERSION < 0.8) { + print "1..0 # Skip: newer File::Spec needed\n"; + exit 0; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} use Storable qw(store retrieve); + print "1..8\n"; my $test = 1; -my $bad = ['foo', sub { 1 }, 'bar']; +*GLOB = *GLOB; # peacify -w +my $bad = ['foo', \*GLOB, 'bar']; my $result; -eval {$result = store ($bad , 't/store')}; +eval {$result = store ($bad , 'store')}; print ((!defined $result)?"ok $test\n":"not ok $test\n"); $test++; print (($@ ne '')?"ok $test\n":"not ok $test\n"); $test++; $Storable::forgive_me=1; +my $devnull = File::Spec->devnull; + open(SAVEERR, ">&STDERR"); -open(STDERR, ">/dev/null") or +open(STDERR, ">$devnull") or ( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) ); -eval {$result = store ($bad , 't/store')}; +eval {$result = store ($bad , 'store')}; open(STDERR, ">&SAVEERR"); print ((defined $result)?"ok $test\n":"not ok $test\n"); $test++; print (($@ eq '')?"ok $test\n":"not ok $test\n"); $test++; -my $ret = retrieve('t/store'); +my $ret = retrieve('store'); print ((defined $ret)?"ok $test\n":"not ok $test\n"); $test++; print (($ret->[0] eq 'foo')?"ok $test\n":"not ok $test\n"); $test++; print (($ret->[2] eq 'bar')?"ok $test\n":"not ok $test\n"); $test++; print ((ref $ret->[1] eq 'SCALAR')?"ok $test\n":"not ok $test\n"); $test++; -END { - unlink 't/store'; -} +END { 1 while unlink 'store' } Modified: trunk/orca/packages/Storable-2.05/t/st-dump.pl ============================================================================== --- trunk/orca/packages/Storable-2.05/t/st-dump.pl (original) +++ trunk/orca/packages/Storable-2.05/t/st-dump.pl 2002-11-09 12:32:32.000000000 -0800 @@ -1,19 +1,37 @@ -;# $Id: dump.pl,v 1.0 2000/09/01 19:40:41 ram Exp $ -;# -;# Copyright (c) 1995-2000, Raphael Manfredi -;# -;# You may redistribute only under the same terms as Perl 5, as specified -;# in the README file that comes with the distribution. -;# -;# $Log: dump.pl,v $ -;# Revision 1.0 2000/09/01 19:40:41 ram -;# Baseline for first official release. -;# +# +# Copyright (c) 1995-2000, Raphael Manfredi +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +# NOTE THAT THIS FILE IS COPIED FROM ext/Storable/t/st-dump.pl +# TO t/lib/st-dump.pl. One could also play games with +# File::Spec->updir and catdir to get the st-dump.pl in +# ext/Storable into @INC. sub ok { - my ($num, $ok) = @_; - print "not " unless $ok; - print "ok $num\n"; + my ($num, $ok, $name) = @_; + $num .= " - $name" if defined $name and length $name; + print $ok ? "ok $num\n" : "not ok $num\n"; + $ok; +} + +sub num_equal { + my ($num, $left, $right, $name) = @_; + my $ok = ((defined $left) ? $left == $right : undef); + unless (ok ($num, $ok, $name)) { + print "# Expected $right\n"; + if (!defined $left) { + print "# Got undef\n"; + } elsif ($left !~ tr/0-9//c) { + print "# Got $left\n"; + } else { + $left =~ s/([^-a-zA-Z0-9_+])/sprintf "\\%03o", ord $1/ge; + print "# Got \"$left\"\n"; + } + } + $ok; } package dump; Added: trunk/orca/packages/Storable-2.05/t/make_56_interwork.pl ============================================================================== --- trunk/orca/packages/Storable-2.05/t/make_56_interwork.pl (original) +++ trunk/orca/packages/Storable-2.05/t/make_56_interwork.pl 2002-11-09 12:32:33.000000000 -0800 @@ -0,0 +1,51 @@ +#!/usr/bin/perl -w +use strict; + +use Config; +use Storable qw(freeze thaw); + +# Lilliput decreed that eggs should be eaten small end first. +# Belfuscu welcomed the rebels who wanted to eat big end first. +my $kingdom = $Config{byteorder} =~ /23/ ? "Lillput" : "Belfuscu"; + +my $frozen = freeze + ["This file was written with $Storable::VERSION on perl $]", + "$kingdom was correct", (~0 ^ (~0 >> 1) ^ 2), + "The End"]; + +my $ivsize = $Config{ivsize} || $Config{longsize}; + +my $storesize = unpack 'xxC', $frozen; +my $storebyteorder = unpack "xxxA$storesize", $frozen; + +if ($Config{byteorder} eq $storebyteorder) { + my $ivtype = $Config{ivtype} || 'long'; + print <<"EOM"; +You only need to run this generator program where Config.pm's byteorder string +is not the same length as the size of IVs. + +This length difference should only happen on perl 5.6.x configured with IVs as +long long on Unix, OS/2 or any platform that runs the Configure stript (ie not +MS Windows) + +This is perl $], sizeof(long) is $Config{longsize}, IVs are '$ivtype', sizeof(IV) is $ivsize, +byteorder is '$Config{byteorder}', Storable $Storable::VERSION writes a byteorder of '$storebyteorder' +EOM + exit; # Grr ' +} + +my ($i, $l, $p, $n) = unpack "xxxx${storesize}CCCC", $frozen; + +print <<"EOM"; +# byteorder '$storebyteorder' +# sizeof(int) $i +# sizeof(long) $l +# sizeof(char *) $p +# sizeof(NV) $n +EOM + +my $uu = pack 'u', $frozen; + +printf "begin %3o $kingdom,$i,$l,$p,$n\n", ord 'A'; +print $uu; +print "\nend\n\n"; Modified: trunk/orca/packages/Storable-2.05/t/dclone.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/dclone.t (original) +++ trunk/orca/packages/Storable-2.05/t/dclone.t 2002-11-09 12:32:33.000000000 -0800 @@ -1,22 +1,30 @@ #!./perl - -# $Id: dclone.t,v 1.0 2000/09/01 19:40:41 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: dclone.t,v $ -# Revision 1.0 2000/09/01 19:40:41 ram -# Baseline for first official release. -# -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + use Storable qw(dclone); -print "1..9\n"; +print "1..10\n"; $a = 'toto'; $b = \$a; @@ -69,3 +77,16 @@ print "not " unless $$cloned{''}[0] == \$$cloned{a}; print "ok 9\n"; +# [ID 20020221.007] SEGV in Storable with empty string scalar object +package TestString; +sub new { + my ($type, $string) = @_; + return bless(\$string, $type); +} +package main; +my $empty_string_obj = TestString->new(''); +my $clone = dclone($empty_string_obj); +# If still here after the dclone the fix (#17543) worked. +print ref $clone eq ref $empty_string_obj && + $$clone eq $$empty_string_obj && + $$clone eq '' ? "ok 10\n" : "not ok 10\n"; Modified: trunk/orca/packages/Storable-2.05/t/tied_hook.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/tied_hook.t (original) +++ trunk/orca/packages/Storable-2.05/t/tied_hook.t 2002-11-09 12:32:33.000000000 -0800 @@ -1,21 +1,26 @@ #!./perl - -# $Id: tied_hook.t,v 1.0.1.1 2001/02/17 12:29:01 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: tied_hook.t,v $ -# Revision 1.0.1.1 2001/02/17 12:29:01 ram -# patch8: added test for blessed ref to tied hash -# -# Revision 1.0 2000/09/01 19:40:42 ram -# Baseline for first official release. -# -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + sub ok; use Storable qw(freeze thaw); @@ -240,4 +245,3 @@ $old_hash_fetch = $hash_fetch; $v = $bx->{attribute}; ok 25, $hash_fetch == $old_hash_fetch + 1; # Still tied - Modified: trunk/orca/packages/Storable-2.05/t/recurse.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/recurse.t (original) +++ trunk/orca/packages/Storable-2.05/t/recurse.t 2002-11-09 12:32:34.000000000 -0800 @@ -1,32 +1,31 @@ #!./perl - -# $Id: recurse.t,v 1.0.1.3 2001/02/17 12:28:33 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: recurse.t,v $ -# Revision 1.0.1.3 2001/02/17 12:28:33 ram -# patch8: ensure blessing occurs ASAP, specially designed for hooks -# -# Revision 1.0.1.2 2000/11/05 17:22:05 ram -# patch6: stress hook a little more with refs to lexicals -# -# Revision 1.0.1.1 2000/09/17 16:48:05 ram -# patch1: added test case for store hook bug -# -# Revision 1.0 2000/09/01 19:40:42 ram -# Baseline for first official release. -# -require 't/dump.pl'; +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib', '../ext/Storable/t'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + require 'st-dump.pl'; +} + sub ok; use Storable qw(freeze thaw dclone); -print "1..32\n"; +print "1..33\n"; package OBJ_REAL; @@ -141,7 +140,7 @@ ok 1, 1; my $y = thaw $x; -ok 2, 1; +ok 2, ref $y eq 'OBJ_REAL'; ok 3, $y->[0] eq 'a'; ok 4, $y->[1] == 1; @@ -279,9 +278,43 @@ sub set_c2 { $_[0]->{c2} = $_[1] } +# +# Is the reference count of the extra references returned from a +# STORABLE_freeze hook correct? [ID 20020601.005] +# +package Foo2; + +sub new { + my $self = bless {}, $_[0]; + $self->{freezed} = "$self"; + return $self; +} + +sub DESTROY { + my $self = shift; + $::refcount_ok = 1 unless "$self" eq $self->{freezed}; +} + +package Foo3; + +sub new { + bless {}, $_[0]; +} + +sub STORABLE_freeze { + my $obj = shift; + return ("", $obj, Foo2->new); +} + +sub STORABLE_thaw { } # Not really used + package main; +use vars qw($refcount_ok); my $o = CLASS_OTHER->make(); my $c2 = CLASS_2->make($o); my $so = thaw freeze $o; +$refcount_ok = 0; +thaw freeze(Foo3->new); +ok 33, $refcount_ok == 1; Added: trunk/orca/packages/Storable-2.05/t/code.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/code.t (original) +++ trunk/orca/packages/Storable-2.05/t/code.t 2002-11-09 12:32:35.000000000 -0800 @@ -0,0 +1,272 @@ +#!./perl +# +# Copyright (c) 2002 Slaven Rezic +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} + +use strict; +BEGIN { + if (!eval q{ + use Test; + use B::Deparse 0.61; + use 5.6.0; + 1; + }) { + print "1..0 # skip: tests only work with B::Deparse 0.61 and at least perl 5.6.0\n"; + exit; + } + require File::Spec; + if ($File::Spec::VERSION < 0.8) { + print "1..0 # Skip: newer File::Spec needed\n"; + exit 0; + } +} + +BEGIN { plan tests => 47 } + +use Storable qw(retrieve store nstore freeze nfreeze thaw dclone); +use Safe; + +#$Storable::DEBUGME = 1; + +use vars qw($freezed $thawed @obj @res $blessed_code); + +sub code { "JAPH" } +$blessed_code = bless sub { "blessed" }, "Some::Package"; +{ package Another::Package; sub foo { __PACKAGE__ } } + + at obj = + ([\&code, # code reference + sub { 6*7 }, + $blessed_code, # blessed code reference + \&Another::Package::foo, # code in another package + sub ($$;$) { 0 }, # prototypes + sub { print "test\n" }, + \&Test::ok, # large scalar + ], + + {"a" => sub { "srt" }, "b" => \&code}, + + sub { ord("a")-ord("7") }, + + \&code, + + \&dclone, # XS function + + sub { open FOO, "/" }, + ); + +$Storable::Deparse = 1; +$Storable::Eval = 1; + +###################################################################### +# Test freeze & thaw + +$freezed = freeze $obj[0]; +$thawed = thaw $freezed; + +ok($thawed->[0]->(), "JAPH"); +ok($thawed->[1]->(), 42); +ok($thawed->[2]->(), "blessed"); +ok($thawed->[3]->(), "Another::Package"); +ok(prototype($thawed->[4]), prototype($obj[0]->[4])); + +###################################################################### + +$freezed = freeze $obj[1]; +$thawed = thaw $freezed; + +ok($thawed->{"a"}->(), "srt"); +ok($thawed->{"b"}->(), "JAPH"); + +###################################################################### + +$freezed = freeze $obj[2]; +$thawed = thaw $freezed; + +ok($thawed->(), 42); + +###################################################################### + +$freezed = freeze $obj[3]; +$thawed = thaw $freezed; + +ok($thawed->(), "JAPH"); + +###################################################################### + +eval { $freezed = freeze $obj[4] }; +ok($@ =~ /The result of B::Deparse::coderef2text was empty/); + +###################################################################### +# Test dclone + +my $new_sub = dclone($obj[2]); +ok($new_sub->(), $obj[2]->()); + +###################################################################### +# Test retrieve & store + +store $obj[0], 'store'; +$thawed = retrieve 'store'; + +ok($thawed->[0]->(), "JAPH"); +ok($thawed->[1]->(), 42); +ok($thawed->[2]->(), "blessed"); +ok($thawed->[3]->(), "Another::Package"); +ok(prototype($thawed->[4]), prototype($obj[0]->[4])); + +###################################################################### + +nstore $obj[0], 'store'; +$thawed = retrieve 'store'; +unlink 'store'; + +ok($thawed->[0]->(), "JAPH"); +ok($thawed->[1]->(), 42); +ok($thawed->[2]->(), "blessed"); +ok($thawed->[3]->(), "Another::Package"); +ok(prototype($thawed->[4]), prototype($obj[0]->[4])); + +###################################################################### +# Security with +# $Storable::Eval +# $Storable::Deparse + +{ + local $Storable::Eval = 0; + + for my $i (0 .. 1) { + $freezed = freeze $obj[$i]; + $@ = ""; + eval { $thawed = thaw $freezed }; + ok($@ =~ /Can\'t eval/); + } +} + +{ + + local $Storable::Deparse = 0; + for my $i (0 .. 1) { + $@ = ""; + eval { $freezed = freeze $obj[$i] }; + ok($@ =~ /Can\'t store CODE items/); + } +} + +{ + local $Storable::Eval = 0; + local $Storable::forgive_me = 1; + for my $i (0 .. 4) { + $freezed = freeze $obj[0]->[$i]; + $@ = ""; + eval { $thawed = thaw $freezed }; + ok($@, ""); + ok($$thawed =~ /^sub/); + } +} + +{ + local $Storable::Deparse = 0; + local $Storable::forgive_me = 1; + + my $devnull = File::Spec->devnull; + + open(SAVEERR, ">&STDERR"); + open(STDERR, ">$devnull") or + ( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) ); + + eval { $freezed = freeze $obj[0]->[0] }; + + open(STDERR, ">&SAVEERR"); + + ok($@, ""); + ok($freezed ne ''); +} + +{ + my $safe = new Safe; + $safe->permit(qw(:default require)); + local $Storable::Eval = sub { $safe->reval(shift) }; + + for my $def ([0 => "JAPH", + 1 => 42, + ] + ) { + my($i, $res) = @$def; + $freezed = freeze $obj[0]->[$i]; + $@ = ""; + eval { $thawed = thaw $freezed }; + ok($@, ""); + ok($thawed->(), $res); + } + + $freezed = freeze $obj[0]->[6]; + eval { $thawed = thaw $freezed }; + ok($@ =~ /trapped/); + + if (0) { + # Disable or fix this test if the internal representation of Storable + # changes. + skip("no malicious storable file check", 1); + } else { + # Construct malicious storable code + $freezed = nfreeze $obj[0]->[0]; + my $bad_code = ';open FOO, "/badfile"'; + # 5th byte is (short) length of scalar + my $len = ord(substr($freezed, 4, 1)); + substr($freezed, 4, 1, chr($len+length($bad_code))); + substr($freezed, -1, 0, $bad_code); + $@ = ""; + eval { $thawed = thaw $freezed }; + ok($@ =~ /trapped/); + } +} + +{ + { + package MySafe; + sub new { bless {}, shift } + sub reval { + my $source = $_[1]; + # Here you can apply some nifty regexpes to ensure the + # safeness of the source code. + my $coderef = eval $source; + $coderef; + } + } + + my $safe = new MySafe; + local $Storable::Eval = sub { $safe->reval($_[0]) }; + + $freezed = freeze $obj[0]; + eval { $thawed = thaw $freezed }; + ok($@, ""); + + if ($@ ne "") { + ok(0) for (1..5); + } else { + ok($thawed->[0]->(), "JAPH"); + ok($thawed->[1]->(), 42); + ok($thawed->[2]->(), "blessed"); + ok($thawed->[3]->(), "Another::Package"); + ok(prototype($thawed->[4]), prototype($obj[0]->[4])); + } +} + Added: trunk/orca/packages/Storable-2.05/t/downgrade.t ============================================================================== --- trunk/orca/packages/Storable-2.05/t/downgrade.t (original) +++ trunk/orca/packages/Storable-2.05/t/downgrade.t 2002-11-09 12:32:35.000000000 -0800 @@ -0,0 +1,510 @@ +#!./perl -w +# +# Copyright 2002, Larry Wall. +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +# I ought to keep this test easily backwards compatible to 5.004, so no +# qr//; + +# This test checks downgrade behaviour on pre-5.8 perls when new 5.8 features +# are encountered. + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} + +use Test::More; +use Storable 'thaw'; + +use strict; +use vars qw(@RESTRICT_TESTS %R_HASH %U_HASH $UTF8_CROAK $RESTRICTED_CROAK); + + at RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder', + 'Locked keys', 'Locked keys placeholder', + ); +%R_HASH = (perl => 'rules'); + +if ($] > 5.007002) { + # This is cheating. "\xdf" in Latin 1 is beta S, so will match \w if it + # is stored in utf8, not bytes. + # "\xdf" is y diaresis in EBCDIC (except for cp875, but so far no-one seems + # to use that) which has exactly the same properties for \w + # So the tests happen to pass. + my $utf8 = "Schlo\xdf" . chr 256; + chop $utf8; + + # \xe5 is V in EBCDIC. That doesn't have the same properties w.r.t. \w as + # an a circumflex, so we need to be explicit. + + # and its these very properties we're trying to test - an edge case + # involving whether scalars are being stored in bytes or in utf8. + my $a_circumflex = (ord ('A') == 193 ? "\x47" : "\xe5"); + %U_HASH = (map {$_, $_} 'castle', "ch${a_circumflex}teau", $utf8, chr 0x57CE); + plan tests => 169; +} elsif ($] >= 5.006) { + plan tests => 59; +} else { + plan tests => 67; +} + +$UTF8_CROAK = qr/^Cannot retrieve UTF8 data in non-UTF8 perl/; +$RESTRICTED_CROAK = qr/^Cannot retrieve restricted hash/; + +my %tests; +{ + local $/ = "\n\nend\n"; + while () { + next unless /\S/s; + unless (/begin ([0-7]{3}) ([^\n]*)\n(.*)$/s) { + s/\n.*//s; + warn "Dodgy data in section starting '$_'"; + next; + } + next unless oct $1 == ord 'A'; # Skip ASCII on EBCDIC, and vice versa + my $data = unpack 'u', $3; + $tests{$2} = $data; + } +} + +# use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper \%tests; +sub thaw_hash { + my ($name, $expected) = @_; + my $hash = eval {thaw $tests{$name}}; + is ($@, '', "Thawed $name without error?"); + isa_ok ($hash, 'HASH'); + ok (defined $hash && eq_hash($hash, $expected), + "And it is the hash we expected?"); + $hash; +} + +sub thaw_scalar { + my ($name, $expected, $bug) = @_; + my $scalar = eval {thaw $tests{$name}}; + is ($@, '', "Thawed $name without error?"); + isa_ok ($scalar, 'SCALAR', "Thawed $name?"); + if ($bug and $] == 5.006) { + # Aargh. 5.6.0's harness doesn't even honour + # TODO tests. + warn "# Test skipped because eq is buggy for certain Unicode cases in 5.6.0"; + warn "# Please upgrade to 5.6.1\n"; + ok ("I'd really like to fail this test on 5.6.0 but I'm told that CPAN auto-dependancies mess up, and certain vendors only ship 5.6.0. Get your vendor to ugrade. Else upgrade your vendor."); + # One such vendor being the folks who brought you LONG_MIN as a positive + # integer. + } else { + is ($$scalar, $expected, "And it is the data we expected?"); + } + $scalar; +} + +sub thaw_fail { + my ($name, $expected) = @_; + my $thing = eval {thaw $tests{$name}}; + is ($thing, undef, "Thawed $name failed as expected?"); + like ($@, $expected, "Error as predicted?"); +} + +sub test_locked_hash { + my $hash = shift; + my @keys = keys %$hash; + my ($key, $value) = each %$hash; + eval {$hash->{$key} = reverse $value}; + like( $@, qr/^Modification of a read-only value attempted/, + 'trying to change a locked key' ); + is ($hash->{$key}, $value, "hash should not change?"); + eval {$hash->{use} = 'perl'}; + like( $@, qr/^Attempt to access disallowed key 'use' in a restricted hash/, + 'trying to add another key' ); + ok (eq_array([keys %$hash], \@keys), "Still the same keys?"); +} + +sub test_restricted_hash { + my $hash = shift; + my @keys = keys %$hash; + my ($key, $value) = each %$hash; + eval {$hash->{$key} = reverse $value}; + is( $@, '', + 'trying to change a restricted key' ); + is ($hash->{$key}, reverse ($value), "hash should change"); + eval {$hash->{use} = 'perl'}; + like( $@, qr/^Attempt to access disallowed key 'use' in a restricted hash/, + 'trying to add another key' ); + ok (eq_array([keys %$hash], \@keys), "Still the same keys?"); +} + +sub test_placeholder { + my $hash = shift; + eval {$hash->{rules} = 42}; + is ($@, '', 'No errors'); + is ($hash->{rules}, 42, "New value added"); +} + +sub test_newkey { + my $hash = shift; + eval {$hash->{nms} = "http://nms-cgi.sourceforge.net/"}; + is ($@, '', 'No errors'); + is ($hash->{nms}, "http://nms-cgi.sourceforge.net/", "New value added"); +} + +# $Storable::DEBUGME = 1; +thaw_hash ('Hash with utf8 flag but no utf8 keys', \%R_HASH); + +if (eval "use Hash::Util; 1") { + print "# We have Hash::Util, so test that the restricted hashes in are valid\n"; + for $Storable::downgrade_restricted (0, 1, undef, "cheese") { + my $hash = thaw_hash ('Locked hash', \%R_HASH); + test_locked_hash ($hash); + $hash = thaw_hash ('Locked hash placeholder', \%R_HASH); + test_locked_hash ($hash); + test_placeholder ($hash); + + $hash = thaw_hash ('Locked keys', \%R_HASH); + test_restricted_hash ($hash); + $hash = thaw_hash ('Locked keys placeholder', \%R_HASH); + test_restricted_hash ($hash); + test_placeholder ($hash); + } +} else { + print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n"; + my $hash = thaw_hash ('Locked hash', \%R_HASH); + test_newkey ($hash); + $hash = thaw_hash ('Locked hash placeholder', \%R_HASH); + test_newkey ($hash); + $hash = thaw_hash ('Locked keys', \%R_HASH); + test_newkey ($hash); + $hash = thaw_hash ('Locked keys placeholder', \%R_HASH); + test_newkey ($hash); + local $Storable::downgrade_restricted = 0; + thaw_fail ('Locked hash', $RESTRICTED_CROAK); + thaw_fail ('Locked hash placeholder', $RESTRICTED_CROAK); + thaw_fail ('Locked keys', $RESTRICTED_CROAK); + thaw_fail ('Locked keys placeholder', $RESTRICTED_CROAK); +} + +if ($] >= 5.006) { + print "# We have utf8 scalars, so test that the utf8 scalars in are valid\n"; + thaw_scalar ('Short 8 bit utf8 data', "\xDF", 1); + thaw_scalar ('Long 8 bit utf8 data', "\xDF" x 256, 1); + thaw_scalar ('Short 24 bit utf8 data', chr 0xC0FFEE); + thaw_scalar ('Long 24 bit utf8 data', chr (0xC0FFEE) x 256); +} else { + print "# We don't have utf8 scalars, so test that the utf8 scalars downgrade\n"; + thaw_fail ('Short 8 bit utf8 data', $UTF8_CROAK); + thaw_fail ('Long 8 bit utf8 data', $UTF8_CROAK); + thaw_fail ('Short 24 bit utf8 data', $UTF8_CROAK); + thaw_fail ('Long 24 bit utf8 data', $UTF8_CROAK); + local $Storable::drop_utf8 = 1; + my $bytes = thaw $tests{'Short 8 bit utf8 data as bytes'}; + thaw_scalar ('Short 8 bit utf8 data', $$bytes); + thaw_scalar ('Long 8 bit utf8 data', $$bytes x 256); + $bytes = thaw $tests{'Short 24 bit utf8 data as bytes'}; + thaw_scalar ('Short 24 bit utf8 data', $$bytes); + thaw_scalar ('Long 24 bit utf8 data', $$bytes x 256); +} + +if ($] > 5.007002) { + print "# We have utf8 hashes, so test that the utf8 hashes in are valid\n"; + my $hash = thaw_hash ('Hash with utf8 keys', \%U_HASH); + for (keys %$hash) { + my $l = 0 + /^\w+$/; + my $r = 0 + $hash->{$_} =~ /^\w+$/; + cmp_ok ($l, '==', $r, sprintf "key length %d", length $_); + cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1); + } + if (eval "use Hash::Util; 1") { + print "# We have Hash::Util, so test that the restricted utf8 hash is valid\n"; + my $hash = thaw_hash ('Locked hash with utf8 keys', \%U_HASH); + for (keys %$hash) { + my $l = 0 + /^\w+$/; + my $r = 0 + $hash->{$_} =~ /^\w+$/; + cmp_ok ($l, '==', $r, sprintf "key length %d", length $_); + cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1); + } + test_locked_hash ($hash); + } else { + print "# We don't have Hash::Util, so test that the utf8 hash downgrades\n"; + fail ("You can't get here [perl version $]]. This is a bug in the test. +# Please send the output of perl -V to perlbug\@perl.org"); + } +} else { + print "# We don't have utf8 hashes, so test that the utf8 hashes downgrade\n"; + thaw_fail ('Hash with utf8 keys', $UTF8_CROAK); + thaw_fail ('Locked hash with utf8 keys', $UTF8_CROAK); + local $Storable::drop_utf8 = 1; + my $what = $] < 5.006 ? 'pre 5.6' : '5.6'; + my $expect = thaw $tests{"Hash with utf8 keys for $what"}; + thaw_hash ('Hash with utf8 keys', $expect); + #foreach (keys %$expect) { print "'$_':\t'$expect->{$_}'\n"; } + #foreach (keys %$got) { print "'$_':\t'$got->{$_}'\n"; } + if (eval "use Hash::Util; 1") { + print "# We have Hash::Util, so test that the restricted hashes in are valid\n"; + fail ("You can't get here [perl version $]]. This is a bug in the test. +# Please send the output of perl -V to perlbug\@perl.org"); + } else { + print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n"; + my $hash = thaw_hash ('Locked hash with utf8 keys', $expect); + test_newkey ($hash); + local $Storable::downgrade_restricted = 0; + thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK); + # Which croak comes first is a bit of an implementation issue :-) + local $Storable::drop_utf8 = 0; + thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK); + } +} +__END__ +# A whole run of 2.x nfreeze data, uuencoded. The "mode bits" are the octal +# value of 'A', the "file name" is the test name. Use make_downgrade.pl to +# generate these. +begin 101 Locked hash +8!049`0````$*!7)U;&5S!`````1P97)L + +end + +begin 101 Locked hash placeholder +C!049`0````(*!7)U;&5S!`````1P97)L#A0````%%F9,` + +end + +begin 301 Locked keys +8!049`0````$*!9FDDX6B``````27A9F3 + +end + +begin 301 Locked keys placeholder +C!049`0````(.%`````69I).%H at H%F:23A:(`````!)>%F9,` + +end + +begin 301 Short 8 bit utf8 data +&!047`HMS + +end + +begin 301 Short 8 bit utf8 data as bytes +&!04*`HMS + +end + +begin 301 Long 8 bit utf8 data +M!048```"`(MSBW.+#B$>CA8&D``````>#B$>C +FA8&D%P?B at XB3EHMS`@````;B at XB3EM\7!-QD @@ -58,10 +13,17 @@ #include /* Perl's one, needed since 5.6 */ #include +#ifndef NETWARE #if 0 #define DEBUGME /* Debug mode, turns assertions on as well */ #define DASSERT /* Assertion mode */ #endif +#else /* NETWARE */ +#if 0 /* On NetWare USE_PERLIO is not used */ +#define DEBUGME /* Debug mode, turns assertions on as well */ +#define DASSERT /* Assertion mode */ +#endif +#endif /* * Pre PerlIO time when none of USE_PERLIO and PERLIO_IS_STDIO is defined @@ -133,22 +95,24 @@ * TRACEME() will only output things when the $Storable::DEBUGME is true. */ -#define TRACEME(x) do { \ +#define TRACEME(x) \ + STMT_START { \ if (SvTRUE(perl_get_sv("Storable::DEBUGME", TRUE))) \ - { PerlIO_stdoutf x; PerlIO_stdoutf("\n"); } \ -} while (0) + { PerlIO_stdoutf x; PerlIO_stdoutf("\n"); } \ + } STMT_END #else #define TRACEME(x) #endif /* DEBUGME */ #ifdef DASSERT -#define ASSERT(x,y) do { \ +#define ASSERT(x,y) \ + STMT_START { \ if (!(x)) { \ PerlIO_stdoutf("ASSERT FAILED (\"%s\", line %d): ", \ __FILE__, __LINE__); \ PerlIO_stdoutf y; PerlIO_stdoutf("\n"); \ } \ -} while (0) + } STMT_END #else #define ASSERT(x,y) #endif @@ -170,9 +134,9 @@ #define SX_BYTE C(8) /* (signed) byte forthcoming */ #define SX_NETINT C(9) /* Integer in network order forthcoming */ #define SX_SCALAR C(10) /* Scalar (binary, small) follows (length, data) */ -#define SX_TIED_ARRAY C(11) /* Tied array forthcoming */ -#define SX_TIED_HASH C(12) /* Tied hash forthcoming */ -#define SX_TIED_SCALAR C(13) /* Tied scalar forthcoming */ +#define SX_TIED_ARRAY C(11) /* Tied array forthcoming */ +#define SX_TIED_HASH C(12) /* Tied hash forthcoming */ +#define SX_TIED_SCALAR C(13) /* Tied scalar forthcoming */ #define SX_SV_UNDEF C(14) /* Perl's immortal PL_sv_undef */ #define SX_SV_YES C(15) /* Perl's immortal PL_sv_yes */ #define SX_SV_NO C(16) /* Perl's immortal PL_sv_no */ @@ -180,19 +144,21 @@ #define SX_IX_BLESS C(18) /* Object is blessed, classname given by index */ #define SX_HOOK C(19) /* Stored via hook, user-defined */ #define SX_OVERLOAD C(20) /* Overloaded reference */ -#define SX_TIED_KEY C(21) /* Tied magic key forthcoming */ -#define SX_TIED_IDX C(22) /* Tied magic index forthcoming */ -#define SX_UTF8STR C(23) /* UTF-8 string forthcoming (small) */ -#define SX_LUTF8STR C(24) /* UTF-8 string forthcoming (large) */ -#define SX_ERROR C(25) /* Error */ +#define SX_TIED_KEY C(21) /* Tied magic key forthcoming */ +#define SX_TIED_IDX C(22) /* Tied magic index forthcoming */ +#define SX_UTF8STR C(23) /* UTF-8 string forthcoming (small) */ +#define SX_LUTF8STR C(24) /* UTF-8 string forthcoming (large) */ +#define SX_FLAG_HASH C(25) /* Hash with flags forthcoming (size, flags, key/flags/value triplet list) */ +#define SX_CODE C(26) /* Code references as perl source code */ +#define SX_ERROR C(27) /* Error */ /* * Those are only used to retrieve "old" pre-0.6 binary images. */ #define SX_ITEM 'i' /* An array item introducer */ #define SX_IT_UNDEF 'I' /* Undefined array item */ -#define SX_KEY 'k' /* An hash key introducer */ -#define SX_VALUE 'v' /* An hash value introducer */ +#define SX_KEY 'k' /* A hash key introducer */ +#define SX_VALUE 'v' /* A hash value introducer */ #define SX_VL_UNDEF 'V' /* Undefined hash value */ /* @@ -200,7 +166,7 @@ */ #define SX_CLASS 'b' /* Object is blessed, class name length <255 */ -#define SX_LG_CLASS 'B' /* Object is blessed, class name length >255 */ +#define SX_LG_CLASS 'B' /* Object is blessed, class name length >255 */ #define SX_STORED 'X' /* End of object */ /* @@ -238,7 +204,7 @@ /* * At store time: - * An hash table records the objects which have already been stored. + * A hash table records the objects which have already been stored. * Those are referred to as SX_OBJECT in the file, and their "tag" (i.e. * an arbitrary sequence number) is used to identify them. * @@ -271,6 +237,39 @@ #define MY_VERSION "Storable(" XS_VERSION ")" + +/* + * Conditional UTF8 support. + * + */ +#ifdef SvUTF8_on +#define STORE_UTF8STR(pv, len) STORE_PV_LEN(pv, len, SX_UTF8STR, SX_LUTF8STR) +#define HAS_UTF8_SCALARS +#ifdef HeKUTF8 +#define HAS_UTF8_HASHES +#define HAS_UTF8_ALL +#else +/* 5.6 perl has utf8 scalars but not hashes */ +#endif +#else +#define SvUTF8(sv) 0 +#define STORE_UTF8STR(pv, len) CROAK(("panic: storing UTF8 in non-UTF8 perl")) +#endif +#ifndef HAS_UTF8_ALL +#define UTF8_CROAK() CROAK(("Cannot retrieve UTF8 data in non-UTF8 perl")) +#endif + +#ifdef HvPLACEHOLDERS +#define HAS_RESTRICTED_HASHES +#else +#define HVhek_PLACEHOLD 0x200 +#define RESTRICTED_HASH_CROAK() CROAK(("Cannot retrieve restricted hash")) +#endif + +#ifdef HvHASKFLAGS +#define HAS_HASH_KEY_FLAGS +#endif + /* * Fields s_tainted and s_dirty are prefixed with s_ because Perl's include * files remap tainted and dirty when threading is enabled. That's bad for @@ -291,7 +290,16 @@ int netorder; /* true if network order used */ int s_tainted; /* true if input source is tainted, at retrieve time */ int forgive_me; /* whether to be forgiving... */ + int deparse; /* whether to deparse code refs */ + SV *eval; /* whether to eval source code */ int canonical; /* whether to store hashes sorted by key */ +#ifndef HAS_RESTRICTED_HASHES + int derestrict; /* whether to downgrade restrcted hashes */ +#endif +#ifndef HAS_UTF8_ALL + int use_bytes; /* whether to bytes-ify utf8 */ +#endif + int accept_future_minor; /* croak immediately on future minor versions? */ int s_dirty; /* context is dirty due to CROAK() -- can be cleaned */ int membuf_ro; /* true means membuf is read-only and msaved is rw */ struct extendable keybuf; /* for hash key retrieval */ @@ -301,9 +309,20 @@ int ver_major; /* major of version for retrieved object */ int ver_minor; /* minor of version for retrieved object */ SV *(**retrieve_vtbl)(); /* retrieve dispatch table */ - struct stcxt *prev; /* contexts chained backwards in real recursion */ + SV *prev; /* contexts chained backwards in real recursion */ + SV *my_sv; /* the blessed scalar who's SvPVX() I am */ } stcxt_t; +#define NEW_STORABLE_CXT_OBJ(cxt) \ + STMT_START { \ + SV *self = newSV(sizeof(stcxt_t) - 1); \ + SV *my_sv = newRV_noinc(self); \ + sv_bless(my_sv, gv_stashpv("Storable::Cxt", TRUE)); \ + cxt = (stcxt_t *)SvPVX(self); \ + Zero(cxt, 1, stcxt_t); \ + cxt->my_sv = my_sv; \ + } STMT_END + #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || defined(PERL_CAPI) #if (PATCHLEVEL <= 4) && (SUBVERSION < 68) @@ -316,29 +335,33 @@ #endif /* < perl5.004_68 */ #define dSTCXT_PTR(T,name) \ - T name = (perinterp_sv && SvIOK(perinterp_sv) \ - ? INT2PTR(T, SvIVX(perinterp_sv)) : (T) 0) + T name = ((perinterp_sv && SvIOK(perinterp_sv) && SvIVX(perinterp_sv) \ + ? (T)SvPVX(SvRV(INT2PTR(SV*,SvIVX(perinterp_sv)))) : (T) 0)) #define dSTCXT \ dSTCXT_SV; \ dSTCXT_PTR(stcxt_t *, cxt) -#define INIT_STCXT \ - dSTCXT; \ - Newz(0, cxt, 1, stcxt_t); \ - sv_setiv(perinterp_sv, PTR2IV(cxt)) +#define INIT_STCXT \ + dSTCXT; \ + NEW_STORABLE_CXT_OBJ(cxt); \ + sv_setiv(perinterp_sv, PTR2IV(cxt->my_sv)) -#define SET_STCXT(x) do { \ +#define SET_STCXT(x) \ + STMT_START { \ dSTCXT_SV; \ - sv_setiv(perinterp_sv, PTR2IV(x)); \ -} while (0) + sv_setiv(perinterp_sv, PTR2IV(x->my_sv)); \ + } STMT_END #else /* !MULTIPLICITY && !PERL_OBJECT && !PERL_CAPI */ -static stcxt_t Context; -static stcxt_t *Context_ptr = &Context; +static stcxt_t *Context_ptr = NULL; #define dSTCXT stcxt_t *cxt = Context_ptr -#define INIT_STCXT dSTCXT -#define SET_STCXT(x) Context_ptr = x +#define SET_STCXT(x) Context_ptr = x +#define INIT_STCXT \ + dSTCXT; \ + NEW_STORABLE_CXT_OBJ(cxt); \ + SET_STCXT(cxt) + #endif /* MULTIPLICITY || PERL_OBJECT || PERL_CAPI */ @@ -359,7 +382,7 @@ * but the topmost context stacked. */ -#define CROAK(x) do { cxt->s_dirty = 1; croak x; } while (0) +#define CROAK(x) STMT_START { cxt->s_dirty = 1; croak x; } STMT_END /* * End of "thread-safe" related definitions. @@ -401,20 +424,22 @@ */ #define kbuf (cxt->keybuf).arena #define ksiz (cxt->keybuf).asiz -#define KBUFINIT() do { \ +#define KBUFINIT() \ + STMT_START { \ if (!kbuf) { \ TRACEME(("** allocating kbuf of 128 bytes")); \ New(10003, kbuf, 128, char); \ ksiz = 128; \ } \ -} while (0) -#define KBUFCHK(x) do { \ + } STMT_END +#define KBUFCHK(x) \ + STMT_START { \ if (x >= ksiz) { \ TRACEME(("** extending kbuf to %d bytes (had %d)", x+1, ksiz)); \ Renew(kbuf, x+1, char); \ ksiz = x+1; \ } \ -} while (0) + } STMT_END /* * memory buffer handling @@ -434,7 +459,8 @@ #define int_aligned(x) \ ((unsigned long) (x) == trunc_int(x)) -#define MBUF_INIT(x) do { \ +#define MBUF_INIT(x) \ + STMT_START { \ if (!mbase) { \ TRACEME(("** allocating mbase of %d bytes", MGROW)); \ New(10003, mbase, MGROW, char); \ @@ -445,7 +471,7 @@ mend = mbase + x; \ else \ mend = mbase + msiz; \ -} while (0) + } STMT_END #define MBUF_TRUNC(x) mptr = mbase + x #define MBUF_SIZE() (mptr - mbase) @@ -458,34 +484,38 @@ * buffer into cxt->msaved, before MBUF_LOAD() can be used to retrieve * data from a string. */ -#define MBUF_SAVE_AND_LOAD(in) do { \ +#define MBUF_SAVE_AND_LOAD(in) \ + STMT_START { \ ASSERT(!cxt->membuf_ro, ("mbase not already saved")); \ cxt->membuf_ro = 1; \ TRACEME(("saving mbuf")); \ StructCopy(&cxt->membuf, &cxt->msaved, struct extendable); \ MBUF_LOAD(in); \ -} while (0) + } STMT_END -#define MBUF_RESTORE() do { \ +#define MBUF_RESTORE() \ + STMT_START { \ ASSERT(cxt->membuf_ro, ("mbase is read-only")); \ cxt->membuf_ro = 0; \ TRACEME(("restoring mbuf")); \ StructCopy(&cxt->msaved, &cxt->membuf, struct extendable); \ -} while (0) + } STMT_END /* * Use SvPOKp(), because SvPOK() fails on tainted scalars. * See store_scalar() for other usage of this workaround. */ -#define MBUF_LOAD(v) do { \ +#define MBUF_LOAD(v) \ + STMT_START { \ ASSERT(cxt->membuf_ro, ("mbase is read-only")); \ if (!SvPOKp(v)) \ CROAK(("Not a scalar string")); \ mptr = mbase = SvPV(v, msiz); \ mend = mbase + msiz; \ -} while (0) + } STMT_END -#define MBUF_XTEND(x) do { \ +#define MBUF_XTEND(x) \ + STMT_START { \ int nsz = (int) round_mgrow((x)+msiz); \ int offset = mptr - mbase; \ ASSERT(!cxt->membuf_ro, ("mbase is not read-only")); \ @@ -495,31 +525,35 @@ msiz = nsz; \ mptr = mbase + offset; \ mend = mbase + nsz; \ -} while (0) + } STMT_END -#define MBUF_CHK(x) do { \ +#define MBUF_CHK(x) \ + STMT_START { \ if ((mptr + (x)) > mend) \ MBUF_XTEND(x); \ -} while (0) + } STMT_END -#define MBUF_GETC(x) do { \ +#define MBUF_GETC(x) \ + STMT_START { \ if (mptr < mend) \ x = (int) (unsigned char) *mptr++; \ else \ return (SV *) 0; \ -} while (0) + } STMT_END #ifdef CRAY_HACK -#define MBUF_GETINT(x) do { \ +#define MBUF_GETINT(x) \ + STMT_START { \ oC(x); \ if ((mptr + 4) <= mend) { \ memcpy(oI(&x), mptr, 4); \ mptr += 4; \ } else \ return (SV *) 0; \ -} while (0) + } STMT_END #else -#define MBUF_GETINT(x) do { \ +#define MBUF_GETINT(x) \ + STMT_START { \ if ((mptr + sizeof(int)) <= mend) { \ if (int_aligned(mptr)) \ x = *(int *) mptr; \ @@ -528,18 +562,20 @@ mptr += sizeof(int); \ } else \ return (SV *) 0; \ -} while (0) + } STMT_END #endif -#define MBUF_READ(x,s) do { \ +#define MBUF_READ(x,s) \ + STMT_START { \ if ((mptr + (s)) <= mend) { \ memcpy(x, mptr, s); \ mptr += s; \ } else \ return (SV *) 0; \ -} while (0) + } STMT_END -#define MBUF_SAFEREAD(x,s,z) do { \ +#define MBUF_SAFEREAD(x,s,z) \ + STMT_START { \ if ((mptr + (s)) <= mend) { \ memcpy(x, mptr, s); \ mptr += s; \ @@ -547,39 +583,43 @@ sv_free(z); \ return (SV *) 0; \ } \ -} while (0) + } STMT_END -#define MBUF_PUTC(c) do { \ +#define MBUF_PUTC(c) \ + STMT_START { \ if (mptr < mend) \ *mptr++ = (char) c; \ else { \ MBUF_XTEND(1); \ *mptr++ = (char) c; \ } \ -} while (0) + } STMT_END #ifdef CRAY_HACK -#define MBUF_PUTINT(i) do { \ +#define MBUF_PUTINT(i) \ + STMT_START { \ MBUF_CHK(4); \ memcpy(mptr, oI(&i), 4); \ mptr += 4; \ -} while (0) + } STMT_END #else -#define MBUF_PUTINT(i) do { \ +#define MBUF_PUTINT(i) \ + STMT_START { \ MBUF_CHK(sizeof(int)); \ if (int_aligned(mptr)) \ *(int *) mptr = i; \ else \ memcpy(mptr, &i, sizeof(int)); \ mptr += sizeof(int); \ -} while (0) + } STMT_END #endif -#define MBUF_WRITE(x,s) do { \ +#define MBUF_WRITE(x,s) \ + STMT_START { \ MBUF_CHK(s); \ memcpy(mptr, x, s); \ mptr += s; \ -} while (0) + } STMT_END /* * Possible return values for sv_type(). @@ -591,7 +631,8 @@ #define svis_HASH 3 #define svis_TIED 4 #define svis_TIED_ITEM 5 -#define svis_OTHER 6 +#define svis_CODE 6 +#define svis_OTHER 7 /* * Flags for SX_HOOK. @@ -623,6 +664,22 @@ #define SHT_THASH 6 /* 4 + 2 -- tied hash */ /* + * per hash flags for flagged hashes + */ + +#define SHV_RESTRICTED 0x01 + +/* + * per key flags for flagged hashes + */ + +#define SHV_K_UTF8 0x01 +#define SHV_K_WASUTF8 0x02 +#define SHV_K_LOCKED 0x04 +#define SHV_K_ISSV 0x08 +#define SHV_K_PLACEHOLDER 0x10 + +/* * Before 0.6, the magic string was "perl-store" (binary version number 0). * * Since 0.6 introduced many binary incompatibilities, the magic string has @@ -638,33 +695,112 @@ * a "minor" version, to better track this kind of evolution from now on. * */ -static char old_magicstr[] = "perl-store"; /* Magic number before 0.6 */ -static char magicstr[] = "pst0"; /* Used as a magic number */ +static const char old_magicstr[] = "perl-store"; /* Magic number before 0.6 */ +static const char magicstr[] = "pst0"; /* Used as a magic number */ + +#define MAGICSTR_BYTES 'p','s','t','0' +#define OLDMAGICSTR_BYTES 'p','e','r','l','-','s','t','o','r','e' + +/* 5.6.x introduced the ability to have IVs as long long. + However, Configure still defined BYTEORDER based on the size of a long. + Storable uses the BYTEORDER value as part of the header, but doesn't + explicity store sizeof(IV) anywhere in the header. Hence on 5.6.x built + with IV as long long on a platform that uses Configure (ie most things + except VMS and Windows) headers are identical for the different IV sizes, + despite the files containing some fields based on sizeof(IV) + Erk. Broken-ness. + 5.8 is consistent - the following redifinition kludge is only needed on + 5.6.x, but the interwork is needed on 5.8 while data survives in files + with the 5.6 header. + +*/ + +#if defined (IVSIZE) && (IVSIZE == 8) && (LONGSIZE == 4) +#ifndef NO_56_INTERWORK_KLUDGE +#define USE_56_INTERWORK_KLUDGE +#endif +#if BYTEORDER == 0x1234 +#undef BYTEORDER +#define BYTEORDER 0x12345678 +#else +#if BYTEORDER == 0x4321 +#undef BYTEORDER +#define BYTEORDER 0x87654321 +#endif +#endif +#endif -#define STORABLE_BIN_MAJOR 2 /* Binary major "version" */ -#define STORABLE_BIN_MINOR 4 /* Binary minor "version" */ +#if BYTEORDER == 0x1234 +#define BYTEORDER_BYTES '1','2','3','4' +#else +#if BYTEORDER == 0x12345678 +#define BYTEORDER_BYTES '1','2','3','4','5','6','7','8' +#ifdef USE_56_INTERWORK_KLUDGE +#define BYTEORDER_BYTES_56 '1','2','3','4' +#endif +#else +#if BYTEORDER == 0x87654321 +#define BYTEORDER_BYTES '8','7','6','5','4','3','2','1' +#ifdef USE_56_INTERWORK_KLUDGE +#define BYTEORDER_BYTES_56 '4','3','2','1' +#endif +#else +#if BYTEORDER == 0x4321 +#define BYTEORDER_BYTES '4','3','2','1' +#else +#error Unknown byteoder. Please append your byteorder to Storable.xs +#endif +#endif +#endif +#endif + +static const char byteorderstr[] = {BYTEORDER_BYTES, 0}; +#ifdef USE_56_INTERWORK_KLUDGE +static const char byteorderstr_56[] = {BYTEORDER_BYTES_56, 0}; +#endif + +#define STORABLE_BIN_MAJOR 2 /* Binary major "version" */ +#define STORABLE_BIN_MINOR 6 /* Binary minor "version" */ + +/* If we aren't 5.7.3 or later, we won't be writing out files that use the + * new flagged hash introdued in 2.5, so put 2.4 in the binary header to + * maximise ease of interoperation with older Storables. + * Could we write 2.3s if we're on 5.005_03? NWC + */ +#if (PATCHLEVEL <= 6) +#define STORABLE_BIN_WRITE_MINOR 4 +#else +/* + * As of perl 5.7.3, utf8 hash key is introduced. + * So this must change -- dankogai +*/ +#define STORABLE_BIN_WRITE_MINOR 6 +#endif /* (PATCHLEVEL <= 6) */ /* * Useful store shortcuts... */ -#define PUTMARK(x) do { \ +#define PUTMARK(x) \ + STMT_START { \ if (!cxt->fio) \ MBUF_PUTC(x); \ else if (PerlIO_putc(cxt->fio, x) == EOF) \ return -1; \ -} while (0) + } STMT_END -#define WRITE_I32(x) do { \ +#define WRITE_I32(x) \ + STMT_START { \ ASSERT(sizeof(x) == sizeof(I32), ("writing an I32")); \ if (!cxt->fio) \ MBUF_PUTINT(x); \ else if (PerlIO_write(cxt->fio, oI(&x), oS(sizeof(x))) != oS(sizeof(x))) \ return -1; \ - } while (0) + } STMT_END #ifdef HAS_HTONL -#define WLEN(x) do { \ +#define WLEN(x) \ + STMT_START { \ if (cxt->netorder) { \ int y = (int) htonl(x); \ if (!cxt->fio) \ @@ -677,19 +813,21 @@ else if (PerlIO_write(cxt->fio,oI(&x),oS(sizeof(x))) != oS(sizeof(x))) \ return -1; \ } \ -} while (0) + } STMT_END #else #define WLEN(x) WRITE_I32(x) #endif -#define WRITE(x,y) do { \ +#define WRITE(x,y) \ + STMT_START { \ if (!cxt->fio) \ MBUF_WRITE(x,y); \ else if (PerlIO_write(cxt->fio, x, y) != y) \ return -1; \ - } while (0) + } STMT_END -#define STORE_PV_LEN(pv, len, small, large) do { \ +#define STORE_PV_LEN(pv, len, small, large) \ + STMT_START { \ if (len <= LG_SCALAR) { \ unsigned char clen = (unsigned char) len; \ PUTMARK(small); \ @@ -701,30 +839,18 @@ WLEN(len); \ WRITE(pv, len); \ } \ -} while (0) + } STMT_END #define STORE_SCALAR(pv, len) STORE_PV_LEN(pv, len, SX_SCALAR, SX_LSCALAR) /* - * Conditional UTF8 support. - * On non-UTF8 perls, UTF8 strings are returned as normal strings. - * - */ -#ifdef SvUTF8_on -#define STORE_UTF8STR(pv, len) STORE_PV_LEN(pv, len, SX_UTF8STR, SX_LUTF8STR) -#else -#define SvUTF8(sv) 0 -#define STORE_UTF8STR(pv, len) CROAK(("panic: storing UTF8 in non-UTF8 perl")) -#define SvUTF8_on(sv) CROAK(("Cannot retrieve UTF8 data in non-UTF8 perl")) -#endif - -/* * Store undef in arrays and hashes without recursing through store(). */ -#define STORE_UNDEF() do { \ +#define STORE_UNDEF() \ + STMT_START { \ cxt->tagnum++; \ PUTMARK(SX_UNDEF); \ -} while (0) + } STMT_END /* * Useful retrieve shortcuts... @@ -733,24 +859,27 @@ #define GETCHAR() \ (cxt->fio ? PerlIO_getc(cxt->fio) : (mptr >= mend ? EOF : (int) *mptr++)) -#define GETMARK(x) do { \ +#define GETMARK(x) \ + STMT_START { \ if (!cxt->fio) \ MBUF_GETC(x); \ else if ((int) (x = PerlIO_getc(cxt->fio)) == EOF) \ return (SV *) 0; \ -} while (0) + } STMT_END -#define READ_I32(x) do { \ +#define READ_I32(x) \ + STMT_START { \ ASSERT(sizeof(x) == sizeof(I32), ("reading an I32")); \ oC(x); \ if (!cxt->fio) \ MBUF_GETINT(x); \ else if (PerlIO_read(cxt->fio, oI(&x), oS(sizeof(x))) != oS(sizeof(x))) \ return (SV *) 0; \ -} while (0) + } STMT_END #ifdef HAS_NTOHL -#define RLEN(x) do { \ +#define RLEN(x) \ + STMT_START { \ oC(x); \ if (!cxt->fio) \ MBUF_GETINT(x); \ @@ -758,26 +887,28 @@ return (SV *) 0; \ if (cxt->netorder) \ x = (int) ntohl(x); \ -} while (0) + } STMT_END #else #define RLEN(x) READ_I32(x) #endif -#define READ(x,y) do { \ +#define READ(x,y) \ + STMT_START { \ if (!cxt->fio) \ MBUF_READ(x, y); \ else if (PerlIO_read(cxt->fio, x, y) != y) \ return (SV *) 0; \ -} while (0) + } STMT_END -#define SAFEREAD(x,y,z) do { \ +#define SAFEREAD(x,y,z) \ + STMT_START { \ if (!cxt->fio) \ MBUF_SAFEREAD(x,y,z); \ else if (PerlIO_read(cxt->fio, x, y) != y) { \ sv_free(z); \ return (SV *) 0; \ } \ -} while (0) + } STMT_END /* * This macro is used at retrieve time, to remember where object 'y', bearing a @@ -797,7 +928,8 @@ * recursively, and the first SEEN() call for which the class name is not NULL * will bless the object. */ -#define SEEN(y,c) do { \ +#define SEEN(y,c) \ + STMT_START { \ if (!y) \ return (SV *) 0; \ if (av_store(cxt->aseen, cxt->tagnum++, SvREFCNT_inc(y)) == 0) \ @@ -806,12 +938,13 @@ PTR2UV(y), SvREFCNT(y)-1)); \ if (c) \ BLESS((SV *) (y), c); \ -} while (0) + } STMT_END /* * Bless `s' in `p', via a temporary reference, required by sv_bless(). */ -#define BLESS(s,p) do { \ +#define BLESS(s,p) \ + STMT_START { \ SV *ref; \ HV *stash; \ TRACEME(("blessing 0x%"UVxf" in %s", PTR2UV(s), (p))); \ @@ -820,7 +953,7 @@ (void) sv_bless(ref, stash); \ SvRV(ref) = 0; \ SvREFCNT_dec(ref); \ -} while (0) + } STMT_END static int store(); static SV *retrieve(stcxt_t *cxt, char *cname); @@ -835,6 +968,7 @@ static int store_hash(stcxt_t *cxt, HV *hv); static int store_tied(stcxt_t *cxt, SV *sv); static int store_tied_item(stcxt_t *cxt, SV *sv); +static int store_code(stcxt_t *cxt, CV *cv); static int store_other(stcxt_t *cxt, SV *sv); static int store_blessed(stcxt_t *cxt, SV *sv, int type, HV *pkg); @@ -845,6 +979,7 @@ (int (*)(stcxt_t *cxt, SV *sv)) store_hash, /* svis_HASH */ store_tied, /* svis_TIED */ store_tied_item, /* svis_TIED_ITEM */ + (int (*)(stcxt_t *cxt, SV *sv)) store_code, /* svis_CODE */ store_other, /* svis_OTHER */ }; @@ -897,6 +1032,8 @@ retrieve_other, /* SX_TIED_IDX not supported */ retrieve_other, /* SX_UTF8STR not supported */ retrieve_other, /* SX_LUTF8STR not supported */ + retrieve_other, /* SX_FLAG_HASH not supported */ + retrieve_other, /* SX_CODE not supported */ retrieve_other, /* SX_ERROR */ }; @@ -911,6 +1048,8 @@ static SV *retrieve_overloaded(stcxt_t *cxt, char *cname); static SV *retrieve_tied_key(stcxt_t *cxt, char *cname); static SV *retrieve_tied_idx(stcxt_t *cxt, char *cname); +static SV *retrieve_flag_hash(stcxt_t *cxt, char *cname); +static SV *retrieve_code(stcxt_t *cxt, char *cname); static SV *(*sv_retrieve[])(stcxt_t *cxt, char *cname) = { 0, /* SX_OBJECT -- entry unused dynamically */ @@ -938,6 +1077,8 @@ retrieve_tied_idx, /* SX_TIED_IDX */ retrieve_utf8str, /* SX_UTF8STR */ retrieve_lutf8str, /* SX_LUTF8STR */ + retrieve_flag_hash, /* SX_HASH */ + retrieve_code, /* SX_CODE */ retrieve_other, /* SX_ERROR */ }; @@ -990,6 +1131,8 @@ cxt->netorder = network_order; cxt->forgive_me = -1; /* Fetched from perl if needed */ + cxt->deparse = -1; /* Idem */ + cxt->eval = NULL; /* Idem */ cxt->canonical = -1; /* Idem */ cxt->tagnum = -1; /* Reset tag numbers */ cxt->classnum = -1; /* Reset class numbers */ @@ -1135,6 +1278,14 @@ sv_free((SV *) hook_seen); } + cxt->forgive_me = -1; /* Fetched from perl if needed */ + cxt->deparse = -1; /* Idem */ + if (cxt->eval) { + SvREFCNT_dec(cxt->eval); + } + cxt->eval = NULL; /* Idem */ + cxt->canonical = -1; /* Idem */ + reset_context(cxt); } @@ -1165,7 +1316,7 @@ * new retrieve routines. */ - cxt->hseen = (cxt->retrieve_vtbl == sv_old_retrieve) ? newHV() : 0; + cxt->hseen = ((cxt->retrieve_vtbl == sv_old_retrieve) ? newHV() : 0); cxt->aseen = newAV(); /* Where retrieved objects are kept */ cxt->aclass = newAV(); /* Where seen classnames are kept */ @@ -1174,6 +1325,13 @@ cxt->optype = optype; cxt->s_tainted = is_tainted; cxt->entry = 1; /* No recursion yet */ +#ifndef HAS_RESTRICTED_HASHES + cxt->derestrict = -1; /* Fetched from perl if needed */ +#endif +#ifndef HAS_UTF8_ALL + cxt->use_bytes = -1; /* Fetched from perl if needed */ +#endif + cxt->accept_future_minor = -1; /* Fetched from perl if needed */ } /* @@ -1215,6 +1373,14 @@ sv_free((SV *) hseen); /* optional HV, for backward compat. */ } +#ifndef HAS_RESTRICTED_HASHES + cxt->derestrict = -1; /* Fetched from perl if needed */ +#endif +#ifndef HAS_UTF8_ALL + cxt->use_bytes = -1; /* Fetched from perl if needed */ +#endif + cxt->accept_future_minor = -1; /* Fetched from perl if needed */ + reset_context(cxt); } @@ -1260,8 +1426,8 @@ ASSERT(!parent_cxt->s_dirty, ("parent context clean")); - Newz(0, cxt, 1, stcxt_t); - cxt->prev = parent_cxt; + NEW_STORABLE_CXT_OBJ(cxt); + cxt->prev = parent_cxt->my_sv; SET_STCXT(cxt); ASSERT(!cxt->s_dirty, ("clean context")); @@ -1278,19 +1444,14 @@ static void free_context(cxt) stcxt_t *cxt; { - stcxt_t *prev = cxt->prev; + stcxt_t *prev = (stcxt_t *)(cxt->prev ? SvPVX(SvRV(cxt->prev)) : 0); TRACEME(("free_context")); ASSERT(!cxt->s_dirty, ("clean context")); ASSERT(prev, ("not freeing root context")); - if (kbuf) - Safefree(kbuf); - if (mbase) - Safefree(mbase); - - Safefree(cxt); + SvREFCNT_dec(cxt->my_sv); SET_STCXT(prev); ASSERT(cxt, ("context not void")); @@ -1632,7 +1793,7 @@ * * Store a scalar. * - * Layout is SX_LSCALAR , SX_SCALAR or SX_UNDEF. + * Layout is SX_LSCALAR , SX_SCALAR or SX_UNDEF. * The section is omitted if is 0. * * If integer or double, the layout is SX_INTEGER or SX_DOUBLE . @@ -1706,89 +1867,134 @@ pv = SvPV(sv, len); /* We know it's SvPOK */ goto string; /* Share code below */ } - } else if (flags & SVp_POK) { /* SvPOKp(sv) => string */ - I32 wlen; /* For 64-bit machines */ - pv = SvPV(sv, len); - - /* - * Will come here from below with pv and len set if double & netorder, - * or from above if it was readonly, POK and NOK but neither &PL_sv_yes - * nor &PL_sv_no. - */ - string: - - wlen = (I32) len; /* WLEN via STORE_SCALAR expects I32 */ - if (SvUTF8 (sv)) - STORE_UTF8STR(pv, wlen); - else - STORE_SCALAR(pv, wlen); - TRACEME(("ok (scalar 0x%"UVxf" '%s', length = %"IVdf")", - PTR2UV(sv), SvPVX(sv), (IV)len)); - - } else if (flags & SVp_NOK) { /* SvNOKp(sv) => double */ - NV nv = SvNV(sv); - - /* - * Watch for number being an integer in disguise. - */ - if (nv == (NV) (iv = I_V(nv))) { - TRACEME(("double %"NVff" is actually integer %"IVdf, nv, iv)); - goto integer; /* Share code below */ - } - - if (cxt->netorder) { - TRACEME(("double %"NVff" stored as string", nv)); - pv = SvPV(sv, len); - goto string; /* Share code above */ - } - - PUTMARK(SX_DOUBLE); - WRITE(&nv, sizeof(nv)); - - TRACEME(("ok (double 0x%"UVxf", value = %"NVff")", PTR2UV(sv), nv)); - - } else if (flags & SVp_IOK) { /* SvIOKp(sv) => integer */ - iv = SvIV(sv); + } else if (flags & SVf_POK) { + /* public string - go direct to string read. */ + goto string_readlen; + } else if ( +#if (PATCHLEVEL <= 6) + /* For 5.6 and earlier NV flag trumps IV flag, so only use integer + direct if NV flag is off. */ + (flags & (SVf_NOK | SVf_IOK)) == SVf_IOK +#else + /* 5.7 rules are that if IV public flag is set, IV value is as + good, if not better, than NV value. */ + flags & SVf_IOK +#endif + ) { + iv = SvIV(sv); + /* + * Will come here from below with iv set if double is an integer. + */ + integer: + + /* Sorry. This isn't in 5.005_56 (IIRC) or earlier. */ +#ifdef SVf_IVisUV + /* Need to do this out here, else 0xFFFFFFFF becomes iv of -1 + * (for example) and that ends up in the optimised small integer + * case. + */ + if ((flags & SVf_IVisUV) && SvUV(sv) > IV_MAX) { + TRACEME(("large unsigned integer as string, value = %"UVuf, SvUV(sv))); + goto string_readlen; + } +#endif + /* + * Optimize small integers into a single byte, otherwise store as + * a real integer (converted into network order if they asked). + */ + + if (iv >= -128 && iv <= 127) { + unsigned char siv = (unsigned char) (iv + 128); /* [0,255] */ + PUTMARK(SX_BYTE); + PUTMARK(siv); + TRACEME(("small integer stored as %d", siv)); + } else if (cxt->netorder) { +#ifndef HAS_HTONL + TRACEME(("no htonl, fall back to string for integer")); + goto string_readlen; +#else + I32 niv; - /* - * Will come here from above with iv set if double is an integer. - */ - integer: - /* - * Optimize small integers into a single byte, otherwise store as - * a real integer (converted into network order if they asked). - */ +#if IVSIZE > 4 + if ( +#ifdef SVf_IVisUV + /* Sorry. This isn't in 5.005_56 (IIRC) or earlier. */ + ((flags & SVf_IVisUV) && SvUV(sv) > 0x7FFFFFFF) || +#endif + (iv > 0x7FFFFFFF) || (iv < -0x80000000)) { + /* Bigger than 32 bits. */ + TRACEME(("large network order integer as string, value = %"IVdf, iv)); + goto string_readlen; + } +#endif - if (iv >= -128 && iv <= 127) { - unsigned char siv = (unsigned char) (iv + 128); /* [0,255] */ - PUTMARK(SX_BYTE); - PUTMARK(siv); - TRACEME(("small integer stored as %d", siv)); - } else if (cxt->netorder) { - I32 niv; -#ifdef HAS_HTONL - niv = (I32) htonl(iv); - TRACEME(("using network order")); -#else - niv = (I32) iv; - TRACEME(("as-is for network order")); + niv = (I32) htonl((I32) iv); + TRACEME(("using network order")); + PUTMARK(SX_NETINT); + WRITE_I32(niv); #endif - PUTMARK(SX_NETINT); - WRITE_I32(niv); - } else { - PUTMARK(SX_INTEGER); - WRITE(&iv, sizeof(iv)); - } + } else { + PUTMARK(SX_INTEGER); + WRITE(&iv, sizeof(iv)); + } + + TRACEME(("ok (integer 0x%"UVxf", value = %"IVdf")", PTR2UV(sv), iv)); + } else if (flags & SVf_NOK) { + NV nv; +#if (PATCHLEVEL <= 6) + nv = SvNV(sv); + /* + * Watch for number being an integer in disguise. + */ + if (nv == (NV) (iv = I_V(nv))) { + TRACEME(("double %"NVff" is actually integer %"IVdf, nv, iv)); + goto integer; /* Share code above */ + } +#else - TRACEME(("ok (integer 0x%"UVxf", value = %"IVdf")", PTR2UV(sv), iv)); + SvIV_please(sv); + if (SvIOK(sv)) { + iv = SvIV(sv); + goto integer; /* Share code above */ + } + nv = SvNV(sv); +#endif + if (cxt->netorder) { + TRACEME(("double %"NVff" stored as string", nv)); + goto string_readlen; /* Share code below */ + } + + PUTMARK(SX_DOUBLE); + WRITE(&nv, sizeof(nv)); + + TRACEME(("ok (double 0x%"UVxf", value = %"NVff")", PTR2UV(sv), nv)); + + } else if (flags & (SVp_POK | SVp_NOK | SVp_IOK)) { + I32 wlen; /* For 64-bit machines */ + + string_readlen: + pv = SvPV(sv, len); + + /* + * Will come here from above if it was readonly, POK and NOK but + * neither &PL_sv_yes nor &PL_sv_no. + */ + string: + + wlen = (I32) len; /* WLEN via STORE_SCALAR expects I32 */ + if (SvUTF8 (sv)) + STORE_UTF8STR(pv, wlen); + else + STORE_SCALAR(pv, wlen); + TRACEME(("ok (scalar 0x%"UVxf" '%s', length = %"IVdf")", + PTR2UV(sv), SvPVX(sv), (IV)len)); } else - CROAK(("Can't determine type of %s(0x%"UVxf")", - sv_reftype(sv, FALSE), - PTR2UV(sv))); - - return 0; /* Ok, no recursion on scalars */ + CROAK(("Can't determine type of %s(0x%"UVxf")", + sv_reftype(sv, FALSE), + PTR2UV(sv))); + return 0; /* Ok, no recursion on scalars */ } /* @@ -1853,28 +2059,62 @@ /* * store_hash * - * Store an hash table. + * Store a hash table. + * + * For a "normal" hash (not restricted, no utf8 keys): * * Layout is SX_HASH followed by each key/value pair, in random order. * Values are stored as . * Keys are stored as , the section being omitted * if length is 0. + * + * For a "fancy" hash (restricted or utf8 keys): + * + * Layout is SX_FLAG_HASH followed by each key/value pair, + * in random order. + * Values are stored as . + * Keys are stored as , the section being omitted + * if length is 0. + * Currently the only hash flag is "restriced" + * Key flags are as for hv.h */ static int store_hash(stcxt_t *cxt, HV *hv) { - I32 len = HvKEYS(hv); + I32 len = +#ifdef HAS_RESTRICTED_HASHES + HvTOTALKEYS(hv); +#else + HvKEYS(hv); +#endif I32 i; int ret = 0; I32 riter; HE *eiter; + int flagged_hash = ((SvREADONLY(hv) +#ifdef HAS_HASH_KEY_FLAGS + || HvHASKFLAGS(hv) +#endif + ) ? 1 : 0); + unsigned char hash_flags = (SvREADONLY(hv) ? SHV_RESTRICTED : 0); - TRACEME(("store_hash (0x%"UVxf")", PTR2UV(hv))); + if (flagged_hash) { + /* needs int cast for C++ compilers, doesn't it? */ + TRACEME(("store_hash (0x%"UVxf") (flags %x)", PTR2UV(hv), + (int) hash_flags)); + } else { + TRACEME(("store_hash (0x%"UVxf")", PTR2UV(hv))); + } /* * Signal hash by emitting SX_HASH, followed by the table length. */ - PUTMARK(SX_HASH); + if (flagged_hash) { + PUTMARK(SX_FLAG_HASH); + PUTMARK(hash_flags); + } else { + PUTMARK(SX_HASH); + } WLEN(len); TRACEME(("size = %d", len)); @@ -1900,7 +2140,7 @@ if ( !(cxt->optype & ST_CLONE) && (cxt->canonical == 1 || (cxt->canonical < 0 && (cxt->canonical = - SvTRUE(perl_get_sv("Storable::canonical", TRUE)) ? 1 : 0))) + (SvTRUE(perl_get_sv("Storable::canonical", TRUE)) ? 1 : 0)))) ) { /* * Storing in order, sorted by key. @@ -1911,10 +2151,16 @@ AV *av = newAV(); + /*av_extend (av, len);*/ + TRACEME(("using canonical order")); for (i = 0; i < len; i++) { +#ifdef HAS_RESTRICTED_HASHES + HE *he = hv_iternext_flags(hv, HV_ITERNEXT_WANTPLACEHOLDERS); +#else HE *he = hv_iternext(hv); +#endif SV *key = hv_iterkeysv(he); av_store(av, AvFILLp(av)+1, key); /* av_push(), really */ } @@ -1922,8 +2168,10 @@ qsort((char *) AvARRAY(av), len, sizeof(SV *), sortcmp); for (i = 0; i < len; i++) { + unsigned char flags; char *keyval; - I32 keylen; + STRLEN keylen_tmp; + I32 keylen; SV *key = av_shift(av); HE *he = hv_fetch_ent(hv, key, 0, 0); SV *val = HeVAL(he); @@ -1947,11 +2195,61 @@ * See retrieve_hash() for details. */ - keyval = hv_iterkey(he, &keylen); - TRACEME(("(#%d) key '%s'", i, keyval)); + /* Implementation of restricted hashes isn't nicely + abstracted: */ + flags + = (((hash_flags & SHV_RESTRICTED) + && SvREADONLY(val)) + ? SHV_K_LOCKED : 0); + if (val == &PL_sv_undef) + flags |= SHV_K_PLACEHOLDER; + + keyval = SvPV(key, keylen_tmp); + keylen = keylen_tmp; +#ifdef HAS_UTF8_HASHES + /* If you build without optimisation on pre 5.6 + then nothing spots that SvUTF8(key) is always 0, + so the block isn't optimised away, at which point + the linker dislikes the reference to + bytes_from_utf8. */ + if (SvUTF8(key)) { + const char *keysave = keyval; + bool is_utf8 = TRUE; + + /* Just casting the &klen to (STRLEN) won't work + well if STRLEN and I32 are of different widths. + --jhi */ + keyval = (char*)bytes_from_utf8((U8*)keyval, + &keylen_tmp, + &is_utf8); + + /* If we were able to downgrade here, then than + means that we have a key which only had chars + 0-255, but was utf8 encoded. */ + + if (keyval != keysave) { + keylen = keylen_tmp; + flags |= SHV_K_WASUTF8; + } else { + /* keylen_tmp can't have changed, so no need + to assign back to keylen. */ + flags |= SHV_K_UTF8; + } + } +#endif + + if (flagged_hash) { + PUTMARK(flags); + TRACEME(("(#%d) key '%s' flags %x %u", i, keyval, flags, *keyval)); + } else { + assert (flags == 0); + TRACEME(("(#%d) key '%s'", i, keyval)); + } WLEN(keylen); if (keylen) WRITE(keyval, keylen); + if (flags & SHV_K_WASUTF8) + Safefree (keyval); } /* @@ -1971,7 +2269,15 @@ for (i = 0; i < len; i++) { char *key; I32 len; - SV *val = hv_iternextsv(hv, &key, &len); + unsigned char flags; +#ifdef HV_ITERNEXT_WANTPLACEHOLDERS + HE *he = hv_iternext_flags(hv, HV_ITERNEXT_WANTPLACEHOLDERS); +#else + HE *he = hv_iternext(hv); +#endif + SV *val = (he ? hv_iterval(hv, he) : 0); + SV *key_sv = NULL; + HEK *hek; if (val == 0) return 1; /* Internal error, not I/O error */ @@ -1985,6 +2291,36 @@ if ((ret = store(cxt, val))) /* Extra () for -Wall, grr... */ goto out; + /* Implementation of restricted hashes isn't nicely + abstracted: */ + flags + = (((hash_flags & SHV_RESTRICTED) + && SvREADONLY(val)) + ? SHV_K_LOCKED : 0); + if (val == &PL_sv_undef) + flags |= SHV_K_PLACEHOLDER; + + hek = HeKEY_hek(he); + len = HEK_LEN(hek); + if (len == HEf_SVKEY) { + /* This is somewhat sick, but the internal APIs are + * such that XS code could put one of these in in + * a regular hash. + * Maybe we should be capable of storing one if + * found. + */ + key_sv = HeKEY_sv(he); + flags |= SHV_K_ISSV; + } else { + /* Regular string key. */ +#ifdef HAS_HASH_KEY_FLAGS + if (HEK_UTF8(hek)) + flags |= SHV_K_UTF8; + if (HEK_WASUTF8(hek)) + flags |= SHV_K_WASUTF8; +#endif + key = HEK_KEY(hek); + } /* * Write key string. * Keys are written after values to make sure retrieval @@ -1993,10 +2329,20 @@ * See retrieve_hash() for details. */ - TRACEME(("(#%d) key '%s'", i, key)); - WLEN(len); - if (len) + if (flagged_hash) { + PUTMARK(flags); + TRACEME(("(#%d) key '%s' flags %x", i, key, flags)); + } else { + assert (flags == 0); + TRACEME(("(#%d) key '%s'", i, key)); + } + if (flags & SHV_K_ISSV) { + store(cxt, key_sv); + } else { + WLEN(len); + if (len) WRITE(key, len); + } } } @@ -2010,6 +2356,109 @@ } /* + * store_code + * + * Store a code reference. + * + * Layout is SX_CODE followed by a scalar containing the perl + * source code of the code reference. + */ +static int store_code(stcxt_t *cxt, CV *cv) +{ +#if PERL_VERSION < 6 + /* + * retrieve_code does not work with perl 5.005 or less + */ + return store_other(cxt, (SV*)cv); +#else + dSP; + I32 len; + int ret, count, reallen; + SV *text, *bdeparse; + + TRACEME(("store_code (0x%"UVxf")", PTR2UV(cv))); + + if ( + cxt->deparse == 0 || + (cxt->deparse < 0 && !(cxt->deparse = + SvTRUE(perl_get_sv("Storable::Deparse", TRUE)) ? 1 : 0)) + ) { + return store_other(cxt, (SV*)cv); + } + + /* + * Require B::Deparse. At least B::Deparse 0.61 is needed for + * blessed code references. + */ + /* XXX sv_2mortal seems to be evil here. why? */ + load_module(PERL_LOADMOD_NOIMPORT, newSVpvn("B::Deparse",10), newSVnv(0.61)); + + ENTER; + SAVETMPS; + + /* + * create the B::Deparse object + */ + + PUSHMARK(sp); + XPUSHs(sv_2mortal(newSVpvn("B::Deparse",10))); + PUTBACK; + count = call_method("new", G_SCALAR); + SPAGAIN; + if (count != 1) + CROAK(("Unexpected return value from B::Deparse::new\n")); + bdeparse = POPs; + + /* + * call the coderef2text method + */ + + PUSHMARK(sp); + XPUSHs(bdeparse); /* XXX is this already mortal? */ + XPUSHs(sv_2mortal(newRV_inc((SV*)cv))); + PUTBACK; + count = call_method("coderef2text", G_SCALAR); + SPAGAIN; + if (count != 1) + CROAK(("Unexpected return value from B::Deparse::coderef2text\n")); + + text = POPs; + len = SvLEN(text); + reallen = strlen(SvPV(text,PL_na)); + + /* + * Empty code references or XS functions are deparsed as + * "(prototype) ;" or ";". + */ + + if (len == 0 || *(SvPV(text,PL_na)+reallen-1) == ';') { + CROAK(("The result of B::Deparse::coderef2text was empty - maybe you're trying to serialize an XS function?\n")); + } + + /* + * Signal code by emitting SX_CODE. + */ + + PUTMARK(SX_CODE); + TRACEME(("size = %d", len)); + TRACEME(("code = %s", SvPV(text,PL_na))); + + /* + * Now store the source code. + */ + + STORE_SCALAR(SvPV(text,PL_na), len); + + FREETMPS; + LEAVE; + + TRACEME(("ok (code)")); + + return 0; +#endif +} + +/* * store_tied * * When storing a tied object (be it a tied scalar, array or hash), we lay out @@ -2315,7 +2764,7 @@ * If they returned more than one item, we need to serialize some * extra references if not already done. * - * Loop over the array, starting at postion #1, and for each item, + * Loop over the array, starting at position #1, and for each item, * ensure it is a reference, serialize it if not already done, and * replace the entry with the tag ID of the corresponding serialized * object. @@ -2487,7 +2936,7 @@ PUTMARK(clen); } if (len2) - WRITE(pv, len2); /* Final \0 is omitted */ + WRITE(pv, (SSize_t)len2); /* Final \0 is omitted */ /* [ ] */ if (flags & SHF_HAS_LIST) { @@ -2684,7 +3133,7 @@ len = strlen(buf); STORE_SCALAR(buf, len); - TRACEME(("ok (dummy \"%s\", length = %"IVdf")", buf, len)); + TRACEME(("ok (dummy \"%s\", length = %"IVdf")", buf, (IV) len)); return 0; } @@ -2743,6 +3192,8 @@ if (SvRMAGICAL(sv) && (mg_find(sv, 'P'))) return svis_TIED; return svis_HASH; + case SVt_PVCV: + return svis_CODE; default: break; } @@ -2775,7 +3226,7 @@ * * NOTA BENE, for 64-bit machines: the "*svh" below does not yield a * real pointer, rather a tag number (watch the insertion code below). - * That means it pobably safe to assume it is well under the 32-bit limit, + * That means it probably safe to assume it is well under the 32-bit limit, * and makes the truncation safe. * -- RAM, 14/09/1999 */ @@ -2796,7 +3247,7 @@ * stored, before recursing... * * In order to avoid creating new SvIVs to hold the tagnum we just - * cast the tagnum to a SV pointer and store that in the hash. This + * cast the tagnum to an SV pointer and store that in the hash. This * means that we must clean up the hash manually afterwards, but gives * us a 15% throughput increase. * @@ -2843,51 +3294,87 @@ */ static int magic_write(stcxt_t *cxt) { - char buf[256]; /* Enough room for 256 hexa digits */ - unsigned char c; - int use_network_order = cxt->netorder; - - TRACEME(("magic_write on fd=%d", cxt->fio ? fileno(cxt->fio) : -1)); - - if (cxt->fio) - WRITE(magicstr, strlen(magicstr)); /* Don't write final \0 */ - - /* - * Starting with 0.6, the "use_network_order" byte flag is also used to - * indicate the version number of the binary image, encoded in the upper - * bits. The bit 0 is always used to indicate network order. - */ - - c = (unsigned char) - ((use_network_order ? 0x1 : 0x0) | (STORABLE_BIN_MAJOR << 1)); - PUTMARK(c); - - /* - * Starting with 0.7, a full byte is dedicated to the minor version of - * the binary format, which is incremented only when new markers are - * introduced, for instance, but when backward compatibility is preserved. - */ + /* + * Starting with 0.6, the "use_network_order" byte flag is also used to + * indicate the version number of the binary image, encoded in the upper + * bits. The bit 0 is always used to indicate network order. + */ + /* + * Starting with 0.7, a full byte is dedicated to the minor version of + * the binary format, which is incremented only when new markers are + * introduced, for instance, but when backward compatibility is preserved. + */ + + /* Make these at compile time. The WRITE() macro is sufficiently complex + that it saves about 200 bytes doing it this way and only using it + once. */ + static const unsigned char network_file_header[] = { + MAGICSTR_BYTES, + (STORABLE_BIN_MAJOR << 1) | 1, + STORABLE_BIN_WRITE_MINOR + }; + static const unsigned char file_header[] = { + MAGICSTR_BYTES, + (STORABLE_BIN_MAJOR << 1) | 0, + STORABLE_BIN_WRITE_MINOR, + /* sizeof the array includes the 0 byte at the end: */ + (char) sizeof (byteorderstr) - 1, + BYTEORDER_BYTES, + (unsigned char) sizeof(int), + (unsigned char) sizeof(long), + (unsigned char) sizeof(char *), + (unsigned char) sizeof(NV) + }; +#ifdef USE_56_INTERWORK_KLUDGE + static const unsigned char file_header_56[] = { + MAGICSTR_BYTES, + (STORABLE_BIN_MAJOR << 1) | 0, + STORABLE_BIN_WRITE_MINOR, + /* sizeof the array includes the 0 byte at the end: */ + (char) sizeof (byteorderstr_56) - 1, + BYTEORDER_BYTES_56, + (unsigned char) sizeof(int), + (unsigned char) sizeof(long), + (unsigned char) sizeof(char *), + (unsigned char) sizeof(NV) + }; +#endif + const unsigned char *header; + SSize_t length; - PUTMARK((unsigned char) STORABLE_BIN_MINOR); + TRACEME(("magic_write on fd=%d", cxt->fio ? PerlIO_fileno(cxt->fio) : -1)); - if (use_network_order) - return 0; /* Don't bother with byte ordering */ + if (cxt->netorder) { + header = network_file_header; + length = sizeof (network_file_header); + } else { +#ifdef USE_56_INTERWORK_KLUDGE + if (SvTRUE(perl_get_sv("Storable::interwork_56_64bit", TRUE))) { + header = file_header_56; + length = sizeof (file_header_56); + } else +#endif + { + header = file_header; + length = sizeof (file_header); + } + } + + if (!cxt->fio) { + /* sizeof the array includes the 0 byte at the end. */ + header += sizeof (magicstr) - 1; + length -= sizeof (magicstr) - 1; + } - sprintf(buf, "%lx", (unsigned long) BYTEORDER); - c = (unsigned char) strlen(buf); - PUTMARK(c); - WRITE(buf, (unsigned int) c); /* Don't write final \0 */ - PUTMARK((unsigned char) sizeof(int)); - PUTMARK((unsigned char) sizeof(long)); - PUTMARK((unsigned char) sizeof(char *)); - PUTMARK((unsigned char) sizeof(NV)); + WRITE(header, length); + if (!cxt->netorder) { TRACEME(("ok (magic_write byteorder = 0x%lx [%d], I%d L%d P%d D%d)", - (unsigned long) BYTEORDER, (int) c, + (unsigned long) BYTEORDER, (int) sizeof (byteorderstr) - 1, (int) sizeof(int), (int) sizeof(long), (int) sizeof(char *), (int) sizeof(NV))); - - return 0; + } + return 0; } /* @@ -3311,6 +3798,10 @@ * We don't need to remember the addresses returned by retrieval, because * all the references will be obtained through indirection via the object * tags in the object-ID list. + * + * We need to decrement the reference count for these objects + * because, if the user doesn't save a reference to them in the hook, + * they must be freed when this context is cleaned. */ while (flags & SHF_NEED_RECURSE) { @@ -3318,6 +3809,7 @@ rv = retrieve(cxt, 0); if (!rv) return (SV *) 0; + SvREFCNT_dec(rv); TRACEME(("retrieve_hook back with rv=0x%"UVxf, PTR2UV(rv))); GETMARK(flags); @@ -3377,7 +3869,7 @@ TRACEME(("class name: %s", class)); /* - * Decode user-frozen string length and read it in a SV. + * Decode user-frozen string length and read it in an SV. * * For efficiency reasons, we read data directly into the SV buffer. * To understand that code, read retrieve_scalar() @@ -3513,7 +4005,7 @@ */ TRACEME(("calling STORABLE_thaw on %s at 0x%"UVxf" (%"IVdf" args)", - class, PTR2UV(sv), AvFILLp(av) + 1)); + class, PTR2UV(sv), (IV) AvFILLp(av) + 1)); rv = newRV(sv); (void) scalar_call(rv, hook, clone, av, G_SCALAR|G_DISCARD); @@ -3854,7 +4346,7 @@ SV *sv; RLEN(len); - TRACEME(("retrieve_lscalar (#%d), len = %"IVdf, cxt->tagnum, len)); + TRACEME(("retrieve_lscalar (#%d), len = %"IVdf, cxt->tagnum, (IV) len)); /* * Allocate an empty scalar of the suitable length. @@ -3879,7 +4371,7 @@ if (cxt->s_tainted) /* Is input source tainted? */ SvTAINT(sv); /* External data cannot be trusted */ - TRACEME(("large scalar len %"IVdf" '%s'", len, SvPVX(sv))); + TRACEME(("large scalar len %"IVdf" '%s'", (IV) len, SvPVX(sv))); TRACEME(("ok (retrieve_lscalar at 0x%"UVxf")", PTR2UV(sv))); return sv; @@ -3917,8 +4409,12 @@ /* * newSV did not upgrade to SVt_PV so the scalar is undefined. * To make it defined with an empty length, upgrade it now... + * Don't upgrade to a PV if the original type contains more + * information than a scalar. */ - sv_upgrade(sv, SVt_PV); + if (SvTYPE(sv) <= SVt_PV) { + sv_upgrade(sv, SVt_PV); + } SvGROW(sv, 1); *SvEND(sv) = '\0'; /* Ensure it's null terminated anyway */ TRACEME(("ok (retrieve_scalar empty at 0x%"UVxf")", PTR2UV(sv))); @@ -3951,15 +4447,25 @@ */ static SV *retrieve_utf8str(stcxt_t *cxt, char *cname) { - SV *sv; + SV *sv; - TRACEME(("retrieve_utf8str")); + TRACEME(("retrieve_utf8str")); - sv = retrieve_scalar(cxt, cname); - if (sv) - SvUTF8_on(sv); + sv = retrieve_scalar(cxt, cname); + if (sv) { +#ifdef HAS_UTF8_SCALARS + SvUTF8_on(sv); +#else + if (cxt->use_bytes < 0) + cxt->use_bytes + = (SvTRUE(perl_get_sv("Storable::drop_utf8", TRUE)) + ? 1 : 0); + if (cxt->use_bytes == 0) + UTF8_CROAK(); +#endif + } - return sv; + return sv; } /* @@ -3970,15 +4476,24 @@ */ static SV *retrieve_lutf8str(stcxt_t *cxt, char *cname) { - SV *sv; - - TRACEME(("retrieve_lutf8str")); + SV *sv; - sv = retrieve_lscalar(cxt, cname); - if (sv) - SvUTF8_on(sv); + TRACEME(("retrieve_lutf8str")); - return sv; + sv = retrieve_lscalar(cxt, cname); + if (sv) { +#ifdef HAS_UTF8_SCALARS + SvUTF8_on(sv); +#else + if (cxt->use_bytes < 0) + cxt->use_bytes + = (SvTRUE(perl_get_sv("Storable::drop_utf8", TRUE)) + ? 1 : 0); + if (cxt->use_bytes == 0) + UTF8_CROAK(); +#endif + } + return sv; } /* @@ -4223,6 +4738,7 @@ SEEN(hv, cname); /* Will return if table not allocated properly */ if (len == 0) return (SV *) hv; /* No data follow if table empty */ + hv_ksplit(hv, len); /* pre-extend hash to save multiple splits */ /* * Now get each key/value pair in turn... @@ -4246,7 +4762,7 @@ */ RLEN(size); /* Get key size */ - KBUFCHK(size); /* Grow hash key read pool if needed */ + KBUFCHK((STRLEN)size); /* Grow hash key read pool if needed */ if (size) READ(kbuf, size); kbuf[size] = '\0'; /* Mark string end, just in case */ @@ -4266,6 +4782,249 @@ } /* + * retrieve_hash + * + * Retrieve a whole hash table. + * Layout is SX_HASH followed by each key/value pair, in random order. + * Keys are stored as , the section being omitted + * if length is 0. + * Values are stored as . + * + * When we come here, SX_HASH has been read already. + */ +static SV *retrieve_flag_hash(stcxt_t *cxt, char *cname) +{ + I32 len; + I32 size; + I32 i; + HV *hv; + SV *sv; + int hash_flags; + + GETMARK(hash_flags); + TRACEME(("retrieve_flag_hash (#%d)", cxt->tagnum)); + /* + * Read length, allocate table. + */ + +#ifndef HAS_RESTRICTED_HASHES + if (hash_flags & SHV_RESTRICTED) { + if (cxt->derestrict < 0) + cxt->derestrict + = (SvTRUE(perl_get_sv("Storable::downgrade_restricted", TRUE)) + ? 1 : 0); + if (cxt->derestrict == 0) + RESTRICTED_HASH_CROAK(); + } +#endif + + RLEN(len); + TRACEME(("size = %d, flags = %d", len, hash_flags)); + hv = newHV(); + SEEN(hv, cname); /* Will return if table not allocated properly */ + if (len == 0) + return (SV *) hv; /* No data follow if table empty */ + hv_ksplit(hv, len); /* pre-extend hash to save multiple splits */ + + /* + * Now get each key/value pair in turn... + */ + + for (i = 0; i < len; i++) { + int flags; + int store_flags = 0; + /* + * Get value first. + */ + + TRACEME(("(#%d) value", i)); + sv = retrieve(cxt, 0); + if (!sv) + return (SV *) 0; + + GETMARK(flags); +#ifdef HAS_RESTRICTED_HASHES + if ((hash_flags & SHV_RESTRICTED) && (flags & SHV_K_LOCKED)) + SvREADONLY_on(sv); +#endif + + if (flags & SHV_K_ISSV) { + /* XXX you can't set a placeholder with an SV key. + Then again, you can't get an SV key. + Without messing around beyond what the API is supposed to do. + */ + SV *keysv; + TRACEME(("(#%d) keysv, flags=%d", i, flags)); + keysv = retrieve(cxt, 0); + if (!keysv) + return (SV *) 0; + + if (!hv_store_ent(hv, keysv, sv, 0)) + return (SV *) 0; + } else { + /* + * Get key. + * Since we're reading into kbuf, we must ensure we're not + * recursing between the read and the hv_store() where it's used. + * Hence the key comes after the value. + */ + + if (flags & SHV_K_PLACEHOLDER) { + SvREFCNT_dec (sv); + sv = &PL_sv_undef; + store_flags |= HVhek_PLACEHOLD; + } + if (flags & SHV_K_UTF8) { +#ifdef HAS_UTF8_HASHES + store_flags |= HVhek_UTF8; +#else + if (cxt->use_bytes < 0) + cxt->use_bytes + = (SvTRUE(perl_get_sv("Storable::drop_utf8", TRUE)) + ? 1 : 0); + if (cxt->use_bytes == 0) + UTF8_CROAK(); +#endif + } +#ifdef HAS_UTF8_HASHES + if (flags & SHV_K_WASUTF8) + store_flags |= HVhek_WASUTF8; +#endif + + RLEN(size); /* Get key size */ + KBUFCHK((STRLEN)size); /* Grow hash key read pool if needed */ + if (size) + READ(kbuf, size); + kbuf[size] = '\0'; /* Mark string end, just in case */ + TRACEME(("(#%d) key '%s' flags %X store_flags %X", i, kbuf, + flags, store_flags)); + + /* + * Enter key/value pair into hash table. + */ + +#ifdef HAS_RESTRICTED_HASHES + if (hv_store_flags(hv, kbuf, size, sv, 0, flags) == 0) + return (SV *) 0; +#else + if (!(store_flags & HVhek_PLACEHOLD)) + if (hv_store(hv, kbuf, size, sv, 0) == 0) + return (SV *) 0; +#endif + } + } +#ifdef HAS_RESTRICTED_HASHES + if (hash_flags & SHV_RESTRICTED) + SvREADONLY_on(hv); +#endif + + TRACEME(("ok (retrieve_hash at 0x%"UVxf")", PTR2UV(hv))); + + return (SV *) hv; +} + +/* + * retrieve_code + * + * Return a code reference. + */ +static SV *retrieve_code(stcxt_t *cxt, char *cname) +{ +#if PERL_VERSION < 6 + CROAK(("retrieve_code does not work with perl 5.005 or less\n")); +#else + dSP; + int type, count; + SV *cv; + SV *sv, *text, *sub, *errsv; + + TRACEME(("retrieve_code (#%d)", cxt->tagnum)); + + /* + * Retrieve the source of the code reference + * as a small or large scalar + */ + + GETMARK(type); + switch (type) { + case SX_SCALAR: + text = retrieve_scalar(cxt, cname); + break; + case SX_LSCALAR: + text = retrieve_lscalar(cxt, cname); + break; + default: + CROAK(("Unexpected type %d in retrieve_code\n", type)); + } + + /* + * prepend "sub " to the source + */ + + sub = newSVpvn("sub ", 4); + sv_catpv(sub, SvPV(text, PL_na)); /* XXX no sv_catsv! */ + SvREFCNT_dec(text); + + /* + * evaluate the source to a code reference and use the CV value + */ + + if (cxt->eval == NULL) { + cxt->eval = perl_get_sv("Storable::Eval", TRUE); + SvREFCNT_inc(cxt->eval); + } + if (!SvTRUE(cxt->eval)) { + if ( + cxt->forgive_me == 0 || + (cxt->forgive_me < 0 && !(cxt->forgive_me = + SvTRUE(perl_get_sv("Storable::forgive_me", TRUE)) ? 1 : 0)) + ) { + CROAK(("Can't eval, please set $Storable::Eval to a true value")); + } else { + sv = newSVsv(sub); + return sv; + } + } + + ENTER; + SAVETMPS; + + if (SvROK(cxt->eval) && SvTYPE(SvRV(cxt->eval)) == SVt_PVCV) { + SV* errsv = get_sv("@", TRUE); + sv_setpv(errsv, ""); /* clear $@ */ + PUSHMARK(sp); + XPUSHs(sv_2mortal(newSVsv(sub))); + PUTBACK; + count = call_sv(cxt->eval, G_SCALAR); + SPAGAIN; + if (count != 1) + CROAK(("Unexpected return value from $Storable::Eval callback\n")); + cv = POPs; + if (SvTRUE(errsv)) { + CROAK(("code %s caused an error: %s", SvPV(sub, PL_na), SvPV(errsv, PL_na))); + } + PUTBACK; + } else { + cv = eval_pv(SvPV(sub, PL_na), TRUE); + } + if (cv && SvROK(cv) && SvTYPE(SvRV(cv)) == SVt_PVCV) { + sv = SvRV(cv); + } else { + CROAK(("code %s did not evaluate to a subroutine reference\n", SvPV(sub, PL_na))); + } + + SvREFCNT_inc(sv); /* XXX seems to be necessary */ + SvREFCNT_dec(sub); + + FREETMPS; + LEAVE; + + SEEN(sv, cname); + return sv; +#endif +} + +/* * old_retrieve_array * * Retrieve a whole array in pre-0.6 binary format. @@ -4357,6 +5116,7 @@ SEEN(hv, 0); /* Will return if table not allocated properly */ if (len == 0) return (SV *) hv; /* No data follow if table empty */ + hv_ksplit(hv, len); /* pre-extend hash to save multiple splits */ /* * Now get each key/value pair in turn... @@ -4397,7 +5157,7 @@ if (c != SX_KEY) (void) retrieve_other((stcxt_t *) 0, 0); /* Will croak out */ RLEN(size); /* Get key size */ - KBUFCHK(size); /* Grow hash key read pool if needed */ + KBUFCHK((STRLEN)size); /* Grow hash key read pool if needed */ if (size) READ(kbuf, size); kbuf[size] = '\0'; /* Mark string end, just in case */ @@ -4433,120 +5193,170 @@ */ static SV *magic_check(stcxt_t *cxt) { - char buf[256]; - char byteorder[256]; - int c; - int use_network_order; - int version_major; - int version_minor = 0; - - TRACEME(("magic_check")); - - /* - * The "magic number" is only for files, not when freezing in memory. - */ - - if (cxt->fio) { - STRLEN len = sizeof(magicstr) - 1; - STRLEN old_len; - - READ(buf, len); /* Not null-terminated */ - buf[len] = '\0'; /* Is now */ - - if (0 == strcmp(buf, magicstr)) - goto magic_ok; - - /* - * Try to read more bytes to check for the old magic number, which - * was longer. - */ - - old_len = sizeof(old_magicstr) - 1; - READ(&buf[len], old_len - len); - buf[old_len] = '\0'; /* Is now null-terminated */ - - if (strcmp(buf, old_magicstr)) - CROAK(("File is not a perl storable")); - } - -magic_ok: - /* - * Starting with 0.6, the "use_network_order" byte flag is also used to - * indicate the version number of the binary, and therefore governs the - * setting of sv_retrieve_vtbl. See magic_write(). - */ - + /* The worst case for a malicious header would be old magic (which is + longer), major, minor, byteorder length byte of 255, 255 bytes of + garbage, sizeof int, long, pointer, NV. + So the worse of that we can read is 255 bytes of garbage plus 4. + Err, I am assuming 8 bit bytes here. Please file a bug report if you're + compiling perl on a system with chars that are larger than 8 bits. + (Even Crays aren't *that* perverse). + */ + unsigned char buf[4 + 255]; + unsigned char *current; + int c; + int length; + int use_network_order; + int use_NV_size; + int version_major; + int version_minor = 0; + + TRACEME(("magic_check")); + + /* + * The "magic number" is only for files, not when freezing in memory. + */ + + if (cxt->fio) { + /* This includes the '\0' at the end. I want to read the extra byte, + which is usually going to be the major version number. */ + STRLEN len = sizeof(magicstr); + STRLEN old_len; + + READ(buf, (SSize_t)(len)); /* Not null-terminated */ + + /* Point at the byte after the byte we read. */ + current = buf + --len; /* Do the -- outside of macros. */ + + if (memNE(buf, magicstr, len)) { + /* + * Try to read more bytes to check for the old magic number, which + * was longer. + */ + + TRACEME(("trying for old magic number")); + + old_len = sizeof(old_magicstr) - 1; + READ(current + 1, (SSize_t)(old_len - len)); + + if (memNE(buf, old_magicstr, old_len)) + CROAK(("File is not a perl storable")); + current = buf + old_len; + } + use_network_order = *current; + } else GETMARK(use_network_order); - version_major = use_network_order >> 1; - cxt->retrieve_vtbl = version_major ? sv_retrieve : sv_old_retrieve; - - TRACEME(("magic_check: netorder = 0x%x", use_network_order)); - - - /* - * Starting with 0.7 (binary major 2), a full byte is dedicated to the - * minor version of the protocol. See magic_write(). - */ - - if (version_major > 1) - GETMARK(version_minor); - - cxt->ver_major = version_major; - cxt->ver_minor = version_minor; - - TRACEME(("binary image version is %d.%d", version_major, version_minor)); - - /* - * Inter-operability sanity check: we can't retrieve something stored - * using a format more recent than ours, because we have no way to - * know what has changed, and letting retrieval go would mean a probable - * failure reporting a "corrupted" storable file. - */ - - if ( - version_major > STORABLE_BIN_MAJOR || - (version_major == STORABLE_BIN_MAJOR && - version_minor > STORABLE_BIN_MINOR) - ) - CROAK(("Storable binary image v%d.%d more recent than I am (v%d.%d)", - version_major, version_minor, - STORABLE_BIN_MAJOR, STORABLE_BIN_MINOR)); - - /* - * If they stored using network order, there's no byte ordering - * information to check. - */ - - if ((cxt->netorder = (use_network_order & 0x1))) /* Extra () for -Wall */ - return &PL_sv_undef; /* No byte ordering info */ - - sprintf(byteorder, "%lx", (unsigned long) BYTEORDER); - GETMARK(c); - READ(buf, c); /* Not null-terminated */ - buf[c] = '\0'; /* Is now */ - - if (strcmp(buf, byteorder)) - CROAK(("Byte order is not compatible")); - - GETMARK(c); /* sizeof(int) */ - if ((int) c != sizeof(int)) - CROAK(("Integer size is not compatible")); - - GETMARK(c); /* sizeof(long) */ - if ((int) c != sizeof(long)) - CROAK(("Long integer size is not compatible")); + + /* + * Starting with 0.6, the "use_network_order" byte flag is also used to + * indicate the version number of the binary, and therefore governs the + * setting of sv_retrieve_vtbl. See magic_write(). + */ + + version_major = use_network_order >> 1; + cxt->retrieve_vtbl = version_major ? sv_retrieve : sv_old_retrieve; + + TRACEME(("magic_check: netorder = 0x%x", use_network_order)); + + + /* + * Starting with 0.7 (binary major 2), a full byte is dedicated to the + * minor version of the protocol. See magic_write(). + */ + + if (version_major > 1) + GETMARK(version_minor); + + cxt->ver_major = version_major; + cxt->ver_minor = version_minor; + + TRACEME(("binary image version is %d.%d", version_major, version_minor)); + + /* + * Inter-operability sanity check: we can't retrieve something stored + * using a format more recent than ours, because we have no way to + * know what has changed, and letting retrieval go would mean a probable + * failure reporting a "corrupted" storable file. + */ + + if ( + version_major > STORABLE_BIN_MAJOR || + (version_major == STORABLE_BIN_MAJOR && + version_minor > STORABLE_BIN_MINOR) + ) { + int croak_now = 1; + TRACEME(("but I am version is %d.%d", STORABLE_BIN_MAJOR, + STORABLE_BIN_MINOR)); + + if (version_major == STORABLE_BIN_MAJOR) { + TRACEME(("cxt->accept_future_minor is %d", + cxt->accept_future_minor)); + if (cxt->accept_future_minor < 0) + cxt->accept_future_minor + = (SvTRUE(perl_get_sv("Storable::accept_future_minor", + TRUE)) + ? 1 : 0); + if (cxt->accept_future_minor == 1) + croak_now = 0; /* Don't croak yet. */ + } + if (croak_now) { + CROAK(("Storable binary image v%d.%d more recent than I am (v%d.%d)", + version_major, version_minor, + STORABLE_BIN_MAJOR, STORABLE_BIN_MINOR)); + } + } - GETMARK(c); /* sizeof(char *) */ - if ((int) c != sizeof(char *)) - CROAK(("Pointer integer size is not compatible")); + /* + * If they stored using network order, there's no byte ordering + * information to check. + */ + + if ((cxt->netorder = (use_network_order & 0x1))) /* Extra () for -Wall */ + return &PL_sv_undef; /* No byte ordering info */ + + /* In C truth is 1, falsehood is 0. Very convienient. */ + use_NV_size = version_major >= 2 && version_minor >= 2; + + GETMARK(c); + length = c + 3 + use_NV_size; + READ(buf, length); /* Not null-terminated */ + + TRACEME(("byte order '%.*s' %d", c, buf, c)); + +#ifdef USE_56_INTERWORK_KLUDGE + /* No point in caching this in the context as we only need it once per + retrieve, and we need to recheck it each read. */ + if (SvTRUE(perl_get_sv("Storable::interwork_56_64bit", TRUE))) { + if ((c != (sizeof (byteorderstr_56) - 1)) + || memNE(buf, byteorderstr_56, c)) + CROAK(("Byte order is not compatible")); + } else +#endif + { + if ((c != (sizeof (byteorderstr) - 1)) || memNE(buf, byteorderstr, c)) + CROAK(("Byte order is not compatible")); + } - if (version_major >= 2 && version_minor >= 2) { - GETMARK(c); /* sizeof(NV) */ - if ((int) c != sizeof(NV)) - CROAK(("Double size is not compatible")); - } + current = buf + c; + + /* sizeof(int) */ + if ((int) *current++ != sizeof(int)) + CROAK(("Integer size is not compatible")); + + /* sizeof(long) */ + if ((int) *current++ != sizeof(long)) + CROAK(("Long integer size is not compatible")); + + /* sizeof(char *) */ + if ((int) *current != sizeof(char *)) + CROAK(("Pointer integer size is not compatible")); + + if (use_NV_size) { + /* sizeof(NV) */ + if ((int) *++current != sizeof(NV)) + CROAK(("Double size is not compatible")); + } - return &PL_sv_undef; /* OK */ + return &PL_sv_undef; /* OK */ } /* @@ -4645,7 +5455,19 @@ TRACEME(("had retrieved #%d at 0x%"UVxf, tag, PTR2UV(sv))); SvREFCNT_inc(sv); /* One more reference to this same sv */ return sv; /* The SV pointer where object was retrieved */ - } + } else if (type >= SX_ERROR && cxt->ver_minor > STORABLE_BIN_MINOR) { + if (cxt->accept_future_minor < 0) + cxt->accept_future_minor + = (SvTRUE(perl_get_sv("Storable::accept_future_minor", + TRUE)) + ? 1 : 0); + if (cxt->accept_future_minor == 1) { + CROAK(("Storable binary image v%d.%d contains data of type %d. " + "This Storable is v%d.%d and can only handle data types up to %d", + cxt->ver_major, cxt->ver_minor, type, + STORABLE_BIN_MAJOR, STORABLE_BIN_MINOR, SX_ERROR - 1)); + } + } first_time: /* Will disappear when support for old format is dropped */ @@ -4683,7 +5505,7 @@ default: return (SV *) 0; /* Failed */ } - KBUFCHK(len); /* Grow buffer as necessary */ + KBUFCHK((STRLEN)len); /* Grow buffer as necessary */ if (len) READ(kbuf, len); kbuf[len] = '\0'; /* Mark string end */ @@ -4991,12 +5813,36 @@ #define InputStream PerlIO * #endif /* !OutputStream */ +MODULE = Storable PACKAGE = Storable::Cxt + +void +DESTROY(self) + SV *self +PREINIT: + stcxt_t *cxt = (stcxt_t *)SvPVX(SvRV(self)); +PPCODE: + if (kbuf) + Safefree(kbuf); + if (!cxt->membuf_ro && mbase) + Safefree(mbase); + if (cxt->membuf_ro && (cxt->msaved).arena) + Safefree((cxt->msaved).arena); + + MODULE = Storable PACKAGE = Storable PROTOTYPES: ENABLE BOOT: init_perinterp(); + gv_fetchpv("Storable::drop_utf8", GV_ADDMULTI, SVt_PV); +#ifdef DEBUGME + /* Only disable the used only once warning if we are in debugging mode. */ + gv_fetchpv("Storable::DEBUGME", GV_ADDMULTI, SVt_PV); +#endif +#ifdef USE_56_INTERWORK_KLUDGE + gv_fetchpv("Storable::interwork_56_64bit", GV_ADDMULTI, SVt_PV); +#endif int pstore(f,obj) @@ -5036,4 +5882,3 @@ int is_retrieving() - Modified: trunk/orca/packages/Storable-2.05/Storable.pm ============================================================================== --- trunk/orca/packages/Storable-2.05/Storable.pm (original) +++ trunk/orca/packages/Storable-2.05/Storable.pm 2002-11-09 12:32:39.000000000 -0800 @@ -1,54 +1,9 @@ -;# $Id: Storable.pm,v 1.0.1.12 2001/08/28 21:51:51 ram Exp $ -;# -;# Copyright (c) 1995-2000, Raphael Manfredi -;# -;# You may redistribute only under the same terms as Perl 5, as specified -;# in the README file that comes with the distribution. -;# -;# $Log: Storable.pm,v $ -;# Revision 1.0.1.12 2001/08/28 21:51:51 ram -;# patch13: fixed truncation race with lock_retrieve() in lock_store() -;# -;# Revision 1.0.1.11 2001/07/01 11:22:14 ram -;# patch12: systematically use "=over 4" for POD linters -;# patch12: updated version number -;# -;# Revision 1.0.1.10 2001/03/15 00:20:25 ram -;# patch11: updated version number -;# -;# Revision 1.0.1.9 2001/02/17 12:37:32 ram -;# patch10: forgot to increase version number at previous patch -;# -;# Revision 1.0.1.8 2001/02/17 12:24:37 ram -;# patch8: fixed incorrect error message -;# -;# Revision 1.0.1.7 2001/01/03 09:39:02 ram -;# patch7: added CAN_FLOCK to determine whether we can flock() or not -;# -;# Revision 1.0.1.6 2000/11/05 17:20:25 ram -;# patch6: increased version number -;# -;# Revision 1.0.1.5 2000/10/26 17:10:18 ram -;# patch5: documented that store() and retrieve() can return undef -;# patch5: added paragraph explaining the auto require for thaw hooks -;# -;# Revision 1.0.1.4 2000/10/23 18:02:57 ram -;# patch4: protected calls to flock() for dos platform -;# patch4: added logcarp emulation if they don't have Log::Agent -;# -;# Revision 1.0.1.3 2000/09/29 19:49:01 ram -;# patch3: updated version number -;# -;# Revision 1.0.1.2 2000/09/28 21:42:51 ram -;# patch2: added lock_store lock_nstore lock_retrieve -;# -;# Revision 1.0.1.1 2000/09/17 16:46:21 ram -;# patch1: documented that doubles are stringified by nstore() -;# patch1: added Salvador Ortiz Garcia in CREDITS section -;# -;# Revision 1.0 2000/09/01 19:40:41 ram -;# Baseline for first official release. -;# +# +# Copyright (c) 1995-2000, Raphael Manfredi +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# require DynaLoader; require Exporter; @@ -64,9 +19,9 @@ ); use AutoLoader; -use vars qw($forgive_me $VERSION); +use vars qw($canonical $forgive_me $VERSION); -$VERSION = '1.013'; +$VERSION = '2.05'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... # @@ -75,26 +30,14 @@ eval "use Log::Agent"; -unless (defined @Log::Agent::EXPORT) { - eval q{ - sub logcroak { - require Carp; - Carp::croak(@_); - } - sub logcarp { - require Carp; - Carp::carp(@_); - } - }; -} +require Carp; # # They might miss :flock in Fcntl # BEGIN { - require Fcntl; - if (exists $Fcntl::EXPORT_TAGS{'flock'}) { + if (eval { require Fcntl; 1 } && exists $Fcntl::EXPORT_TAGS{'flock'}) { Fcntl->import(':flock'); } else { eval q{ @@ -104,18 +47,34 @@ } } -sub logcroak; -sub logcarp; - +# Can't Autoload cleanly as this clashes 8.3 with &retrieve sub retrieve_fd { &fd_retrieve } # Backward compatibility +# By default restricted hashes are downgraded on earlier perls. + +$Storable::downgrade_restricted = 1; +$Storable::accept_future_minor = 1; +bootstrap Storable; +1; +__END__ # -# Determine whether locking is possible, but only when needed. +# Use of Log::Agent is optional. If it hasn't imported these subs then +# Autoloader will kindly supply our fallback implementation. # -my $CAN_FLOCK; +sub logcroak { + Carp::croak(@_); +} + +sub logcarp { + Carp::carp(@_); +} -sub CAN_FLOCK { +# +# Determine whether locking is possible, but only when needed. +# + +sub CAN_FLOCK; my $CAN_FLOCK; sub CAN_FLOCK { return $CAN_FLOCK if defined $CAN_FLOCK; require Config; import Config; return $CAN_FLOCK = @@ -124,9 +83,62 @@ $Config{'d_lockf'}; } -bootstrap Storable; -1; -__END__ +sub show_file_magic { + print <4 byte >0 (net-order %d) +>>4 byte &01 (network-ordered) +>>4 byte =3 (major 1) +>>4 byte =2 (major 1) + +0 string pst0 perl Storable(v0.7) data +>4 byte >0 +>>4 byte &01 (network-ordered) +>>4 byte =5 (major 2) +>>4 byte =4 (major 2) +>>5 byte >0 (minor %d) +EOM +} + +sub read_magic { + my $header = shift; + return unless defined $header and length $header > 11; + my $result; + if ($header =~ s/^perl-store//) { + die "Can't deal with version 0 headers"; + } elsif ($header =~ s/^pst0//) { + $result->{file} = 1; + } + # Assume it's a string. + my ($major, $minor, $bytelen) = unpack "C3", $header; + + my $net_order = $major & 1; + $major >>= 1; + @$result{qw(major minor netorder)} = ($major, $minor, $net_order); + + return $result if $net_order; + + # I assume that it is rare to find v1 files, so this is an intentionally + # inefficient way of doing it, to make the rest of the code constant. + if ($major < 2) { + delete $result->{minor}; + $header = '.' . $header; + $bytelen = $minor; + } + + @$result{qw(byteorder intsize longsize ptrsize)} = + unpack "x3 A$bytelen C3", $header; + + if ($major >= 2 and $minor >= 2) { + $result->{nvsize} = unpack "x6 x$bytelen C", $header; + } + $result; +} # # store @@ -234,6 +246,7 @@ # Call C routine nstore or pstore, depending on network order eval { $ret = &$xsptr($file, $self) }; logcroak $@ if $@ =~ s/\.?\n$/,/; + local $\; print $file ''; # Autoflush the file if wanted $@ = $da; return $ret ? $ret : undef; } @@ -350,7 +363,7 @@ =head1 NAME -Storable - persistency for perl data structures +Storable - persistence for Perl data structures =head1 SYNOPSIS @@ -385,19 +398,20 @@ =head1 DESCRIPTION -The Storable package brings persistency to your perl data structures +The Storable package brings persistence to your Perl data structures containing SCALAR, ARRAY, HASH or REF objects, i.e. anything that can be -convenientely stored to disk and retrieved at a later time. +conveniently stored to disk and retrieved at a later time. It can be used in the regular procedural way by calling C with a reference to the object to be stored, along with the file name where the image should be written. + The routine returns C for I/O problems or other internal error, a true value otherwise. Serious errors are propagated as a C exception. -To retrieve data stored to disk, use C with a file name, -and the objects stored into that file are recreated into memory for you, -a I to the root object being returned. In case an I/O error +To retrieve data stored to disk, use C with a file name. +The objects stored into that file are recreated into memory for you, +and a I to the root object is returned. In case an I/O error occurs while reading, C is returned instead. Other serious errors are propagated via C. @@ -409,7 +423,7 @@ At the cost of a slight header overhead, you may store to an already opened file descriptor using the C routine, and retrieve from a file via C. Those names aren't imported by default, -so you will have to do that explicitely if you need those routines. +so you will have to do that explicitly if you need those routines. The file descriptor you supply must be already opened, for read if you're going to retrieve and for write if you wish to store. @@ -456,35 +470,35 @@ Storable provides you with a C interface which does not create that intermediary scalar but instead freezes the structure in some -internal memory space and then immediatly thaws it out. +internal memory space and then immediately thaws it out. =head1 ADVISORY LOCKING -The C and C routine are equivalent to C -and C, only they get an exclusive lock on the file before -writing. Likewise, C performs as C, but also -gets a shared lock on the file before reading. - -Like with any advisory locking scheme, the protection only works if -you systematically use C and C. If one -side of your application uses C whilst the other uses C, +The C and C routine are equivalent to +C and C, except that they get an exclusive lock on +the file before writing. Likewise, C does the same +as C, but also gets a shared lock on the file before reading. + +As with any advisory locking scheme, the protection only works if you +systematically use C and C. If one side of +your application uses C whilst the other uses C, you will get no protection at all. -The internal advisory locking is implemented using Perl's flock() routine. -If your system does not support any form of flock(), or if you share -your files across NFS, you might wish to use other forms of locking by -using modules like LockFile::Simple which lock a file using a filesystem -entry, instead of locking the file descriptor. +The internal advisory locking is implemented using Perl's flock() +routine. If your system does not support any form of flock(), or if +you share your files across NFS, you might wish to use other forms +of locking by using modules such as LockFile::Simple which lock a +file using a filesystem entry, instead of locking the file descriptor. =head1 SPEED The heart of Storable is written in C for decent speed. Extra low-level -optimization have been made when manipulating perl internals, to -sacrifice encapsulation for the benefit of a greater speed. +optimizations have been made when manipulating perl internals, to +sacrifice encapsulation for the benefit of greater speed. =head1 CANONICAL REPRESENTATION -Normally Storable stores elements of hashes in the order they are +Normally, Storable stores elements of hashes in the order they are stored internally by Perl, i.e. pseudo-randomly. If you set C<$Storable::canonical> to some C value, Storable will store hashes with the elements sorted by their key. This allows you to @@ -492,9 +506,80 @@ even the compressed frozen representations), which can be useful for creating lookup tables for complicated queries. -Canonical order does not imply network order, those are two orthogonal +Canonical order does not imply network order; those are two orthogonal settings. +=head1 CODE REFERENCES + +Since Storable version 2.05, CODE references may be serialized with +the help of L. To enable this feature, set +C<$Storable::Deparse> to a true value. To enable deserializazion, +C<$Storable::Eval> should be set to a true value. Be aware that +deserialization is done through C, which is dangerous if the +Storable file contains malicious data. You can set C<$Storable::Eval> +to a subroutine reference which would be used instead of C. See +below for an example using a L compartment for deserialization +of CODE references. + +=head1 FORWARD COMPATIBILITY + +This release of Storable can be used on a newer version of Perl to +serialize data which is not supported by earlier Perls. By default, +Storable will attempt to do the right thing, by Cing if it +encounters data that it cannot deserialize. However, the defaults +can be changed as follows: + +=over 4 + +=item utf8 data + +Perl 5.6 added support for Unicode characters with code points > 255, +and Perl 5.8 has full support for Unicode characters in hash keys. +Perl internally encodes strings with these characters using utf8, and +Storable serializes them as utf8. By default, if an older version of +Perl encounters a utf8 value it cannot represent, it will C. +To change this behaviour so that Storable deserializes utf8 encoded +values as the string of bytes (effectively dropping the I flag) +set C<$Storable::drop_utf8> to some C value. This is a form of +data loss, because with C<$drop_utf8> true, it becomes impossible to tell +whether the original data was the Unicode string, or a series of bytes +that happen to be valid utf8. + +=item restricted hashes + +Perl 5.8 adds support for restricted hashes, which have keys +restricted to a given set, and can have values locked to be read only. +By default, when Storable encounters a restricted hash on a perl +that doesn't support them, it will deserialize it as a normal hash, +silently discarding any placeholder keys and leaving the keys and +all values unlocked. To make Storable C instead, set +C<$Storable::downgrade_restricted> to a C value. To restore +the default set it back to some C value. + +=item files from future versions of Storable + +Earlier versions of Storable would immediately croak if they encountered +a file with a higher internal version number than the reading Storable +knew about. Internal version numbers are increased each time new data +types (such as restricted hashes) are added to the vocabulary of the file +format. This meant that a newer Storable module had no way of writing a +file readable by an older Storable, even if the writer didn't store newer +data types. + +This version of Storable will defer croaking until it encounters a data +type in the file that it does not recognize. This means that it will +continue to read files generated by newer Storable modules which are careful +in what they write out, making it easier to upgrade Storable modules in a +mixed environment. + +The old behaviour of immediate croaking can be re-instated by setting +C<$Storable::accept_future_minor> to some C value. + +=back + +All these variables have no effect on a newer Perl which supports the +relevant feature. + =head1 ERROR REPORTING Storable uses the "exception" paradigm, in that it does not try to workaround @@ -515,7 +600,7 @@ Any class may define hooks that will be called during the serialization and deserialization process on objects that are instances of that class. Those hooks can redefine the way serialization is performed (and therefore, -how the symetrical deserialization should be conducted). +how the symmetrical deserialization should be conducted). Since we said earlier: @@ -530,7 +615,7 @@ Well, you could keep them in sync, but there's no guarantee it will always hold on classes somebody else wrote. Besides, there is little to gain in -doing so: a serializing hook could only keep one attribute of an object, +doing so: a serializing hook could keep only one attribute of an object, which is probably not what should happen during a deep cloning of that same object. @@ -572,7 +657,7 @@ =item C I, I, I, ... The deserializing hook called on the object during deserialization. -But wait. If we're deserializing, there's no object yet... right? +But wait: if we're deserializing, there's no object yet... right? Wrong: the Storable engine creates an empty one for you. If you know Eiffel, you can view C as an alternate creation routine. @@ -591,10 +676,10 @@ it tries to load the class by requiring the package dynamically (using the blessed package name), and then re-attempts the lookup. If at that time the hook cannot be located, the engine croaks. Note that this mechanism -will fail if you define several classes in the same file, but perlmod(1) +will fail if you define several classes in the same file, but L warned you. -It is up to you to use these information to populate I the way you want. +It is up to you to use this information to populate I the way you want. Returned value: none. @@ -602,7 +687,7 @@ =head2 Predicates -Predicates are not exportable. They must be called by explicitely prefixing +Predicates are not exportable. They must be called by explicitly prefixing them with the Storable package name. =over 4 @@ -619,25 +704,26 @@ =item C -Returns true if within a retrieve operation, (via STORABLE_thaw hook). +Returns true if within a retrieve operation (via STORABLE_thaw hook). =back =head2 Recursion -With hooks comes the ability to recurse back to the Storable engine. Indeed, -hooks are regular Perl code, and Storable is convenient when it comes to -serialize and deserialize things, so why not use it to handle the -serialization string? +With hooks comes the ability to recurse back to the Storable engine. +Indeed, hooks are regular Perl code, and Storable is convenient when +it comes to serializing and deserializing things, so why not use it +to handle the serialization string? -There are a few things you need to know however: +There are a few things you need to know, however: =over 4 =item * You can create endless loops if the things you serialize via freeze() -(for instance) point back to the object we're trying to serialize in the hook. +(for instance) point back to the object we're trying to serialize in +the hook. =item * @@ -665,11 +751,26 @@ =head2 Deep Cloning -There is a new Clone module available on CPAN which implements deep cloning +There is a Clone module available on CPAN which implements deep cloning natively, i.e. without freezing to memory and thawing the result. It is aimed to replace Storable's dclone() some day. However, it does not currently support Storable hooks to redefine the way deep cloning is performed. +=head1 Storable magic + +Yes, there's a lot of that :-) But more precisely, in UNIX systems +there's a utility called C, which recognizes data files based on +their contents (usually their first few bytes). For this to work, +a certain file called F needs to taught about the I +of the data. Where that configuration file lives depends on the UNIX +flavour; often it's something like F or +F. Your system administrator needs to do the updating of +the F file. The necessary signature information is output to +STDOUT by invoking Storable::show_file_magic(). Note that the GNU +implementation of the C utility, version 3.38 or later, +is expected to contain support for recognising Storable files +out-of-the-box, in addition to other kinds of Perl files. + =head1 EXAMPLES Here are some code samples showing a possible usage of Storable: @@ -695,35 +796,50 @@ Blue is still 0.100000 Serialization of %color is 102 bytes long. +Serialization of CODE references and deserialization in a safe +compartment: + + use Storable qw(freeze thaw); + use Safe; + use strict; + my $safe = new Safe; + # permitting the "require" opcode is necessary when using "use strict" + $safe->permit(qw(:default require)); + local $Storable::Deparse = 1; + local $Storable::Eval = sub { $safe->reval($_[0]) }; + my $serialized = freeze(sub { print "42\n" }); + my $code = thaw($serialized); + $code->(); # prints 42 + =head1 WARNING If you're using references as keys within your hash tables, you're bound -to disapointment when retrieving your data. Indeed, Perl stringifies +to be disappointed when retrieving your data. Indeed, Perl stringifies references used as hash table keys. If you later wish to access the items via another reference stringification (i.e. using the same reference that was used for the key originally to record the value into the hash table), it will work because both references stringify to the same string. -It won't work across a C and C operations however, because -the addresses in the retrieved objects, which are part of the stringified -references, will probably differ from the original addresses. The -topology of your structure is preserved, but not hidden semantics -like those. +It won't work across a sequence of C and C operations, +however, because the addresses in the retrieved objects, which are +part of the stringified references, will probably differ from the +original addresses. The topology of your structure is preserved, +but not hidden semantics like those. On platforms where it matters, be sure to call C on the descriptors that you pass to Storable functions. Storing data canonically that contains large hashes can be significantly slower than storing the same data normally, as -temprorary arrays to hold the keys for each hash have to be allocated, +temporary arrays to hold the keys for each hash have to be allocated, populated, sorted and freed. Some tests have shown a halving of the speed of storing -- the exact penalty will depend on the complexity of your data. There is no slowdown on retrieval. =head1 BUGS -You can't store GLOB, CODE, FORMLINE, etc... If you can define +You can't store GLOB, CODE, FORMLINE, etc.... If you can define semantics for those operations, feel free to enhance Storable so that it can deal with them. @@ -734,7 +850,7 @@ Setting C<$Storable::canonical> may not yield frozen strings that compare equal due to possible stringification of numbers. When the -string version of a scalar exists, it is the form stored, therefore +string version of a scalar exists, it is the form stored; therefore, if you happen to use your numbers as strings between two freezing operations on the same data structures, you will get different results. @@ -752,6 +868,73 @@ of floating-point numbers, you will not be able be able to exchange floating-point data, even with nstore(). +C is a blunt tool. There is no facility either to +return B strings as utf8 sequences, or to attempt to convert utf8 +data back to 8 bit and C if the conversion fails. + +Prior to Storable 2.01, no distinction was made between signed and +unsigned integers on storing. By default Storable prefers to store a +scalars string representation (if it has one) so this would only cause +problems when storing large unsigned integers that had never been coverted +to string or floating point. In other words values that had been generated +by integer operations such as logic ops and then not used in any string or +arithmetic context before storing. + +=head2 64 bit data in perl 5.6.0 and 5.6.1 + +This section only applies to you if you have existing data written out +by Storable 2.02 or earlier on perl 5.6.0 or 5.6.1 on Unix or Linux which +has been configured with 64 bit integer support (not the default) +If you got a precompiled perl, rather than running Configure to build +your own perl from source, then it almost certainly does not affect you, +and you can stop reading now (unless you're curious). If you're using perl +on Windows it does not affect you. + +Storable writes a file header which contains the sizes of various C +language types for the C compiler that built Storable (when not writing in +network order), and will refuse to load files written by a Storable not +on the same (or compatible) architecture. This check and a check on +machine byteorder is needed because the size of various fields in the file +are given by the sizes of the C language types, and so files written on +different architectures are incompatible. This is done for increased speed. +(When writing in network order, all fields are written out as standard +lengths, which allows full interworking, but takes longer to read and write) + +Perl 5.6.x introduced the ability to optional configure the perl interpreter +to use C's C type to allow scalars to store 64 bit integers on 32 +bit systems. However, due to the way the Perl configuration system +generated the C configuration files on non-Windows platforms, and the way +Storable generates its header, nothing in the Storable file header reflected +whether the perl writing was using 32 or 64 bit integers, despite the fact +that Storable was storing some data differently in the file. Hence Storable +running on perl with 64 bit integers will read the header from a file +written by a 32 bit perl, not realise that the data is actually in a subtly +incompatible format, and then go horribly wrong (possibly crashing) if it +encountered a stored integer. This is a design failure. + +Storable has now been changed to write out and read in a file header with +information about the size of integers. It's impossible to detect whether +an old file being read in was written with 32 or 64 bit integers (they have +the same header) so it's impossible to automatically switch to a correct +backwards compatibility mode. Hence this Storable defaults to the new, +correct behaviour. + +What this means is that if you have data written by Storable 1.x running +on perl 5.6.0 or 5.6.1 configured with 64 bit integers on Unix or Linux +then by default this Storable will refuse to read it, giving the error +I. If you have such data then you you +should set C<$Storable::interwork_56_64bit> to a true value to make this +Storable read and write files with the old header. You should also +migrate your data, or any older perl you are communicating with, to this +current version of Storable. + +If you don't have data written with specific configuration of perl described +above, then you do not and should not do anything. Don't set the flag - +not only will Storable on an identically configured perl refuse to load them, +but Storable a differently configured perl will load them believing them +to be correct for it, and then may well fail or crash part way through +reading them. + =head1 CREDITS Thank you to (in chronological order): @@ -774,27 +957,26 @@ Benjamin Holzman contributed the tied variable support, Andrew Ford contributed the canonical order for hashes, and Gisle Aas fixed -a few misunderstandings of mine regarding the Perl internals, +a few misunderstandings of mine regarding the perl internals, and optimized the emission of "tags" in the output streams by simply counting the objects instead of tagging them (leading to a binary incompatibility for the Storable image starting at version -0.6--older images are of course still properly understood). +0.6--older images are, of course, still properly understood). Murray Nesbitt made Storable thread-safe. Marc Lehmann added overloading -and reference to tied items support. - -=head1 TRANSLATIONS - -There is a Japanese translation of this man page available at -http://member.nifty.ne.jp/hippo2000/perltips/storable.htm , -courtesy of Kawai, Takanori . +and references to tied items support. =head1 AUTHOR -Raphael Manfredi FRaphael_Manfredi at pobox.comE> +Storable was written by Raphael Manfredi FRaphael_Manfredi at pobox.comE> +Maintenance is now done by the perl5-porters Fperl5-porters at perl.orgE> + +Please e-mail us with problems, bug fixes, comments and complaints, +although if you have complements you should send them to Raphael. +Please don't e-mail Raphael with problems, as he no longer works on +Storable, and your message will be delayed while he forwards it to us. =head1 SEE ALSO -Clone(3). +L. =cut - Modified: trunk/orca/packages/Storable-2.05/MANIFEST ============================================================================== --- trunk/orca/packages/Storable-2.05/MANIFEST (original) +++ trunk/orca/packages/Storable-2.05/MANIFEST 2002-11-09 12:32:39.000000000 -0800 @@ -1,23 +1,32 @@ -ChangeLog Changes since baseline -MANIFEST This shipping list -Makefile.PL Generic Makefile template -README Read this first -Storable.pm The perl side of Storable -Storable.xs The C side of Storable -t/blessed.t Test blessed objects -t/canonical.t Test canonical hash table dumping -t/compat-0.6.t Test backward compatibility with 0.6 at 11 -t/dclone.t Test deep cloning -t/dump.pl Small utility to dump data structures -t/forgive.t Test forgiveness -t/forgive.t Test if $Storable::forgive_me works -t/freeze.t Test memory store (freeze/thaw) operations -t/lock.t Test advisory locking routines -t/overload.t Test overloaded behaviour -t/recurse.t Test recursive calls -t/retrieve.t Test retrieve operation -t/store.t Test store operation -t/tied.t Test serialization of tied SVs. -t/tied_hook.t Test tied SVs with hooks -t/tied_items.t Test ref to items in tied hash/array -t/utf8.t Test UTF8 strings +README Read this first +MANIFEST This shipping list +Makefile.PL Generic Makefile template +Storable.pm The perl side of Storable +Storable.xs The C side of Storable +ChangeLog Changes since baseline +t/blessed.t See if Storable works +t/canonical.t See if Storable works +t/code.t Test (de)serialization of code references +t/compat06.t See if Storable works +t/croak.t See if Storable works +t/dclone.t See if Storable works +t/downgrade.t See if Storable works +t/forgive.t See if Storable works +t/freeze.t See if Storable works +t/integer.t For "use integer" testing +t/interwork56.t Test combatibility kludge for 64bit data under 5.6.x +t/lock.t See if Storable works +t/make_56_interwork.pl Make test data for interwork56.t +t/make_downgrade.pl Make test data for downgrade.t +t/malice.t See if Storable copes with corrupt files +t/overload.t See if Storable works +t/recurse.t See if Storable works +t/restrict.t See if Storable works +t/retrieve.t See if Storable works +t/st-dump.pl helper routines for tests +t/store.t See if Storable works +t/tied.t See if Storable works +t/tied_hook.t See if Storable works +t/tied_items.t See if Storable works +t/utf8.t See if Storable works +t/utf8hash.t See if Storable works Modified: trunk/orca/packages/Storable-2.05/Makefile.PL ============================================================================== --- trunk/orca/packages/Storable-2.05/Makefile.PL (original) +++ trunk/orca/packages/Storable-2.05/Makefile.PL 2002-11-09 12:32:40.000000000 -0800 @@ -1,26 +1,39 @@ -# $Id: Makefile.PL,v 1.0.1.1 2001/01/03 09:38:39 ram Exp $ # # Copyright (c) 1995-2000, Raphael Manfredi # # You may redistribute only under the same terms as Perl 5, as specified # in the README file that comes with the distribution. # -# $Log: Makefile.PL,v $ -# Revision 1.0.1.1 2001/01/03 09:38:39 ram -# patch7: removed spurious 'clean' entry -# -# Revision 1.0 2000/09/01 19:40:41 ram -# Baseline for first official release. -# use ExtUtils::MakeMaker; use Config; WriteMakefile( - 'NAME' => 'Storable', - 'DISTNAME' => "Storable", - 'MAN3PODS' => {}, - 'VERSION_FROM' => 'Storable.pm', - 'dist' => { SUFFIX => 'gz', COMPRESS => 'gzip -f' }, + NAME => 'Storable', + DISTNAME => "Storable", + MAN3PODS => {}, + PREREQ_PM => { 'Test::More' => '0.41' }, + INSTALLDIRS => 'perl', + VERSION_FROM => 'Storable.pm', + dist => { SUFFIX => 'gz', COMPRESS => 'gzip -f' }, ); +my $ivtype = $Config{ivtype}; + +# I don't know if the VMS folks ever supported long long on 5.6.x +if ($ivtype and $ivtype eq 'long long' and $^O !~ /^MSWin/) { + print <<'EOM'; + +You appear to have a perl configured to use 64 bit integers in its scalar +variables. If you have existing data written with an earlier version of +Storable which this version of Storable refuses to load with a + + Byte order is not compatible + +error, then please read the section "64 bit data in perl 5.6.0 and 5.6.1" +in the Storable documentation for instructions on how to read your data. + +(You can find the documentation at the end of Storable.pm in POD format) + +EOM +} Modified: trunk/orca/packages/Storable-2.05/ChangeLog ============================================================================== --- trunk/orca/packages/Storable-2.05/ChangeLog (original) +++ trunk/orca/packages/Storable-2.05/ChangeLog 2002-11-09 12:32:40.000000000 -0800 @@ -1,567 +1,620 @@ -Tue Aug 28 23:53:20 MEST 2001 Raphael Manfredi - -. Description: +Thu Oct 3 08:57:22 IST 2002 Abhijit Menon-Sen - Fixed truncation race with lock_retrieve() in lock_store(). - The file has to be truncated only once the exclusive lock is held. + Version 2.05 - Removed spurious debugging messages in .xs file. + Adds support for CODE references from Slaven Rezic + . -Sun Jul 1 13:27:32 MEST 2001 Raphael Manfredi +Fri Jun 7 23:55:41 BST 2002 Nicholas Clark -. Description: + Version 2.04 + + Bug fix from Radu Greab (plus regression test) + to fix a recently introduced bug detected by Dave Rolsky. + Bug was that for a non threaded build, the class information was + being lost at freeze time on the first object with a STORABLE_freeze + hook. Consequentially the object was not blessed at all when thawed. + (The presence (or lack) of STORABLE_thaw was irrelevant; this was + a store-time data lost bug, caused by failure to initialize internal + context) + The bug was introduced as development perl change 16442 (on + 2002/05/07), so has been present since 2.00. + Patches to introduce more regression tests to reduce the chance of + a reoccurance of this sort of goof are always welcome. + +Thu May 30 20:31:08 BST 2002 Nicholas Clark - Systematically use "=over 4" for POD linters. - Apparently, POD linters are much stricter than would - otherwise be needed, but that's OK. + Version 2.03 Header changes on 5.6.x on Unix where IV is long long - Fixed memory corruption on croaks during thaw(). Thanks - to Claudio Garcia for reproducing this bug and providing the - code to exercise it. Added test cases for this bug, adapted - from Claudio's code. + 5.6.x introduced the ability to have IVs as long long. However, + Configure still defined BYTEORDER based on the size of a long. + Storable uses the BYTEORDER value as part of the header, but + doesn't explicity store sizeof(IV) anywhere in the header. + Hence on 5.6.x built with IV as long long on a platform that + uses Configure (ie most things except VMS and Windows) headers + are identical for the different IV sizes, despite the files + containing some fields based on sizeof(IV) + + 5.8.0 is consistent; all platforms have BYTEORDER in config.h + based on sizeof(IV) rather than sizeof(long). This means that + the value of BYTEORDER will change from (say) 4321 to 87654321 + between 5.6.1 and 5.8.0 built with the same options to Configure + on the same machine. This means that the Storable header will + differ, and the two versions will wrongly thing that they are + incompatible. + + For the benefit of long term consistency, Storable now + implements the 5.8.0 BYTEORDER policy on 5.6.x. This means that + 2.03 onwards default to be incompatible with 2.02 and earlier + (ie the large 1.0.x installed base) on the same 5.6.x perl. + + To allow interworking, a new variable + $Storable::interwork_56_64bit is introduced. It defaults to + false. Set it to true to read and write old format files. Don't + use it unless you have existing stored data written with 5.6.x + that you couldn't otherwise read, or you need to interwork with + a machine running older Storable on a 5.6.x with long long IVs + (i.e., you probably don't need to use it). + +Sat May 25 22:38:39 BST 2002 Nicholas Clark + + Version 2.02 + + Rewrite Storable.xs so that the file header structure for write_magic + is built at compile time, and check_magic attempts to the header in + blocks rather than byte per byte. These changes make the compiled + extension 2.25% smaller, but are not significant enough to give a + noticeable speed up. + +Thu May 23 22:50:41 BST 2002 Nicholas Clark + + Version 2.01 + + - New regression tests integer.t + - Add code to safely store large unsigned integers. + - Change code not to attempt to store large integers (ie > 32 bits) + in network order as 32 bits. + + *Never* underestimate the value of a pathological test suite carefully + crafted with maximum malice before writing a line of real code. It + prevents crafty bugs from stowing away in your released code. + It's much less embarrassing to find them before you ship. + (Well, never underestimate it if you ever want to work for me) + +Fri May 17 22:48:59 BST 2002 Nicholas Clark + + Version 2.0, binary format 2.5 (but writes format 2.4 on pre 5.7.3) + + The perl5 porters have decided to make sure that Storable still + builds on pre-5.8 perls, and make the 5.8 version available on CPAN. + The VERSION is now 2.0, and it passes all tests on 5.005_03, 5.6.1 + and 5.6.1 with threads. On 5.6.0 t/downgrade.t fails tests 34 and 37, + due to a bug in 5.6.0 - upgrade to 5.6.1. + + Jarkko and I have collated the list of changes the perl5 porters have + from the perl5 Changes file: + + - data features of upcoming perl 5.8.0 are supported: Unicode hash + keys (Unicode hash values have been supported since Storable 1.0.1) + and "restricted hashes" (readonly hashes and hash entries) + - a newer version of perl can now be used to serialize data which is + not supported in earlier perls: Storable will attempt to do the + right thing for as long as possible, croaking only when safe data + conversion simply isn't possible. Alternatively earlier perls can + opt to have a lossy downgrade data instead of croaking + - when built with perls pre 5.7.3 this Storable writes out files + with binary format 2.4, the same format as Storable 1.0.8 onwards. + This should mean that this Storable will inter-operate seamlessly + with any Storable 1.0.8 or newer on perls pre 5.7.3 + - dclone() now works with empty string scalar objects + - retrieving of large hashes is now more efficient + - more routines autosplit out of the main module, so Storable should + load slightly more quickly + - better documentation + - the internal context objects are now freed explicitly, rather than + relying on thread or process exit + - bugs fixed in debugging trace code affecting builds made with 64 bit + IVs + - code tidy-ups to allow clean compiles with more warning options + turned on avoid problems with $@ getting corrupted on 5.005_03 if + Carp wasn't already loaded + - added &show_file_magic, so you can add to /etc/magic and teach + Unix's file command about Storable files + + We plan to keep Storable on CPAN in sync with the Perl core, so + if you encounter bugs or other problems building or using Storable, + please let us know at perl5-porters at perl.org + Patches welcome! + +Sat Dec 1 14:37:54 MET 2001 Raphael Manfredi + + This is the LAST maintenance release of the Storable module. + Indeed, Storable is now part of perl 5.8, and will be maintained + as part of Perl. The CPAN module will remain available there + for people running pre-5.8 perls. + + Avoid requiring Fcntl upfront, useful to embedded runtimes. + Use an eval {} for testing, instead of making Storable.pm + simply fail its compilation in the BEGIN block. - Made code compile cleanly with -Wall (from Jarkko Hietaniemi). + store_fd() will now correctly autoflush file if needed. - Changed tagnum and classnum from I32 to IV in context. Also - from Jarkko. +Tue Aug 28 23:53:20 MEST 2001 Raphael Manfredi -Thu Mar 15 01:22:32 MET 2001 Raphael Manfredi + Fixed truncation race with lock_retrieve() in lock_store(). + The file has to be truncated only once the exclusive lock is held. -. Description: + Removed spurious debugging messages in .xs file. - Last version was wrongly compiling with assertions on, due - to an edit glitch. That did not cause any problem (apart from - a slight performance loss) excepted on Win* platforms, where the - assertion code does not compile. +Sun Jul 1 13:27:32 MEST 2001 Raphael Manfredi -Sat Feb 17 13:37:37 MET 2001 Raphael Manfredi + Systematically use "=over 4" for POD linters. + Apparently, POD linters are much stricter than would + otherwise be needed, but that's OK. + + Fixed memory corruption on croaks during thaw(). Thanks + to Claudio Garcia for reproducing this bug and providing the + code to exercise it. Added test cases for this bug, adapted + from Claudio's code. -. Description: + Made code compile cleanly with -Wall (from Jarkko Hietaniemi). - Version 1.0.10. + Changed tagnum and classnum from I32 to IV in context. Also + from Jarkko. - Forgot to increase version number at previous patch (there were - two of them, which is why we jump from 1.0.8 to 1.0.10). +Thu Mar 15 01:22:32 MET 2001 Raphael Manfredi -Sat Feb 17 13:35:00 MET 2001 Raphael Manfredi + Last version was wrongly compiling with assertions on, due + to an edit glitch. That did not cause any problem (apart from + a slight performance loss) excepted on Win* platforms, where the + assertion code does not compile. -. Description: +Sat Feb 17 13:37:37 MET 2001 Raphael Manfredi - Version 1.0.8, binary format 2.4. + Version 1.0.10. - Fixed incorrect error message. + Forgot to increase version number at previous patch (there were + two of them, which is why we jump from 1.0.8 to 1.0.10). - Now bless objects ASAP at retrieve time, which is meant to fix - two bugs: +Sat Feb 17 13:35:00 MET 2001 Raphael Manfredi - * Indirect references to overloaded object were not able to - restore overloading if the object was not blessed yet, - which was possible since blessing occurred only after the - recursive retrieval. + Version 1.0.8, binary format 2.4. - * Storable hooks asking for serialization of blessed ref could - get un-blessed refs at retrieval time, for the very same - reason. + Fixed incorrect error message. - The fix implemented here was suggested by Nick Ing-Simmons. + Now bless objects ASAP at retrieve time, which is meant to fix + two bugs: - Added support for blessed ref to tied structures. This is the - cause for the binary format change. + * Indirect references to overloaded object were not able to + restore overloading if the object was not blessed yet, + which was possible since blessing occurred only after the + recursive retrieval. - Added EBCDIC version of the compatibility test with 0.6.11, - from Peter Prymmer + * Storable hooks asking for serialization of blessed ref could + get un-blessed refs at retrieval time, for the very same + reason. - Added tests for the new features, and to make sure the bugs they - are meant to fix are indeed fixed. + The fix implemented here was suggested by Nick Ing-Simmons. -Wed Jan 3 10:43:18 MET 2001 Raphael Manfredi + Added support for blessed ref to tied structures. This is the + cause for the binary format change. -. Description: + Added EBCDIC version of the compatibility test with 0.6.11, + from Peter Prymmer - Removed spurious 'clean' entry in Makefile.PL. + Added tests for the new features, and to make sure the bugs they + are meant to fix are indeed fixed. - Added CAN_FLOCK to determine whether we can flock() or not, - by inspecting Perl's configuration parameters, as determined - by Configure. +Wed Jan 3 10:43:18 MET 2001 Raphael Manfredi - Trace offending package when overloading cannot be restored - on a scalar. + Removed spurious 'clean' entry in Makefile.PL. - Made context cleanup safer to avoid dup freeing, mostly in the - presence of repeated exceptions during store/retrieve (which can - cause memory leaks anyway, so it's just additional safety, not a - definite fix). + Added CAN_FLOCK to determine whether we can flock() or not, + by inspecting Perl's configuration parameters, as determined + by Configure. + + Trace offending package when overloading cannot be restored + on a scalar. + + Made context cleanup safer to avoid dup freeing, mostly in the + presence of repeated exceptions during store/retrieve (which can + cause memory leaks anyway, so it's just additional safety, not a + definite fix). Sun Nov 5 18:23:48 MET 2000 Raphael Manfredi -. Description: - - Version 1.0.6. + Version 1.0.6. - Fixed severe "object lost" bug for STORABLE_freeze returns, - when refs to lexicals, taken within the hook, were to be - serialized by Storable. Enhanced the t/recurse.t test to - stress hook a little more with refs to lexicals. + Fixed severe "object lost" bug for STORABLE_freeze returns, + when refs to lexicals, taken within the hook, were to be + serialized by Storable. Enhanced the t/recurse.t test to + stress hook a little more with refs to lexicals. Thu Oct 26 19:14:38 MEST 2000 Raphael Manfredi -. Description: + Version 1.0.5. - Version 1.0.5. + Documented that store() and retrieve() can return undef. + That is, the error reporting is not always made via exceptions, + as the paragraph on error reporting was implying. + + Auto requires module of blessed ref when STORABLE_thaw misses. + When the Storable engine looks for the STORABLE_thaw hook and + does not find it, it now tries to require the package into which + the blessed reference is. - Documented that store() and retrieve() can return undef. - That is, the error reporting is not always made via exceptions, - as the paragraph on error reporting was implying. - - Auto requires module of blessed ref when STORABLE_thaw misses. - When the Storable engine looks for the STORABLE_thaw hook and - does not find it, it now tries to require the package into which - the blessed reference is. - - Just check $^O, in t/lock.t: there's no need to pull the whole - Config module for that. + Just check $^O, in t/lock.t: there's no need to pull the whole + Config module for that. Mon Oct 23 20:03:49 MEST 2000 Raphael Manfredi -. Description: - - Version 1.0.4. - - Protected calls to flock() for DOS platform: apparently, the - flock/fcnlt emulation is reported to be broken on that - platform. + Version 1.0.4. - Added logcarp emulation if they don't have Log::Agent, since - we now use it to carp when lock_store/lock_retrieve is used - on DOS. + Protected calls to flock() for DOS platform: apparently, the + flock/fcnlt emulation is reported to be broken on that + platform. + + Added logcarp emulation if they don't have Log::Agent, since + we now use it to carp when lock_store/lock_retrieve is used + on DOS. Fri Sep 29 21:52:29 MEST 2000 Raphael Manfredi -. Description: + Version 1.0.3. - Version 1.0.3. - - Avoid using "tainted" and "dirty" since Perl remaps them via - cpp (i.e. #define). This is deeply harmful when threading - is enabled. This concerned both the context structure and - local variable and argument names. Brrr..., scary! + Avoid using "tainted" and "dirty" since Perl remaps them via + cpp (i.e. #define). This is deeply harmful when threading + is enabled. This concerned both the context structure and + local variable and argument names. Brrr..., scary! Thu Sep 28 23:46:39 MEST 2000 Raphael Manfredi -. Description: - - Version 1.0.2. + Version 1.0.2. - Fixed spelling in README. + Fixed spelling in README. - Added lock_store, lock_nstore, and lock_retrieve (advisory locking) - after a proposal from Erik Haugan . + Added lock_store, lock_nstore, and lock_retrieve (advisory locking) + after a proposal from Erik Haugan . - Perls before 5.004_04 lack newSVpvn, added remapping in XS. + Perls before 5.004_04 lack newSVpvn, added remapping in XS. - Fixed stupid typo in the t/utf8.t test. + Fixed stupid typo in the t/utf8.t test. Sun Sep 17 18:51:10 MEST 2000 Raphael Manfredi -. Description: - - Version 1.0.1, binary format 2.3. + Version 1.0.1, binary format 2.3. - Documented that doubles are stored stringified by nstore(). + Documented that doubles are stored stringified by nstore(). - Added Salvador Ortiz Garcia in CREDITS section, He identified - a bug in the store hooks and proposed the right fix: the class - id was allocated too soon. His bug case was also added to - the regression test suite. + Added Salvador Ortiz Garcia in CREDITS section, He identified + a bug in the store hooks and proposed the right fix: the class + id was allocated too soon. His bug case was also added to + the regression test suite. - Now only taint retrieved data when source was tainted. A bug - discovered by Marc Lehmann. + Now only taint retrieved data when source was tainted. A bug + discovered by Marc Lehmann. - Added support for UTF-8 strings, a contribution of Marc Lehmann. - This is normally only activated in post-5.6 perls. + Added support for UTF-8 strings, a contribution of Marc Lehmann. + This is normally only activated in post-5.6 perls. Thu Aug 31 23:06:06 MEST 2000 Raphael Manfredi - First official release Storable 1.0, for inclusion in perl 5.7.0. - The license scheme is now compatible with Perl's. + First official release Storable 1.0, for inclusion in perl 5.7.0. + The license scheme is now compatible with Perl's. Thu Aug 24 01:02:02 MEST 2000 Raphael Manfredi -. Description: + ANSI-fied most of the code, preparing for Perl core integration. + The next version of Storable will be 0.8, and will be integrated + into the Perl core (development branch). + Dispatch tables were moved upfront to relieve some compilers, + especially on AIX and Windows platforms. - ANSI-fied most of the code, preparing for Perl core integration. - The next version of Storable will be 0.8, and will be integrated - into the Perl core (development branch). - - Dispatch tables were moved upfront to relieve some compilers, - especially on AIX and Windows platforms. - - Merged 64-bit fixes from perl5-porters. + Merged 64-bit fixes from perl5-porters. Mon Aug 14 09:22:04 MEST 2000 Raphael Manfredi -. Description: + Added a refcnt dec in retrieve_tied_key(): sv_magic() increases + the refcnt on the mg_ptr as well. - Added a refcnt dec in retrieve_tied_key(): sv_magic() increases - the refcnt on the mg_ptr as well. - - Removed spurious dependency to Devel::Peek, which was used for - testing only in t/tied_items.t. Thanks to Conrad Heiney - for spotting it first. + Removed spurious dependency to Devel::Peek, which was used for + testing only in t/tied_items.t. Thanks to Conrad Heiney + for spotting it first. Sun Aug 13 22:12:59 MEST 2000 Raphael Manfredi -. Description: - - Marc Lehmann kindly contributed code to add overloading support - and to handle references to tied variables. + Marc Lehmann kindly contributed code to add overloading support + and to handle references to tied variables. - Rewrote leading blurb about compatibility to make it clearer what - "backward compatibility" is about: when I say 0.7 is backward - compatible with 0.6, it means the revision 0.7 can read files - produced by 0.6. - - Mention new Clone(3) extension in SEE ALSO. - - Was wrongly optimizing for "undef" values in hashes by not - fully recursing: as a result, tied "undef" values were incorrectly - serialized. + Rewrote leading blurb about compatibility to make it clearer what + "backward compatibility" is about: when I say 0.7 is backward + compatible with 0.6, it means the revision 0.7 can read files + produced by 0.6. + + Mention new Clone(3) extension in SEE ALSO. + + Was wrongly optimizing for "undef" values in hashes by not + fully recursing: as a result, tied "undef" values were incorrectly + serialized. Sun Jul 30 12:59:17 MEST 2000 Raphael Manfredi - First revision of Storable 0.7. + First revision of Storable 0.7. - The serializing format is new, known as version 2.0. It is fully - backward compatible with 0.6. Earlier formats are deprecated and - have not even been tested: next version will drop pre-0.6 format. + The serializing format is new, known as version 2.0. It is fully + backward compatible with 0.6. Earlier formats are deprecated and + have not even been tested: next version will drop pre-0.6 format. - Changes since 0.6 at 11: + Changes since 0.6 at 11: - - Moved interface to the "beta" status. Some tiny parts are still - subject to change, but nothing important enough to warrant an "alpha" - status any longer. + - Moved interface to the "beta" status. Some tiny parts are still + subject to change, but nothing important enough to warrant an "alpha" + status any longer. - - Slightly reduced the size of the Storable image by factorizing - object class names and removing final object storage notification due - to a redesign of the blessed object storing. + - Slightly reduced the size of the Storable image by factorizing + object class names and removing final object storage notification due + to a redesign of the blessed object storing. - - Classes can now redefine how they wish their instances to be serialized - and/or deep cloned. Serializing hooks are written in Perl code. + - Classes can now redefine how they wish their instances to be serialized + and/or deep cloned. Serializing hooks are written in Perl code. - - The engine is now fully re-entrant. + - The engine is now fully re-entrant. Sun Apr 2 23:47:50 MEST 2000 Raphael Manfredi -. Description: - - Added provision to detect more recent binary formats, since - the new upcoming Storable-0.7 will use a different format. - In order to prevent attempting the de-serialization of newer - formats by older versions, I'm adding this now to the 0.6 series. - - I'm expecting this revision to be the last of the 0.6 series. - Unless it does not work with perl 5.6, which I don't use yet, - and therefore against which I cannot test. + Added provision to detect more recent binary formats, since + the new upcoming Storable-0.7 will use a different format. + In order to prevent attempting the de-serialization of newer + formats by older versions, I'm adding this now to the 0.6 series. + + I'm expecting this revision to be the last of the 0.6 series. + Unless it does not work with perl 5.6, which I don't use yet, + and therefore against which I cannot test. Wed Mar 29 19:55:21 MEST 2000 Raphael Manfredi -. Description: - - Added note about format incompatibilities with old versions - (i.e. pre 0.5 at 9 formats, which cannot be understood as there - was no versionning information in the file by then). - - Protect all $@ variables when eval {} used, to avoid corrupting - it when store/retrieve is called within an exception handler. - - Mistakenly included "patchlevel.h" instead of , - preventing Perl's patchlevel from being included, which is - needed starting from 5.6. + Added note about format incompatibilities with old versions + (i.e. pre 0.5 at 9 formats, which cannot be understood as there + was no versionning information in the file by then). + + Protect all $@ variables when eval {} used, to avoid corrupting + it when store/retrieve is called within an exception handler. + + Mistakenly included "patchlevel.h" instead of , + preventing Perl's patchlevel from being included, which is + needed starting from 5.6. Tue May 12 09:15:15 METDST 1998 Raphael Manfredi -. Description: - - Fixed shared "undef" bug in hashes, which did not remain shared - through store/retrieve. + Fixed shared "undef" bug in hashes, which did not remain shared + through store/retrieve. Thu Feb 10 19:48:16 MET 2000 Raphael Manfredi -. Description: - - added last_op_in_netorder() predicate - documented last_op_in_netorder() - added tests for the new last_op_in_netorder() predicate + added last_op_in_netorder() predicate + documented last_op_in_netorder() + added tests for the new last_op_in_netorder() predicate Wed Oct 20 19:07:36 MEST 1999 Raphael Manfredi -. Description: - - Forgot to update VERSION + Forgot to update VERSION Tue Oct 19 21:25:02 MEST 1999 Raphael Manfredi -. Description: + Added mention of japanese translation for the manual page. - Added mention of japanese translation for the manual page. + Fixed typo in macro that made threaded code not compilable, + especially on Win32 platforms. - Fixed typo in macro that made threaded code not compilable, - especially on Win32 platforms. - - Changed detection of older perls (pre-5.005) by testing PATCHLEVEL - directly instead of relying on internal symbols. + Changed detection of older perls (pre-5.005) by testing PATCHLEVEL + directly instead of relying on internal symbols. Tue Sep 14 22:13:28 MEST 1999 Raphael Manfredi -. Description: - - Integrated "thread-safe" patch from Murray Nesbitt. - Note that this may not be very efficient for threaded code, - see comment in the code. + Integrated "thread-safe" patch from Murray Nesbitt. + Note that this may not be very efficient for threaded code, + see comment in the code. - Try to avoid compilation warning on 64-bit CPUs. Can't test it, - since I don't have access to such machines. + Try to avoid compilation warning on 64-bit CPUs. Can't test it, + since I don't have access to such machines. Mon Jul 12 14:37:19 METDST 1999 Raphael Manfredi -. Description: + changed my e-mail to pobox. - changed my e-mail to pobox. + mentionned it is not thread-safe. - mentionned it is not thread-safe. + updated version number. - updated version number. - - uses new internal PL_* naming convention. + uses new internal PL_* naming convention. Fri Jul 3 13:38:16 METDST 1998 Raphael Manfredi -. Description: - - Updated benchmark figures due to recent optimizations done in - store(): tagnums are now stored as-is in the hash table, so - no surrounding SV is created. And the "shared keys" mode for - hash table was turned off. - - Fixed backward compatibility (wrt 0.5 at 9) for retrieval of - blessed refs. That old version did something wrong, but the - bugfix prevented correct retrieval of the old format. + Updated benchmark figures due to recent optimizations done in + store(): tagnums are now stored as-is in the hash table, so + no surrounding SV is created. And the "shared keys" mode for + hash table was turned off. + + Fixed backward compatibility (wrt 0.5 at 9) for retrieval of + blessed refs. That old version did something wrong, but the + bugfix prevented correct retrieval of the old format. Mon Jun 22 11:00:48 METDST 1998 Raphael Manfredi -. Description: + Changed benchmark figures. - Changed benchmark figures. - - Adjust refcnt of tied objects after calling sv_magic() to avoid - memory leaks. Contributed by Jeff Gresham. + Adjust refcnt of tied objects after calling sv_magic() to avoid + memory leaks. Contributed by Jeff Gresham. Fri Jun 12 11:50:04 METDST 1998 Raphael Manfredi -. Description: - - Added workaround for persistent LVALUE-ness in perl5.004. All - scalars tagged as being an lvalue are handled as if they were - not an lvalue at all. Added test for that LVALUE bug workaround. - - Now handles Perl immortal scalars explicitely, by storing &sv_yes - as such, explicitely. - - Retrieval of non-immortal undef cannot be shared. Previous - version was over-optimizing by not creating a separate SV for - all undefined scalars seen. + Added workaround for persistent LVALUE-ness in perl5.004. All + scalars tagged as being an lvalue are handled as if they were + not an lvalue at all. Added test for that LVALUE bug workaround. + + Now handles Perl immortal scalars explicitely, by storing &sv_yes + as such, explicitely. + + Retrieval of non-immortal undef cannot be shared. Previous + version was over-optimizing by not creating a separate SV for + all undefined scalars seen. Thu Jun 4 17:21:51 METDST 1998 Raphael Manfredi -. Description: + Baseline for Storable-0.6 at 0. - Baseline for Storable-0.6 at 0. - - This version introduces a binary incompatibility in the generated - binary image, which is more compact than older ones by approximatively - 15%, depending on the exact degree of sharing in your structures. - - The good news is that your older images can still be retrieved with - this version, i.e. backward compatibility is preserved. This version - of Storable can only generate new binaries however. - - Another good news is that the retrieval of data structure is - significantly quicker than before, because a Perl array is used - instead of a hash table to keep track of retrieved objects, and - also because the image being smaller, less I/O function calls are - made. + This version introduces a binary incompatibility in the generated + binary image, which is more compact than older ones by approximatively + 15%, depending on the exact degree of sharing in your structures. + + The good news is that your older images can still be retrieved with + this version, i.e. backward compatibility is preserved. This version + of Storable can only generate new binaries however. + + Another good news is that the retrieval of data structure is + significantly quicker than before, because a Perl array is used + instead of a hash table to keep track of retrieved objects, and + also because the image being smaller, less I/O function calls are + made. Tue May 12 09:15:15 METDST 1998 Raphael Manfredi -. Description: - - Version number now got from Storable.pm directly. + Version number now got from Storable.pm directly. - Fixed overzealous sv_type() optimization, which would make - Storable fail when faced with an "upgraded" SV to the PVIV - or PVNV kind containing a reference. + Fixed overzealous sv_type() optimization, which would make + Storable fail when faced with an "upgraded" SV to the PVIV + or PVNV kind containing a reference. Thu Apr 30 15:11:30 METDST 1998 Raphael Manfredi -. Description: + Extended the SYNOPSIS section to give quick overview of the + routines and their signature. - Extended the SYNOPSIS section to give quick overview of the - routines and their signature. - - Optimized sv_type() to avoid flags checking when not needed, i.e. - when their type makes it impossible for them to be refs or tied. - This slightly increases throughput by a few percents when refs - and tied variables are marginal occurrences in your data. - - Stubs for XS now use OutputStream and InputStream file types to - make it work when the given file is actually a socket. Perl - makes a distinction for sockets in its internal I/O structures - by having both a read and a write structure, whereas plain files - share the same one. + Optimized sv_type() to avoid flags checking when not needed, i.e. + when their type makes it impossible for them to be refs or tied. + This slightly increases throughput by a few percents when refs + and tied variables are marginal occurrences in your data. + + Stubs for XS now use OutputStream and InputStream file types to + make it work when the given file is actually a socket. Perl + makes a distinction for sockets in its internal I/O structures + by having both a read and a write structure, whereas plain files + share the same one. Tue Jun 3 09:41:33 METDST 1997 Raphael Manfredi -. Description: - - Thanks to a contribution from Benjamin A. Holzman, Storable is now - able to correctly serialize tied SVs, i.e. tied arrays, hashes - and scalars. + Thanks to a contribution from Benjamin A. Holzman, Storable is now + able to correctly serialize tied SVs, i.e. tied arrays, hashes + and scalars. Thu Apr 9 18:07:51 METDST 1998 Raphael Manfredi -. Description: - - I said SvPOK() had changed to SvPOKp(), but that was a lie... + I said SvPOK() had changed to SvPOKp(), but that was a lie... Wed Apr 8 13:14:29 METDST 1998 Raphael Manfredi -. Description: - - Wrote sizeof(SV *) instead of sizeof(I32) when portable, which - in effect mangled the object tags and prevented portability - accross 32/64 bit architectures! + Wrote sizeof(SV *) instead of sizeof(I32) when portable, which + in effect mangled the object tags and prevented portability + accross 32/64 bit architectures! Wed Mar 25 14:57:02 MET 1998 Raphael Manfredi -. Description: - - Added code example for store_fd() and retrieve_fd() in the - man page, to emphasize that file descriptors must be passed as - globs, not as plain strings. - - Cannot use SV addresses as tag when using nstore() on LP64. This - was the cause of problems when creating a storable image on an - LP64 machine and retrieving it on an ILP32 system, which is - exactly what nstore() is meant for... - - However, we continue to use SV addresses as tags for plain store(), - because benchamarking shows that it saves up to 8% of the store - time, and store() is meant to be fast at the expense of lack - of portability. - - This means there will be approximately an 8% degradation of - performance for nstore(), but it's now working as expected. - That cost may vary on your machine of course, since it is - solely caused by the memory allocation overhead used to create - unique SV tags for each distinct stored SV. + Added code example for store_fd() and retrieve_fd() in the + man page, to emphasize that file descriptors must be passed as + globs, not as plain strings. + + Cannot use SV addresses as tag when using nstore() on LP64. This + was the cause of problems when creating a storable image on an + LP64 machine and retrieving it on an ILP32 system, which is + exactly what nstore() is meant for... + + However, we continue to use SV addresses as tags for plain store(), + because benchamarking shows that it saves up to 8% of the store + time, and store() is meant to be fast at the expense of lack + of portability. + + This means there will be approximately an 8% degradation of + performance for nstore(), but it's now working as expected. + That cost may vary on your machine of course, since it is + solely caused by the memory allocation overhead used to create + unique SV tags for each distinct stored SV. Tue Jan 20 09:21:53 MET 1998 Raphael Manfredi -. Description: - - Don't use any '_' in version number. + Don't use any '_' in version number. Tue Jan 13 17:51:50 MET 1998 Raphael Manfredi -. Description: - - Updated version number. + Updated version number. - added binmode() calls for systems where it matters. + added binmode() calls for systems where it matters. - Be sure to pass globs, not plain file strings, to C routines, - so that Storable can be used under the Perl debugger. + Be sure to pass globs, not plain file strings, to C routines, + so that Storable can be used under the Perl debugger. Wed Nov 5 10:53:22 MET 1997 Raphael Manfredi -. Description: + Fix memory leaks on seen hash table and returned SV refs. - Fix memory leaks on seen hash table and returned SV refs. + Storable did not work properly when tainting enabled. - Storable did not work properly when tainting enabled. - - Fixed "Allocation too large" messages in freeze/thaw and added. - proper regression test in t/freeze.t. + Fixed "Allocation too large" messages in freeze/thaw and added. + proper regression test in t/freeze.t. Tue Jun 3 09:41:33 METDST 1997 Raphael Manfredi -. Description: - - Updated version number + Updated version number - Added freeze/thaw interface and dclone. + Added freeze/thaw interface and dclone. Fri May 16 10:45:47 METDST 1997 Raphael Manfredi -. Description: - - Forgot that AutoLoader does not export its own AUTOLOAD. - I could use + Forgot that AutoLoader does not export its own AUTOLOAD. + I could use - use AutoLoader 'AUTOLOAD'; - - but that would not be backward compatible. So the export is - done by hand... + use AutoLoader 'AUTOLOAD'; + + but that would not be backward compatible. So the export is + done by hand... Tue Mar 25 11:21:32 MET 1997 Raphael Manfredi -. Description: - - Empty scalar strings are now "defined" at retrieval time. + Empty scalar strings are now "defined" at retrieval time. - New test to ensure an empty string is defined when retrieved. + New test to ensure an empty string is defined when retrieved. Thu Feb 27 16:32:44 MET 1997 Raphael Manfredi -. Description: + Updated version number - Updated version number + Declare VERSION as being used - Declare VERSION as being used - - Fixed a typo in the PerlIO_putc remapping. - PerlIO_read and perlIO_write inverted size/nb_items. - (only relevant for pre-perl5.004 versions) + Fixed a typo in the PerlIO_putc remapping. + PerlIO_read and perlIO_write inverted size/nb_items. + (only relevant for pre-perl5.004 versions) Thu Feb 27 15:58:31 MET 1997 Raphael Manfredi -. Description: - - Updated version number + Updated version number - Added VERSION identification + Added VERSION identification - Allow build with perl5.003, which is ante perlIO time + Allow build with perl5.003, which is ante perlIO time Mon Jan 13 17:53:18 MET 1997 Raphael Manfredi -. Description: - - Random code fixes. + Random code fixes. Wed Jan 22 15:19:56 MET 1997 Raphael Manfredi -. Description: - - Updated version number in Makefile.PL. - - Added "thanks to" section to README. + Updated version number in Makefile.PL. - Documented new forgive_me variable. + Added "thanks to" section to README. - Made 64-bit clean. + Documented new forgive_me variable. - Added forgive_me support to allow store() of data structures - containing non-storable items like CODE refs. + Made 64-bit clean. + Added forgive_me support to allow store() of data structures + containing non-storable items like CODE refs. Modified: trunk/orca/packages/Storable-2.05/README ============================================================================== --- trunk/orca/packages/Storable-2.05/README (original) +++ trunk/orca/packages/Storable-2.05/README 2002-11-09 12:32:41.000000000 -0800 @@ -1,5 +1,6 @@ - Storable 1.0 + Storable 1.015 Copyright (c) 1995-2000, Raphael Manfredi + Copyright (c) 2001,2002, Larry Wall ------------------------------------------------------------------------ This program is free software; you can redistribute it and/or modify @@ -13,9 +14,9 @@ +======================================================================= | Storable is distributed as a module, but is also part of the official -| Perl core distribution. Maintenance is still done by the Author, -| whilst the perl5-porters ensure that no change to the Perl internals -| can break the version of Storable distributed with it. +| Perl core distribution, as of perl 5.8. +| Maintenance is now done by the perl5-porters. We thank Raphael +| Manfredi for providing us with this very useful module. +======================================================================= The Storable extension brings persistency to your data. @@ -28,7 +29,7 @@ the stored file and recreate the same hiearchy in memory. If you had blessed references, the retrieved references are blessed into the same package, so you must make sure you have access to the -same perl class as the one used to create the relevant objects. +same perl class than the one used to create the relevant objects. There is also a dclone() routine which performs an optimized mirroring of any data structure, preserving its topology. @@ -45,7 +46,13 @@ There is an embeded POD manual page in Storable.pm. -Raphael Manfredi +Storable was written by Raphael Manfredi +Maitainance is now done by the perl5-porters + +Please e-mail us with problems, bug fixes, comments and complaints, +although if you have complements you should send them to Raphael. +Please don't e-mail Raphael with problems, as he no longer works on +Storable, and your message will be delayed while he forwards it to us. ------------------------------------------------------------------------ Thanks to (in chronological order): @@ -59,11 +66,8 @@ Murray Nesbitt Albert N. Micheev Marc Lehmann - Justin Banks - Jarkko Hietaniemi (AGAIN, as perl 5.7.0 Pumpking!) - Salvador Ortiz Garcia - Dominic Dunlop - Erik Haugan + Justin Banks + Jarkko Hietaniemi (AGAIN, as perl 5.7.0 Pumpkin!) for their contributions. @@ -71,3 +75,36 @@ http://member.nifty.ne.jp/hippo2000/perltips/storable.htm, courtesy of Kawai, Takanori . ------------------------------------------------------------------------ + +The perl5-porters would like to thank + + Raphael Manfredi + +According to the perl5.8 Changes file, the following people have helped +bring you this Storable release: + + Abhijit Menon-Sen + Andreas J. Koenig + Archer Sully + Craig A. Berry + Dan Kogai + Doug MacEachern + Gurusamy Sarathy + H.Merijn Brand + Jarkko Hietaniemi + Mark Bixby + Michael Stevens + Mike Guy + Nicholas Clark + Peter J. Farley III + Peter Prymmer + Philip Newton + Raphael Manfredi + Robin Barker + Radu Greab + Tim Bunce + VMSperlers + Yitzchak Scott-Thoennes + +If I've missed you out, please accept my apologies, and e-mail your +patch to perl5-porters at perl.org. Added: trunk/orca/packages/Time-HiRes-1.38/typemap ============================================================================== --- trunk/orca/packages/Time-HiRes-1.38/typemap (original) +++ trunk/orca/packages/Time-HiRes-1.38/typemap 2002-11-09 12:32:42.000000000 -0800 @@ -0,0 +1,313 @@ +# basic C types +int T_IV +unsigned T_UV +unsigned int T_UV +long T_IV +unsigned long T_UV +short T_IV +unsigned short T_UV +char T_CHAR +unsigned char T_U_CHAR +char * T_PV +unsigned char * T_PV +const char * T_PV +caddr_t T_PV +wchar_t * T_PV +wchar_t T_IV +bool_t T_IV +size_t T_UV +ssize_t T_IV +time_t T_NV +unsigned long * T_OPAQUEPTR +char ** T_PACKEDARRAY +void * T_PTR +Time_t * T_PV +SV * T_SV +SVREF T_SVREF +AV * T_AVREF +HV * T_HVREF +CV * T_CVREF + +IV T_IV +UV T_UV +NV T_NV +I32 T_IV +I16 T_IV +I8 T_IV +STRLEN T_UV +U32 T_U_LONG +U16 T_U_SHORT +U8 T_UV +Result T_U_CHAR +Boolean T_BOOL +float T_FLOAT +double T_DOUBLE +SysRet T_SYSRET +SysRetLong T_SYSRET +FILE * T_STDIO +PerlIO * T_INOUT +FileHandle T_PTROBJ +InputStream T_IN +InOutStream T_INOUT +OutputStream T_OUT +bool T_BOOL + +############################################################################# +INPUT +T_SV + $var = $arg +T_SVREF + if (SvROK($arg)) + $var = (SV*)SvRV($arg); + else + Perl_croak(aTHX_ \"$var is not a reference\") +T_AVREF + if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVAV) + $var = (AV*)SvRV($arg); + else + Perl_croak(aTHX_ \"$var is not an array reference\") +T_HVREF + if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV) + $var = (HV*)SvRV($arg); + else + Perl_croak(aTHX_ \"$var is not a hash reference\") +T_CVREF + if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVCV) + $var = (CV*)SvRV($arg); + else + Perl_croak(aTHX_ \"$var is not a code reference\") +T_SYSRET + $var NOT IMPLEMENTED +T_UV + $var = ($type)SvUV($arg) +T_IV + $var = ($type)SvIV($arg) +T_INT + $var = (int)SvIV($arg) +T_ENUM + $var = ($type)SvIV($arg) +T_BOOL + $var = (bool)SvTRUE($arg) +T_U_INT + $var = (unsigned int)SvUV($arg) +T_SHORT + $var = (short)SvIV($arg) +T_U_SHORT + $var = (unsigned short)SvUV($arg) +T_LONG + $var = (long)SvIV($arg) +T_U_LONG + $var = (unsigned long)SvUV($arg) +T_CHAR + $var = (char)*SvPV_nolen($arg) +T_U_CHAR + $var = (unsigned char)SvUV($arg) +T_FLOAT + $var = (float)SvNV($arg) +T_NV + $var = ($type)SvNV($arg) +T_DOUBLE + $var = (double)SvNV($arg) +T_PV + $var = ($type)SvPV_nolen($arg) +T_PTR + $var = INT2PTR($type,SvIV($arg)) +T_PTRREF + if (SvROK($arg)) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = INT2PTR($type,tmp); + } + else + Perl_croak(aTHX_ \"$var is not a reference\") +T_REF_IV_REF + if (sv_isa($arg, \"${ntype}\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = *INT2PTR($type *, tmp); + } + else + Perl_croak(aTHX_ \"$var is not of type ${ntype}\") +T_REF_IV_PTR + if (sv_isa($arg, \"${ntype}\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = INT2PTR($type, tmp); + } + else + Perl_croak(aTHX_ \"$var is not of type ${ntype}\") +T_PTROBJ + if (sv_derived_from($arg, \"${ntype}\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = INT2PTR($type,tmp); + } + else + Perl_croak(aTHX_ \"$var is not of type ${ntype}\") +T_PTRDESC + if (sv_isa($arg, \"${ntype}\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + ${type}_desc = (\U${type}_DESC\E*) tmp; + $var = ${type}_desc->ptr; + } + else + Perl_croak(aTHX_ \"$var is not of type ${ntype}\") +T_REFREF + if (SvROK($arg)) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = *INT2PTR($type,tmp); + } + else + Perl_croak(aTHX_ \"$var is not a reference\") +T_REFOBJ + if (sv_isa($arg, \"${ntype}\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = *INT2PTR($type,tmp); + } + else + Perl_croak(aTHX_ \"$var is not of type ${ntype}\") +T_OPAQUE + $var = *($type *)SvPV_nolen($arg) +T_OPAQUEPTR + $var = ($type)SvPV_nolen($arg) +T_PACKED + $var = XS_unpack_$ntype($arg) +T_PACKEDARRAY + $var = XS_unpack_$ntype($arg) +T_CALLBACK + $var = make_perl_cb_$type($arg) +T_ARRAY + U32 ix_$var = $argoff; + $var = $ntype(items -= $argoff); + while (items--) { + DO_ARRAY_ELEM; + ix_$var++; + } + /* this is the number of elements in the array */ + ix_$var -= $argoff +T_STDIO + $var = PerlIO_findFILE(IoIFP(sv_2io($arg))) +T_IN + $var = IoIFP(sv_2io($arg)) +T_INOUT + $var = IoIFP(sv_2io($arg)) +T_OUT + $var = IoOFP(sv_2io($arg)) +############################################################################# +OUTPUT +T_SV + $arg = $var; +T_SVREF + $arg = newRV((SV*)$var); +T_AVREF + $arg = newRV((SV*)$var); +T_HVREF + $arg = newRV((SV*)$var); +T_CVREF + $arg = newRV((SV*)$var); +T_IV + sv_setiv($arg, (IV)$var); +T_UV + sv_setuv($arg, (UV)$var); +T_INT + sv_setiv($arg, (IV)$var); +T_SYSRET + if ($var != -1) { + if ($var == 0) + sv_setpvn($arg, "0 but true", 10); + else + sv_setiv($arg, (IV)$var); + } +T_ENUM + sv_setiv($arg, (IV)$var); +T_BOOL + $arg = boolSV($var); +T_U_INT + sv_setuv($arg, (UV)$var); +T_SHORT + sv_setiv($arg, (IV)$var); +T_U_SHORT + sv_setuv($arg, (UV)$var); +T_LONG + sv_setiv($arg, (IV)$var); +T_U_LONG + sv_setuv($arg, (UV)$var); +T_CHAR + sv_setpvn($arg, (char *)&$var, 1); +T_U_CHAR + sv_setuv($arg, (UV)$var); +T_FLOAT + sv_setnv($arg, (double)$var); +T_NV + sv_setnv($arg, (NV)$var); +T_DOUBLE + sv_setnv($arg, (double)$var); +T_PV + sv_setpv((SV*)$arg, $var); +T_PTR + sv_setiv($arg, PTR2IV($var)); +T_PTRREF + sv_setref_pv($arg, Nullch, (void*)$var); +T_REF_IV_REF + sv_setref_pv($arg, \"${ntype}\", (void*)new $ntype($var)); +T_REF_IV_PTR + sv_setref_pv($arg, \"${ntype}\", (void*)$var); +T_PTROBJ + sv_setref_pv($arg, \"${ntype}\", (void*)$var); +T_PTRDESC + sv_setref_pv($arg, \"${ntype}\", (void*)new\U${type}_DESC\E($var)); +T_REFREF + NOT_IMPLEMENTED +T_REFOBJ + NOT IMPLEMENTED +T_OPAQUE + sv_setpvn($arg, (char *)&$var, sizeof($var)); +T_OPAQUEPTR + sv_setpvn($arg, (char *)$var, sizeof(*$var)); +T_PACKED + XS_pack_$ntype($arg, $var); +T_PACKEDARRAY + XS_pack_$ntype($arg, $var, count_$ntype); +T_DATAUNIT + sv_setpvn($arg, $var.chp(), $var.size()); +T_CALLBACK + sv_setpvn($arg, $var.context.value().chp(), + $var.context.value().size()); +T_ARRAY + { + U32 ix_$var; + EXTEND(SP,size_$var); + for (ix_$var = 0; ix_$var < size_$var; ix_$var++) { + ST(ix_$var) = sv_newmortal(); + DO_ARRAY_ELEM + } + } +T_STDIO + { + GV *gv = newGVgen("$Package"); + PerlIO *fp = PerlIO_importFILE($var,0); + if ( fp && do_open(gv, "+<&", 3, FALSE, 0, 0, fp) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); + else + $arg = &PL_sv_undef; + } +T_IN + { + GV *gv = newGVgen("$Package"); + if ( do_open(gv, "<&", 2, FALSE, 0, 0, $var) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); + else + $arg = &PL_sv_undef; + } +T_INOUT + { + GV *gv = newGVgen("$Package"); + if ( do_open(gv, "+<&", 3, FALSE, 0, 0, $var) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); + else + $arg = &PL_sv_undef; + } +T_OUT + { + GV *gv = newGVgen("$Package"); + if ( do_open(gv, "+>&", 3, FALSE, 0, 0, $var) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); + else + $arg = &PL_sv_undef; + } Modified: trunk/orca/packages/Time-HiRes-1.38/t/HiRes.t ============================================================================== --- trunk/orca/packages/Time-HiRes-1.38/t/HiRes.t (original) +++ trunk/orca/packages/Time-HiRes-1.38/t/HiRes.t 2002-11-09 12:32:42.000000000 -0800 @@ -1,35 +1,56 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' +#!./perl -w -######################### We start with some black magic to print on failure. +BEGIN { + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } +} -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) +BEGIN { $| = 1; print "1..25\n"; } -BEGIN { $| = 1; print "1..14\n"; } END {print "not ok 1\n" unless $loaded;} + use Time::HiRes qw(tv_interval); -$loaded = 1; -print "ok 1\n"; -######################### End of black magic. +$loaded = 1; -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): +print "ok 1\n"; use strict; my $have_gettimeofday = defined &Time::HiRes::gettimeofday; my $have_usleep = defined &Time::HiRes::usleep; my $have_ualarm = defined &Time::HiRes::ualarm; +my $have_time = defined &Time::HiRes::time; import Time::HiRes 'gettimeofday' if $have_gettimeofday; import Time::HiRes 'usleep' if $have_usleep; import Time::HiRes 'ualarm' if $have_ualarm; +use Config; + +my $xdefine; + +if (open(XDEFINE, "xdefine")) { + chomp($xdefine = ); + close(XDEFINE); +} + +# Ideally, we'd like to test that the timers are rather precise. +# However, if the system is busy, there are no guarantees on how +# quickly we will return. This limit used to be 10%, but that +# was occasionally triggered falsely. +# Try 20%. +# Another possibility might be to print "ok" if the test completes fine +# with (say) 10% slosh, "skip - system may have been busy?" if the test +# completes fine with (say) 30% slosh, and fail otherwise. If you do that, +# consider changing over to test.pl at the same time. +# --A.D., Nov 27, 2001 +my $limit = 0.20; # 20% is acceptable slosh for testing timers + sub skip { - map { print "ok $_ (skipped)\n" } @_; + map { print "ok $_ # skipped\n" } @_; } sub ok { @@ -57,9 +78,9 @@ ok 4, ($two[0] > $one[0] || ($two[0] == $one[0] && $two[1] > $one[1])), "@two is not greater than @one"; - my $f = Time::HiRes::time; + my $f = Time::HiRes::time(); ok 5, $f > 850_000_000, "$f too small"; - ok 6, $f - $two[0] < 2, "$f - @two >= 2"; + ok 6, $f - $two[0] < 2, "$f - $two[0] >= 2"; } if (!$have_usleep) { @@ -77,18 +98,18 @@ skip 8; } else { - my $f = Time::HiRes::time; + my $f = Time::HiRes::time(); usleep(500_000); - my $f2 = Time::HiRes::time; + my $f2 = Time::HiRes::time(); my $d = $f2 - $f; - ok 8, $d > 0.4 && $d < 0.8, "slept $d secs $f to $f2"; + ok 8, $d > 0.4 && $d < 0.9, "slept $d secs $f to $f2"; } } # Two-arg tv_interval() is always available. { my $f = tv_interval [5, 100_000], [10, 500_000]; - ok 9, $f == 5.4, $f; + ok 9, abs($f - 5.4) < 0.001, $f; } if (!$have_gettimeofday) { @@ -100,7 +121,7 @@ ok 10, $f < 2, $f; } -if (!$have_usleep) { +if (!$have_usleep || !$have_gettimeofday) { skip 11; } else { @@ -108,7 +129,7 @@ #jTime::HiRes::sleep 0.5; Time::HiRes::sleep( 0.5 ); my $f = tv_interval $r; - ok 11, $f > 0.4 && $f < 0.8, "slept $f secs"; + ok 11, $f > 0.4 && $f < 0.9, "slept $f instead of 0.5 secs."; } if (!$have_ualarm) { @@ -118,23 +139,202 @@ my $tick = 0; local $SIG{ALRM} = sub { $tick++ }; - my $one = time; $tick = 0; ualarm(10_000); sleep until $tick; - my $two = time; $tick = 0; ualarm(10_000); sleep until $tick; + my $one = time; $tick = 0; ualarm(10_000); while ($tick == 0) { sleep } + my $two = time; $tick = 0; ualarm(10_000); while ($tick == 0) { sleep } my $three = time; ok 12, $one == $two || $two == $three, "slept too long, $one $two $three"; $tick = 0; ualarm(10_000, 10_000); - sleep until $tick >= 3; + while ($tick < 3) { sleep } ok 13, 1; ualarm(0); } # new test: did we even get close? -{ - my $t = time(); - my $tf = Time::HiRes::time(); - ok 14, ($tf >= $t) && (($tf - $t) <= 1), - "time $t differs from Time::HiRes::time $tf"; +if (!$have_time) { + skip 14 +} else { + my ($s, $n); + for my $i (1 .. 100) { + $s += Time::HiRes::time() - time(); + $n++; + } + # $s should be, at worst, equal to $n + # (time() may be rounding down, up, or closest) + ok 14, abs($s) / $n <= 1.0, "Time::HiRes::time() not close to time()"; + print "# s = $s, n = $n, s/n = ", $s/$n, "\n"; +} + +my $has_ualarm = $Config{d_ualarm}; + +$has_ualarm ||= $xdefine =~ /-DHAS_UALARM/; + +unless ( defined &Time::HiRes::gettimeofday + && defined &Time::HiRes::ualarm + && defined &Time::HiRes::usleep + && $has_ualarm) { + for (15..17) { + print "ok $_ # Skip: no gettimeofday or no ualarm or no usleep\n"; + } +} else { + use Time::HiRes qw (time alarm sleep); + + my ($f, $r, $i, $not, $ok); + + $f = time; + print "# time...$f\n"; + print "ok 15\n"; + + $r = [Time::HiRes::gettimeofday()]; + sleep (0.5); + print "# sleep...", Time::HiRes::tv_interval($r), "\nok 16\n"; + + $r = [Time::HiRes::gettimeofday()]; + $i = 5; + $SIG{ALRM} = "tick"; + while ($i > 0) + { + alarm(0.3); + select (undef, undef, undef, 3); + my $ival = Time::HiRes::tv_interval ($r); + print "# Select returned! $i $ival\n"; + print "# ", abs($ival/3 - 1), "\n"; + # Whether select() gets restarted after signals is + # implementation dependent. If it is restarted, we + # will get about 3.3 seconds: 3 from the select, 0.3 + # from the alarm. If this happens, let's just skip + # this particular test. --jhi + if (abs($ival/3.3 - 1) < $limit) { + $ok = "Skip: your select() may get restarted by your SIGALRM (or just retry test)"; + undef $not; + last; + } + my $exp = 0.3 * (5 - $i); + # This test is more sensitive, so impose a softer limit. + if (abs($ival/$exp - 1) > 3*$limit) { + my $ratio = abs($ival/$exp); + $not = "while: $exp sleep took $ival ratio $ratio"; + last; + } + $ok = $i; + } + + sub tick + { + $i--; + my $ival = Time::HiRes::tv_interval ($r); + print "# Tick! $i $ival\n"; + my $exp = 0.3 * (5 - $i); + # This test is more sensitive, so impose a softer limit. + if (abs($ival/$exp - 1) > 3*$limit) { + my $ratio = abs($ival/$exp); + $not = "tick: $exp sleep took $ival ratio $ratio"; + $i = 0; + } + } + + alarm(0); # can't cancel usig %SIG + + print $not ? "not ok 17 # $not\n" : "ok 17 # $ok\n"; +} + +unless ( defined &Time::HiRes::setitimer + && defined &Time::HiRes::getitimer + && eval 'Time::HiRes::ITIMER_VIRTUAL' + && $Config{d_select} + && $Config{sig_name} =~ m/\bVTALRM\b/) { + for (18..19) { + print "ok $_ # Skip: no virtual interval timers\n"; + } +} else { + use Time::HiRes qw (setitimer getitimer ITIMER_VIRTUAL); + + my $i = 3; + my $r = [Time::HiRes::gettimeofday()]; + + $SIG{VTALRM} = sub { + $i ? $i-- : setitimer(ITIMER_VIRTUAL, 0); + print "# Tick! $i ", Time::HiRes::tv_interval($r), "\n"; + }; + + print "# setitimer: ", join(" ", setitimer(ITIMER_VIRTUAL, 0.5, 0.4)), "\n"; + + # Assume interval timer granularity of $limit * 0.5 seconds. Too bold? + print "not " unless abs(getitimer(ITIMER_VIRTUAL) / 0.5) - 1 < $limit; + print "ok 18\n"; + + print "# getitimer: ", join(" ", getitimer(ITIMER_VIRTUAL)), "\n"; + + while (getitimer(ITIMER_VIRTUAL)) { + my $j; + for (1..1000) { $j++ } # Can't be unbreakable, must test getitimer(). + } + + print "# getitimer: ", join(" ", getitimer(ITIMER_VIRTUAL)), "\n"; + + print "not " unless getitimer(ITIMER_VIRTUAL) == 0; + print "ok 19\n"; + + $SIG{VTALRM} = 'DEFAULT'; +} + +if ($have_gettimeofday) { + my ($t0, $td); + + my $sleep = 1.5; # seconds + my $msg; + + $t0 = gettimeofday(); + $a = abs(sleep($sleep) / $sleep - 1.0); + $td = gettimeofday() - $t0; + my $ratio = 1.0 + $a; + + $msg = "$td went by while sleeping $sleep, ratio $ratio.\n"; + + if ($td < $sleep * (1 + $limit)) { + print $a < $limit ? "ok 20 # $msg" : "not ok 20 # $msg"; + } else { + print "ok 20 # Skip: $msg"; + } + + $t0 = gettimeofday(); + $a = abs(usleep($sleep * 1E6) / ($sleep * 1E6) - 1.0); + $td = gettimeofday() - $t0; + $ratio = 1.0 + $a; + + $msg = "$td went by while sleeping $sleep, ratio $ratio.\n"; + + if ($td < $sleep * (1 + $limit)) { + print $a < $limit ? "ok 21 # $msg" : "not ok 21 # $msg"; + } else { + print "ok 21 # Skip: $msg"; + } + +} else { + for (20..21) { + print "ok $_ # Skip: no gettimeofday\n"; + } +} + +eval { sleep(-1) }; +print $@ =~ /::sleep\(-1\): negative time not invented yet/ ? + "ok 22\n" : "not ok 22\n"; + +eval { usleep(-2) }; +print $@ =~ /::usleep\(-2\): negative time not invented yet/ ? + "ok 23\n" : "not ok 23\n"; + +if ($have_ualarm) { + eval { alarm(-3) }; + print $@ =~ /::alarm\(-3, 0\): negative time not invented yet/ ? + "ok 24\n" : "not ok 24\n"; + + eval { ualarm(-4) }; + print $@ =~ /::ualarm\(-4, 0\): negative time not invented yet/ ? + "ok 25\n" : "not ok 25\n"; +} else { + skip 24; + skip 25; } Deleted: trunk/orca/packages/Time-HiRes-1.38/t/02export.t Modified: trunk/orca/packages/Time-HiRes-1.38/HiRes.xs ============================================================================== --- trunk/orca/packages/Time-HiRes-1.38/HiRes.xs (original) +++ trunk/orca/packages/Time-HiRes-1.38/HiRes.xs 2002-11-09 12:32:43.000000000 -0800 @@ -9,10 +9,167 @@ #else #include #endif +#ifdef HAS_SELECT +# ifdef I_SYS_SELECT +# include +# endif +#endif #ifdef __cplusplus } #endif +#ifndef aTHX_ +# define aTHX_ +# define pTHX_ +#endif + +#ifndef NVTYPE +# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) +# define NVTYPE long double +# else +# define NVTYPE double +# endif +typedef NVTYPE NV; +#endif + +#ifndef IVdf +# ifdef IVSIZE +# if IVSIZE == LONGSIZE +# define IVdf "ld" +# else +# if IVSIZE == INTSIZE +# define IVdf "d" +# endif +# endif +# else +# define IVdf "ld" +# endif +#endif + +#ifndef NVef +# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \ + defined(PERL_PRIgldbl) /* Not very likely, but let's try anyway. */ +# define NVgf PERL_PRIgldbl +# else +# define NVgf "g" +# endif +#endif + +#ifndef INT2PTR + +#if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) +# define PTRV UV +# define INT2PTR(any,d) (any)(d) +#else +# if PTRSIZE == LONGSIZE +# define PTRV unsigned long +# else +# define PTRV unsigned +# endif +# define INT2PTR(any,d) (any)(PTRV)(d) +#endif +#define PTR2IV(p) INT2PTR(IV,p) + +#endif /* !INT2PTR */ + +#ifndef SvPV_nolen +static char * +sv_2pv_nolen(pTHX_ register SV *sv) +{ + STRLEN n_a; + return sv_2pv(sv, &n_a); +} +# define SvPV_nolen(sv) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? SvPVX(sv) : sv_2pv_nolen(sv)) +#endif + +#ifndef PerlProc_pause +# define PerlProc_pause() Pause() +#endif + +/* Though the cpp define ITIMER_VIRTUAL is available the functionality + * is not supported in Cygwin as of August 2002, ditto for Win32. + * Neither are ITIMER_PROF or ITIMER_REALPROF implemented. --jhi + */ +#if defined(__CYGWIN__) || defined(WIN32) +# undef ITIMER_VIRTUAL +# undef ITIMER_PROF +# undef ITIMER_REALPROF +#endif + +static IV +constant(char *name, int arg) +{ + errno = 0; + switch (*name) { + case 'd': + if (strEQ(name, "d_getitimer")) +#ifdef HAS_GETITIMER + return 1; +#else + return 0; +#endif + if (strEQ(name, "d_nanosleep")) +#ifdef HAS_NANOSLEEP + return 1; +#else + return 0; +#endif + if (strEQ(name, "d_setitimer")) +#ifdef HAS_SETITIMER + return 1; +#else + return 0; +#endif + if (strEQ(name, "d_ualarm")) +#ifdef HAS_UALARM + return 1; +#else + return 0; +#endif + if (strEQ(name, "d_usleep")) +#ifdef HAS_USLEEP + return 1; +#else + return 0; +#endif + break; + case 'I': + if (strEQ(name, "ITIMER_REAL")) +#ifdef ITIMER_REAL + return ITIMER_REAL; +#else + goto not_there; +#endif + if (strEQ(name, "ITIMER_REALPROF")) +#ifdef ITIMER_REALPROF + return ITIMER_REALPROF; +#else + goto not_there; +#endif + if (strEQ(name, "ITIMER_VIRTUAL")) +#ifdef ITIMER_VIRTUAL + return ITIMER_VIRTUAL; +#else + goto not_there; +#endif + if (strEQ(name, "ITIMER_PROF")) +#ifdef ITIMER_PROF + return ITIMER_PROF; +#else + goto not_there; +#endif + break; + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + #if !defined(HAS_GETTIMEOFDAY) && defined(WIN32) #define HAS_GETTIMEOFDAY @@ -23,35 +180,50 @@ } */ +typedef union { + unsigned __int64 ft_i64; + FILETIME ft_val; +} FT_t; + +/* Number of 100 nanosecond units from 1/1/1601 to 1/1/1970 */ +#ifdef __GNUC__ +#define Const64(x) x##LL +#else +#define Const64(x) x##i64 +#endif +#define EPOCH_BIAS Const64(116444736000000000) + +/* NOTE: This does not compute the timezone info (doing so can be expensive, + * and appears to be unsupported even by glibc) */ int -gettimeofday (struct timeval *tp, int nothing) +gettimeofday (struct timeval *tp, void *not_used) { - SYSTEMTIME st; - time_t tt; - struct tm tmtm; - /* mktime converts local to UTC */ - GetLocalTime (&st); - tmtm.tm_sec = st.wSecond; - tmtm.tm_min = st.wMinute; - tmtm.tm_hour = st.wHour; - tmtm.tm_mday = st.wDay; - tmtm.tm_mon = st.wMonth - 1; - tmtm.tm_year = st.wYear - 1900; - tmtm.tm_isdst = -1; - tt = mktime (&tmtm); - tp->tv_sec = tt; - tp->tv_usec = st.wMilliseconds * 1000; - return 0; + FT_t ft; + + /* this returns time in 100-nanosecond units (i.e. tens of usecs) */ + GetSystemTimeAsFileTime(&ft.ft_val); + + /* seconds since epoch */ + tp->tv_sec = (long)((ft.ft_i64 - EPOCH_BIAS) / Const64(10000000)); + + /* microseconds remaining */ + tp->tv_usec = (long)((ft.ft_i64 / Const64(10)) % Const64(1000000)); + + return 0; } #endif #if !defined(HAS_GETTIMEOFDAY) && defined(VMS) #define HAS_GETTIMEOFDAY +#include #include /* gettimeofday */ #include /* qdiv */ #include /* sys$gettim */ #include +#ifdef __VAX +#include /* lib$ediv() */ +#endif /* VMS binary time is expressed in 100 nano-seconds since @@ -67,15 +239,111 @@ */ static $DESCRIPTOR(dscepoch,"01-JAN-1970 00:00:00.00"); +#ifdef __VAX +static long base_adjust[2]={0L,0L}; +#else static __int64 base_adjust=0; +#endif + +/* + + If we don't have gettimeofday, then likely we are on a VMS machine that + operates on local time rather than UTC...so we have to zone-adjust. + This code gleefully swiped from VMS.C + +*/ +/* method used to handle UTC conversions: + * 1 == CRTL gmtime(); 2 == SYS$TIMEZONE_DIFFERENTIAL; 3 == no correction + */ +static int gmtime_emulation_type; +/* number of secs to add to UTC POSIX-style time to get local time */ +static long int utc_offset_secs; +static struct dsc$descriptor_s fildevdsc = + { 12, DSC$K_DTYPE_T, DSC$K_CLASS_S, "LNM$FILE_DEV" }; +static struct dsc$descriptor_s *fildev[] = { &fildevdsc, NULL }; + +static time_t toutc_dst(time_t loc) { + struct tm *rsltmp; + + if ((rsltmp = localtime(&loc)) == NULL) return -1; + loc -= utc_offset_secs; + if (rsltmp->tm_isdst) loc -= 3600; + return loc; +} + +static time_t toloc_dst(time_t utc) { + struct tm *rsltmp; + + utc += utc_offset_secs; + if ((rsltmp = localtime(&utc)) == NULL) return -1; + if (rsltmp->tm_isdst) utc += 3600; + return utc; +} + +#define _toutc(secs) ((secs) == (time_t) -1 ? (time_t) -1 : \ + ((gmtime_emulation_type || timezone_setup()), \ + (gmtime_emulation_type == 1 ? toutc_dst(secs) : \ + ((secs) - utc_offset_secs)))) + +#define _toloc(secs) ((secs) == (time_t) -1 ? (time_t) -1 : \ + ((gmtime_emulation_type || timezone_setup()), \ + (gmtime_emulation_type == 1 ? toloc_dst(secs) : \ + ((secs) + utc_offset_secs)))) + +static int +timezone_setup(void) +{ + struct tm *tm_p; + + if (gmtime_emulation_type == 0) { + int dstnow; + time_t base = 15 * 86400; /* 15jan71; to avoid month/year ends between */ + /* results of calls to gmtime() and localtime() */ + /* for same &base */ + + gmtime_emulation_type++; + if ((tm_p = gmtime(&base)) == NULL) { /* CRTL gmtime() is a fake */ + char off[LNM$C_NAMLENGTH+1];; + + gmtime_emulation_type++; + if (!Perl_vmstrnenv("SYS$TIMEZONE_DIFFERENTIAL",off,0,fildev,0)) { + gmtime_emulation_type++; + utc_offset_secs = 0; + Perl_warn(aTHX_ "no UTC offset information; assuming local time is UTC"); + } + else { utc_offset_secs = atol(off); } + } + else { /* We've got a working gmtime() */ + struct tm gmt, local; + + gmt = *tm_p; + tm_p = localtime(&base); + local = *tm_p; + utc_offset_secs = (local.tm_mday - gmt.tm_mday) * 86400; + utc_offset_secs += (local.tm_hour - gmt.tm_hour) * 3600; + utc_offset_secs += (local.tm_min - gmt.tm_min) * 60; + utc_offset_secs += (local.tm_sec - gmt.tm_sec); + } + } + return 1; +} + int gettimeofday (struct timeval *tp, void *tpz) { long ret; +#ifdef __VAX + long quad[2]; + long quad1[2]; + long div_100ns_to_secs; + long div_100ns_to_usecs; + long quo,rem; + long quo1,rem1; +#else __int64 quad; __qdiv_t ans1,ans2; - +#endif /* In case of error, tv_usec = 0 and tv_sec = VMS condition code. The return from function is also set to -1. @@ -84,7 +352,11 @@ tp->tv_usec = 0; +#ifdef __VAX + if (base_adjust[0]==0 && base_adjust[1]==0) { +#else if (base_adjust==0) { /* Need to determine epoch adjustment */ +#endif ret=sys$bintim(&dscepoch,&base_adjust); if (1 != (ret &&1)) { tp->tv_sec = ret; @@ -94,19 +366,55 @@ ret=sys$gettim(&quad); /* Get VMS system time */ if ((1 && ret) == 1) { +#ifdef __VAX + quad[0] -= base_adjust[0]; /* convert to epoch offset */ + quad[1] -= base_adjust[1]; /* convert 2nd half of quadword */ + div_100ns_to_secs = DIV_100NS_TO_SECS; + div_100ns_to_usecs = DIV_100NS_TO_USECS; + lib$ediv(&div_100ns_to_secs,&quad,&quo,&rem); + quad1[0] = rem; + quad1[1] = 0L; + lib$ediv(&div_100ns_to_usecs,&quad1,&quo1,&rem1); + tp->tv_sec = quo; /* Whole seconds */ + tp->tv_usec = quo1; /* Micro-seconds */ +#else quad -= base_adjust; /* convert to epoch offset */ ans1=qdiv(quad,DIV_100NS_TO_SECS); ans2=qdiv(ans1.rem,DIV_100NS_TO_USECS); tp->tv_sec = ans1.quot; /* Whole seconds */ tp->tv_usec = ans2.quot; /* Micro-seconds */ +#endif } else { tp->tv_sec = ret; return -1; } +# ifdef VMSISH_TIME +# ifdef RTL_USES_UTC + if (VMSISH_TIME) tp->tv_sec = _toloc(tp->tv_sec); +# else + if (!VMSISH_TIME) tp->tv_sec = _toutc(tp->tv_sec); +# endif +# endif return 0; } #endif + +#if !defined(HAS_USLEEP) && defined(HAS_NANOSLEEP) +#define HAS_USLEEP +#define usleep hrt_nanosleep /* could conflict with ncurses for static build */ + +void +hrt_nanosleep(unsigned long usec) +{ + struct timespec res; + res.tv_sec = usec/1000/1000; + res.tv_nsec = ( usec - res.tv_sec*1000*1000 ) * 1000; + nanosleep(&res, NULL); +} +#endif + + #if !defined(HAS_USLEEP) && defined(HAS_SELECT) #ifndef SELECT_IS_BROKEN #define HAS_USLEEP @@ -154,10 +462,206 @@ } #endif -#ifdef ATLEASTFIVEOHOHFIVE -#ifdef HAS_GETTIMEOFDAY +#if !defined(HAS_UALARM) && defined(VMS) +#define HAS_UALARM +#define ualarm vms_ualarm + +#include +#include +#include +#include +#include +#include +#include + +#define VMSERR(s) (!((s)&1)) static void +us_to_VMS(useconds_t mseconds, unsigned long v[]) +{ + int iss; + unsigned long qq[2]; + + qq[0] = mseconds; + qq[1] = 0; + v[0] = v[1] = 0; + + iss = lib$addx(qq,qq,qq); + if (VMSERR(iss)) lib$signal(iss); + iss = lib$subx(v,qq,v); + if (VMSERR(iss)) lib$signal(iss); + iss = lib$addx(qq,qq,qq); + if (VMSERR(iss)) lib$signal(iss); + iss = lib$subx(v,qq,v); + if (VMSERR(iss)) lib$signal(iss); + iss = lib$subx(v,qq,v); + if (VMSERR(iss)) lib$signal(iss); +} + +static int +VMS_to_us(unsigned long v[]) +{ + int iss; + unsigned long div=10,quot, rem; + + iss = lib$ediv(&div,v,",&rem); + if (VMSERR(iss)) lib$signal(iss); + + return quot; +} + +typedef unsigned short word; +typedef struct _ualarm { + int function; + int repeat; + unsigned long delay[2]; + unsigned long interval[2]; + unsigned long remain[2]; +} Alarm; + + +static int alarm_ef; +static Alarm *a0, alarm_base; +#define UAL_NULL 0 +#define UAL_SET 1 +#define UAL_CLEAR 2 +#define UAL_ACTIVE 4 +static void ualarm_AST(Alarm *a); + +static int +vms_ualarm(int mseconds, int interval) +{ + Alarm *a, abase; + struct item_list3 { + word length; + word code; + void *bufaddr; + void *retlenaddr; + } ; + static struct item_list3 itmlst[2]; + static int first = 1; + unsigned long asten; + int iss, enabled; + + if (first) { + first = 0; + itmlst[0].code = JPI$_ASTEN; + itmlst[0].length = sizeof(asten); + itmlst[0].retlenaddr = NULL; + itmlst[1].code = 0; + itmlst[1].length = 0; + itmlst[1].bufaddr = NULL; + itmlst[1].retlenaddr = NULL; + + iss = lib$get_ef(&alarm_ef); + if (VMSERR(iss)) lib$signal(iss); + + a0 = &alarm_base; + a0->function = UAL_NULL; + } + itmlst[0].bufaddr = &asten; + + iss = sys$getjpiw(0,0,0,itmlst,0,0,0); + if (VMSERR(iss)) lib$signal(iss); + if (!(asten&0x08)) return -1; + + a = &abase; + if (mseconds) { + a->function = UAL_SET; + } else { + a->function = UAL_CLEAR; + } + + us_to_VMS(mseconds, a->delay); + if (interval) { + us_to_VMS(interval, a->interval); + a->repeat = 1; + } else + a->repeat = 0; + + iss = sys$clref(alarm_ef); + if (VMSERR(iss)) lib$signal(iss); + + iss = sys$dclast(ualarm_AST,a,0); + if (VMSERR(iss)) lib$signal(iss); + + iss = sys$waitfr(alarm_ef); + if (VMSERR(iss)) lib$signal(iss); + + if (a->function == UAL_ACTIVE) + return VMS_to_us(a->remain); + else + return 0; +} + + + +static void +ualarm_AST(Alarm *a) +{ + int iss; + unsigned long now[2]; + + iss = sys$gettim(now); + if (VMSERR(iss)) lib$signal(iss); + + if (a->function == UAL_SET || a->function == UAL_CLEAR) { + if (a0->function == UAL_ACTIVE) { + iss = sys$cantim(a0,PSL$C_USER); + if (VMSERR(iss)) lib$signal(iss); + + iss = lib$subx(a0->remain, now, a->remain); + if (VMSERR(iss)) lib$signal(iss); + + if (a->remain[1] & 0x80000000) + a->remain[0] = a->remain[1] = 0; + } + + if (a->function == UAL_SET) { + a->function = a0->function; + a0->function = UAL_ACTIVE; + a0->repeat = a->repeat; + if (a0->repeat) { + a0->interval[0] = a->interval[0]; + a0->interval[1] = a->interval[1]; + } + a0->delay[0] = a->delay[0]; + a0->delay[1] = a->delay[1]; + + iss = lib$subx(now, a0->delay, a0->remain); + if (VMSERR(iss)) lib$signal(iss); + + iss = sys$setimr(0,a0->delay,ualarm_AST,a0); + if (VMSERR(iss)) lib$signal(iss); + } else { + a->function = a0->function; + a0->function = UAL_NULL; + } + iss = sys$setef(alarm_ef); + if (VMSERR(iss)) lib$signal(iss); + } else if (a->function == UAL_ACTIVE) { + if (a->repeat) { + iss = lib$subx(now, a->interval, a->remain); + if (VMSERR(iss)) lib$signal(iss); + + iss = sys$setimr(0,a->interval,ualarm_AST,a); + if (VMSERR(iss)) lib$signal(iss); + } else { + a->function = UAL_NULL; + } + iss = sys$wake(0,0); + if (VMSERR(iss)) lib$signal(iss); + lib$signal(SS$_ASTFLT); + } else { + lib$signal(SS$_BADPARAM); + } +} + +#endif /* !HAS_UALARM && VMS */ + +#ifdef HAS_GETTIMEOFDAY + +static int myU2time(UV *ret) { struct timeval Tp; @@ -165,19 +669,19 @@ status = gettimeofday (&Tp, NULL); ret[0] = Tp.tv_sec; ret[1] = Tp.tv_usec; + return status; } -static double +static NV myNVtime() { struct timeval Tp; int status; status = gettimeofday (&Tp, NULL); - return Tp.tv_sec + (Tp.tv_usec / 1000000.); + return status == 0 ? Tp.tv_sec + (Tp.tv_usec / 1000000.) : -1.0; } #endif -#endif MODULE = Time::HiRes PACKAGE = Time::HiRes @@ -186,23 +690,78 @@ BOOT: #ifdef ATLEASTFIVEOHOHFIVE #ifdef HAS_GETTIMEOFDAY - hv_store(PL_modglobal, "Time::NVtime", 12, newSViv((IV) myNVtime), 0); - hv_store(PL_modglobal, "Time::U2time", 12, newSViv((IV) myU2time), 0); +{ + UV auv[2]; + hv_store(PL_modglobal, "Time::NVtime", 12, newSViv(PTR2IV(myNVtime)), 0); + if (myU2time(auv) == 0) + hv_store(PL_modglobal, "Time::U2time", 12, newSViv((IV) auv[0]), 0); +} #endif #endif -#ifdef HAS_USLEEP +IV +constant(name, arg) + char * name + int arg -void +#if defined(HAS_USLEEP) && defined(HAS_GETTIMEOFDAY) + +NV usleep(useconds) - int useconds + NV useconds + PREINIT: + struct timeval Ta, Tb; + CODE: + gettimeofday(&Ta, NULL); + if (items > 0) { + if (useconds > 1E6) { + IV seconds = (IV) (useconds / 1E6); + /* If usleep() has been implemented using setitimer() + * then this contortion is unnecessary-- but usleep() + * may be implemented in some other way, so let's contort. */ + if (seconds) { + sleep(seconds); + useconds -= 1E6 * seconds; + } + } else if (useconds < 0.0) + croak("Time::HiRes::usleep(%"NVgf"): negative time not invented yet", useconds); + usleep((U32)useconds); + } else + PerlProc_pause(); + gettimeofday(&Tb, NULL); +#if 0 + printf("[%ld %ld] [%ld %ld]\n", Tb.tv_sec, Tb.tv_usec, Ta.tv_sec, Ta.tv_usec); +#endif + RETVAL = 1E6*(Tb.tv_sec-Ta.tv_sec)+(NV)((IV)Tb.tv_usec-(IV)Ta.tv_usec); -void -sleep(fseconds) - double fseconds + OUTPUT: + RETVAL + +NV +sleep(...) + PREINIT: + struct timeval Ta, Tb; CODE: - int useconds = fseconds * 1000000; - usleep (useconds); + gettimeofday(&Ta, NULL); + if (items > 0) { + NV seconds = SvNV(ST(0)); + if (seconds >= 0.0) { + UV useconds = (UV)(1E6 * (seconds - (UV)seconds)); + if (seconds >= 1.0) + sleep((U32)seconds); + usleep(useconds); + } else + croak("Time::HiRes::sleep(%"NVgf"): negative time not invented yet", seconds); + } else + PerlProc_pause(); + gettimeofday(&Tb, NULL); +#if 0 + printf("[%ld %ld] [%ld %ld]\n", Tb.tv_sec, Tb.tv_usec, Ta.tv_sec, Ta.tv_usec); +#endif + RETVAL = (NV)(Tb.tv_sec-Ta.tv_sec)+0.000001*(NV)(Tb.tv_usec-Ta.tv_usec); + + OUTPUT: + RETVAL #endif @@ -212,22 +771,65 @@ ualarm(useconds,interval=0) int useconds int interval + CODE: + if (useconds < 0 || interval < 0) + croak("Time::HiRes::ualarm(%d, %d): negative time not invented yet", useconds, interval); + RETVAL = ualarm(useconds, interval); -int -alarm(fseconds,finterval=0) - double fseconds - double finterval - PREINIT: - int useconds, uinterval; + OUTPUT: + RETVAL + +NV +alarm(seconds,interval=0) + NV seconds + NV interval CODE: - useconds = fseconds * 1000000; - uinterval = finterval * 1000000; - RETVAL = ualarm (useconds, uinterval); + if (seconds < 0.0 || interval < 0.0) + croak("Time::HiRes::alarm(%"NVgf", %"NVgf"): negative time not invented yet", seconds, interval); + RETVAL = (NV)ualarm(seconds * 1000000, + interval * 1000000) / 1E6; + + OUTPUT: + RETVAL #endif #ifdef HAS_GETTIMEOFDAY +# ifdef MACOS_TRADITIONAL /* fix epoch TZ and use unsigned time_t */ +void +gettimeofday() + PREINIT: + struct timeval Tp; + struct timezone Tz; + PPCODE: + int status; + status = gettimeofday (&Tp, &Tz); + Tp.tv_sec += Tz.tz_minuteswest * 60; /* adjust for TZ */ + if (GIMME == G_ARRAY) { + EXTEND(sp, 2); + /* Mac OS (Classic) has unsigned time_t */ + PUSHs(sv_2mortal(newSVuv(Tp.tv_sec))); + PUSHs(sv_2mortal(newSViv(Tp.tv_usec))); + } else { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(Tp.tv_sec + (Tp.tv_usec / 1000000.0)))); + } + +NV +time() + PREINIT: + struct timeval Tp; + struct timezone Tz; + CODE: + int status; + status = gettimeofday (&Tp, &Tz); + Tp.tv_sec += Tz.tz_minuteswest * 60; /* adjust for TZ */ + RETVAL = Tp.tv_sec + (Tp.tv_usec / 1000000.0); + OUTPUT: + RETVAL + +# else /* MACOS_TRADITIONAL */ void gettimeofday() PREINIT: @@ -244,7 +846,7 @@ PUSHs(sv_2mortal(newSVnv(Tp.tv_sec + (Tp.tv_usec / 1000000.0)))); } -double +NV time() PREINIT: struct timeval Tp; @@ -255,43 +857,53 @@ OUTPUT: RETVAL +# endif /* MACOS_TRADITIONAL */ #endif -# $Id: HiRes.xs,v 1.11 1999/03/16 02:27:38 wegscd Exp wegscd $ +#if defined(HAS_GETITIMER) && defined(HAS_SETITIMER) + +#define TV2NV(tv) ((NV)((tv).tv_sec) + 0.000001 * (NV)((tv).tv_usec)) + +void +setitimer(which, seconds, interval = 0) + int which + NV seconds + NV interval + PREINIT: + struct itimerval newit; + struct itimerval oldit; + PPCODE: + if (seconds < 0.0 || interval < 0.0) + croak("Time::HiRes::setitimer(%"IVdf", %"NVgf", %"NVgf"): negative time not invented yet", (IV)which, seconds, interval); + newit.it_value.tv_sec = seconds; + newit.it_value.tv_usec = + (seconds - (NV)newit.it_value.tv_sec) * 1000000.0; + newit.it_interval.tv_sec = interval; + newit.it_interval.tv_usec = + (interval - (NV)newit.it_interval.tv_sec) * 1000000.0; + if (setitimer(which, &newit, &oldit) == 0) { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(TV2NV(oldit.it_value)))); + if (GIMME == G_ARRAY) { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(TV2NV(oldit.it_interval)))); + } + } + +void +getitimer(which) + int which + PREINIT: + struct itimerval nowit; + PPCODE: + if (getitimer(which, &nowit) == 0) { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(TV2NV(nowit.it_value)))); + if (GIMME == G_ARRAY) { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(TV2NV(nowit.it_interval)))); + } + } + +#endif -# $Log: HiRes.xs,v $ -# Revision 1.11 1999/03/16 02:27:38 wegscd -# Add U2time, NVtime. Fix symbols for static link. -# -# Revision 1.10 1998/09/30 02:36:25 wegscd -# Add VMS changes. -# -# Revision 1.9 1998/07/07 02:42:06 wegscd -# Win32 usleep() -# -# Revision 1.8 1998/07/02 01:47:26 wegscd -# Add Win32 code for gettimeofday. -# -# Revision 1.7 1997/11/13 02:08:12 wegscd -# Add missing EXTEND in gettimeofday() scalar code. -# -# Revision 1.6 1997/11/11 02:32:35 wegscd -# Do something useful when calling gettimeofday() in a scalar context. -# The patch is courtesy of Gisle Aas. -# -# Revision 1.5 1997/11/06 03:10:47 wegscd -# Fake ualarm() if we have setitimer. -# -# Revision 1.4 1997/11/05 05:41:23 wegscd -# Turn prototypes ON (suggested by Gisle Aas) -# -# Revision 1.3 1997/10/13 20:56:15 wegscd -# Add PROTOTYPES: DISABLE -# -# Revision 1.2 1997/05/23 01:01:38 wegscd -# Conditional compilation, depending on what the OS gives us. -# -# Revision 1.1 1996/09/03 18:26:35 wegscd -# Initial revision -# -# Added: trunk/orca/packages/Time-HiRes-1.38/hints/dynixptx.pl ============================================================================== --- trunk/orca/packages/Time-HiRes-1.38/hints/dynixptx.pl (original) +++ trunk/orca/packages/Time-HiRes-1.38/hints/dynixptx.pl 2002-11-09 12:32:43.000000000 -0800 @@ -0,0 +1,5 @@ +# uname -v +# V4.5.2 +# needs to explicitly link against libc to pull in usleep +$self->{LIBS} = ['-lc']; + Added: trunk/orca/packages/Time-HiRes-1.38/hints/sco.pl ============================================================================== --- trunk/orca/packages/Time-HiRes-1.38/hints/sco.pl (original) +++ trunk/orca/packages/Time-HiRes-1.38/hints/sco.pl 2002-11-09 12:32:44.000000000 -0800 @@ -0,0 +1,3 @@ +# osr5 needs to explicitly link against libc to pull in usleep +$self->{LIBS} = ['-lc']; + Modified: trunk/orca/packages/Time-HiRes-1.38/HiRes.pm ============================================================================== --- trunk/orca/packages/Time-HiRes-1.38/HiRes.pm (original) +++ trunk/orca/packages/Time-HiRes-1.38/HiRes.pm 2002-11-09 12:32:44.000000000 -0800 @@ -1,7 +1,7 @@ package Time::HiRes; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK @EXPORT_FAIL); +use vars qw($VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); require Exporter; require DynaLoader; @@ -9,13 +9,32 @@ @ISA = qw(Exporter DynaLoader); @EXPORT = qw( ); - at EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval); - -$VERSION = do{my at r=q$Revision: 1.20 $=~/\d+/g;sprintf '%02d.'.'%02d'x$#r, at r}; - -bootstrap Time::HiRes $VERSION; + at EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval + getitimer setitimer + ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF + d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer + d_nanosleep); + +$VERSION = '1.38'; +$XS_VERSION = $VERSION; +$VERSION = eval $VERSION; + +sub AUTOLOAD { + my $constname; + ($constname= $AUTOLOAD) =~ s/.*:://; + my $val = constant($constname, @_ ? $_[0] : 0); + if ($!) { + my ($pack,$file,$line) = caller; + die "Your vendor has not defined Time::HiRes macro $constname, used at $file line $line.\n"; + } + { + no strict 'refs'; + *$AUTOLOAD = sub { $val }; + } + goto &$AUTOLOAD; +} - at EXPORT_FAIL = grep { ! defined &$_ } @EXPORT_OK; +bootstrap Time::HiRes; # Preloaded methods go here. @@ -26,14 +45,6 @@ (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000); } -# I'm only supplying this because the version of it in 5.003's Export.pm -# is buggy (it doesn't shift off the class name). - -sub export_fail { - my $self = shift; - @_; -} - # Autoload methods go after =cut, and are processed by the autosplit program. 1; @@ -41,7 +52,7 @@ =head1 NAME -Time::HiRes - High resolution ualarm, usleep, and gettimeofday +Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers =head1 SYNOPSIS @@ -60,72 +71,175 @@ $elapsed = tv_interval ( $t0 ); use Time::HiRes qw ( time alarm sleep ); + $now_fractions = time; sleep ($floating_seconds); alarm ($floating_seconds); alarm ($floating_seconds, $floating_interval); + use Time::HiRes qw( setitimer getitimer + ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF ); + + setitimer ($which, $floating_seconds, $floating_interval ); + getitimer ($which); + =head1 DESCRIPTION -The C module implements a Perl interface to the usleep, ualarm, -and gettimeofday system calls. See the EXAMPLES section below and the test -scripts for usage; see your system documentation for the description of -the underlying gettimeofday, usleep, and ualarm calls. - -If your system lacks gettimeofday(2) you don't get gettimeofday() or the -one-arg form of tv_interval(). If you don't have usleep(3) or select(2) -you don't get usleep() or sleep(). If your system don't have ualarm(3) -or setitimer(2) you don't -get ualarm() or alarm(). If you try to import an unimplemented function -in the C statement it will fail at compile time. +The C module implements a Perl interface to the usleep, +ualarm, gettimeofday, and setitimer/getitimer system calls. See the +EXAMPLES section below and the test scripts for usage; see your system +documentation for the description of the underlying nanosleep or usleep, +ualarm, gettimeofday, and setitimer/getitimer calls. + +If your system lacks gettimeofday(2) or an emulation of it you don't +get gettimeofday() or the one-arg form of tv_interval(). If you don't +have nanosleep() or usleep(3) or select(2) you don't get Time::HiRes::usleep() +or sleep(). If your system don't have ualarm(3) or setitimer(2) you +don't get Time::HiRes::ualarm() or alarm(). + +If you try to import an unimplemented function in the C statement +it will fail at compile time. + +If your subsecond sleeping is implemented with nanosleep() instead of +usleep(), you can mix subsecond sleeping with signals since +nanosleep() does not use signals. This, however, is unportable +behavior, and you should first check for the truth value of +C<&Time::HiRes::d_nanosleep> to see whether you have nanosleep, +and then read carefully your nanosleep() C API documentation for +any peculiarities. (There is no separate interface to call nanosleep(); +just use Time::HiRes::sleep() or usleep() with small enough values. Also, +think twice whether using nanosecond accuracies in a Perl program is what +you should be doing.) -The following functions can be imported from this module. No -functions are exported by default. +The following functions can be imported from this module. +No functions are exported by default. =over 4 =item gettimeofday () -In array context it returns a 2 element array with the seconds and -microseconds since the epoch. In scalar context it returns floating +In array context returns a 2 element array with the seconds and +microseconds since the epoch. In scalar context returns floating seconds like Time::HiRes::time() (see below). =item usleep ( $useconds ) -Issues a usleep for the number of microseconds specified. See also -Time::HiRes::sleep() below. +Sleeps for the number of microseconds specified. Returns the number +of microseconds actually slept. Can sleep for more than one second +unlike the usleep system call. See also Time::HiRes::sleep() below. =item ualarm ( $useconds [, $interval_useconds ] ) Issues a ualarm call; interval_useconds is optional and will be 0 if unspecified, resulting in alarm-like behaviour. -=item tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] ) +=item tv_interval -Returns the floating seconds between the two times, which should have been -returned by gettimeofday(). If the second argument is omitted, then the -current time is used. +C + +Returns the floating seconds between the two times, which should have +been returned by gettimeofday(). If the second argument is omitted, +then the current time is used. =item time () -Returns a floating seconds since the epoch. This function can be imported, -resulting in a nice drop-in replacement for the C