Microsoft Virtualization Discussions

Get-NaSIS and ChangelogUsedPercent

DENISMELONI
3,003 Views

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
3,003 Views

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
3,003 Views

Hi Denis,

Could you try the below command and see if it works

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


DENISMELONI
3,003 Views

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
3,004 Views

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

Public