Thursday, May 8, 2014

Top and load average in Linux


It always practice to see top command output in the linux servers to identify the resource utilization.

We try to check load average and assume the performence of the system.

The top output looks like below

load average: 2.39, 1.70, 1.81

The same can be checked from 
$ cat  /proc/loadavg
2.70 2.45 2.13 1/450 6959

What are these 3 number?  how to analyze them ? What should be normal numbers?

The load average is computed based on CPU utilization, and includes the number of processes using or waiting to use the CPU,

The load average can be interpreted on a basic level as being a CPU core at full utilization has a system load average of one.

For a quad-core (4 core) machine, a system load average of 4 would mean that the machine had adequate resources to handle the work it needed to do, 

On the same quad-core system, a load average of 8 would mean that if the server had eight cores instead of four, 

It would have been able to handle the work, but it is now overloaded. 

So when you check load average, You also need to check the no of CPU cores on the server.

Use the below command to check the number of CPU cores on the server.

$ grep 'process' /proc/cpuinfo | wc -l
8

So the thumb rule is always load average should be less than the number of CPU (Cores), For 4 core server, Load average should be less than 4 always.


In case the system is showing high load average, but the CPU system and user utilization is low, it is time to start looking at IO wait.

IO wait shows up in system load on Linux because one or more of the cores is busy waiting on something having to do with either disk, or network input or output to finish before it can continue. 

Will post more on the IO waits and finding the IO issues in the next post.

class: ELFCLASS64 at /usr/lib64/perl5/XSLoader.pm line 70.



In R12 when we try to start the forms server,Below is the error encountered.

=============================================
*** Latest formsapp.ear has been deployed ***
=============================================


Program : /apps/EBSPROD/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl completed @ Thu May  8 10:43:26 2014

Perl script txkChkFormsDeployment.pl got executed successfully



adformsctl.sh: exiting with status 0

adformsctl.sh: check the logfile /apps/EBSPROD/inst/apps/EBSPROD_dxbhoebzapp2/logs/appl/admin/log/adformsctl.txt for more information ...


.end std out.
Can't load '/usr/lib64/perl5/auto/Sys/Hostname/Hostname.so' for module Sys::Hostname: /usr/lib64/perl5/auto/Sys/Hostname/Hostname.so: wrong ELF class: ELFCLASS64 at /usr/lib64/perl5/XSLoader.pm line 70.
 at /usr/lib64/perl5/Sys/Hostname.pm line 23
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /apps/EBSPROD/inst/apps/EBSPROD_dxbhoebzapp2/logs/appl/rgf/TXK/txkChkFormsDeployment_Thu_May_8_10_43_25_2014/txkChkFormsDeployment_Thu_May_8_10_43_25_2014.log


FIX
===

Check below two varaibles in the CONTEXT_FILE, 
PERL5LIB
ADPERLPRG

They should point to  below variable, Please check the below

Mofiy them in CONTEXT_FILE as below

From 

  <ADPERLPRG oa_var="s_adperlprg" osd="unix">/usr/bin/perl</ADPERLPRG>

To 
         <ADPERLPRG oa_var="s_adperlprg" osd="unix">/apps/PROD/apps/tech_st/10.1.3/perl/bin/perl</ADPERLPRG>

From 

        <PERL5LIB oa_var="s_perl5lib" osd="LINUX_X86-64">/usr/local/lib64/perl5:/usr/local/share/perl5:/usr/lib64/perl5/vendor_perl:/usr/share/perl5/vendor_perl:/usr/lib64/perl5:/usr/share/perl5:.:/apps/PROD/apps/apps_st/appl/au/12.0.0/perl:/apps/PROD/apps/apps_st/appl/au/12.0.0/perl</PERL5LIB>

To 

         <PERL5LIB oa_var="s_perl5lib" osd="LINUX_X86-64">/apps/PROD/apps/tech_st/10.1.3/perl/lib/5.8.3:/apps/PROD/apps/tech_st/10.1.3/perl/lib/site_perl/5.8.3:/apps/PROD/apps/apps_st/appl/au/12.0.0/perl:/apps/PROD/apps/tech_st/10.1.3/Apache/Apache/mod_perl/lib/site_perl/5.8.3/i686-linux-thread-multi</PERL5LIB>


Thursday, April 17, 2014

How can we control a concurrent program to Run In Specific RAC/PCP node?

How can we control a concurrent program to Run In Specific RAC/PCP node?


There is an interesting feature in R12 for this to achieve.


In concurrent program define window , we can define which node and instance a concurrent program should connect and run, That is through concurrent program session control.

Navigation: System Administrator Responsibility > Concurrent > Program > Define > Click 'Session Control' 

You can define in this screen Target Node and Target Instance for that particler concurrent program. 

Irrespective of the managers running on the node and connected to which ever RAC instance, This definition makes sure the program is run in the specified RAC/PCP node.

What is Target Node 
------------------------

If you specify the target node on which requests for this program will run. When requests for this program are submitted, They run on this node if that is node is available, 

If no specification is made for the target node of a concurrent program, a request for it will be picked up by any manager available to run it. 

If a node specification is made for a concurrent program and the node is up, only available managers running on the specified node will pick up the request. 

What is Target Instance 
----------------------------

When requests for this program are submitted, they run on this database instance node If it is available.

If no specification is made for the target instance of a concurrent program, a request for it will be picked up by the first manager available to run it and will be run in the instance where the manager is already connected.

If an instance specification is made for a concurrent program and the instance is up, it will be picked up by the first manager available to run it and the manager will run the request in the specified instance. 

However, if the target RAC instance is down, the manager will run the request in the instance where it is already connected and log an appropriate message.