Pages

Tuesday, 28 July 2020

Finding Top running process in Linux using TOP command


Top Memory consuming processes:

[root@joju ~]$ ps -eo pmem,pcpu,pid,args | tail -n +2 | sort -rnk 1 | head

 1.8  0.0  3304 gnome-panel
 1.3  0.2  3365 /usr/lib/vmware-tools/sbin64/vmtoolsd -n vmusr --blockFd 3
 1.3  0.0  3370 nautilus -n
 1.2  0.3  2642 /usr/bin/Xorg :0 -br -verbose -novtswitch -auth /var/run/gdm3/auth-for-Debian-                          gdm-0vVbZF/database -nolisten tcp vt7
 1.0  0.1  3468 gnome-terminal
 0.9  0.0  3377 nm-applet
 0.8  0.0  3371 gnome-screensaver
 0.8  0.0  3357 gnome-sound-applet
 0.8  0.0  3267 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
 0.7  0.0  3458 /usr/lib/gnome-online-accounts/goa-daemon

Top CPU consuming processes:

[root@joju ~]$ ps -eo pmem,pcpu,pid,args | tail -n +2 | sort -rnk 2 | head

 0.1 26.4  5845 find / -name *fg*
 1.8  0.0  3304 gnome-panel
 1.3  0.3  3365 /usr/lib/vmware-tools/sbin64/vmtoolsd -n vmusr --blockFd 3
 1.3  0.3  2642 /usr/bin/Xorg :0 -br -verbose -novtswitch -auth /var/run/gdm3/auth-for-Debian-gdm-0vVbZF/database -nolisten tcp vt7
 1.3  0.0  3370 nautilus -n
 0.9  0.1  3468 gnome-terminal
 0.9  0.0  3377 nm-applet
 0.8  0.0  3371 gnome-screensaver
 0.8  0.0  3357 gnome-sound-applet
 0.8  0.0  3267 /usr/lib/gnome-settings-daemon/gnome-settings-daemon

Explanations:

- ps Report a snapshot of the current processes
- -e Select all processes
- o Specify user-defined format
- pmem,pcpu,pid,args user-defined format: memory,cpu, pid number and command
- | tail -n +2 Output lines starting to the second line (to avoid column names such %MEM, etc ...)
- | sort -rnk 1 reverse (r), numeric sort (n) by column 1 (memory)
- | sort -rnk 2 reverse (r), numeric sort (n) by column 2 (cpu)
- | head output the 10 first lines


When running adcfgclone.pl in appstier Exception in thread "Thread-1" java.lang.OutOfMemoryError: Java heap space

Error:-


INFO : Jul 5, 2020 11:56:31 - CLONE-23283  Unpack Domain.
FINE : Jul 5, 2020 11:56:31 - [J2EEComponentApplyCloner:unpackDomain] Domain Target Location:/x01/xxxx_code/fs1/FMW_Home/user_projects/domains/EBS_domain_xxxx
FINE : Jul 5, 2020 11:56:31 - [J2EEComponentApplyCloner:unpackDomain] Unpack Command:/x01/xxxx_code/fs1/FMW_Home/oracle_common/common/bin/unpack.sh -domain=/x01/xxxxx_code/fs1/FMW_Home/user_projects/domains/EBS_domain_xxx -template=/var/tmp//CLONINGCLIENT5552710768559332279/packed_template.jar -server_start_mode=prod -log=/var/tmp//CLONINGCLIENT5552710768559332279/unpack.log -log_priority=debug 
<< read template from "/var/tmp/CLONINGCLIENT5552710768559332279/packed_template.jar"
>>  succeed: read template from "/var/tmp/CLONINGCLIENT5552710768559332279/packed_template.jar"
<< set config option ServerStartMode to "prod"
>>  succeed: set config option ServerStartMode to "prod"
<< write Domain to "/x01/xxxxx_code/fs1/FMW_Home/user_projects/domains/EBS_domain_xxxx"
Exception in thread "Thread-1" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.io.BufferedReader.readLine(BufferedReader.java:349)
at java.io.BufferedReader.readLine(BufferedReader.java:382)
at com.oracle.cie.common.util.CRLF.readData(CRLF.java:129)
at com.oracle.cie.common.util.CRLF.processFile(CRLF.java:67)
at com.oracle.cie.common.util.CRLF.process(CRLF.java:57)
at com.oracle.cie.domain.util.stringsub.SubsScriptHelper.processCRLF(SubsScriptHelper.java:167)
at com.oracle.cie.domain.DomainGenerator.generate(DomainGenerator.java:478)
at com.oracle.cie.domain.script.ScriptExecutor$2.run(ScriptExecutor.java:2991)

Cause:-

When running adcfgclone.pl in appstier , above error reported.

This scenario will happens when there is not a sufficient JVM heap size allocated to unpack the file during the clonning process.

Parameter value before the issue:-

CONFIG_JVM_ARGS="-Xmx2048m -Xms1024m" 

SOLUTION:

In a terminal export the below values, and again rerun adcfgclone in appstier

Set the environment variable CONFIG_JVM_ARGS with the memory parameters for the JVM. The required memory parameters will vary with the domain configuration.  Tey adjusting the value till you run the adcfgclone.pl smoothly.


export CONFIG_JVM_ARGS="-Xmx3072m -Xms1024m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit"


Note:- Xmx max value > 4096m



[Troubleshoot Socket:000445] Connection Rejected, Filter Blocked Socket While Accessing EBS R12.2 WebLogic Console


Error:-

While accessing the WebLogic Admin console  http://<url>:7003/console reported with the following error:

“The Server is not able to service this request: [Socket:000445]Connection rejected, filter blocked Socket, weblogic.security.net.FilterException: [Security:090220]rule 2”

Root Cause:-

The error I encountered is due to WebLogic offers a concept called “connection filter“.  Connection filters provide network layer access control and allow the server(s) to block unwanted communication based on different criteria. 

You can check the WebLogic connector filter configuration under the config.xml file. 

Note: config.xml is a file that contains all the WebLogic configurations

In the above config.xml file, you can see that it is blocking the connection for 0.0.0.0/0 where 0.0.0.0/0 is nothing but public/private internet.

Note: Using Weblogic Connection filter you can also control access to particular IP

Solution:-

1) Open  the config.xml file

     cd $EBS_DOMAIN_HOME/config

2) Backup your config.xml file before making any changes

     eg: $ cp -R config.xml config.xml_bkp

3) Search for connection-filter-rule

4) Change the string “deny” to “allow”

      <connection-filter-rule>0.0.0.0/0 * * deny</connection-filter-rule>

       <connection-filter-rule>0.0.0.0/0 * * allow</connection-filter-rule>

5) Save the config.xml file & bounce the admin server

Now you will be able to access the WebLogic console :) 

 


RMAN-06034: at least 1 channel must be allocated to execute this command


Scenario:-


Error faced when duplicating the Target database from Source.

Error:-


RMAN-03002: failure of Duplicate Db command at 07/27/2020 13:08:36
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06034: at least 1 channel must be allocated to execute this command

Cause:-


Need to allocate atleast 1 channel for duplicating the database.

Initial Executed script:-

run
{

allocate auxiliary channel c1 device type disk;
allocate auxiliary channel c2 device type disk;
Duplicate target database to 'ORCL' from active database;

}


Solution(Corrected Script):-


run
{

allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
allocate auxiliary channel c1 device type disk;
allocate auxiliary channel c2 device type disk;
Duplicate target database to 'ORCL' from active database;

}