sqlf stats

Displays statistics values from the statistics archive.

Syntax


sqlf stats ([<instanceId>][:<typeId>][.<statId>])* [-details] [-nofilter|-persec|-persample] [-prunezeros]
     [-starttime=<time>] [-endtime=<time>] -archive=<statFile>

Description

To enable statistics generation with archiving, you configure the following properties when you start the SQLFire server:
  • statistic-sampling-enabled=true
  • statistic-archive-file=<stats-archive-file-name>
To include timing statistics you set enable-time-statistics=true along with the above properties. See Configuration Properties.

By default sqlf stats prints all statistics. You can use one or more statistics specification arguments to print individual resources or a specific statistic. The format of a statistics specification is: an optional combine operator, an optional instanceId, an optional typeId, and an optional statId.

The combine operator can be a plus (+) to combine all matches in the same file or a double plus (++) to combine all matches across all files.

instanceId must be the name or id of a resource.

typeId is a colon (:) followed by the name of a resource type.

statId is a period (.) followed by the name of a statistic.

A typeId or instanceId with no statId prints out all the matching resources and all their statistics. A typeId or instanceId with a statId prints out just the named statistic on the matching resources.

A statId with no typeId or instanceId matches all statistics with that name.

The table shows options for sqlf stats.

Option Description
-details Prints static descriptions.
-nofilter In conjunction with -archive, prints statistics as raw, unfiltered, values.
-persec In conjunction with -archive, prints statistics as the rate of change, per second, of the raw values.
-persample In conjunction with -archive, prints statistics as the rate of change, per sample, of the raw values.
-prunezeros In conjunction with -archive, suppresses printing those statistics that have all zero values.
-starttime=<time> In conjunction with -archive, ignores those statistics samples that were taken before the specified time. The time argument format must match the string yyyy/MM/dd HH:mm:ss.SSS z where z is the time zone.
-endtime=<time> In conjunction with -archive, ignores statistics samples that were taken after the specified time. The time argument format must match the string yyyy/MM/dd HH:mm:ss.SSS z where z is the time zone.
-archive Specifies the archive file to use.

Example 1: Starting a Server with Statistics Archiving Enabled

sqlf server start -client-port=1528 -statistic-sampling-enabled=true 
-statistic-archive-file=system_stats.data

Example 2: Viewing a Statistics Archive File

This command prints all available statistics:
sqlf stats -archive=system_stats.data
vmStats, 31616, VMStats: "2011/05/20 20:04:12.633 GMT+05:30" samples=27
  pendingFinalization objects: samples=27 min=0 max=0 average=0 stddev=0 
  daemonThreads threads: samples=27 min=22 max=34 average=32.85 stddev=2.23 
  threads threads: samples=27 min=23 max=35 average=33.85 stddev=2.23 
  peakThreads threads: samples=27 min=23 max=35 average=34.3 stddev=2.32 
  threadStarts threads/sec: samples=26 min=0 max=10 average=0.46 stddev=1.96 

Here   instanceId  is   vmStats
	 	    typeId      is   VMStats
	 	    statId      are   pendingFinalization, daemonThreads, threads,
	 	                      peakThreads, threadStarts  

SQLF-DD-DISKSTORE_DIR#0, 31616, DiskDirStatistics: "2011/05/20 20:04:13.633 GMT+05:30" samples=26 
  diskSpace bytes: samples=26 min=182 max=182 average=182 stddev=0 
  maximumSpace bytes: samples=26 min=2251799812636672 max=2251799812636672   
  average=2251799812636672 stddev=0
  
Here  instanceId  is   SQLF-DD-DISKSTORE_DIR#0
      typeId      is   DiskDirStatistics
      statId     are   diskSpace, maximumSpace

SQLF-DEFAULT-DISKSTORE_DIR#0, 31616, DiskDirStatistics: "2011/05/20 20:04:13.633 GMT+05:30" samples=232821 
	 	  diskSpace bytes: samples=232821 min=0 max=0 average=0 stddev=0 
	 	  maximumSpace bytes: samples=232821 min=2251799812636672 max=2251799812636672 average=2251799812636672 stddev=0 

Example 3: Viewing All Statistics of a Specified Instance ID

sqlf stats   vmStats -archive=system_stats.data
[info] Found 14 matches :  for "vmStats" vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093 

  pendingFinalization objects: samples=234093 min=0 max=1 average=0 stddev=0 
[info] Found 14 matches :  for "vmStats" vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093 

  daemonThreads threads: samples=234093 min=22 max=34 average=33 stddev=0.02 
[info] Found 14 matches :  for "vmStats" vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093 

  threads threads: samples=234093 min=23 max=35 average=34 stddev=0.02 
[info] Found 14 matches :  for "vmStats" vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093 

  peakThreads threads: samples=234093 min=23 max=35 average=35 stddev=0.03 
[info] Found 14 matches :  for "vmStats" vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093vmStats, 31616, VMStats: 
"2011/05/20 20:04:12.633 GMT+05:30" samples=234093

Example 4: Viewing All Statistics of a Specified Instance ID and Stat ID

sqlf stats   SQLF-DEFAULT-DISKSTORE_DIR#0:DiskDirStatistics -archive=system_stats.data
[info] Found 2 matches :  for "SQLF-DEFAULT-DISKSTORE_DIR#0:DiskDirStatistics" SQLF-DEFAULT-DISKSTORE_DIR#0, 
31616, DiskDirStatistics: "2011/05/20 20:04:13.633 GMT+05:30" samples=236469 

  diskSpace bytes: samples=236469 min=0 max=0 average=0 stddev=0 
[info] Found 2 matches :  for "SQLF-DEFAULT-DISKSTORE_DIR#0:DiskDirStatistics" SQLF-DEFAULT-DISKSTORE_DIR#0, 
31616, DiskDirStatistics: "2011/05/20 20:04:13.633 GMT+05:30" samples=236469SQLF-DEFAULT-DISKSTORE_DIR#0, 
31616, DiskDirStatistics: "2011/05/20 20:04:13.633 GMT+05:30" samples=236469 

  maximumSpace bytes: samples=236469 min=2251799812636672 max=2251799812636672 average=2251799812636672 stddev=0

Example 5: Viewing One Statistic of a Specified Instance ID and Stat ID

sqlf stats  SQLF-DEFAULT-DISKSTORE_DIR#0:DiskDirStatistics.diskSpace -archive=system_stats.data
[info] Found 1 matches :  for "SQLF-DEFAULT-DISKSTORE_DIR#0:DiskDirStatistics.diskSpace" SQLF-DEFAULT-DISKSTORE_DIR#0, 
31616, DiskDirStatistics: "2011/05/20 20:04:13.633 GMT+05:30" samples=240133 

  diskSpace bytes: samples=240133 min=0 max=0 average=0 stddev=0