[Orca-checkins] rev 244 - trunk/orca/data_gatherers/orcallator

Blair Zajac blair at orcaware.com
Tue Jul 15 22:02:36 PDT 2003


Author: blair
Date: Tue Jul 15 22:02:17 2003
New Revision: 244

Modified:
   trunk/orca/data_gatherers/orcallator/orcallator.se   (contents, props changed)
Log:
* data_gatherers/orcallator/orcallator.se:
  Only define MAX_RAWDISKS if it is not already defined.
  Remove all modification history and use the Subversion revision
    number to track versions of this file.  Set `svn:keywords' to
    `HeadURL LastChangedBy LastChangedDate LastChangedRevision' and
    use them.


Modified: trunk/orca/data_gatherers/orcallator/orcallator.se
==============================================================================
--- trunk/orca/data_gatherers/orcallator/orcallator.se	(original)
+++ trunk/orca/data_gatherers/orcallator/orcallator.se	Tue Jul 15 22:02:17 2003
@@ -8,330 +8,13 @@
 //
 // Portions copied from percollator.se written by Adrian Cockroft.
 //
-// Version 1.40:   Feb 23, 2003 John Langner
-//                              john_langner at ne.3com.com
-//                              Posted to orca-user list on Oct 25, 2000
-//                              with Subject "Re: Interest in more disk based
-//                              statistics"
-//                              Add disk service time data collection.
+// $HeadURL$
+// $LastChangedDate$
+// $LastChangedBy$
+// $LastChangedRevision$
 //
-// Version 1.39:   Feb 18, 2003 Burkhardt Schopp
-//                              B.Schopp at gmx.de
-//                              Modified struct RawDisk long_name object to
-//                              48 characters to handle T3 disks names.
-//
-// Version 1.38:   Jan 14, 2003 Additions by Sean O'Neill
-//                              Added several new variables for Orca to collect
-//                              and graph including:
-//                              pgrec/s - page reclaims (include pageout)
-//                              pgfrec/s - page reclaims from free list
-//                              pgin/s - pageins
-//                              pages_in/s - pages paged in
-//                              pgout/s - pageouts
-//                              pages_out/s - pages paged out
-//                              dfree/s - pages freed by daemon or auto
-//                              min_fault/s - minor page faults 
-//                                            (pvm.hat_fault + pvm.as_fault)
-//                              maj_fault/s - major page faults
-//                              prot_fault/s - protection faults
-//                              cow_fault/s - copy-on-write faults
-//                              zfod/s - zero-fill-on-demand faults
-//                              interrupts/s - interrupts including clock
-//                              intrthreads/s - interrupts as threads
-//                                              (below clock)
-//                              system_calls/s
-//                              context_switches/s
-//                              invol_switches/s - involuntary context switches
-//                              traps/s
-//                              forks/s
-//                              vforks/s
-//                              execs/s
-//                              namei/s - pathname lookups
-//                              ufsiget/s - ufs_iget() calls
-//                              ufsdirblk/s - directory blocks read
-//                              ufsinopage/s - inodes taken with no attached 
-//                                             pages
-//
-// Version 1.37:   Dec 28, 2002	Improved algorithm in raw_disk_map() which
-//				detects the end of the GLOBAL_disk_info array.
-//				To deal with occasions when the first disk is a
-//				CD-ROM and the second disk is an unmounted
-//				CD-ROM, revise the check in raw_disk_map() to
-//				detect both the first and second disk mentioned
-//				in GLOBAL_disk_info.  Patch contributed by Alan
-//				LeGrand <alegrand at wallace.com>.
-// Version 1.36:   Dec 17, 2002	Add measurements for tape (st) devices.  These
-//				tape measurements are only taken when the
-//				RAWDISK code is enabled.  The new measurements
-//				include system wide tape reads and writes per
-//				second (tape_rd/s and tape_wr/s), system wide
-//				tape transfer rate (tape_rK/s and tape_wK/s),
-//				and tape run percent (tape_runp_*). Patch
-//				contributed by Liston Bias <bias at pobox.com>.
-// Version 1.35:   Aug 11, 2002	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.
-//				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.
-// Version 1.34:   Jul 14, 2002	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.
-// Version 1.33:   Jul 10, 2002	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 <richp at setoolkit.com>.
-// Version 1.32:   Oct 24, 2001	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
-//				<jeremy at nd.edu>.
-// Version 1.31:   Oct 21, 2001	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.
-// Version 1.30:   Oct 19, 2001	Rename the new State_* columns to state_*.
-// Version 1.30b2: Oct 12, 2001	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
-//				<rcarruth at tempe.tt.slb.com>.  Make all of the
-//				live_rule.se live and temporary variable names
-//				consistent.
-// Version 1.30b1: Oct  8, 2001	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
-//				<alegrand at wallace.com>.
-// Version 1.29:   Oct  5, 2001	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.
-// Version 1.28:   Oct  2, 2001	No changes, bump version number to 1.28.
-// Version 1.28b7: Sep 29, 2001	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.
-// Version 1.28b6: Sep 28, 2001	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.
-// Version 1.28b5: Sep 28, 2001	Add three parameters that vmstat outputs,
-//				#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
-//				resources (I/O, paging), and #swpque, vmstat's
-//				`w', the number of processes runnable but
-//				swapped out.  Increase MAX_COLUMNS from 512 to
-//				2048.  Check [wr]lentime to see if an EMC disk
-//				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 can
-//				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 valid measurement
-//				anyway.  What happens is that we can have a
-//				small I/O, say 1024 bytes, in a 1/100sec =
-//				1024*100/sec.  I am thinking of making it
-//				wlentime+rlentime > 2 since I am still getting
-//				fake write spikes.  Make sure to define
-//				HAVE_EMC_DISK_CONTROL to enable this check.
-//				Patch contributed by Damon
-//				Atkins <Damon.Atkins at nabaus.com.au>.
-// Version 1.28b4: Mar 27, 2001	Recoded measure_disk() to access the RAWDISK
-//				interface to sys_kstat device information to
-//				allow the activity on Sun's A1000 and Clariion
-//				Raid controller drives to be seen.  Apparently
-//				the pseudo drivers do not update the kstat
-//				interface.  It is also inverts the fix
-//				provided by version 1.23 to avoid over-counting
-//				md devices.  By suppressing stats from slices
-//				and metadevices and instead reporting on full
-//				devices such as c0t0d0 or sd0.  Note: This may
-//				have introduced an interaction with the
-//				live_rules.se class monitoring of drive
-//				performance.  Prevent floppy disks and tape
-//				drives from RAWDISK.  Added wio% to measure
-//				wait time since the idle calculation is wrong
-//				without this.  Prevent filesystems mounted
-//				under /snapshots from being seen.  Patch
-//				contributed by Alan LeGrand
-//				<alegrand at wallace.com>.
-// Version 1.27:   Mar 27, 2001	Print the portion of time running in idle mode
-//				with some process waiting for block I/O as
-//				wio% and otherwise completely idle time as
-//				idle%.
-// Version 1.26:   Feb  5, 2001	Make sure to check the return from stat() on
-//				the web server access log in case the file is
-//				missing.  Use fstat() instead of stat() when a
-//				file descriptor is available.
-// Version 1.25:   Mar 30, 2000	Fix a typo where nil was misspelled as nik.
-// Version 1.24:   Mar 25, 2000	When orcallator.se was running on a system
-//				with an older version of SE the p_vmstat.scan
-//				variable is an integer and the sprintf to
-//				%8.3f fails, resulting in a perceived scan rate
-//				of 0 pages per second.  Now always add 0.0 to
-//				p_vmstat.scan to get a double.
-// Version 1.23:   Feb 25, 2000	When orcallator.se was running on a system
-//				with DiskSuite, the same physical disk was
-//				listed multiple times when it appeared in
-//				several metadevices.  The solution to the
-//				problem is not to build the c0t0d0 name but
-//				use the long disk name provided by the
-//				long_name string.  Patch contributed by Paul
-//				Haldane <Paul.Haldane at newcastle.ac.uk>.
-// Version 1.22:   Jan 14, 2000	Include code to record NFS v2 and v3 server
-//				statistics.  The new statistics are:
-//				nfss_calls, the number of NFS calls to the NFS
-//				server, nfss_bad, the number of bad NFS calls
-//				per second, and v{2,3}{reads,writes}, which are
-//				nfss_calls broken down into NFS version 2 and
-//				NFS version 3 calls.  The sum of v{2,3}{reads,
-//				writes} will be less than nfss_calls as the
-//				other types of NFS calls, such as getattr and
-//				lookup, are not included.  Contributed by Paul
-//				Haldane <Paul.Haldane at newcastle.ac.uk>.  This
-//				code is enabled by the standard -DWATCH_OS or
-//				individually by -DWATCH_NFS_SERVER.  The
-//				define -DWATCH_NFS has been superseded by
-//				-DWATCH_NFS_CLIENT, but to keep backwards
-//				compatibility, -DWATCH_NFS_CLIENT will be
-//				defined if -DWATCH_NFS is defined.
-// Version 1.21:   Jan 12, 2000	Prevent core dumps on extremely long access
-//				log lines.
-// Version 1.20:   Oct 20, 1999	Update my email address.
-// Version 1.19:   Oct 13, 1999	Prevent a division by zero in calculating the
-//				mean_disk_busy if the number of disks on the
-//				system is 0.
-// Version 1.18:   Oct 12, 1999	Rename disk_runp.c?t?d? to disk_runp_c?t?d?
-//				to remove the .'s.
-// Version 1.17:   Oct  8, 1999	Do not record mount point statistics for
-//				locally mounted /cdrom partitions.
-// Version 1.16:   Oct  7, 1999	To keep backwards compatibility, define
-//				WATCH_WEB if WATCH_HTTPD is defined.
-//				If the COMPRESSOR environmental variable
-//				is defined, then when a new log file is opened
-//				for a new day, the just closed log file is
-//				compressed using the COMPRESSOR command in the
-//				following manner:
-//				system(sprintf("%s %s &", COMPRESSOR, log_file)
-//				COMPRESSOR should be set to something like
-//				"gzip -9", or "compress", or "bzip2 -9".
-// Version 1.15:   Oct  5, 1999	kvm$mpid is a int not a long.  This caused
-//				problems on Solaris 7 hosts running a 64
-//				bit kernel.
-// Version 1.14:   Oct  1, 1999	Rename disk.c?t?d? column names to
-//				disk_runp.c?t?d? to better reflect the data
-//				being recorded and to allow for more per disk
-//				information later.
-// Version 1.13:   Sep 24, 1999	Fix a bug in the disk_mean calculation where
-//				it was being divided by the wrong disk_count.
-//				Now it should be much larger and in scale with
-//				disk_peak.  When WATCH_DISK is defined, now
-//				print each disk's run percent.  Add a new
-//				define WATCH_MOUNTS, which reports each local
-//				mount point's disk space and inode capacity,
-//				usage, available for non-root users and
-//				percent used.  This comes from Duncan Lawie
-//				tyger at hoopoes.com.  Add some smarts so that if
-//				the number of interfaces, physical disks, or
-//				mounted partitions changes, then a new header
-//				is printed.  This will prevent column name and
-//				data mixups when the system configuration
-//				changes.
-// Version 1.12:   Sep 14, 1999	Add the page scan rate as scanrate in
-//				measure_cpu.
-// Version 1.11:   Aug 13, 1999	Add the number of CPUs as ncpus.  Move
-//				measure_disk and measure_ram sooner in the
-//				list of subsystems to handle.  Increase the
-//				number of characters for each network
-//				interface from four to five.  Add new disk
-//				reads, writes, Kbytes read, and Kbytes
-//				written per second.  Add number of bytes
-//				of free memory in bytes as freememK.
-// Version 1.10:   Jul 28, 1999	Measure the process spawn rate if WATCH_CPU
-//				is defined and the user is root.
-// Version 1.9:    Jun  2, 1999	If WATCH_YAHOO is defined, then process the
-//				access log as a Yahoo! style access log.
-//				Restructure the code to handle different
-//				web server access log formats.
-// Version 1.8:    Jun  1, 1999	If the environmental variable WEB_SERVER is
-//				defined, use its value of the as the name
-//				of the process to count for the number of
-//				web servers on the system.  If WEB_SERVER
-//				is not defined, then count number of httpd's.
-// Version 1.7:    Mar 25, 1999	Simplify and speed up count_proc by 20%.
-// Version 1.6:    Feb 23, 1999	Print pvm.user_time and system_time correctly.
-// Version 1.5:    Feb 23, 1999	Always write header to a new file.
-// Version 1.4:    Feb 19, 1999	Handle missing HTTP/1.x in access log.
-// Version 1.3:    Feb 18, 1999	On busy machines httpops5 will be enlarged.
-// Version 1.2:    Feb 18, 1999	Output data on integral multiples of interval.
-// Version 1.1:	   Feb 18, 1999	Integrate Squid log processing from SE 3.1.
-// Version 1.0:	   Sep  9, 1998	Initial version.
+// Revision history for this file can be retrieved by running svn log
+// on the HeadURL listed above.
 //
 
 // The default sampling interval in seconds.
@@ -653,7 +336,10 @@
 };
 
 // Define global for tracking raw disk data.
+#ifndef MAX_RAWDISKS
 #define MAX_RAWDISKS	1024
+#endif
+
 RawDisk			RAW_disk[MAX_RAWDISKS];
 int			RAW_disk_map=0;
 int			RAW_disk_count=0;



More information about the Orca-checkins mailing list