Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
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.
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: -
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...
Solved! See The Solution
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
Hi Denis,
Could you try the below command and see if it works
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: -
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