Wednesday, January 11, 2017

Today we continue discussing graphical user interface for DRAC access :
As a recap, DRAC stands for DELL Remote Access Controller. It is an out-of-band management platform on certain DELL servers There are salient features : First, it is an out of band management mechanism and the default server resource and operating system does not matter. Second, it comes as an expansion card on the server or an integration to the main board and as such is dedicated to the server.
The virtual console feature of the DRAC enables you to access the local console remotely in either graphic or text mode. We discussed the benefits of text mode, but we now investigate graphic mode.
The graphical user interface to the virtual console is available from DRAC either as a java plugin or an ActiveX plugin but both cannot be opened simultaneously. A maximum of four simultaneous Virtual Console Sessions are supported for the same managed server console.  The first has full access and all others are granted sharing. A Virtual Console Session should not be launched from a Web browser on the managed system. iDRAC Virtual Console is available for linux too but must be switched to text mode.
For Java plugin, we have to enable Java content in the browser and add the drac ip address to the exceptions list. The plugin is downloaded as a JNLP file and its source is not open.
We can specify the plugin operations on a mac where we 1) filter finder items based on jnlp extension 2) we specify to automatically open the DRAC console and 3) we run the shell script as 
sed -e "s/\(.*\)/\"\1\"/" | xargs /usr/bin/javaws
The JNLP file may have hardcoded settings to connect to the DRAC which can be overridden. Different versions of DRAC may have different JNLP files.
The virtual console seems to run only with the following file dependencies:
1) avctKVM.jar
2) an old jre such as 1.7.0_80 from the Server JRE package downloaded and extracted to a local jre folder
3) lib/avctKVMIO.so for Linux and .dll for Windows
4) lib/avmWinLib.so for Linux and .dll for Windows
And the command required to run may then be 
./jre/bin/java -cp avctKVM.jar -Djava.library.path=./lib com.avocent.idrac.kvm.Main ip=$drachost kmport=5900 vport=5900 user=$dracuser passwd=$dracpwd apcp=1 version=2 vmprivilege=true "helpurl=https://$drachost:443/help/contents.html"


#codingexercise
Perform Trie insert and search

void Insert(TrieNode root, string key)
{
var current = root;
for (int level = 0; level < key.Length; level++)
{
   int index = CharToIndex(key[level]);
   if (current.children[index] == null)  // TrieNode has children[alphabet_size]
   {
         current.children[index] = InitializeNode();
   }
   current = current.children[index];
}
current.IsLeaf = true;
}


void search(TrieNode root, string key)
{
var current = root;
for (int level = 0; level < key.Length; level++)
{
      int index = CharToIndex(key[level]);
      if (current.children[index] == null)
          return false;
      current = current.children[index];
}
return (current != null && current.IsLeaf);
}

void PrintBoundariesOfABinaryTree(node root)
{
int max = 0;
PrintLeftView(root, 0, ref max);
PrintLeaves(root);
max = 0;
PrintRightView(root, 0, ref max);
// care must be taken to not print the leaves redundantly

}
// The above could be modified to pass in a list for the nodes.

No comments:

Post a Comment