Microsoft Virtualization Discussions

Get-NaSIS and ChangelogUsedPercent

DENISMELONI

Hi, I'm trying to develop a Powershell script and I need to highlight some informations like the "ChangelogUsedPercent" value for deduplicated volumes.

With "sis status -l" in SSH, it's OK, but with Powershell KO (see below).

Is there another way (that works) to get this information in Powershell?

Thanks.

# sis status -l /vol/j_rec_507

Path:                                    /vol/j_rec_507

State:                                   Enabled

Status:                                 Idle

Progress:                             Idle for 76:51:24

Type:                                   Regular

Schedule:                            sat@9

Minimum Blocks Shared:      1

Blocks Skipped Sharing:       0

Last Operation Begin:           Sat Feb  9 05:00:00 CET 2013

Last Operation End:             Sat Feb  9 05:42:44 CET 2013

Last Operation Size:             88 GB

Last Operation Error:            -

Changelog Usage:             3%

Checkpoint Time:                 No Checkpoint

Checkpoint Op Type:            -

Checkpoint stage:                -

Checkpoint Sub-stage:         -

Checkpoint Progress:           -

# get-nasis /vol/j_rec_507 | fl *

Enabled                                             : True

BlocksSkippedSharing                        :

ChangelogUsedPercent                   :

CheckpointOpType                             : -

CheckpointProgress                           : -

CheckpointStage                               : -

CheckpointSubStage                          : -

CheckpointTime                                 : 0

CheckpointTimeDT                             :

IsCompressionEnabled                       :

IsInlineCompressionEnabled               :

LastOperationBeginTimestamp           : 1360382400

LastOperationBeginTimestampDT       : 09/02/2013 05:00:00

LastOperationEndTimestamp              : 1360384964

LastOperationEndTimestampDT          : 09/02/2013 05:42:44

LastOperationError                             :

LastOperationSize                             : 88 GB

LastOperationSizeBytes                    :

LastOperationState                           :

LastSuccessOperationBeginTimestamp          :

LastSuccessOperationEndTimestamp            :

LogicalData                                     :

MinimumBlocksShared                    :

Path                                               : /vol/j_rec_507

Progress                                         : Idle for 76:57:50

QueuedJobType                               :

Schedule                                        : sat@9

StaleFingerprintPercentage              :

State                                             : Enabled

Status                                           : Idle

...etc...

1 ACCEPTED SOLUTION

DENISMELONI

It's not very pretty, but it works

# recupération du Changelog Used

          $vol=Invoke-NaSsh "sis status -l" $volume.path      ###volume name

          $SearchStart="Changelog Usage:         "               ###not included in result

          $SearchEnd="%"                                                 ###not included in result

          $vol -match "(?s)$SearchStart(?<content>.*)$SearchEnd"

          $result=$matches['content']

          $CHANGELOG = [int]$result

So, $CHANGELOG = 3

View solution in original post

3 REPLIES 3

vinith

Hi Denis,

Could you try the below command and see if it works

Invoke-NaSsh "sis status -l /vol/j_rec_507"


DENISMELONI

Great !

But how to put it in a variable, I've tryed :

# $vol=Invoke-NaSsh "sis status -l /vol/j_rec_507"

# $vol."Change Usage" => nothing

# $vol

Path:                    /vol/j_rec_507

State:                   Enabled

Status:                  Idle

Progress:                Idle for 77:14:08

Type:                    Regular

Schedule:                sat@9

Minimum Blocks Shared:   1

Blocks Skipped Sharing:  0

Last Operation Begin:    Sat Feb  9 05:00:00 CET 2013

Last Operation End:      Sat Feb  9 05:42:44 CET 2013

Last Operation Size:     88 GB

Last Operation Error:    -

Changelog Usage:         3%

Checkpoint Time:         No Checkpoint

Checkpoint Op Type:      -

Checkpoint stage:        -

Checkpoint Sub-stage:    -

Checkpoint Progress:     -

DENISMELONI

It's not very pretty, but it works

# recupération du Changelog Used

          $vol=Invoke-NaSsh "sis status -l" $volume.path      ###volume name

          $SearchStart="Changelog Usage:         "               ###not included in result

          $SearchEnd="%"                                                 ###not included in result

          $vol -match "(?s)$SearchStart(?<content>.*)$SearchEnd"

          $result=$matches['content']

          $CHANGELOG = [int]$result

So, $CHANGELOG = 3

View solution in original post

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public