<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6595597812704890351</id><updated>2012-01-23T02:55:33.105-08:00</updated><category term='OpenVMS'/><category term='Apache API'/><category term='C++ interview questions'/><category term='System Management'/><category term='dll'/><category term='CPU'/><category term='unix'/><category term='interview questions'/><category term='programming'/><category term='windows'/><category term='Hardware monitoring'/><category term='Thoughts'/><category term='C++ notes'/><category term='apr library'/><category term='ideas'/><category term='hardware'/><category term='shared library'/><category term='memory leak'/><category term='SMH'/><title type='text'>Tech talk from chennamangallur</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-1077099356687487358</id><published>2011-03-31T00:25:00.000-07:00</published><updated>2011-03-31T00:38:54.964-07:00</updated><title type='text'>C++ Interview questions - part2</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;When C++ creates a default constructor ?&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- C++ create a default constructor, if an explicit constructor is not defined by the programmer. A default constructor is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- default constructor for a class as a constructor that can be called with no arguments (this includes a constructor whose parameters all have default arguments)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- The compiler will implicitly define a default constructor if no constructors are explicitly defined for a class.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- This implicitly-declared default constructor is equivalent to a default constructor defined with a blank body.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- if some constructors are defined, but they are all non-default, the compiler will not implicitly define a default constructor. This means that a default constructor may not exist for a class.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- When an object value is declared with no argument list, e.g. MyClass x;; or allocated dynamically with no argument list, e.g. new MyClass; the default constructor is used to initialize the object&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- When an array of objects is declared, e.g. MyClass x[10];; or allocated dynamically, e.g. new MyClass [10]; the default constructor is used to initialize all the elements&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- When a derived class constructor does not explicitly call the base class constructor in its initializer list, the default constructor for the base class is called&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- When a class constructor does not explicitly call the constructor of one of its object-valued fields in its initializer list, the default constructor for the field's class is called&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- In the standard library, certain containers "fill in" values using the default constructor when the value is not given explicitly, e.g. vector&lt;myclass&gt;(10); initializes the vector with 10 elements, which are filled with the default-constructed value of our type.&lt;/myclass&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Link : http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr376.htm&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;Whats the difference between copy constrctor and overloaded assignment operator ?&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;  - If a new object has to be created before the copying can occur, the copy constructor is used.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; - If a new object does not have to be created before the copying can occur, the assignment operator is used.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Eg. base a;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    base b;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    a=b;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;There are three general cases where the copy constructor is called instead of the assignment operator:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;   1. When instantiating one object and initializing it with values from another object.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Eg. base b=a;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;   2. When passing an object by value.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;   3. When an object is returned from a function by value. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Link : http://www.learncpp.com/cpp-tutorial/911-the-copy-constructor-and-overloading-the-assignment-operator/&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Why an empty class have size of one byte.?&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;- The reason is, the language standard states that all classes must have a memory size of at least 1 byte so that the class doesn't occupy the same memory space with another class. It'll be more clear if you think of two empty classes(class with no members). &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;- Each instance of the class/struct must have its own unique address , compiler compiler just adds a byte for padding. where as in case, if you have a member variable say "int a" inside the class/struct, it will be 4 bytes , not 5 bytes !!! &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;What is initialization list ?&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Link : http://www.cprogramming.com/tutorial/initialization-lists-c++.html&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;How C++ implemented map container ? whats the data-structure it uses?&lt;/b&gt;&lt;/div&gt;&lt;div&gt;- Most probably a balanced binary search tree is used to implement map container.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-1077099356687487358?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/1077099356687487358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/03/c-interview-questions-part2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/1077099356687487358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/1077099356687487358'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/03/c-interview-questions-part2.html' title='C++ Interview questions - part2'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-8563851574311038884</id><published>2011-03-24T02:56:00.000-07:00</published><updated>2011-03-24T03:00:34.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><title type='text'>What is the difference between mutex and semaphore?</title><content type='html'>&lt;span style="font-weight: bold;"&gt;The difference between mutex and semaphore&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt;&lt;div style="text-align: justify;"&gt;Semaphores can be thought of as simple counters that indicate the status of a resource. This counter is a protected from user access and shielded by kernel.If counter is greater that 0, then the resource is available, and if the counter is 0 or less, then that resource is busy.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Semaphores can be either binary or counting, depending on the number of shared resources.semaphore available accessible to all processes so that they can read and check the value and also initialize and reinitialize the value of semaphore appropriately. For this reason only the semaphore is stored in kernel so that it can be accessed by all processes.&lt;br /&gt;&lt;/div&gt;The command&lt;br /&gt;    $ ipcs –s&lt;br /&gt;will give the list of existing semaphores.&lt;br /&gt;-----------------------------------------------------------&lt;br /&gt;&lt;div style="text-align: left; font-style: italic;"&gt;&lt;span style="font-size:85%;"&gt;Eg.&lt;br /&gt;    yoshi# ipcs -s&lt;br /&gt;IPC status from /dev/kmem as of Mon Feb  7 11:21:36 2011&lt;br /&gt;T         ID     KEY        MODE        OWNER     GROUP&lt;br /&gt;Semaphores:&lt;br /&gt;s          0 0x4f1c02d4 --ra-------      root      root&lt;br /&gt;s          1 0x411c1149 --ra-ra-ra-      root      root&lt;br /&gt;s          2 0x4e0c0002 --ra-ra-ra-      root      root&lt;br /&gt;s          3 0x41200ec8 --ra-ra-ra-      root      root&lt;br /&gt;s          4 0x00446f6e --ra-r--r--      root      root&lt;br /&gt;s         25 0x410c035b --ra-ra-ra-      root      root&lt;br /&gt;s         26 0x712068c5 --ra-ra-ra-      root      root&lt;br /&gt;s       2075 0x00000000 --ra-------       www     other&lt;br /&gt;s         28 0x00000000 --ra-------       www     other&lt;br /&gt;-----------------------------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Mutex can be released only by the thread that had acquired it where as in semaphore any thread can signal the semaphore to release the critical section.&lt;br /&gt;There are 3 major differences between Mutex and Binary semaphore.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. In case of Mutex semaphore the task that had taken the semaphore can only give it, however in the case of binary&lt;br /&gt;semaphore any task can give the semaphore.&lt;br /&gt;2. Calling SemFlush() function in Mutex is illegal.&lt;br /&gt;3. Mutex Semaphore can not be given from an ISR.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Apart from counting behaviour the biggest differnce is in scope of mutex and semaphore. Mutex have process scope that is it is valid within a process space and can be used for thread synchronization (hence light weight), semaphore are can be used accross process space and hence can be used for inter process synch.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Shemaphores are of two types , binary and counting.counting shemaphore can range over an unrestricted domain ,where as binary semaphore which is also known as mutex can range between 0 and 1&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Links :&lt;br /&gt;1- http://www.allinterview.com/showanswers/105279.html&lt;br /&gt;2- http://www.cs.cf.ac.uk/Dave/C/&lt;br /&gt;3- http://www.minek.com/files/unix_examples/semab.html&lt;br /&gt;&lt;div style="text-align: justify;"&gt;4- http://www.ecst.csuchico.edu/~hilzer/csci640/pdf/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-8563851574311038884?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/8563851574311038884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/03/what-is-difference-between-mutex-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/8563851574311038884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/8563851574311038884'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/03/what-is-difference-between-mutex-and.html' title='What is the difference between mutex and semaphore?'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-4756978855127154575</id><published>2011-03-24T02:48:00.000-07:00</published><updated>2011-03-24T02:53:00.310-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shared library'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='dll'/><title type='text'>Windows and Unix way of dynamic link library management</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Dynamic/Shared libraries: Differences Between Unix and Windows&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;[ On Unix, linking with a library creates a separate copy of it, But Windows will not create a copy. Its keeps a reference to the functions inside the libraries]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;U&lt;/span&gt;nix and Windows use completely different paradigms for run-time loading of code. Before you try to build a module that can be dynamically loaded, be aware of how your system works.&lt;br /&gt;&lt;br /&gt;In Unix, a shared object (.so) file contains code to be used by the program, and also the names of functions and data that it expects to find in the program. When the file is joined to the program, all references to those functions and data in the file's code are changed to point to the actual locations in the program where the functions and data are placed in memory. This is basically a link operation.&lt;br /&gt;&lt;br /&gt;In Windows, a dynamic-link library (.dll) file has no dangling references. Instead, an access to functions or data goes through a lookup table. So the DLL code does not have to be fixed up at runtime to refer to the program's memory; instead, the code already uses the DLL's lookup table, and the lookup table is modified at runtime to point to the functions and data.&lt;br /&gt;&lt;br /&gt;In Unix, there is only one type of library file (.a) which contains code from several object files (.o). During the link step to create a shared object file (.so), the linker may find that it doesn't know where an identifier is defined. The linker will look for it in the object files in the libraries; if it finds it, it will include all the code from that object file.&lt;br /&gt;&lt;br /&gt;In Windows, there are two types of library, a static library and an import library (both called .lib). A static library is like a Unix .a file; it contains code to be included as necessary. An import library is basically used only to reassure the linker that a certain identifier is legal, and will be present in the program when the DLL is loaded. So the linker uses the information from the import library to build the lookup table for using identifiers that are not included in the DLL. When an application or a DLL is linked, an import library may be generated, which will need to be used for all future DLLs that depend on the symbols in the application or DLL.&lt;br /&gt;&lt;br /&gt;Suppose you are building two dynamic-load modules, B and C, which should share another block of code A. On Unix, you would not pass A.a to the linker for B.so and C.so; that would cause it to be included twice, so that B and C would each have their own copy. In Windows, building A.dll will also build A.lib. You do pass A.lib to the linker for B and C. A.lib does not contain code; it just contains information which will be used at runtime to access A's code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;In Windows, using an import library is sort of like using "import spam"; it gives you access to spam's names, but does not create a separate copy. On Unix, linking with a library is more like "from spam import *"; it does create a separate copy. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-4756978855127154575?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/4756978855127154575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/03/windows-and-unix-way-of-dynamic-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4756978855127154575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4756978855127154575'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/03/windows-and-unix-way-of-dynamic-link.html' title='Windows and Unix way of dynamic link library management'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-2387108327211728492</id><published>2011-03-23T03:23:00.000-07:00</published><updated>2011-03-23T03:50:00.382-07:00</updated><title type='text'>STL- Containers</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;Vector&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;- Vectors are a kind of sequence containers. As such, their elements are ordered following a strict linear sequence.&lt;br /&gt;- Vector containers are implemented as dynamic arrays; Just as regular arrays, vector containers have their elements stored in contiguous storage locations, which means that their elements can be accessed not only using iterators but also using offsets on regular pointers to elements.&lt;br /&gt;- But unlike regular arrays, storage in vectors is handled automatically, allowing it to be expanded and contracted as needed.&lt;br /&gt;- Vectors are good at:&lt;br /&gt; * Accessing individual elements by their position index (constant time).&lt;br /&gt; * Iterating over the elements in any order (linear time).&lt;br /&gt; * Add and remove elements from its end (constant amortized time).&lt;br /&gt;- Compared to arrays, they provide almost the same performance for these tasks, plus they have the ability to be easily re-sized. Although, they usually consume more memory than arrays when their capacity is handled automatically&lt;br /&gt;Element access:&lt;br /&gt;1 - operator[] - Access element at a particular locattion(ofset)&lt;br /&gt;2 - at - Access element at a particular locattion(ofset)(throws exception, if fails).&lt;br /&gt;3 - front - Access first element&lt;br /&gt;4 - back - Access last element&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Note:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;- Internally, vectors -like all containers- have a size, which represents the amount of elements contained in the vector. But vectors, also have a capacity, which determines the amount of storage space they have allocated, and which can be either equal or greater than the actual size. When number of elements exhausted the capacity of Vector, reallocation of vectors will be required.&lt;br /&gt;- Re-allocations may be a costly operation in terms of performance, since they generally involve the entire storage space used by the vector to be copied to a new location. Therefore, whenever large increases in size are planned for a vector, it is recommended to explicitly indicate a capacity for the vector using member function vector::reserve.&lt;br /&gt;- How vector size is managed ? is it a continuous memory allocation or memory blocks are linked?&lt;br /&gt;- Vectors are dynamic arrays, which have pre-defined capacity in the memory. when the elements are exhausted the capacity, the whole vector will be copied to new place for reallocation of the capacity.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;List&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;- Lists are a kind of sequence containers. As such, their elements are ordered following a linear sequence.&lt;br /&gt;- List containers are implemented as doubly-linked lists; Doubly linked lists can store each of the elements they contain in different and unrelated storage locations. The ordering is kept by the association to each element of a link to the element preceding it and a link to the element following it.&lt;br /&gt;- This provides the following advantages to list containers:&lt;br /&gt; * Efficient insertion and removal of elements anywhere in the container (constant time).&lt;br /&gt; * Efficient moving elements and block of elements within the container or even between different containers (constant time).&lt;br /&gt; * Iterating over the elements in forward or reverse order (linear time).&lt;br /&gt;- Compared to other base standard sequence containers (vectors and deques), lists perform generally better in inserting, extracting and moving elements in any position within the container, and therefore also in algorithms that make intensive use of these, like sorting algorithms.&lt;br /&gt;- The main drawback of lists compared to these other sequence containers is that they lack direct access to the elements by their position.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Set&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;- Sets are a kind of associative containers that stores unique elements, and in which the elements themselves are the keys.&lt;br /&gt;- Internally, the elements in a set are always sorted from lower to higher following a specific strict weak ordering criterion set on container construction.&lt;br /&gt;- Sets are typically implemented as binary search trees.&lt;br /&gt;- Therefore, the main characteristics of set as an associative container are:&lt;br /&gt; * Unique element values: no two elements in the set can compare equal to each other. For a similar associative container allowing for multiple equivalent elements, see multiset.&lt;br /&gt; * The element value is the key itself. For a similar associative container where elements are accessed using a key, but map to a value different than this key, see map.&lt;br /&gt; * Elements follow a strict weak ordering at all times. Unordered associative arrays, like unordered_set, are available in implementations following TR1.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Map&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;- Map is a Sorted Associative Container that associates objects of type Key with objects of type Data.&lt;br /&gt;- Map is a Pair Associative Container, meaning that its value type is pair.&lt;br /&gt;- It is also a Unique Associative Container, meaning that no two elements have the same key.&lt;br /&gt;- Internally, the elements in the map are sorted from lower to higher key value following a specific strict weak ordering criterion set on construction&lt;br /&gt;- As associative containers, they are especially designed to be efficient accessing its elements by their key&lt;br /&gt;- Iterators are using to access the mapped value based on key.&lt;br /&gt;- Iterators to elements of map,access to both the key and the mapped value&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-2387108327211728492?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/2387108327211728492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/03/stl-containers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2387108327211728492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2387108327211728492'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/03/stl-containers.html' title='STL- Containers'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-2570782306719358751</id><published>2011-03-23T02:57:00.000-07:00</published><updated>2011-03-23T03:23:06.382-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ notes'/><title type='text'>C++ Interview questions</title><content type='html'>&lt;span style="font-size:85%;"&gt;[ Matter here is just notes. No authenticity can be assured]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How Exception can be handled at constructor ?&lt;/span&gt;&lt;br /&gt;- When exception happened in constructor, destructor will not called and memory leak would happened.&lt;br /&gt;- &lt;a href="http://www.open-std.org/jtc1/sc22/open/n2356/except.html#except"&gt;"function-try-block"&lt;/a&gt;.is the mechanism, which can use to handle the exceptions at constructor.&lt;br /&gt;- Or separate initialization functions can be used, instead of constructor.&lt;br /&gt;&lt;br /&gt;Few Links :&lt;br /&gt; - http://www.cs.technion.ac.il/~imaman/programs/throwingctor.html&lt;br /&gt; - http://www.open-std.org/jtc1/sc22/open/n2356/except.html#except&lt;br /&gt; - http://www.parashift.com/c++-faq-lite/exceptions.html&lt;br /&gt;Notes :&lt;br /&gt; - - A pointer declared inside try block will not be accesible in catch block.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to make a procedure/function invisible to outside a library ?&lt;/span&gt;&lt;br /&gt;-  Declare the procedure or function as static. So the function can be accessible inside the file/library only.&lt;br /&gt; Eg. static int get_user_conf()&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How is the static variable and static functions in C++&lt;/span&gt;&lt;br /&gt;- Static variables are part of class, not with object&lt;br /&gt;- Static variable should be intialised after class definition.&lt;br /&gt;  eg. int base::counter=10;&lt;br /&gt;- A non static function also can access static variables.&lt;br /&gt;Eg. void increment_counter()&lt;br /&gt;    {&lt;br /&gt;        base::counter++; // base:: qualifier required.&lt;br /&gt;    }&lt;br /&gt;- A static class can access only static variables, part of the class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What is placement new ?&lt;/span&gt;&lt;br /&gt; - Placement new is a mechanism in c++ which allows user to allocate memory from pre-allocated buffer.&lt;br /&gt; - Standard C++ supports placement new operator, which constructs an object on a pre-allocated buffer (memory, which is already alocated). This is useful when building a memory pool, a garbage collector or simply when performance and exception safety are paramount (there's no danger of allocation failure since the memory has already been allocated, and constructing an object on a pre-allocated buffer takes less time):&lt;br /&gt; Example :&lt;br /&gt;    void placement() {&lt;br /&gt;    char *buf  = new char[1000];   //pre-allocated buffer&lt;br /&gt;    string *p = new (buf) string("hi");  //placement new&lt;br /&gt;    string *q = new string("hi");  //ordinary heap allocation&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-2570782306719358751?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/2570782306719358751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/03/c-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2570782306719358751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2570782306719358751'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/03/c-interview-questions.html' title='C++ Interview questions'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-4796857823705157919</id><published>2011-02-09T21:53:00.001-08:00</published><updated>2011-02-09T21:53:47.017-08:00</updated><title type='text'>Installing Bash on HP-UX Itanium server</title><content type='html'>&lt;p&gt;Installing Bash on HP-UX is different on different hardware. Currently HP-UX offers support on below hardware   &lt;br /&gt;- PA-RISC servers from HP    &lt;br /&gt;- Itanium(Intel I64) servers from HP.&lt;/p&gt;  &lt;p&gt;I have been facing a difficulty on installing Bash over Itanium server. I found the bash depot in hp web site. Once I finished installation, bash throws an error with below message :   &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;quot;/usr/lib/hpux32/dld.so: Unable to find library 'libtermcap.so'&amp;quot;.&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Here is a simple method to deploy Bash on HP-UX Itanium servers.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;install bash-4.1.007-ia64-11.31.depot    &lt;br /&gt;( swinstall –s &amp;lt;bash-4.1.007-ia64-11.31.depot &amp;gt;    &lt;br /&gt;This depot can be downloaded from internet.&lt;a href="http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.1.007/"&gt;http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.1.007/&lt;/a&gt;    &lt;br /&gt;Then you need to check for the dependencies, which&amp;#160; are installed or not. To check the dependency, go to the bash installed location. Usually the install directory will be /usr/local/bin/bash. Or you can execute below command to know the actual path    &lt;br /&gt;# whereis bash    &lt;br /&gt;Now you need to execute the bash.    &lt;br /&gt;If dependant&amp;#160; libraries are not present, then it will popup with a error message similar bas below :    &lt;br /&gt;&amp;quot;/usr/lib/hpux32/dld.so: Unable to find library 'libtermcap.so'&amp;quot;    &lt;br /&gt;If dependant libraries are not present in your system, here is the method to get it.    &lt;br /&gt;1- note down the bash dependant libraries&amp;#160; from here: &lt;/p&gt;  &lt;p&gt;bash-4.1# ldd bash   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; libtermcap.so =&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /usr/local/lib/hpux32/libtermcap.so    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; libintl.so =&amp;gt;&amp;#160;&amp;#160; /usr/local/lib/hpux32/libintl.so    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; libiconv.so =&amp;gt;&amp;#160; /usr/local/lib/hpux32/libiconv.so    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; libdl.so.1 =&amp;gt;&amp;#160;&amp;#160; /usr/lib/hpux32/libdl.so.1    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; libc.so.1 =&amp;gt;&amp;#160;&amp;#160;&amp;#160; /usr/lib/hpux32/libc.so.1    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; libc.so.1 =&amp;gt;&amp;#160;&amp;#160;&amp;#160; /usr/lib/hpux32/libc.so.1 &lt;/p&gt;  &lt;p&gt;You can download all these files from&amp;#160; here : www.&lt;a href="http://www.http://cmronweb.com/download/library-UX-itanium.rar"&gt;http://cmronweb.com/download/library-UX-itanium.rar&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;2- Now you need to copy all these files files from your friends machine to /usr/local/lib/hpux32/ folder. If hpux32 folder is not exist, then you can create one and copy the libriries to the folder. &lt;/p&gt;  &lt;p&gt;3- Thats it, now you can enjoy the wonderful world of Bash.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-4796857823705157919?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/4796857823705157919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/02/installing-bash-on-hp-ux-itanium-server.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4796857823705157919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4796857823705157919'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/02/installing-bash-on-hp-ux-itanium-server.html' title='Installing Bash on HP-UX Itanium server'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-428728300894672307</id><published>2011-01-12T21:56:00.001-08:00</published><updated>2011-01-13T01:22:44.724-08:00</updated><title type='text'>C++ : New and Malloc</title><content type='html'>&lt;p style="text-align: justify;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;This small article is for C++ beginners, who is familiar with C. The dynamic memory allocation with C will be done with Malloc library function.  In C++ it will be done with an &lt;strong&gt;operator&lt;/strong&gt; new. Don't be confused,  new is not a function, but a operator like +.- etc.. Here I will give you some example of how we use malloc and new.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;pre&gt;//declaring native type&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#004080;"&gt;int* i1 = new int;&lt;br /&gt;delete i1;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#008040;"&gt;int* i2 = (int*) malloc(sizeof(int));&lt;br /&gt;free(i2); //declaring native type array&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#004080;"&gt;&lt;strong&gt;char** c1 = new char*[10]; // Array allocation&lt;br /&gt;delete[] c1; // cleaning array allocation&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008040;"&gt;char** c2 = (char**) malloc(sizeof(char&lt;strong&gt;)*10&lt;/strong&gt;);&lt;br /&gt;// Allocation a two dimensional array in C&lt;br /&gt;free(c2);&lt;/span&gt;&lt;span style="font-size:100%;color:#008040;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;Notes:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;1- Since new/delete is an operator, you can overload it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;2- There is no alternative for C function realloc , in C++.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  &lt;span style="font-size:85%;"&gt;- You can use STL containers instead of new, if a realloc required( eg. std::vector&amp;lt;&amp;gt;::resize()).&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  - When explicit memory management is necessary, try to use smart pointers to make it easier and safer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  - Don't use malloc() or 'new' when containers or automatic variables can do the job.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;3- new will call the appropriate construction to create the object. Similarly delete will call destructor.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;4- No typecasting required for new.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;5- malloc() returns NULL on failure while 'new' throws an exception.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;6- malloc() allocates raw memory while 'new' constructs objects in the allocated space.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;eg. shape * sp=new(12);&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;pre&gt;&lt;strong&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size:100%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-428728300894672307?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/428728300894672307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/01/c-new-and-malloc.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/428728300894672307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/428728300894672307'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/01/c-new-and-malloc.html' title='C++ : New and Malloc'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-544294004592834021</id><published>2011-01-09T03:12:00.001-08:00</published><updated>2011-01-09T03:12:23.767-08:00</updated><title type='text'>C source code : Linked list operations</title><content type='html'>&lt;p&gt;#include &amp;lt;stdio.h&amp;gt;   &lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;    &lt;br /&gt;typedef struct list* node; &lt;/p&gt;  &lt;p&gt;struct list {   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; node next;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; int data;    &lt;br /&gt;}; &lt;/p&gt;  &lt;p&gt;node create_node(int val)   &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; node new_node=(node)malloc(sizeof(node));    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; new_node-&amp;gt;data=val;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return new_node;    &lt;br /&gt;}    &lt;br /&gt;void insert_node(node head, int val, int pos)    &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; while(head-&amp;gt;data!=pos)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; head=head-&amp;gt;next; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; node tmp=head-&amp;gt;next;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; head-&amp;gt;next=create_node(val);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; head-&amp;gt;next-&amp;gt;next=tmp; &lt;/p&gt;  &lt;p&gt;} &lt;/p&gt;  &lt;p&gt;void print_list(node head)   &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; while(head!=NULL)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; printf(&amp;quot;%d - &amp;quot;,head-&amp;gt;data);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; head=head-&amp;gt;next;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;int main()   &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; int i;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; printf(&amp;quot;Linked List operation\n&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; node head=create_node(0);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; node start=head;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; for(i=1;i&amp;lt;=10;i++)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; head-&amp;gt;next=create_node(i);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; head=head-&amp;gt;next;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; head-&amp;gt;next=NULL;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; print_list(start);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; printf(&amp;quot;\n Print the list after insertion&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; insert_node(start,15,5);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; printf(&amp;quot;\n&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; print_list(start);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return 0;    &lt;br /&gt;}&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-544294004592834021?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/544294004592834021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2011/01/c-source-code-linked-list-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/544294004592834021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/544294004592834021'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2011/01/c-source-code-linked-list-operations.html' title='C source code : Linked list operations'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-8365360057875935203</id><published>2010-12-21T22:50:00.001-08:00</published><updated>2010-12-21T22:50:25.447-08:00</updated><title type='text'>C code: A small program to convert decimal number  to binary digits.</title><content type='html'>&lt;p&gt;Hi, &lt;/p&gt;  &lt;p&gt; Here its a small recursive function, which will convert a decimal value to binary digits.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;void convert_binary(int a)       &lt;br /&gt;{        &lt;br /&gt;&amp;#160; if(a!=0)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; convert_binary(a/2);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; printf(&amp;quot;%d&amp;quot;,a%2);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; else        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return ;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;}&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;int main()       &lt;br /&gt;{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; printf(&amp;quot;Hello world!\n&amp;quot;);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; convert_binary(130); // Here this recursive function will convert 130 to binary digits.        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return 0;        &lt;br /&gt;}&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#008000"&gt;If you feel its good, give me a thanks !!!&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;&amp;#160;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-8365360057875935203?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/8365360057875935203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/12/c-code-small-program-to-convert-decimal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/8365360057875935203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/8365360057875935203'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/12/c-code-small-program-to-convert-decimal.html' title='C code: A small program to convert decimal number  to binary digits.'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-7508355564591353612</id><published>2010-12-21T19:44:00.001-08:00</published><updated>2010-12-21T19:44:45.370-08:00</updated><title type='text'>C Threads : Two synchronized threads to print alternate numbers.</title><content type='html'>&lt;p&gt;Here, i was trying to print alternate numbers starting from 0 to 11. I have two threads, one will always prints odd numbers and other will print only even number. &lt;/p&gt;  &lt;p&gt;My intension is to print odd and even alternately. To ensure the synchronization, i am using MUTEXES. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt;Sample code :        &lt;br /&gt;pthread_mutex_lock (&amp;amp;mutexsum);         &lt;br /&gt;gCount++;         &lt;br /&gt;std::cout&amp;lt;&amp;lt;gCount&amp;lt;&amp;lt;endl;         &lt;br /&gt;pthread_mutex_unlock (&amp;amp;mutexsum);&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Full version of the code is as below. Here I use pthread libraries to create the threads.    &lt;br /&gt;My reference&amp;#160; : &lt;a title="https://computing.llnl.gov/tutorials/pthreads/" href="https://computing.llnl.gov/tutorials/pthreads/"&gt;https://computing.llnl.gov/tutorials/pthreads/&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;#include &amp;lt;iostream&amp;gt;        &lt;br /&gt;#include&amp;lt;stdio.h&amp;gt;         &lt;br /&gt;#include &amp;lt;pthread.h&amp;gt;         &lt;br /&gt;using namespace std;         &lt;br /&gt;pthread_mutex_t mutexsum;         &lt;br /&gt;int gCount=0; &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;void *odd(void* ptr)        &lt;br /&gt;{         &lt;br /&gt;while(gCount&amp;lt;=10)         &lt;br /&gt;{         &lt;br /&gt;&amp;#160;&amp;#160; if(gCount%2==1) //If even         &lt;br /&gt;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; pthread_mutex_lock (&amp;amp;mutexsum);         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; gCount++;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; std::cout&amp;lt;&amp;lt;gCount&amp;lt;&amp;lt;endl;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; pthread_mutex_unlock (&amp;amp;mutexsum);         &lt;br /&gt;&amp;#160;&amp;#160; }         &lt;br /&gt;}         &lt;br /&gt;} &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;void *even(void* ptr)        &lt;br /&gt;{         &lt;br /&gt;while(gCount&amp;lt;10)         &lt;br /&gt;{         &lt;br /&gt;&amp;#160;&amp;#160; if(gCount%2==0) //If even         &lt;br /&gt;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; pthread_mutex_lock (&amp;amp;mutexsum);         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; gCount++;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; std::cout&amp;lt;&amp;lt;gCount&amp;lt;&amp;lt;endl;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; pthread_mutex_unlock (&amp;amp;mutexsum);         &lt;br /&gt;&amp;#160;&amp;#160; }         &lt;br /&gt;}         &lt;br /&gt;} &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;int main()        &lt;br /&gt;{ &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;&amp;#160;&amp;#160;&amp;#160; pthread_t T_even, T_odd;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; int T_rt1,T_rt2;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; void *status;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; pthread_mutex_init(&amp;amp;mutexsum, NULL);         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; std::cout &amp;lt;&amp;lt; &amp;quot;Hello world!&amp;quot; &amp;lt;&amp;lt; endl;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; int i=0; // this variable has no significance         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; T_rt1= pthread_create(&amp;amp;T_odd,NULL,odd,&amp;amp;i); // here variable i has no significance. it can be null also. I am passing it as a trial         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; T_rt2=pthread_create(&amp;amp;T_even,NULL,even,&amp;amp;i); &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;&amp;#160;&amp;#160;&amp;#160; pthread_join(T_odd,&amp;amp;status);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; pthread_join(T_even,&amp;amp;status); &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#008000"&gt;&amp;#160;&amp;#160;&amp;#160; pthread_exit(NULL);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return 0;         &lt;br /&gt;}&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Send me your comments.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-7508355564591353612?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/7508355564591353612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/12/c-threads-two-synchronized-threads-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7508355564591353612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7508355564591353612'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/12/c-threads-two-synchronized-threads-to.html' title='C Threads : Two synchronized threads to print alternate numbers.'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-2385542525869219829</id><published>2010-12-07T02:27:00.001-08:00</published><updated>2010-12-08T02:39:47.763-08:00</updated><title type='text'>C Code: Functions to read a line from file, removing leading and trailing spaces from a string token and get token string.</title><content type='html'>/******************************************************************************&lt;br /&gt;  *&lt;br /&gt;  * Function Name: read_line&lt;br /&gt;  *&lt;br /&gt;  * Description: get one line from /etc/passwd file.  If there is a line contains&lt;br /&gt;  *              more than LINE_MAX characters, it will ignore it and read the&lt;br /&gt;  *              next line.  It also handles continuation character '\'. It always&lt;br /&gt;  *              leaves (or inserts) \n\0 at the end of the line.&lt;br /&gt;  *              &lt;br /&gt;  * Parameters:&lt;br /&gt;  *     FILE *f:       file ptr points to /etc/passwd file&lt;br /&gt;  *     char *buffer:  char array&lt;br /&gt;  *     size_t bufeln: length of buffer&lt;br /&gt;  *&lt;br /&gt;  * Return Value:&lt;br /&gt;  *     int : It returns the length of the line read, excluding the \n\0.&lt;br /&gt;  *&lt;br /&gt;  ******************************************************************************/&lt;br /&gt; static int read_line(&lt;br /&gt;     FILE        *f,&lt;br /&gt;     char        *buffer,&lt;br /&gt;     size_t      buflen)&lt;br /&gt; {&lt;br /&gt;         int                     linelen = 0;&lt;br /&gt;         char                    c;&lt;br /&gt;         int curlen = 0;&lt;br /&gt;         char *ret, *tempbuf;&lt;br /&gt;&lt;br /&gt;         tempbuf = buffer;&lt;br /&gt;         while (1) {&lt;br /&gt;                 tempbuf += (unsigned)curlen;&lt;br /&gt;                 /* buffer over flow, skip this long line */&lt;br /&gt;                 if (tempbuf &amp;gt;= (buffer + buflen - 1))&lt;br /&gt;                 {&lt;br /&gt;                           do {&lt;br /&gt;                                   c = getc(f);&lt;br /&gt;                                   if (feof(f)) {&lt;br /&gt;                                           return (-1);&lt;br /&gt;                                   }&lt;br /&gt;                           } while (c != '\n');&lt;br /&gt;                           linelen = 0;&lt;br /&gt;                           tempbuf = buffer;&lt;br /&gt;                           curlen = 0;&lt;br /&gt;                 }&lt;br /&gt;                 ret = fgets(tempbuf, linelen == 0 ?&lt;br /&gt;                         buflen : buflen - (unsigned)linelen, f);&lt;br /&gt;                 curlen = strlen(ret);&lt;br /&gt;                 linelen += curlen;&lt;br /&gt;                 switch (ret == NULL ? EOF : ret[curlen - 1]) {&lt;br /&gt;                 case EOF:&lt;br /&gt;                          if (linelen == 0 ) {&lt;br /&gt;                          /* The file was empty */&lt;br /&gt;                                 linelen = -1;&lt;br /&gt;                          } else if (buffer[linelen] == '\\') {&lt;br /&gt;                          /* We expected another line to append to previous&lt;br /&gt;                             line as indicated by a trailing backslash, but the&lt;br /&gt;                             file ended */&lt;br /&gt;                                 linelen = -1;&lt;br /&gt;                           } else {&lt;br /&gt;                           /* The file contained one line, and all is well */&lt;br /&gt;                                 buffer[linelen     ] = '\n';&lt;br /&gt;                                 buffer[linelen + 1 ] = '\0';&lt;br /&gt;                           }&lt;br /&gt;                           return (linelen);&lt;br /&gt;                 case '\n':&lt;br /&gt;                           if (curlen &amp;gt; 1 &amp;amp;&amp;amp;&lt;br /&gt;                                 ret[curlen - 2] == '\\') {&lt;br /&gt;                                 curlen -= 2;&lt;br /&gt;                                 linelen -= 2;&lt;br /&gt;                           } else {&lt;br /&gt;                                 ret[curlen - 1] = '\n';&lt;br /&gt;                                 ret[curlen    ] = '\0';&lt;br /&gt;                                 return (linelen - 1);&lt;br /&gt;                           }&lt;br /&gt;                           break;&lt;br /&gt;                 default:&lt;br /&gt;                           break;&lt;br /&gt;                 } /* case */&lt;br /&gt;         }&lt;br /&gt;         /*NOTREACHED*/&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /******************************************************************************&lt;br /&gt;  *&lt;br /&gt;  * Function Name: gettok&lt;br /&gt;  *&lt;br /&gt;  * Description: parse one line read from /etc/passwd file, return pointer to the&lt;br /&gt;  *              next passwd entry field&lt;br /&gt;  * Parameters:&lt;br /&gt;  *     char **line_addr:  address of the pointer that point to an array&lt;br /&gt;  *&lt;br /&gt;  * Return Value:&lt;br /&gt;  *     char *p : pointer to an array&lt;br /&gt;  *&lt;br /&gt;  *****************************************************************************/&lt;br /&gt; static char *gettok (char **line_addr)&lt;br /&gt; {&lt;br /&gt;     char    *q = *line_addr;&lt;br /&gt;     char    *p = q;&lt;br /&gt;     while (*p &amp;amp;&amp;amp; *p != ':' &amp;amp;&amp;amp; *p != '\n')&lt;br /&gt;         p++;&lt;br /&gt;     if (*p == '\n')&lt;br /&gt;       *p = '\0';&lt;br /&gt;     else if (*p != '\0')&lt;br /&gt;       *p++ = '\0';&lt;br /&gt;     *line_addr = p;&lt;br /&gt;     return (q);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /******************************************************************************&lt;br /&gt;  *&lt;br /&gt;  * Function Name: rm_leading_and_trailing_blank&lt;br /&gt;  *&lt;br /&gt;  * Description:  Removes all the leading and trialing blanks in a string token.&lt;br /&gt;  *               A string "  This is a test   " will be formatted to&lt;br /&gt;  *               "This is a test"&lt;br /&gt;  *&lt;br /&gt;  *               Cases like empty character string and character string with&lt;br /&gt;  *               just a space or spaces are also covered. A string "       "&lt;br /&gt;  *               will be reduced to ""&lt;br /&gt;  *&lt;br /&gt;  * Parameters:&lt;br /&gt;  *    target_string:     string token.&lt;br /&gt;  *&lt;br /&gt;  * Return Value:         None&lt;br /&gt;  *&lt;br /&gt;  *****************************************************************************/&lt;br /&gt; static void rm_leading_and_trailing_blank(char *target_string)&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;     char * mover   = target_string;&lt;br /&gt;     char * current = target_string;&lt;br /&gt;&lt;br /&gt;     while (*mover != '\0' &amp;amp;&amp;amp; (*mover == ' ' || *mover == '\t'))&lt;br /&gt;            mover++;&lt;br /&gt;&lt;br /&gt;     while(*mover)&lt;br /&gt;         {&lt;br /&gt;               *current = *mover;&lt;br /&gt;               current++, mover++;&lt;br /&gt;         }&lt;br /&gt;     *current = '\0';&lt;br /&gt;     current--;&lt;br /&gt;     while ( current &amp;gt;= target_string &amp;amp;&amp;amp;&lt;br /&gt;              (*current == ' ' || *current == '\t' || *current == '\n'))&lt;br /&gt;         {&lt;br /&gt;           *current='\0';&lt;br /&gt;           current--;&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-2385542525869219829?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/2385542525869219829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/12/c-code-functions-to-read-line-from-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2385542525869219829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2385542525869219829'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/12/c-code-functions-to-read-line-from-file.html' title='C Code: Functions to read a line from file, removing leading and trailing spaces from a string token and get token string.'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-2303620972309169754</id><published>2010-10-12T23:09:00.000-07:00</published><updated>2010-12-21T19:48:38.490-08:00</updated><title type='text'>HP-UX Directory Server components</title><content type='html'>&lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;Directory Server 8.1 is comprised of several components, which work in tandem:&lt;/div&gt;  &lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;• Directory Server&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;The Directory Server is the core LDAP server daemon. It is compliant with LDAP v3 standards. This component includes command-line server management and administration programs, and scripts for common operations like export and backing up databases.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;• Directory Server Console&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;The Directory Server Console is the user interface that simplifies managing users, groups, and other LDAP data for your enterprise. The Console is used for all aspects of server management, including making backups; configuring security, replication, and databases; adding entries; and monitoring servers and viewing statistics.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;• Administration Server&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;The Administration Server is the management agent that administers Directory Servers. It communicates with the Directory Server Console and performs operations on the Directory Server instances. It also provides a simple HTML interface and on-line help pages. There must be one Administration Server running on each machine that has a Directory Server&lt;/div&gt;  &lt;div&gt;instance running on it.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;• Port numbers&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;   &lt;div&gt;The Directory Server setup requires two TCP/IP port numbers: one for the Directory Server and one for the Administration Server. These port numbers must be unique. The Directory Server instance (LDAP) has a default port number of 389(non-secure, secure port is 636) . The Administration Server port number has a default number of 9830. Alternatively, you can assign any port number between 1025 and 65535 for the Directory Server and Administration Server ports; you are not required to use the defaults or the randomly-generated ports.&lt;/div&gt; &lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-2303620972309169754?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/2303620972309169754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/10/hp-ux-directory-server-components.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2303620972309169754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2303620972309169754'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/10/hp-ux-directory-server-components.html' title='HP-UX Directory Server components'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-7555276224452008720</id><published>2010-09-16T00:00:00.000-07:00</published><updated>2010-09-16T00:04:54.908-07:00</updated><title type='text'>Using C functions like malloc in C++.</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#include iostream&lt;iostream&gt;&lt;/iostream&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;using namespace std;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#990000;"&gt;&lt;b&gt;extern "C"&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#990000;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#990000;"&gt;&lt;b&gt;    int puts(const char *); // Using C style functions in Cpp.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#990000;"&gt;&lt;b&gt;    void * malloc(std::size_t);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#990000;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;    puts("helo world ! ");&lt;/div&gt;&lt;div&gt;    int *p;&lt;/div&gt;&lt;div&gt;    p=(int *)malloc(sizeof(int));&lt;/div&gt;&lt;div&gt;    return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-7555276224452008720?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/7555276224452008720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/09/using-c-functions-like-malloc-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7555276224452008720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7555276224452008720'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/09/using-c-functions-like-malloc-in-c.html' title='Using C functions like malloc in C++.'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-7133168700097943162</id><published>2010-07-21T03:17:00.000-07:00</published><updated>2010-07-21T04:28:25.735-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='Thoughts'/><title type='text'>How google would generate new ideas</title><content type='html'>"An idea can change the world". But to have such an idea, you may need to pay your life. If you go with mathematical real analysis concept,  the equation would transform to "one whole life would change the world".&lt;br /&gt;So any inventor could have dream to get an idea, which could change the world. So, I could say, one idea is the most valuable stuff in the world. It may costs your life and will save lots of lives.&lt;br /&gt;Google, the new generation platform for internet world. Google, started as a search engine and then become internet giant. We all will wonder when they come up with new products and idea. I always wonder, who pumps these much of ideas to them.&lt;br /&gt;&lt;br /&gt;There might be lot many researches went on to trap the Google's idea treasure. Many assumptions or  perceptions brought out by those researchers.&lt;br /&gt;&lt;br /&gt;Today, I have started my day with a new idea. I discussed it with my friend. My friend asked me to search it on Google.&lt;br /&gt;I compile the search string on Google, and before hitting the enter key I paused my self from doing so.&lt;br /&gt;&lt;br /&gt;You know why ?&lt;br /&gt;&lt;br /&gt;I got a spark, that why should I submit my new idea to Google corporation, though you are not intended to do so ?&lt;br /&gt;Yes, if you are searching a new string, there can be mechanism to store it in Google servers to verify for a new idea to implement.  I mean, if you search with new search string for finding similar items presented any where in the world. And when you found no similar idea available in internet, you got the trigger to start the research on the perception that, you are the only man knowing about it.&lt;br /&gt;But is it really true ?&lt;br /&gt;I believe there is another invisible, but more powerful man than you, seeing everything, obviously i didn't mean the God, behind the screen. Yes!!! Google eyes should closely watching it.&lt;br /&gt;&lt;br /&gt;Their search engine could be the real treasure for their ideas, that change the world. Their algorithm might be like this.&lt;br /&gt;1- Get the search string.&lt;br /&gt;2- Check for unique or no search result.&lt;br /&gt;3- Google will have a database for interested domain&lt;br /&gt;4- Check for the string match with any of the data kept in Google interested domain.&lt;br /&gt;5- If the new string matches with the Google's interest, take it to expert desk for further analysis.&lt;br /&gt;6- Hence a new idea could be generated&lt;br /&gt;&lt;br /&gt;The all above are my guess. I don't have any evidence for the above thoughts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-7133168700097943162?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/7133168700097943162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/07/how-google-would-generate-new-ideas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7133168700097943162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7133168700097943162'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/07/how-google-would-generate-new-ideas.html' title='How google would generate new ideas'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-9001922543409469307</id><published>2010-04-21T01:19:00.000-07:00</published><updated>2010-04-26T07:52:15.078-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory leak'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache API'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='apr library'/><title type='text'>Memory leak management while using apache libraries</title><content type='html'>&lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&amp;#160;&amp;#160; I had faced a memory leak&amp;#160; issue when using apache APIs to create sockets. My application designs to monitor some set of ports continuously in a frequent time span. Application internally uses APIs from apache library to create memory pool, to create sockets, to shutdown socket etc..&lt;/div&gt;  &lt;div&gt;First, it will create a pool of memory by using apr_pool_create function as below .&lt;/div&gt;  &lt;div&gt;apr_pool_create(&amp;amp;newPool, NULL)&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;And then it makes a socket address with apr_sockaddr_info_get call as below.&lt;/div&gt;  &lt;div&gt;//making socket address&lt;/div&gt;  &lt;div&gt;apr_sockaddr_info_get(&amp;amp;remote_sa, dest, APR_UNSPEC,&lt;/div&gt;  &lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre"&gt; &lt;/span&gt;(apr_uint16_t)portNum, 0, pool)&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;Then it creates a Socket as below.&lt;/div&gt;  &lt;div&gt;apr_socket_create(&amp;amp;sock, remote_sa-&amp;gt;family,&lt;/div&gt;  &lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre"&gt; &lt;/span&gt;SOCK_STREAM, pool))&lt;/div&gt;  &lt;div&gt;After creating socket, it tries binds to the port.&lt;/div&gt;  &lt;div&gt;apr_bind(sock, remote_sa)&lt;/div&gt;  &lt;div&gt;Then connect to the port and started listening for a connection request.&lt;/div&gt;  &lt;div&gt;apr_connect(sock, remote_sa)&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;And then below functions are used for other usual socket activities.&lt;/div&gt;  &lt;div&gt;apr_sleep(10000000); &lt;/div&gt;  &lt;div&gt;apr_recv(sock, dataRecv, &amp;amp;length);&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;After the socket's tasks finished, we used to shutdown the socket and close for further actions.&lt;/div&gt;  &lt;div&gt;apr_shutdown(sock, APR_SHUTDOWN_WRITE)&lt;/div&gt;  &lt;div&gt;apr_socket_close(sock)&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;These all above code works in a while(1) loop. Creation of memory pool is a one time activity. Remaining tasks(from socket creation to socket closing) are continuously looped until application killed. &lt;/div&gt;  &lt;div&gt;This application will be working as a process, which always present in active memory to listen the specified ports. I have received an issue from one of our customer saying that, he is observing a memory leak while running this process. I took this task and me too observed the same issue in my development server. &lt;/div&gt;  &lt;div&gt; In general, reproducing a problem is the 60% of the solution. But, in memory leak problem, it will be only 40%. You may observe a leak, but you may not come to a conclusion that, this leak is happened by this reason.&lt;/div&gt;  &lt;div&gt; I did a regular memory leak check up in the big code base. I searched from malloc, realloc, calloc etc. And I searched for any macros defined against malloc. &lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;Nothing!!! No memory allocation calls used in the code. Then my spy glass went the the pool creation API (apr_pool_create). I observed that Memory pool is created but not freed any where. I have Apache API to delete the pool. But, if I delete the pool, application will be killed immediately. I wanted to retain my application in active memory unless, user forcefully killed him. &lt;/div&gt;  &lt;div&gt;   &lt;div&gt;     &lt;br /&gt;&lt;/div&gt;    &lt;div&gt;So I cant use apr_pool_destroy to release the memory pool. Then i visited &lt;a href="http://apr.apache.org/docs/apr/trunk/group___a_p_r.html"&gt;Apache Portability Runtime library&lt;/a&gt; for the API reference . I found there is another call apr_pool_clear(pool) to clear the memory location. GOD GRACE. I did that !!!.&lt;/div&gt;    &lt;div&gt; My issue is resolved. So whenever a new socket finished his tasks, he will clear the pool and return the handler to begin. And then new socket will allocate the memory from free pool. Hence no memory leak !!!&lt;/div&gt;    &lt;div&gt;     &lt;br /&gt;&lt;/div&gt; &lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-9001922543409469307?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/9001922543409469307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/04/memory-leak-management-while-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/9001922543409469307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/9001922543409469307'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/04/memory-leak-management-while-using.html' title='Memory leak management while using apache libraries'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-8312078845337911279</id><published>2010-02-09T20:32:00.000-08:00</published><updated>2010-02-21T03:10:03.317-08:00</updated><title type='text'>PHP Source code for comment box in unicode language(like malayalam, tamil and arabic)</title><content type='html'>&lt;div&gt;   &lt;blockquote&gt;&lt;/blockquote&gt;    &lt;blockquote&gt;&lt;/blockquote&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A comment box is a must have feature in many of the web based aplications. Users should able to save their comments on their own language. Many of the news papers are allowing their visitors to express their views about the articles/news published. Comment enabled web pages will increase user engagement, hence more income from advertisement venders can expect.&lt;/div&gt;  &lt;div&gt;Making a comment box is nothing if you are using PHP and MySQL in most scenario. &lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;1. Declare a Rich text box using HTML Tags.&lt;/div&gt;  &lt;div&gt;2. On submit, collect the inserted values and save it to mySQL database, thats it.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;Though, saving your text in mySQL database will be difficult if you are playing with Unicode charactors.&amp;#160; I know many of my friends are complaining about that. They were tried to save malayalam unicode characters and, while retrieving the saved text they got a bunch of question marks.&amp;#160; &lt;/div&gt;  &lt;div&gt;Eg: &lt;/div&gt;  &lt;div&gt;They saved &amp;quot; ചേന്ദമംഗല്ലൂര്‍ നല്ലൊരു നാടാണല്ലൊ ... ഹി ഹി ഹി &amp;quot;&lt;/div&gt;  &lt;div&gt;They recieved &amp;quot; ????????????????????????????&amp;#160; ??? &amp;quot;&lt;/div&gt;  &lt;div&gt;Its because, unicode charaters are a unique special numercial codes for different languages. MySQL may not decode it to proper language representation unless you are explicity told to him. I have a solution for this problem. &lt;/div&gt;  &lt;div&gt;1. Use SET NAMES 'utf8' before database transaction started.&lt;/div&gt;  &lt;div&gt;2. Convert your table collation settings to&amp;#160; 'utf8_general_ci'&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;visit my old post for more details about this .&lt;/div&gt;  &lt;div&gt;http://techcmr.blogspot.com/2009/07/store-and-retrieve-unicode-characters.html&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;Hope you understand the technique behind the unicode operations.&amp;#160; Now we can move into the coding part of the comment box. I have to PHP funcitons, which you can use for making a comment box in your web based aplication.&lt;/div&gt;  &lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0,102,0)"&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0,102,0)"&gt;     &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0,102,0)"&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;function commentbox($dcName,$docId,$act_page,$SecurePath=&amp;quot;../../lib/&amp;quot;,$security=&amp;quot;secured&amp;quot;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;inputfrm&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;enctype&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;multipart/form-data&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;post&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;action&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.$act_page.&amp;quot;?mod=&amp;quot;.$security. &amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;onSubmit&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;return ValidateForm()&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;fieldset&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;textarea&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;ta&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;rows&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;10&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;cols&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;50&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;textarea&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    echo(&amp;quot;Doc ID:&amp;quot;); &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;docId&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;text&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.$docId.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;size&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;5&amp;quot;.&amp;quot;'&lt;/span&gt;  &lt;span class="attr"&gt;readonly&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;true&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    echo(&amp;quot;Name &lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;:&amp;quot;); &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;txtName&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;text&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;size&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;25&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;font&lt;/span&gt; &lt;span class="attr"&gt;face&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;Verdana, Arial, Helvetica, sans-serif&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;* (Mandatory)&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;font&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;    echo(&amp;quot;Email &lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;: &amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;txtEmail&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;text&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;size&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;50&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    if($security==&amp;quot;secured&amp;quot;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;        &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;100%&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;border&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;0&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;cellspacing&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;0&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;cellpadding&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;0&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;10%&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;80%&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;        //pass a session id to the query string of the script to prevent ie caching&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.$SecurePath.&amp;quot;securimage_show.php?sid=&amp;quot;.md5(uniqid(time())).&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;//        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;='&lt;span class="kwrd"&gt;&amp;quot;.$SecurePath.&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt;securimage_show&lt;/span&gt;.&lt;span class="attr"&gt;php&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;font&lt;/span&gt; &lt;span class="attr"&gt;color&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;#ff0000&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;        echo(&amp;quot;Enter the string displayed above&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;font&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;text&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;securityCode&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;        &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;10%&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;        echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt; &lt;span class="attr"&gt;align&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;right&amp;quot;.&amp;quot;'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;submit&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;quot;.&amp;quot;Save Comment&amp;quot;.&amp;quot;'&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;fieldset&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;    echo(&amp;quot;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;function insertComment($docName,$DocId,$uText,$Uname,$TxtEmail,$ipAdr=0)&lt;br /&gt;{&lt;br /&gt;        include 'connect.php';&lt;br /&gt;        $pageURL=curPageURL();&lt;br /&gt;//        echo($pageURL);&lt;br /&gt;//        $ipAdr ='93.174.94.53';&lt;br /&gt;        $BlockedIps=IsBlockedIP($ipAdr);&lt;br /&gt;        if($BlockedIps&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;0)&lt;br /&gt;        {&lt;br /&gt;            $isSuspects=1;&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            $isSuspects=0;&lt;br /&gt;        }&lt;br /&gt;        $aproved=0;&lt;br /&gt;        $time = time(now);&lt;br /&gt;        $phptime=date('Y-m-d H:i:s', $time);&lt;br /&gt;        @mysql_query(&amp;quot;SET NAMES 'utf8'&amp;quot;,$id); /// Its very inportant to display or insert unicode characters in db&lt;br /&gt;        $unicodeText = preg_replace('#\r?\n#', '&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;', $uText);&lt;br /&gt;        $cQryPart=&amp;quot;insert into document  (docName, DocID, Comments, aproved, u_name, email,CDate,isSuspects,extra,extra2)    values  &amp;quot;;&lt;br /&gt;        $cQry=$cQryPart.&amp;quot;('&amp;quot;.$docName.&amp;quot;',&amp;quot;.$DocId.&amp;quot;,'&amp;quot;.$unicodeText.&amp;quot;',&amp;quot;.$aproved.&amp;quot;,'&amp;quot;.$Uname.&amp;quot;','&amp;quot;.$TxtEmail.&amp;quot;','&amp;quot;.$phptime.&amp;quot;','&amp;quot;.$isSuspects.&amp;quot;','&amp;quot;.$ipAdr.&amp;quot;','&amp;quot;.$pageURL.&amp;quot;')&amp;quot; ;&lt;br /&gt;//        echo($cQry);&lt;br /&gt;        $cresult = @mysql_query($cQry,$id) or&lt;br /&gt;        die(&amp;quot;Unable to Execute the query&amp;quot;);&lt;br /&gt;&lt;br /&gt;        mysql_close($id);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-8312078845337911279?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/8312078845337911279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2010/02/php-source-code-for-comment-box-in.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/8312078845337911279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/8312078845337911279'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2010/02/php-source-code-for-comment-box-in.html' title='PHP Source code for comment box in unicode language(like malayalam, tamil and arabic)'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-4726714673615465795</id><published>2009-10-30T03:29:00.000-07:00</published><updated>2009-10-30T09:30:19.993-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware monitoring'/><category scheme='http://www.blogger.com/atom/ns#' term='System Management'/><category scheme='http://www.blogger.com/atom/ns#' term='SMH'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenVMS'/><title type='text'>System management Homepage features list</title><content type='html'>&lt;br /&gt;  &lt;br /&gt;  &lt;p class="MsoNormal" style="text-align: left" align="center"&gt;Below are the supported feature list of OpenVMS System&amp;#160; Management Homepage (SMH).&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: left" align="center"&gt;Here I am using traps for indicating the SNMP traps(events). One trap is kind of message sending from SNMP agents to any SNMP trap receiver tools.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 39pt; text-indent: -0.25in; mso-list: l4 level1 lfo7; tab-stops: list 39.0pt"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: rgb(0,153,0)"&gt;·&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0,153,0)"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0,153,0)"&gt;&lt;font size="3"&gt;&lt;strong&gt;Storage&lt;/strong&gt;&lt;/font&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Smart Array 6400 Controller &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;DVD/USB Controller information&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;SCSI Controller Information&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;4.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Smart Array p400&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;5.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;SAS HBA&lt;/p&gt;  &lt;ol style="margin-top: 0in" type="1" start="start"&gt;   &lt;ol style="margin-top: 0in" type="a"&gt;     &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;SAS Address &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;SAS Model &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Physical disk Model &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Physical disk Status &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Physical disk Capacity &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;No traps for status change &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Traps from disk removal or insertion &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;6.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Fiber channel controller (FGA)&lt;/p&gt;  &lt;ol style="margin-top: 0in" type="1" start="start"&gt;   &lt;ol style="margin-top: 0in" type="a"&gt;     &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;&lt;st1:place st="on"&gt;&lt;st1:placename st="on"&gt;World&lt;/st1:placename&gt; &lt;st1:placename st="on"&gt;Wide&lt;/st1:placename&gt; &lt;st1:placetype st="on"&gt;Port&lt;/st1:placetype&gt;&lt;/st1:place&gt; Name &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Model &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;7.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Smart array traps&lt;/p&gt;  &lt;ol style="margin-top: 0in" type="1" start="start"&gt;   &lt;ol style="margin-top: 0in" type="a"&gt;     &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Status change &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;&lt;st1:place st="on"&gt;Battery&lt;/st1:place&gt; failure traps &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Spare status traps &lt;/li&gt;      &lt;li class="MsoNormal" style="mso-list: l1 level2 lfo5; tab-stops: list 1.0in"&gt;Physical drive status &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 57pt; text-indent: -0.25in; mso-list: l1 level1 lfo5; tab-stops: list 57.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;8.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Disk information&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 93pt; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 93.0pt 99.0pt"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Model&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 93pt; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 93.0pt 99.0pt"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Status&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 93pt; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 93.0pt 99.0pt"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Capacity&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 93pt; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 93.0pt 99.0pt"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Space used&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 93pt; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 93.0pt 99.0pt"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Disk threshold monitoring&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 93pt; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 93.0pt 99.0pt"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Traps for status change and removal/add&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 39pt; text-indent: -0.25in; mso-list: l4 level1 lfo7; tab-stops: list 39.0pt"&gt;&lt;strong&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0,102,0)"&gt;Network Controller information&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;1.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;span class="Apple-style-span" style="font-family: georgia"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;Model&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;2.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;span class="Apple-style-span" style="font-family: georgia"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;Port information&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;3.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;span class="Apple-style-span" style="font-family: georgia"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;Status&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;4.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;span class="Apple-style-span" style="font-family: georgia"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;Receive Statistics &amp;amp; Transmit Statistics&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;5.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;span class="Apple-style-span" style="font-family: georgia"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;IP Address&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;6.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;span class="Apple-style-span" style="font-family: georgia"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;Physical Address&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list .75in"&gt;&lt;b&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;7.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;span class="Apple-style-span" style="font-family: georgia"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;Interface Information&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;strong&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0,102,0)"&gt;&lt;strong&gt;System Environment&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l5 level1 lfo4; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Power Sensors&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in; mso-list: l5 level2 lfo4; tab-stops: list 1.25in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;a.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Power status&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in; mso-list: l5 level2 lfo4; tab-stops: list 1.25in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;b.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Traps for status change&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l5 level1 lfo4; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Power On Messages&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; mso-list: l5 level1 lfo4; tab-stops: list .75in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Cooling and Temperature&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in; mso-list: l5 level2 lfo4; tab-stops: list 1.25in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;a.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Traps for temperature exceeds from system thresholds&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in; mso-list: l5 level2 lfo4; tab-stops: list 1.25in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;b.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Fan status information&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in; mso-list: l5 level2 lfo4; tab-stops: list 1.25in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;c.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Fan status change traps&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 39pt; text-indent: -0.25in; mso-list: l4 level1 lfo7; tab-stops: list 39.0pt"&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;font color="#008040"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;System Board&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-list: l6 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Number of processors&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-list: l6 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Processor status&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-list: l6 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Processor models&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-list: l6 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;4.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Processor threshold monitoring&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-list: l6 level1 lfo1; tab-stops: list 1.0in"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;5.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;No traps for processor&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 39pt; text-indent: -0.25in; mso-list: l4 level1 lfo7; tab-stops: list 39.0pt"&gt;&lt;strong&gt;&lt;font color="#008040"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;System Resources&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 75pt; text-indent: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list 75.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;System resources information&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 75pt; text-indent: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list 75.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Memory utilization and threshold information&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 75pt; text-indent: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list 75.0pt"&gt;&lt;span&gt;&lt;span style="mso-list: ignore"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Traps for thresholds exceeding and falling&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 39pt; text-indent: -0.25in; mso-list: l4 level1 lfo7; tab-stops: list 39.0pt"&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;font color="#008040"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;System Summary&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 39pt; text-indent: -0.25in; mso-list: l4 level1 lfo7; tab-stops: list 39.0pt"&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;·&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Cluster Monitoring&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 75pt; text-indent: -0.25in; mso-list: l4 level2 lfo7; tab-stops: list 75.0pt"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-list: ignore"&gt;o&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Cluster add and remove traps&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;#160;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; If you are much eager to see the sample screens of SMH,&amp;#160; please scroll down&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;img id="BLOGGER_PHOTO_ID_5398340967428130786" style="display: block; margin: 0px auto 10px; width: 400px; cursor: hand; height: 300px; text-align: center" alt="" src="http://1.bp.blogspot.com/_29xH0otwa44/SurCghv-B-I/AAAAAAAAABc/eeK8B3lnmP4/s400/smh_homepage2.jpg" border="0" /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;img id="BLOGGER_PHOTO_ID_5398340967005838882" style="display: block; margin: 0px auto 10px; width: 400px; cursor: hand; height: 300px; text-align: center" alt="" src="http://1.bp.blogspot.com/_29xH0otwa44/SurCggLSXiI/AAAAAAAAABU/b1u2OyKRuZ8/s400/smh_homepage.jpg" border="0" /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;font color="#008040"&gt;OK, Now you can ask any question regarding SMH. Its my pleasure to answer !!!&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-4726714673615465795?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/4726714673615465795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2009/10/system-management-homepage-feature-list.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4726714673615465795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4726714673615465795'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2009/10/system-management-homepage-feature-list.html' title='System management Homepage features list'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_29xH0otwa44/SurCghv-B-I/AAAAAAAAABc/eeK8B3lnmP4/s72-c/smh_homepage2.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-5259588500571327176</id><published>2009-10-19T21:17:00.000-07:00</published><updated>2009-10-20T01:34:20.772-07:00</updated><title type='text'>Multiple Extension problem in OpenVMS</title><content type='html'>OpenVMS, the veteran Operating system. Still rules many territories in the tech world. Most of the Stock exchanges in world is under this veteran OS. Many Railway corporations are in his influence still. Indian Railway, the world biggest railway system is with him last few decades. Lots of process control systems are served by OpenVMS server. Lots of Steel plants are saved their life with this grandpa.  &lt;div&gt;Oh !!! &lt;/div&gt;  &lt;div&gt;Again I started story telling.&lt;/div&gt;  &lt;div&gt;Yes, I know our problem is how to handle multiple extensions in OpenVMS. &lt;/div&gt;  &lt;div&gt;For Example, &lt;/div&gt;  &lt;div&gt;If you have file named ,test.php.en;1&lt;/div&gt;  &lt;div&gt;&amp;#160; Don't scared about the ‘;’ and ‘1’ after the file name. Its VMS style of file handling. ‘;1’ tells you that, you are using first version of the file named test.php.en. If you modify the test.php.en, then new version will be created. then its name will be test.php.en;2. &lt;/div&gt;  &lt;div&gt; This is the way which VMS helps his users to trace back. The maximum number of VMS file version will be 32767 !!! &lt;/div&gt;  &lt;div&gt;Oooops !!!.&lt;/div&gt;  &lt;div&gt;You can modify your file more than 30000 and still revert back to first version.&lt;/div&gt;  &lt;div&gt;OK, OK.&lt;/div&gt;  &lt;div&gt;If you have a file named test.php.en and you wanted to open it. &lt;/div&gt;  &lt;div&gt;what you will do?&lt;/div&gt;  &lt;div&gt;you will list the files by entering &lt;/div&gt;  &lt;div&gt;$ dir&lt;/div&gt;  &lt;div&gt;then list of the files will be listed as below:&lt;/div&gt;  &lt;p&gt;Directory ALET$DKA100:[SYS0.SYSCOMMON.HP.HPSMH]    &lt;br /&gt;SMH$SPECIFIC.SAVE;1 SMH$START.COM;1&amp;#160;&amp;#160;&amp;#160;&amp;#160; SMH$STOP.COM;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SMH$STOP_SNMPAGENTS.COM;1    &lt;br /&gt;TEST^.PHP.EN;2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TEST^.PHP.EN;1&lt;/p&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;This name may lead you to a confusion. one extra ‘^’ symbol added with your file name. And if you type the file name as TEST^.PHP.EN; to open the file, Obviously system will not open the file for you.&lt;/div&gt;  &lt;div&gt;Its because VMS handles multiple extensions as a special case.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;This problem will annoy you many places. When you wanted to check the differences between TEST^.PHP.EN;1 and TEST^.PHP.EN;2 , you will get an error message.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;$ diff TEST^.PHP.EN;2&amp;#160; TEST^.PHP.EN;1&lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;“%DCL-W-PARMDEL, invalid parameter delimiter - check use of special characters&amp;#160; \^\ “&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;So, our problem is defined now !!! . &lt;/div&gt;  &lt;div&gt;We need to use the multiple extension files smoothly. &lt;/div&gt;  &lt;div&gt;The resolution also very smooth.just declare below command at your telnet/terminal emulator window. That’s it.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;font color="#008000" size="3"&gt;$ set proces/parse_style=extended&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;font color="#008000" size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;&lt;font color="#008000" size="2"&gt;Now everything works fine. you can use any multiple doted file, as usual.&lt;/font&gt;&lt;/div&gt;  &lt;div&gt;&lt;font color="#008000" size="2"&gt;Ask me, If you have any more questions&lt;/font&gt;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-5259588500571327176?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/5259588500571327176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2009/10/multiple-extension-problem-in-openvms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/5259588500571327176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/5259588500571327176'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2009/10/multiple-extension-problem-in-openvms.html' title='Multiple Extension problem in OpenVMS'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-6709337228165592454</id><published>2009-10-13T10:10:00.001-07:00</published><updated>2009-10-13T10:10:54.708-07:00</updated><title type='text'>SMH – System Management Home Page</title><content type='html'>&lt;p&gt;Availability of proper Manageability solutions is the essential requirement to sell computer servers. Though your server solutions are robust and high available or offers unique features to the customers, lack of server management software may lead you to reduced sales. Since rarely customers think of appointing an expert to manage your server. But, they could buy a moderate server with enough tools available for managing it.&lt;/p&gt;  &lt;p&gt;Hewlett-Packard, the king of the server making business(I didn’t forget IBM and DELL), have variety of server solutions. HP-UX is the most famous server Operating system from HP. There are lot many articles available about HP-UX. I like to pick the less rubbed ball from the pot.&lt;/p&gt;  &lt;p&gt;OpenVMS, Most aged Operating system in the server world. He is 32 year old now. Still runs 100Km per hour on the thread-mill and takes 200 kg dumbbells on each hands. When he was with Digitals hand, he was less explored muscle man. Now with hp, he used to attend international weight lift championship.&lt;/p&gt;  &lt;p&gt;Oh!!!&lt;/p&gt;  &lt;p&gt;I am going out of the play ground. We are talking about OpenVMS operating system. Earlier this OS was available only on VAX and Alpha architecture. Last few years its available in Intel’s Itanium processor. I would say, from my experience, its a real robust OS. If you wanted to automate your manufacturing factory, give that job to him and go to bed. You don’t need need to have a night mare about the server failure.&lt;/p&gt;  &lt;p&gt;There are lots of free tools available for managing OpenVMS servers. System Management Home Page(predecessor of Insight management Agents) is one among from that. Its SNMP based system hardware monitoring and diagnosing software. It has Web interface, so you can see your server internals from remote Desktop.&lt;/p&gt;  &lt;p&gt;SMH offers below features&lt;/p&gt;  &lt;p&gt;1. Single place for seeing system components status. Right now it has four statuses as OK, Degraded, Failed and unknown.&lt;/p&gt;  &lt;p&gt;2. Displaying information about Network interface cards.&lt;/p&gt;  &lt;p&gt;3. Displaying information regarding different storage controllers. Say…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;- Smart Array controllers      &lt;br /&gt;- SAS Controllers       &lt;br /&gt;- FGA&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;4. Processor information including model, speed, etc. And you can set thresholds for usage. And SNMP traps will be generated if thresholds exceeds&lt;/p&gt;  &lt;p&gt;5. Hard disk information including space used . Its is possible to set the thresholds for space usage. And SNMP traps will be generated if thresholds exceeds&lt;/p&gt;  &lt;p&gt;6. System board information.&lt;/p&gt;  &lt;p&gt;7. Power related information&lt;/p&gt;  &lt;p&gt;8. Cooling and temperature information&lt;/p&gt;  &lt;p&gt;9. Operating system related information.&lt;/p&gt;  &lt;p&gt;SMH designed to collect information from SNMP. So SMH installation will also install number SNMP agents in the server and one user has additional facility to read information directly from these SNMP agents. Apache is the web server using to host the web pages.&lt;/p&gt;  &lt;p&gt;&lt;font color="#008080"&gt;&lt;strong&gt;Let me conclude my briefing now. Its my pleasure to answer your queries regarding SMH or OpenVMS.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-6709337228165592454?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/6709337228165592454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2009/10/smh-system-management-home-page.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/6709337228165592454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/6709337228165592454'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2009/10/smh-system-management-home-page.html' title='SMH – System Management Home Page'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-2090485685341360463</id><published>2009-08-09T22:35:00.000-07:00</published><updated>2009-08-09T22:55:18.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CPU'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenVMS'/><title type='text'>Start and Stop CPU in OpenVMS</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;Yes, Its not a dream&lt;span class="Apple-converted-space"&gt;&lt;/span&gt;!!! .&lt;br /&gt;You can start or stop a particular Processor in multiprocessor server.If you don't want to involve all of the available processors for the current tasks running in the system, just stop the unwanted CPU. Then server will remove the stopped CPU from active CPU database. This feature will help an organization to reduce much of the power conception by CPU usage.&lt;br /&gt;Currently this feature available only on OpenVMS Operating system running on VAX/Alpha or I64 machines. below are the commands to manage the CPUS.&lt;br /&gt;&lt;br /&gt;1.&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;$ show cpu/full&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2.&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;$ stop/cpu 2&lt;/span&gt; // this command will stop  a CPU of id 2. This id can be see from executing &lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;'show cpu/full command&lt;/span&gt;&lt;span style="font-style: italic;"&gt;'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;&lt;br /&gt;3.&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;$ start/cpu 2 // This command will start the stopped CPU of id 2.&lt;br /&gt;&lt;br /&gt;More details :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;The STOP/CPU command removes a secondary processor from the active set in an OpenVMS multiprocessing system. If the secondary processor is not executing a process when the STOP/CPU command is issued, it enters the STOPPED state. If the secondary is executing a process at the time, it continues to execute the current process until it attempts to schedule another process. When this occurs, the secondary enters the STOPPED state.&lt;br /&gt;The OpenVMS operating system subjects a processor to a set of checks when it is the object of a STOP/CPU command. As a result, you may not be permitted to stop certain processors that are vital to the functioning of the system. In these cases, there is usually a process in the system that can execute only on the processor you intend to stop. You can determine this by issuing a SHOW CPU/FULL command. In unusual circumstances, you can bypass the checking mechanism by using the /OVERRIDE_CHECKS qualifier in the command.&lt;br /&gt;The STOP/CPU command has no effect if its object processor is already in the STOPPED state when it is issued.&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Examples :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;$ stop/cpu 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;//Will stop the CPU 2 and State of the CPU will be shown as STOPPED. See the out for the  below command. The CPU 2 states is in STOPPED now. All the running CPUs will be in RUN state&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;$ show cpu/full&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;System: &lt;system&gt;, HP rx4640 (1.30GHz/3.0MB)&lt;/system&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;SMP execlet = 3 : Enabled : Streamlined.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Config tree = Version 6&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Primary CPU = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;HWRPB CPUs = 4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Page Size = 8192&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Revision Code =&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Serial Number = USE44136MR&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Default CPU Capabilities:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;System: QUORUM RUN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Default Process Capabilities:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;System: QUORUM RUN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;CPU 0 State: RUN CPUDB: 89020000 Handle: 00005D70&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Owner: 000004C8 Current: 000004C8 Partition 0 (&lt;system&gt;)&lt;/system&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;ChgCnt: 1 State: Present, Primary, Reassignable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Process: SYSTEM PID: 2440042E&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Capabilities:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;System: PRIMARY QUORUM RUN RAD0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Slot Context: 92B95000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;CPU - State..........: RC, PA, PP, CV, PV, PMV, PL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Type...........: Itanium Major = 31, Minor = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Speed..........: 1300 Mhz&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;LID............: 00000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Variation......: IEEE FP, Primary Eligible&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Serial Number..: e52e8e9c01b90000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Revision.......:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Halt Request...: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Software Comp..: 5.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;PALCODE - Revision Code..: 1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Compatibility..: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Max Shared CPUs: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Bindings: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;PKD0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;PKC0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;PEA0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Features:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Autostart - Enabled.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath - Selection enabled as Preferred CPU.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;CPU 1 State: STOPPED CPUDB: 8917AF00 Handle: 00005E80&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Owner: 000004C8 Current: 000004C8 Partition 0 (&lt;system&gt;)&lt;/system&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;ChgCnt: 2 State: Present, In-Console, Reassignable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Process: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Capabilities:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;System: QUORUM RAD0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Slot Context: 92B96000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;CPU - State..........: BIP, PA, PP, CV, PV, PMV, PL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Type...........: Itanium Major = 31, Minor = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Speed..........: 1300 Mhz&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;LID............: 01000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Variation......: IEEE FP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Serial Number..: d566f80703b90100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Revision.......:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Halt Request...: 4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Software Comp..: 5.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;PALCODE - Revision Code..: 1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Compatibility..: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Max Shared CPUs: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Bindings: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Features:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Autostart - Enabled.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath - Selection enabled as Preferred CPU.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;&lt;span style="color: rgb(204, 0, 0); font-weight: bold;"&gt;CPU 2 State: STOPPED&lt;/span&gt; CPUDB: 8917CD00 Handle: 00005F90&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Owner: 000004C8 Current: 000004C8 Partition 0 (&lt;system&gt;)&lt;/system&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;ChgCnt: 2 State: Present, In-Console, Reassignable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Process: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Capabilities:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;System: QUORUM RAD0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Slot Context: 92B97000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;CPU - State..........: BIP, PA, PP, CV, PV, PMV, PL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Type...........: Itanium Major = 31, Minor = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Speed..........: 1300 Mhz&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;LID............: 02000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Variation......: IEEE FP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Serial Number..: a11db90f8ddd0000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Revision.......:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Halt Request...: 4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Software Comp..: 5.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;PALCODE - Revision Code..: 1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Compatibility..: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Max Shared CPUs: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Bindings: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Features:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Autostart - Enabled.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath - Selection enabled as Preferred CPU.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;CPU 3 State: RUN CPUDB: 8917EC80 Handle: 000060A0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Owner: 000004C8 Current: 000004C8 Partition 0 (&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 153, 153); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;&lt;system&gt;&lt;/system&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'trebuchet ms';font-size:13;"  &gt;&lt;span style="color: rgb(51, 153, 153);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;ChgCnt: 1 State: Present, Reassignable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Process: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Capabilities:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;System: QUORUM RUN RAD0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Slot Context: 92B98000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;CPU - State..........: RC, PA, PP, CV, PV, PMV, PL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Type...........: Itanium Major = 31, Minor = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Speed..........: 1300 Mhz&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;LID............: 03000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Variation......: IEEE FP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Serial Number..: 87eae30f7f950300&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Revision.......:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Halt Request...: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Software Comp..: 5.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;PALCODE - Revision Code..: 1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Compatibility..: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Max Shared CPUs: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Bindings: * None *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;EWA0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;BG0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;EWB0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Features:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Autostart - Enabled.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Fastpath - Selection enabled as Preferred CPU.&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);" class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;$ start/cpu 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;//Will start the CPU 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-2090485685341360463?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/2090485685341360463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2009/08/start-and-stop-cpu-in-openvms.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2090485685341360463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/2090485685341360463'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2009/08/start-and-stop-cpu-in-openvms.html' title='Start and Stop CPU in OpenVMS'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-7601586791941436386</id><published>2009-07-21T10:45:00.001-07:00</published><updated>2009-07-21T10:45:44.989-07:00</updated><title type='text'>HP Instant Capacity Software</title><content type='html'>&lt;p&gt;HP's Instant CAPacity (iCAP) software product provides the ability to instantly increase or decrease computing capacity on cell-based HP enterprise servers.   &lt;br /&gt;Its like a dream. You are purchasing cell based server box with 32 CPU cores, with a price of 16 CPU cores!!!. Yes, your business is growing fast, but not sure how much CPU capacity is actually required to finish your computational tasks near future. In a mission critical business, nobody can compromise the performance the computer server. But you are not sure, how much we will be required tomorrow. Now you wanted 16 cores and your business grows fast and within months you may need 24 cores. Its not so easy to upgrade your server box with additional 8 more CPU cores. And it may not be possible to buy another server box to fulfill the increased requirement.    &lt;br /&gt;The solution will be HP iCAP. You buy 32 cores with the cost of 16 CPU cores. Whenever you wanted to increase the number of cores, just to buy the iCAP license from hp and apply the license on your server. See, now your server box is equipped with 24 CPU cores!!!. That's the wonder story with hp iCAP.&lt;/p&gt;  &lt;p align="justify"&gt; The HP product number for Instant Capacity software is &lt;tt&gt;&lt;strong&gt;B9073BA&lt;/strong&gt;&lt;/tt&gt;. Instant Capacity is a part of the HP Utility Pricing Solutions (UPS) program and was formerly known as iCOD.&lt;/p&gt;  &lt;p align="justify"&gt;With Instant Capacity, you initially purchase a specified number of active system components (cores, cell boards, and memory) and a specified number of inactive (iCAP) components without usage rights. Prior to activation of an inactive component, additional usage rights must be obtained by purchasing a component-specific Right to Use (RTU) codeword from HP. When the codeword is applied to the system, the component usage rights are increased on the system, and an inactive component can be instantly activated. For example, inactive cores can be activated to increase the active processing capacity on the system. The action can be taken without waiting for new hardware to arrive because the Instant Capacity cores are already plugged into the system.&lt;/p&gt;  &lt;p align="justify"&gt;Instant Capacity is available for the following HP enterprise servers:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;HP Integrity servers running HP-UX 11i v2 (11.23), or HP-UX 11i v3 (11.31) or OpenVMS 8.31H1 or 8.4(not yet released): &lt;/div&gt;      &lt;ul&gt;       &lt;li&gt;         &lt;div align="justify"&gt;Superdome &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rx8640 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rx8620 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rx7640 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rx7620 &lt;/div&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;HP 9000 servers running HP-UX 11i v1 (11.11), HP-UX 11i v2 (11.23), or HP-UX 11i v3 (11.31): &lt;/div&gt;      &lt;ul&gt;       &lt;li&gt;         &lt;div align="justify"&gt;Superdome &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rp8440 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rp8420 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rp8400 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rp7440 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rp7420 &lt;/div&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;div align="justify"&gt;rp7410 &lt;/div&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The Instant Capacity software is free of charge and is required to be running on all HP-UX or OpenVMS partitions. It has a very small footprint and adds negligible overhead to the system.    &lt;br /&gt;iCAP CPUs are unlicensed CPUs. The unlicensed CPUs may be shown as available CPUs in the &lt;b&gt;vparstatus -A&lt;/b&gt; output. To use iCAP CPUs, you must first purchase them; then, you can activate and assign them to a virtual partition.&lt;/p&gt;  &lt;p align="justify"&gt;giCAP&lt;/p&gt;  &lt;p align="justify"&gt;TiCAP&lt;/p&gt;  &lt;p align="justify"&gt;With Instant Capacity, you initially purchase an HP enterprise server with a specified amount of active processing capacity, and a specified amount of inactive processing capacity.   &lt;br /&gt;Processing capacity consists of the system components:&lt;/p&gt;  &lt;p align="justify"&gt;• Processors containing cores&lt;/p&gt;  &lt;p align="justify"&gt;• Cell boards&lt;/p&gt;  &lt;p align="justify"&gt;• Memory&lt;/p&gt;  &lt;p align="justify"&gt;For each type of component, the number that can be active is equal to the number of usage rights applied to the complex for that type of component. Components purchased with a part number identifying them as “Instant Capacity” and without the label “Right to Use” come without usage rights. Components which are not labeled as Instant Capacity implicitly include usage rights that can be applied to any component of that type installed on the complex.&lt;/p&gt;  &lt;p&gt;Prior to activation of an inactive component, additional usage rights must be obtained. The   &lt;br /&gt;fundamental method is to purchase usage rights by purchasing the appropriate Instant Capacity products that include the label “Right to Use (RTU)”. HP then supplies a Right to Use (RTU) codeword. When the codeword is applied to the HP Enterprise server, the inactive component can be activated.&lt;/p&gt;  &lt;p align="justify"&gt;Additional methods for activating components for which usage rights have not been purchased include:&lt;/p&gt;  &lt;p&gt;• If an HP-UX server is a member of a Global Instant Capacity Group (GiCAP), and if extra   &lt;br /&gt;capacity is available from other members of the group, capacity may be “borrowed” from    &lt;br /&gt;another member of the group. Global Instant Capacity is described in Chapter 7.&lt;/p&gt;  &lt;p&gt;Ooops!!! I got a big order from my client. I need higher capacity server than my current server. But I am not sure the client always wanted this kinds of big tasks from me. Buying new server never gave me profit out from this current order. This client wanted a temporary work from me. I cant miss this client because of the capacity problems in my server. hooray!!! hp TiCAP will give you temporary higher capacity in a temporary time period.&lt;/p&gt;  &lt;p align="justify"&gt;• You may purchase additional Temporary Instant Capacity (TiCAP) and apply the temporary capacity codeword in order to activate one or more cores for a temporary period of time.&lt;/p&gt;  &lt;p align="justify"&gt;Temporary Instant Capacity : If a server is a member of a Global Instant Capacity Group, temporary capacity can be shared between members of the group.&lt;/p&gt;  &lt;p align="justify"&gt;• You may temporarily activate one or more inactive cores using the Instant Access Capacity (IAC) provided with the initial purchase of the Instant Capacity component. Instant Access Capacity is exactly the same as Temporary Instant Capacity except it is automatically provided with an Instant Capacity component and is not separately purchased. It provides an immediate buffer of temporary capacity in case extra capacity is needed before there is time to purchase an RTU codeword, a TiCAP codeword, or to setup a GiCAP group on an HP-UX system.&lt;/p&gt;  &lt;p align="justify"&gt;On OpenVMS server, there are possible to stop and start CPU using DCL commands.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;em&gt;‘$stop cpu’&lt;/em&gt; command can stop a particular CPU core manually. I don't know any other Operating system has such a facility. Similarly one can start the CPU too.     &lt;br /&gt;I know what you are thinking. You are thinking to hack the OpenVMS iCAP !!!.     &lt;br /&gt;I will explain, if one server has 32 CPU cores and it has applied an iCAP license of 16 cores. If Start CPU and Stop CPU commands are available in OpenVMS, why cant I&amp;#160; start 17th CPU Core?     &lt;br /&gt;Yes, you can!!!. But iCAP will stop one CPU among the active CPU cores. So total active CPUs are remains same :).     &lt;br /&gt;    &lt;br /&gt;More details about the iCAP will post soon. Till then bye…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-7601586791941436386?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/7601586791941436386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2009/07/hp-instant-capacity-software.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7601586791941436386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/7601586791941436386'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2009/07/hp-instant-capacity-software.html' title='HP Instant Capacity Software'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6595597812704890351.post-4842813294361565328</id><published>2009-07-15T04:53:00.001-07:00</published><updated>2009-07-15T20:32:10.973-07:00</updated><title type='text'>Store and retrieve Unicode characters with MySQL using PHP</title><content type='html'>&lt;div style="text-align: center"&gt;&amp;#160;&lt;/div&gt;  &lt;p align="justify"&gt;Newcomers to web programming world may face some very common issues related to Unicode and local language support.   &lt;br /&gt;Here I am pointing some generic queries that you might be asked to your colleagues in many days.     &lt;br /&gt;1. How to store Unicode characters in a database     &lt;br /&gt;2. How php can store/retrieve Unicode characters to and from Mysql database     &lt;br /&gt;3. How Indian languages like Malayalam or Hindi or Tamil can be stored in database.     &lt;br /&gt;    &lt;br /&gt;There are some significant difference between Unicode and Ansi fonts (visit : http://users.csc.calpoly.edu/~bfriesen/software/builds.html for difference between them). Since local language computing become much popular and even laymen starts using internet. So storing local languages(Malayalam, Hindi, etc ) will be a necessary feature for the web sites. This can be a big problem to web programmers as most might not be aware of the techniques required for storing the Unicode languages in a database.     &lt;br /&gt;    &lt;br /&gt;Here I am using MySql as DB and PHP as programming language.     &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;font color="#008040"&gt;Design of the database tables :&lt;/font&gt;       &lt;br /&gt;&lt;/strong&gt;    &lt;br /&gt;when creating a table, you should ensure your table can receive Unicode characters. below are the steps to create a table, which supports Unicode.    &lt;br /&gt;    &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;CREATE TABLE IF NOT EXISTS `doc_test` (&lt;/span&gt;     &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;`id` int(10) unsigned NOT NULL auto_increment,&lt;/span&gt;     &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;`unicodeText` varchar(450) NOT NULL,&lt;/span&gt;     &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;PRIMARY KEY (`id`)&lt;/span&gt;     &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=30 ;      &lt;br /&gt;&lt;/span&gt;    &lt;br /&gt;Here you have to make sure below things :     &lt;br /&gt;1. Your database encoding/collation should be utf8_general_ci.     &lt;br /&gt;2. Make sure your designed table(here doc_test ) should be having collation as utf8_general_ci.     &lt;br /&gt;3. Or even you can check the fields collation settings and make sure its utf8_general_ci.     &lt;br /&gt;4.Below image will help you to understand about what I meant.     &lt;br /&gt;I have taken a screen shot of table structure from phpmyadmin     &lt;br /&gt;&amp;#160;&lt;a href="http://lh4.ggpht.com/_29xH0otwa44/Sl4QssDHjsI/AAAAAAAAABM/tR6rvQO6PdI/s1600-h/unicode_db1%5B18%5D.jpg"&gt;&lt;img title="unicode_db1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="153" alt="unicode_db1" src="http://lh3.ggpht.com/_29xH0otwa44/Sl4Qtny2J9I/AAAAAAAAABQ/-P2UyEuvD8Q/unicode_db1_thumb%5B14%5D.jpg?imgmax=800" width="379" border="0" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(153,0,0)"&gt;&lt;span class="Apple-style-span" style="font-size: small"&gt;&lt;font size="1"&gt;(Click on the image to view in bigger size)&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Here note the the circled part.    &lt;br /&gt;5. If your database is not having the proper collation settings, visit below link to convert it into utf8_general_ci.     &lt;br /&gt;&lt;a href="http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html"&gt;http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html&lt;/a&gt;.    &lt;br /&gt;Or install &lt;a href="http://www.phpmyadmin.net/home_page/index.php" target="_blank"&gt;phpmyadmin&lt;/a&gt; software, which will help you to convert the collation settings by some mouse clicks.     &lt;br /&gt;6. Hope you have converted your collation settings.     &lt;br /&gt;    &lt;br /&gt;&lt;font color="#008040"&gt;&lt;strong&gt;Now We need PHP code to insert or retrieve the Unicode character.&lt;/strong&gt;       &lt;br /&gt;&lt;/font&gt;    &lt;br /&gt;1. Script to insert Unicode text to table. Here $txt is a variable which will be filled from a submit action. so user should have a text area in HTML page with a name of 'ta'.     &lt;br /&gt;    &lt;br /&gt;(Eg : &amp;lt;textarea name=&amp;quot;ta&amp;quot; rows=&amp;quot;10&amp;quot; cols=&amp;quot;80”&amp;gt;) &lt;/p&gt;  &lt;p&gt;&lt;font color="#408080"&gt;&amp;lt;?php&lt;/font&gt;    &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;$txt= $_POST['ta']; // get the unicode text from a submit action.      &lt;br /&gt;$unicodeText = $txt;       &lt;br /&gt;@mysql_query(&amp;quot;SET NAMES 'utf8'&amp;quot;,$id); /// Its very inportant to display or insert unicode characters in db       &lt;br /&gt;$cQry= &amp;quot;insert into document (unicodeText) values ('&amp;quot;.$unicodeText.&amp;quot;')&amp;quot; ;       &lt;br /&gt;$cresult = @mysql_query($cQry,$id);&lt;/span&gt;     &lt;br /&gt;&lt;font color="#408080"&gt;?&amp;gt;     &lt;br /&gt;&lt;/font&gt;2. PHP code to Display the Unicode text from MySQL database:&lt;/p&gt;  &lt;p&gt;PHP CODE :    &lt;br /&gt;&lt;font color="#408080"&gt;&amp;lt;?php&lt;/font&gt;    &lt;br /&gt;&lt;font color="#408080"&gt;@mysql_query(&amp;quot;SET NAMES 'utf8'&amp;quot;,$id); /// Its very inportant to display or insert unicode characters in db&lt;/font&gt;     &lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;$cresult = @mysql_query(&amp;quot;SELECT unicodeText FROM document&amp;quot;,$id);      &lt;br /&gt;while ($crow = @mysql_fetch_array($cresult,MYSQL_ASSOC))       &lt;br /&gt;{       &lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51,153,153)"&gt;echo ( $crow['unicodeText']);      &lt;br /&gt;}       &lt;br /&gt;&lt;/span&gt;&lt;font color="#408080"&gt;?&amp;gt;     &lt;br /&gt;&lt;/font&gt;Note: SET NAMES 'utf8' is an important command to work with Unicode texts. Don't forget to include that in your code.     &lt;br /&gt;3. Finished !!!     &lt;br /&gt;Hope you have enjoyed by seeing your local language visible in your web page.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6595597812704890351-4842813294361565328?l=techcmr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techcmr.blogspot.com/feeds/4842813294361565328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techcmr.blogspot.com/2009/07/store-and-retrieve-unicode-characters.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4842813294361565328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6595597812704890351/posts/default/4842813294361565328'/><link rel='alternate' type='text/html' href='http://techcmr.blogspot.com/2009/07/store-and-retrieve-unicode-characters.html' title='Store and retrieve Unicode characters with MySQL using PHP'/><author><name>CMRTechie</name><uri>http://www.blogger.com/profile/04386186811438825025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_29xH0otwa44/Sl4Qtny2J9I/AAAAAAAAABQ/-P2UyEuvD8Q/s72-c/unicode_db1_thumb%5B14%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
