exadata_metrics.pl: “Month ’12’ out of range 0..11” dealing with the collectionTime attribute

Yesterday was the first of December and I detected an issue with the exadata_metrics.pl script when dealing with the collectionTime attribute.

It produced:

Month '12' out of range 0..11 at ./exadata_metrics.pl line 255

This is due to the fact that when using perl localtime/timegm the valid range for a month is 0-11 with 0 indicating January and 11 indicating December (while the collectiontime attribute is using 1-12)

The exadata_metrics.pl script has been updated to take care of this rule (It can be downloaded from this repository).

Remarks:

  1. Without this update the script did not produce wrong values for the DELTA(s) field (It was simply not possible to launch the script during December).
  2. Guess when I discovered the issue? When I was speaking about my exadata_metrics.pl script during the UKOUG TECH13 conference. Live demo never works as expected :-), but with the help of some attendees (Big thanks to Martin Nash) we managed to bypass the issue during the live demo.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s