timestamp);
$formattedTime = strftime("%k:%M", strtotime($date->month."/".$date->day."/".$date->year." ".$date->hour.":".$date->minute.":".$date->second));
// Check the timezone to see if it is custom. If so,
// "Custom" will be shown as the timezone in the report.
error_log("get_custom_tz_dst...");
$ret_val = get_custom_tz_dst($user);
$ret_val_array = explode ("?",$ret_val->custom_tz_dst);
$CustomTZMethod = $ret_val_array[0];
$UseCustomTZ = ($CustomTZMethod == 'EXACT');
error_log("get_network_configuration_ipv4...");
$networkConfig = get_network_configuration_ipv4($user);
error_log("get_product_info...");
$productInfo = get_product_info($user);
error_log("Product Info = " . print_r($productInfo, true ));
$sortCriteria = new SortCriteria();
$sortCriteria->sortColumn = 3;
$sortCriteria->ascending = 1;
$sortCriteria->filterPattern = "*";
error_log("get_all_drives_ex...");
$drives = get_all_drives_ex($user, $sortCriteria);
error_log("get_blades...");
$iobs = get_blades($user);
error_log("FC I/O Blades = " . print_r($iobs, true ));
error_log("get_eeblades...");
$eebs = get_eeblades($user);
error_log("EE Blades = " . print_r($eebs, true ));
$sort = new SortCriteria();
error_log("get_logical_libraries...");
$libs = get_logical_libraries($user, $sort);
error_log("logical libraries = ".print_r($libs,true));
error_log("is_ipv6_enabled...");
$IPv6Enabled = is_ipv6_enabled();
error_log("get_all_ipv6_addresses...");
$ipv6Addrs = get_all_ipv6_addresses();
error_log("ipv6Addrs = ". print_r($ipv6Addrs, true ) );
//$ipv6Addrs = array("2001::55:ee/64", "2001::55:3e/64", "2001::55:2e/64", "2001::55:1e/64", "2001::55:e9/64", "2001::55:e8/64", "2001::55:e7/64", "2001::55:e6/64", "2001::55:e5/64", "2001::55:e4/64", "2001::55:e3/64", "2001::55:e2/64", "2001::55:e1/64" );
$summary = get_library_summary_info($user);
$is5U = $summary->modules == 1;
// Try the GUI over ride first
$Brand = getenv(ADICLIBRARY_BRAND_GUI);
if( $Brand == "" )
$Brand = getenv(ADICLIBRARY_BRAND);
switch( $Brand )
{
case 'ibm':
$theSN = $productInfo->alternateId;
break;
case 'dell':
$theSN = $productInfo->serialnumber;
break;
case 'tandberg':
$theSN = $productInfo->serialnumber;
break;
case 'adic':
$theSN = $productInfo->serialnumber;
break;
case 'quantum':
$theSN = $productInfo->serialnumber;
break;
}
$ApolloVer = "";
// Is this an Apollo robot?
error_log("get_firmware_versions...");
$descriptions = get_firmware_versions($user);
error_log("get_firmware_versions = ". print_r($descriptions, true) );
$isApollo = false;
foreach($descriptions as $description)
{
// CR 19990 Do not diaply the Apollo imager version
if( $description->component == "Robot Firmware" )
{
$ApolloVer = $description->version;
if($ApolloVer == "") // If the robot is dead this can come back blank
$ApolloVer = "N/A";
break;
}
}
//////////////////////////////////
// Handle the encryption stuff
//////////////////////////////////
error_log("is_ibm_encryption_licensed...");
$doEKM = is_ibm_encryption_licensed($user);
$doQEKM = false;
$doSKM = false;
$doRKM = false;
$doKMIP = false;
$doTKLM = false;
if ($doEKM)
{
error_log("get_ekm...kmip");
$kmip_data = get_ekm( $user, 4 );
error_log("kmip_data = ". print_r($kmip_data, true) );
if(($kmip_data->primaryIP != "") && ($perferedServerType == 4))
$doKMIP = true;
error_log("get_ekm...rkm");
$rkm_data = get_ekm( $user, 3 );
error_log("rkm_data = ". print_r($rkm_data, true) );
if(($rkm_data->primaryIP != "") && ($perferedServerType == 3))
$doRKM = true;
error_log("get_ekm...skm");
$akm_data = get_ekm( $user, 2 );
error_log("akm_data = ". print_r($akm_data, true) );
if(($akm_data->primaryIP != "") && ($perferedServerType == 2))
{
$doSKM = true;
// Try to get whatever S/Ns we can
error_log("akm_get_server_serial_numbers...");
$akmSNs = @akm_get_server_serial_numbers($user);
error_log("akm_get_server_serial_numbers returned ". print_r($akmSNs,true) );
error_log("akm_servers_available...");
$akmServAvail = @akm_servers_available($user);
if ($akmServAvail == 1) // Ensure that both are up
{
error_log("akm_get_software_version...");
$qkmVer = @akm_get_software_version($user);
error_log("akm_get_software_version returned ". print_r($qkmVer,true) );
}
else
{
$qkmVer = "Unknown";
error_log("akm servers not available, setting qkm version to Unknown");
}
}
error_log("get_ekm...");
$ekm_data = get_ekm( $user, 1 );
error_log("ekm_data = ". print_r($ekm_data, true) );
if(($ekm_data->primaryIP != "") && ($perferedServerType == 1))
$doQEKM = true;
error_log("get_ekm... (tklm)");
$tklm_data = get_ekm( $user, 5 );
error_log("ekm_data = ". print_r($tklm_data, true) );
if(($tklm_data->primaryIP != "") && ($perferedServerType == 5))
$doTKLM = true;
$ekmServerDefault = ""; // If this is blank the display will show QKM or Q-EKM else it will so what is in the var.
error_log("get_ekm_ssl...");
$sslEnabled = $ekm_data->sslEnabled? Enabled : Disabled;//get_ekm_ssl($user)? Enabled : Disabled;
// If no settings have been saved don;t show encryption
if( !$doRKM && !$doQEKM && !$doSKM && !$doKMIP && !$doTKLM )
$doEKM = false;
}
//////////////////////////////////
// Handle the EDLM stuff
//////////////////////////////////
$hasEDLM = is_feature_licensed($user, "EDLM");
$apps = array();
$pluginMap = array();
$appMap = array();
if($hasEDLM)
{
$apps = edlm_get_external_apps($user);
foreach(edlm_get_plugins() as $plugin)
{
$pluginMap[$plugin->id] = $plugin->name;
}
foreach($apps as $app)
{
$appMap[$app->id] = $app->name;
}
}
?>
System Information Report
css("style");
js("common");
?>
Date & Time
Date
Time
Time Zone
= $formattedDate ?>
= $formattedTime ?>
= $UseCustomTZ?"Custom":$date->timezone ?>
Physical Library
Host Name
IPv4 Address
Serial Number
Firmware Version
= $networkConfig->hostname ?>
= $networkConfig->ip ?>
= $theSN ?>
= $productInfo->productversion ?>
IPv6 Addresses
= $ipv6Addrs[$col+($row*4)] ?>
BSP Level
Last update
BSP Level
Last update
Robot Firmware Version
= $productInfo->bsp_level ?>
= $productInfo->lastupdate ?>
= $productInfo->bsp_level ?>
= $productInfo->lastupdate ?>
= $ApolloVer ?>
Encryption
Key Server Type
Version
SSL Connection
Primary Host
Primary Port
Primary S/N
Secondary Host
Secondary Port
Secondary S/N
SKM
=$qkmVer?>
Enabled
=$akm_data->primaryIP?>
=$akm_data->primaryPort?>
=$akmSNs->primarySN?>
=$akm_data->secondaryIP?>
=$akm_data->secondaryPort?>
=$akmSNs->secondarySN?>
Q-EKM
N/A
=$sslEnabled?>
=$ekm_data->primaryIP?>
=$ekm_data->primaryPort?>
N/A
=$ekm_data->secondaryIP?>
=$ekm_data->secondaryPort?>
N/A
TKLM
N/A
=$sslEnabled?>
=$tklm_data->primaryIP?>
=$tklm_data->primaryPort?>
N/A
=$tklm_data->secondaryIP?>
=$tklm_data->secondaryPort?>
N/A
RKM
N/A
Enabled
=$rkm_data->primaryIP?>
=$rkm_data->primaryPort?>
N/A
N/A
N/A
N/A
KMIP
N/A
Enabled
=$kmip_data->primaryIP?>
=$kmip_data->primaryPort?>
N/A
=$kmip_data->secondaryIP?>
=$kmip_data->secondaryPort?>
N/A
if($hasEDLM) { ?>
EDLM StorNext Configurations
Name
Host
Failover Host
Plug-in
foreach($apps as $app) { ?>
= $app->name ?>
= $app->host ?>:= $app->port ?>
if($app->failover_host != "") { ?>
= $app->failover_host ?>:= $app->failover_port ?>
} else { ?>
Not Configured
} ?>
= $pluginMap[$app->action_type_id] ?>
} ?>
} ?>
Library Partitions
$lib_col_widths = array(10, 17, 19, 8, 11, 8, 7, 7, 7, 6);
if($hasEDLM) { // If we need to include the EDLM column, specify new widths
$lib_col_widths = array(9, 16, 18, 7, 10, 7, 6, 6, 6, 5, 10);
}
?>
Name
Serial Number
Control Path
Mode
Encryption
Type
Slots
Media
Drives
FIPS
if($hasEDLM) { ?>
StorNext Config
} ?>
filterColumn = 0;
$sortCriteria->ascending = true;
error_log("get_all_drives_by_library...");
$libraryDrives = get_all_drives_by_library($user, $lib->guid, $sortCriteria, (int) 0, (int) MEDIA_TYPE_ANY);
error_log("libraryDrives = " . print_r($libraryDrives,true) );
error_log("get_ekm_by_library...");
$ekm_data_lib = get_ekm_by_library( $user, $lib->guid );
$commandPath = "None";
$foundCommandPath = false;
foreach ($libraryDrives as $libraryDrive)
{
// EDLM partition needs control path set to N/A. PCR59546
if( $libraryDrive->isEDLM == 1 )
{
$commandPath = "N/A";
$foundCommandPath = true;
}
else
{
if( $libraryDrive->controlPathType != 0 ) // CP_NONE
{
error_log("Command Path Drive interface type is :". print_r($libraryDrive->interfaceType,true) );
if ($libraryDrive->interfaceType == 'SCSI')
{
$commandPath = "SCSI ID ".$libraryDrive->scsiId;
}
else if ($libraryDrive->interfaceType == 'Fibre' && $libraryDrive->wwpn)
{
switch($libraryDrive->controlPathType)
{
case 1: // CP_LUN1
$wwpn = $libraryDrive->wwpn;
break;
case 2: // CP_CPF_ACTIVE
$wwpn = $libraryDrive->virtual_wwpn;
break;
case 3: // CP_CPF_INACTIVE
$wwpn = $libraryDrive->virtual_wwpn;
break;
}
$commandPath = "WWPN ".$wwpn;
}
else if ($libraryDrive->interfaceType == 'SAS' && $libraryDrive->wwpn)
{
# PCR 20172: Remove colon from SAS Address
# PCR 20176: Show wwpn instead of wwnn, and change the label to "SAS Address"
$saswwpn = str_replace(":", "", $libraryDrive->wwpn);
$commandPath = "SAS Address ".$saswwpn;
}
$foundCommandPath = true;
break;
}
}
if ($foundCommandPath)
break;
}
if ($foundCommandPath == false)
{
// If we still have not found a control path and there is a blade in the system - then make the Cp the blade.
if( sizeof($iobs) != 0 )
{
// Has BLADES
$commandPath = "FC I/O Blade";
}
}
// Get the currents library's encryption status
error_log("Guid:".$lib->guid);
$EncryptionMethod = array( "N/A", "None", "System Managed", "Application Managed", "Library Managed", "Custom" );
$edlmEncryptionMethod = array( "N/A", "None", "System Managed", "None", "Library Managed", "Custom" );
error_log("get_partition_enryption...");
$encryptData = get_partition_enryption($user, $lib->guid);
// Make sure the method is valid - if not make it N/A
if( $encryptData->method > sizeof($EncryptionMethod))
$encryptData->method = 0;
// Check that encryption is supported by the partition. if not,
// show the method as "unsupported".
error_log("GetEncryptionSupported...");
if(!GetEncryptionSupported($libraryDrives))
{
$encryptionString = "Unsupported";
$encryptData->method = 0;
}
else
$encryptionString = $lib->libraryManaged ? $edlmEncryptionMethod[$encryptData->method] : $EncryptionMethod[$encryptData->method];
// Make sure the method is valid - if not make it N/A
if( $encryptData->method > sizeof($EncryptionMethod))
$encryptData->method = 0;
// PCR 23228 States the drive should show there encryption type not the paritions.
// Note: This array is used below to display the encryption methods for the drives.
//$libraryEncryption[$lib->name] = $EncryptionMethod[$encryptData->method];
$ekm_data_lib = get_ekm_by_library( $user, $lib->guid );
error_log("get_ekm_by_library...". print_r($ekm_data_lib, true));
/*##############################################################################################
# PCR 33871
# That behavior is correct in i7.2. The UDS subsystem now forces all partitions to use the
# same server type setting. If a partition doesn't support encryption (or isn't set to LME),
# you should show the server type as "N/A".
###############################################################################################
*/
if( $encryptData->method == 4 )
{
if ($ekm_data_lib->serverType==1)
{
$encryptionType = "Q-EKM";
}
else if ($ekm_data_lib->serverType==2)
{
$encryptionType = "SKM";
}
else if ($ekm_data_lib->serverType==3)
{
$encryptionType = "RKM";
}
else if ($ekm_data_lib->serverType==4)
{
$encryptionType = "KMIP KM";
}
else
{
$encryptionType = "N/A";
}
}
else
{
$encryptionType = "N/A";
}
?>