• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to trace asmcmd command on UNIX/Linux

By admin

Question : The asmcmd command execution is slow. How to trace the asmcmd command?

Answer:

You are seeing some errors or slow performance issue with command execution on asmcmd. And you wish to get more information on the command execution. The exception raised from asmcmd is not very descriptive and more of generic errors are reported for different issues. Below are some of the ways in which you can trace the asmcmd command to troubleshoot the performance issues with the execution of the asmcmd command.

1. Setting the DBI_TRACE environment variable

The main script asmcmdcore is a perl script. We can use DBI_TRACE to get more information by setting it in the environment:

$ export DBI_TRACE=1 
$ asmcmd 
ASMCMD>

2. using oradebug

When you connect to asmcmd it connects to the ASM Instance with SYSDBA or SYSASM privilege, and a local BEQ process is started. After identifying the process ( ps -ef | grep beq and check the process starttime ), you can attach to the process using oradebug and run ‘errorstack’ , ‘12223’ etc.

Note that on 11g you can run asmcmd in non-connected mode, and then this tracing would not be useful.

3. truss/strace

We can of course take truss/strace of the asmcmd and its forked processes.

$ strace -aeft -o /tmp/asmcmd.log asmcmd 
ASMCMD>

Filed Under: ASM, oracle

Some more articles you might also be interested in …

  1. Oracle Database: How To Use PROFILES To Limit User Resources
  2. How to Merge Multiple Partitions in Oracle 12c
  3. How to upgrade RMAN catalog SCHEMA from 11g to 12.1.0.2 without upgrading the catalog database
  4. Oracle Database 12c New Feature – Move a Datafile Online
  5. How to Move User datafiles between ASM Diskgroups using Incrementally Updated Backups
  6. IPv4 Subnet Basics and Oracle Clusterware
  7. How to Failover a Service During Instance Shutdown Using SRVCTL
  8. Oracle 11g new feature – ASM Fast Rebalance
  9. Oracle Database – How to Recover from a Lost or Deleted Datafile with Different Scenarios
  10. Empty Directories in the Flash Recovery Area (FRA) are not deleted

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary