<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SnapShot Status in Perl in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/SnapShot-Status-in-Perl/m-p/6712#M337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ryan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Through trial and error I was able to figure out that I needed to use "busy" last night.&amp;nbsp; Thank you for the quick reply and sample output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Feb 2011 12:29:37 GMT</pubDate>
    <dc:creator>heindeldba</dc:creator>
    <dc:date>2011-02-15T12:29:37Z</dc:date>
    <item>
      <title>SnapShot Status in Perl</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/SnapShot-Status-in-Perl/m-p/6698#M335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a Perl script to automate attaching a SnapManager SnapShot as a drive on a server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have most of the command working, but I need to confirm the snapshot is not currently in use by SnapMirror.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the code below, how do I get the SnapShot status?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; my $result = $s-&amp;gt;invoke("snapshot-list-info", volume =&amp;gt; $Volume);&lt;BR /&gt; if ($result-&amp;gt;results_errno != 0) {&lt;BR /&gt;&amp;nbsp; print "\nError Code: " . $result-&amp;gt;results_errno . " - " . $result-&amp;gt;results_reason() . "\n";&lt;BR /&gt;&amp;nbsp; return (-1);&lt;BR /&gt; }&lt;BR /&gt; my $snapshotlist = $result-&amp;gt;child_get("snapshots");&lt;BR /&gt; if (!defined($snapshotlist) || ($snapshotlist eq "")) {&lt;BR /&gt;&amp;nbsp; printf("No snapshots on volume %s\n\n", $parent_vol_name);&lt;BR /&gt;&amp;nbsp; return (-1);&lt;BR /&gt; }&lt;BR /&gt; my &lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/37252"&gt;@snapshots&lt;/a&gt; = $snapshotlist-&amp;gt;children_get();&lt;BR /&gt; my $tmp = 0;&lt;BR /&gt; my $snapshot;&lt;BR /&gt; my $snap;&lt;BR /&gt; foreach my $ss (@snapshots) {&lt;BR /&gt;&amp;nbsp; $MName = $ss-&amp;gt;child_get_string("name");&lt;BR /&gt;&amp;nbsp; $MTime = $ss-&amp;gt;child_get_int("access-time", 0);&lt;BR /&gt;&amp;nbsp; $MStatus = $ss-&amp;gt;child_get_string("state");&amp;nbsp; ######### this is the value I am not able to get&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 07:00:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/SnapShot-Status-in-Perl/m-p/6698#M335</guid>
      <dc:creator>heindeldba</dc:creator>
      <dc:date>2025-06-05T07:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: SnapShot Status in Perl</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/SnapShot-Status-in-Perl/m-p/6703#M336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are looking for the 'busy' child element of snapshot-info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$MStatus = $ss-&amp;gt;child_get_string("busy");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The raw results back from ONTAP look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;snapshot-info&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;hourly.0&amp;lt;/name&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;access-time&amp;gt;1297717253&amp;lt;/access-time&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;total&amp;gt;2836&amp;lt;/total&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cumulative-total&amp;gt;2836&amp;lt;/cumulative-total&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependency/&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;lt;busy&amp;gt;false&amp;lt;/busy&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cumulative-percentage-of-used-blocks&amp;gt;0&amp;lt;/cumulative-percentage-of-used-blocks&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;percentage-of-used-blocks&amp;gt;0&amp;lt;/percentage-of-used-blocks&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cumulative-percentage-of-total-blocks&amp;gt;0&amp;lt;/cumulative-percentage-of-total-blocks&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;percentage-of-total-blocks&amp;gt;0&amp;lt;/percentage-of-total-blocks&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;/snapshot-info&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-ryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 21:16:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/SnapShot-Status-in-Perl/m-p/6703#M336</guid>
      <dc:creator>ryanc</dc:creator>
      <dc:date>2011-02-14T21:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: SnapShot Status in Perl</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/SnapShot-Status-in-Perl/m-p/6712#M337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ryan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Through trial and error I was able to figure out that I needed to use "busy" last night.&amp;nbsp; Thank you for the quick reply and sample output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 12:29:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/SnapShot-Status-in-Perl/m-p/6712#M337</guid>
      <dc:creator>heindeldba</dc:creator>
      <dc:date>2011-02-15T12:29:37Z</dc:date>
    </item>
  </channel>
</rss>

