Software Development Kit (SDK) and API Discussions

Mismatch between the outputs generated by "Get-NaSnapShot vol0" and "snap list vol0"

netappwala
4,668 Views

Hi,

 

I am getting to see the output mismatch b/w below outputs from DOT PSTK and DOT commands. "hourly.1" snapshot has been created on 21st Feb 2016 as the "snap list vol0" command shows but as per the PSTK output "hourly.1" has been created on 22nd Feb 2016. And its the same with "hourly.5" also as highlighed in red. Please help to get accurate output as I am developing a script that will list no.of snapshot, timespan(no.of days) of snapshots so that there will be an alert if the retention periods exceeds more than 28 days. Its not just with vol0, for all volumes there is a mismatch b/w outputs.

 

===================================================================

# Get-NaSnapShot vol0 | Select Name,Created

 

Name    : hourly.0
Created : 2/22/2016 1:00:29 PM


Name    : hourly.1
Created : 2/22/2016 1:00:30 AM


Name    : hourly.2
Created : 2/21/2016 9:00:31 PM


Name    : hourly.3
Created : 2/21/2016 5:00:31 PM


Name    : hourly.4
Created : 2/21/2016 1:00:32 PM


Name    : hourly.5
Created : 2/21/2016 1:00:33 AM


Name    : nightly.0
Created : 2/22/2016 5:00:30 AM


Name    : nightly.1
Created : 2/21/2016 5:00:32 AM
========================================================================================
 # Snap list vol0

 
  %/used       %/total  date          name
----------  ----------  ------------  --------
  2% ( 2%)    0% ( 0%)  Feb 22 08:00  hourly.0
  5% ( 3%)    0% ( 0%)  Feb 22 00:00  nightly.0
  8% ( 3%)    0% ( 0%)  Feb 21 20:00  hourly.1
 10% ( 3%)    0% ( 0%)  Feb 21 16:00  hourly.2
 12% ( 3%)    0% ( 0%)  Feb 21 12:00  hourly.3
 14% ( 3%)    0% ( 0%)  Feb 21 08:00  hourly.4
 17% ( 3%)    0% ( 0%)  Feb 21 00:00  nightly.1
 19% ( 3%)    0% ( 0%)  Feb 20 20:00  hourly.5

==========================================================================================


Thanks,

Kabir Charan

7 REPLIES 7

asulliva
4,653 Views

They all appear to be 5 hours off.  Is the timezone on your local computer or the controller(s) different?

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

netappwala
4,650 Views

I am connecting to Controller via Remote Desktop and both Contoler and RD timezones are same.

 

 

 

 

Thanks,

Kabir Charan

asulliva
4,572 Views

Just to validate, you might want to check what PowerShell reports for timezones on the controller and the localhost...

 

([System.TimeZoneInfo]::Local).Id

(Get-NaTimezone).Timezone

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

netappwala
4,555 Views

Andrew, goal is to excute the script on a list of filers which are in different timezones. Just to test I chose one filer of EST TZ , Powershell local TZ is also EST. Below is the output form PSTK and "snap list". I see still there is difference eventhough both filer and powershell's timezone is same.

 

# snap list vol0

 

 %/used       %/total  date          name
----------  ----------  ------------  --------
  2% ( 2%)    0% ( 0%)  Feb 26 16:00  hourly.0
  4% ( 2%)    0% ( 0%)  Feb 26 12:00  hourly.1
  7% ( 2%)    0% ( 0%)  Feb 26 08:00  hourly.2
  9% ( 3%)    0% ( 0%)  Feb 26 00:00  nightly.0
 11% ( 3%)    0% ( 0%)  Feb 25 20:00  hourly.3
 13% ( 2%)    0% ( 0%)  Feb 25 16:00  hourly.4
 15% ( 2%)    0% ( 0%)  Feb 25 12:00  hourly.5
 17% ( 3%)    0% ( 0%)  Feb 25 00:00  nightly.1

 

# vol0 | Get-NaSnapShot | Select Name,Created

Name                                                        Created
----                                                        -------
hourly.0                                                    2/26/2016 1:00:24 PM
hourly.1                                                    2/26/2016 1:00:25 AM
hourly.2                                                    2/25/2016 9:00:26 PM
hourly.3                                                    2/25/2016 5:00:26 PM
hourly.4                                                    2/25/2016 1:00:27 PM
hourly.5                                                    2/25/2016 1:00:29 AM
nightly.0                                                   2/26/2016 5:00:24 AM
nightly.1                                                   2/25/2016 5:00:28 AM

 

----------------------------------------

TimeZone Check:

 

PS C:\Users\bt5261\desktop> ([System.TimeZoneInfo]::Local).Id
Eastern Standard Time
PS C:\Users\bt5261\desktop> (Get-NaTimeZone).TimeZone
EST

asulliva
4,526 Views

I'm not seeing this on any of my test systems.  Let's try a couple of things...

 

  1. Can you print/show the value of the AccessTimeDT property for one of the snapshots?  In particular, I'm interested in the "Kind" property.  
Get-NaSnapshot vol0 | Select-Object -First 1 -ExpandProperty AccessTimeDT  | Format-List

 

  1. Can you also provide the value of the AccessTime property for the same snapshot
(Get-NaSnapshot vol0 | Select-Object -First 1).AccessTime

I believe the AccessTimeDT property is a PowerShell DateTime object which is created using the epoc time provided by the AccessTime property.  I'm curious if something is being lost in translation.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

netappwala
4,496 Views

Sorry for the late Andrew.. below are the outputs.

 

PS C:\Users\xxxx\desktop> Get-NaSnapshot vol0 | Select-Object -First 1 -ExpandProperty AccessTimeDT  | Format-List

Date        : 3/8/2016 12:00:00 AM
Day         : 8
DayOfWeek   : Tuesday
DayOfYear   : 68
Hour        : 17
Kind        : Local
Millisecond : 0
Minute      : 1
Month       : 3
Second      : 0
Ticks       : 635930532600000000
TimeOfDay   : 17:01:00
Year        : 2016
DateTime    : Tuesday, March 08, 2016 5:01:00 PM

PS C:\Users\xxxxx\desktop> (Get-NaSnapshot vol0 | Select-Object -First 1).AccessTime
1457456460

 

===============================================================================================

 

PS C:\Users\xxxx\desktop> get-NaSnapShot vol0 | Select Name,Created

Name                                                        Created
----                                                        -------
hourly.0                                                    3/8/2016 5:01:00 PM
hourly.1                                                    3/8/2016 1:00:00 PM
hourly.2                                                    3/8/2016 1:00:02 AM
hourly.3                                                    3/7/2016 9:00:03 PM
hourly.4                                                    3/7/2016 5:00:03 PM
hourly.5                                                    3/7/2016 1:00:04 PM
nightly.0                                                   3/8/2016 5:00:01 AM
nightly.1                                                   3/7/2016 5:00:10 AM


PS C:\Users\xxxxx\desktop> invoke-nassh "snap list vol0"
Volume vol0
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
  1% ( 1%)    0% ( 0%)  Mar 08 12:01  hourly.0
  2% ( 1%)    0% ( 0%)  Mar 08 08:00  hourly.1
  4% ( 2%)    0% ( 0%)  Mar 08 00:00  nightly.0
  5% ( 1%)    0% ( 0%)  Mar 07 20:00  hourly.2
  6% ( 1%)    0% ( 0%)  Mar 07 16:00  hourly.3
  7% ( 1%)    0% ( 0%)  Mar 07 12:00  hourly.4
  9% ( 1%)    0% ( 0%)  Mar 07 08:00  hourly.5
 10% ( 2%)    0% ( 0%)  Mar 07 00:00  nightly.1

 

 

 

 

Thanks,

Kabir

netappwala
4,492 Views

 Andrew, I am trying to understand the difference between Date and Date Time highlighted below as you cansee the timestamp differece.

 

 

PS C:\Users\xxxx\desktop> Get-NaSnapshot vol0 | Select-Object -First 1 -ExpandProperty AccessTimeDT  | Format-List

Date        : 3/8/2016 12:00:00 AM
Day         : 8
DayOfWeek   : Tuesday
DayOfYear   : 68
Hour        : 17
Kind        : Local
Millisecond : 0
Minute      : 1
Month       : 3
Second      : 0
Ticks       : 635930532600000000
TimeOfDay   : 17:01:00
Year        : 2016
DateTime    : Tuesday, March 08, 2016 5:01:00 PM

 

 

Thanks,

Kabir

Public