[ 'physical_used' => 0, 'physical_free' => 0, 'physical_total_api' => 0, 'virtual_total' => 0, 'written_total' => 0, 'compressed_total' => 0, 'dedup_savings' => 0 ], 'V5030' => [ 'physical_used' => 0, 'physical_free' => 0, 'physical_total_api' => 0, 'virtual_total' => 0, 'written_total' => 0, 'compressed_total' => 0, 'dedup_savings' => 0 ], ]; foreach ($poolsData as $poolName => $poolDetails) { $currentSeries = null; if (str_contains($poolName, 'V5100')) { $currentSeries = 'V5100'; } elseif (str_contains($poolName, 'V5030')) { $currentSeries = 'V5030'; } if ($currentSeries) { $used_capacity = (float) $poolDetails['used_capacity']; $free_capacity = (float) $poolDetails['free_capacity']; $capacity = (float) $poolDetails['capacity']; $virtual_cap = (float) $poolDetails['virtual_capacity']; $uncomp_cap = (float) $poolDetails['compression_uncompressed_capacity']; $comp_cap = (float) $poolDetails['compression_compressed_capacity']; $dedup_sav = (float) $poolDetails['deduplication_capacity_saving']; $seriesData[$currentSeries]['physical_used'] += $used_capacity; $seriesData[$currentSeries]['physical_free'] += $free_capacity; $seriesData[$currentSeries]['physical_total_api'] += $capacity; $seriesData[$currentSeries]['virtual_total'] += $virtual_cap; $seriesData[$currentSeries]['written_total'] += $uncomp_cap; $seriesData[$currentSeries]['compressed_total'] += $comp_cap; $seriesData[$currentSeries]['dedup_savings'] += $dedup_sav; } } foreach ($seriesData as $series => &$data) { $data['physical_total_calc'] = ($data['physical_used'] + ($data['physical_free'] / 2)); $data['physical_used_percent'] = ($data['physical_total_calc'] > 0) ? ($data['physical_used'] / $data['physical_total_calc']) * 100 : 0; $data['physical_free_percent'] = 100 - $data['physical_used_percent']; $data['volume_written_percent'] = ($data['virtual_total'] > 0) ? ($data['written_total'] / $data['virtual_total']) * 100 : 0; $data['compression_savings'] = $data['written_total'] - $data['compressed_total']; $data['thin_savings'] = $data['virtual_total'] - $data['written_total']; $data['total_savings'] = $data['compression_savings'] + $data['dedup_savings'] + $data['thin_savings']; $data['compression_ratio'] = ($data['compressed_total'] > 0) ? ($data['written_total'] / $data['compressed_total']) : 0; $data['compression_savings_percent'] = ($data['written_total'] > 0) ? ($data['compression_savings'] / $data['written_total']) * 100 : 0; $data['dedup_savings_percent'] = ($data['written_total'] > 0) ? ($data['dedup_savings'] / $data['written_total']) * 100 : 0; $data['thin_savings_percent'] = ($data['virtual_total'] > 0) ? ($data['thin_savings'] / $data['virtual_total']) * 100 : 0; $data['total_savings_percent'] = ($data['virtual_total'] > 0) ? ($data['total_savings'] / $data['virtual_total']) * 100 : 0; } unset($data); ?> Web Infra Reports IT

5100 //Silver => 5030 $GB = 1024 * 1024 * 1024; $TB = $GB * 1024; //get full data $json = json_decode(PostJson("$bdnuss/Storage/SVC/SVC_INVENTORY.php", ''), true); // Sum LUN Size by Bay $lunsGold = 0; $lunsSilver = 0; try { foreach ($json['Data']['VolumeCopies'] as $data) { if (str_contains($data['mdisk_grp_name'], "5100")) { $lunsGold += $data['capacity']; } else { $lunsSilver += $data['capacity']; } } } catch (Exception $e) { } // Get Full Capacity $goldCapacity = 0; $silverCapacity = 0; $GoldCompression = 0; $SilverCompression = 0; foreach ($json['Data']['Pools'] as $data) { if (str_contains($data['name'], "5100")) { $goldCapacity += $data['capacity']; if ($data['used_capacity'] > 0) { $GoldCompression += ($data['real_capacity'] / $data['used_capacity']); } } else { $silverCapacity += $data['capacity']; if ($data['used_capacity'] > 0) { $SilverCompression += ($data['real_capacity'] / $data['used_capacity']); } } } // Datas $goldCapacity = $goldCapacity / 2; $silverCapacity = $silverCapacity / 2; $GoldFree = $goldCapacity - $lunsGold; $SilverFree = $silverCapacity - $lunsSilver; $goldPercentUsed = round($lunsGold / $goldCapacity * 100, 2); $silverPercentUsed = round($lunsSilver / $silverCapacity * 100, 2); $GoldCompression = round($GoldCompression / 2, 2); $SilverCompression = round($GoldCompression / 2, 2); // Unnasigned Luns $unnasigned = 0; $cuc = "bg-success"; $lLUN = ""; foreach ($json['Data']['Volumes'] as $volume) { if ($volume['protocol'] != "scsi") { $unnasigned++; $cuc = "bg-warning"; $lLUN .= $volume['name'] . "
"; } } // Orphan Hosts // Hosts / clusters without LUNs $orphanHosts = 0; $chc = "bg-success"; $lHOST = ""; // Standalone hosts: heuristic only foreach ($json['Data']['Hosts'] as $host) { $isStandalone = empty($host['host_cluster_id']); $isOffline = isset($host['status']) && $host['status'] === 'offline'; $isScsi = isset($host['protocol']) && $host['protocol'] === 'scsi'; if ($isStandalone && $isOffline && $isScsi) { $orphanHosts++; $chc = "bg-warning"; $lHOST .= "[HOST] " . $host['name'] . "
"; } } // Host clusters: real check with mapping_count if (!empty($json['Data']['Hostclusters'])) { foreach ($json['Data']['Hostclusters'] as $cluster) { $isScsi = isset($cluster['protocol']) && $cluster['protocol'] === 'scsi'; $hasNoMappings = isset($cluster['mapping_count']) && (int)$cluster['mapping_count'] === 0; if ($isScsi && $hasNoMappings) { $orphanHosts++; $chc = "bg-warning"; $lHOST .= "[CLUSTER] " . $cluster['name'] . "
"; } } } ?>
Gold (V5100)
%
%
%
% Compression
%

Compression :1

Silver (V5030)
%
%
%
% Compression
%

Compression :1

IO_grp 0
:
Volumes :
IO_grp 1
:
Volumes :
IO_grp 2
:
Volumes :