Skip to Content

Hi HANA colleagues,

I would like to suggest using a “hdbcons” utility for SAP HANA troubleshooting.

The “hdbcons” is a HANA kernel utility.

There are many options in that utility.

For example,

1) To get threads list,

    hdbcons “context list -s” > thread_callstack_test.txt

2) To generate runtime dump (see the Note 1813020 – How to generate a runtime dump on SAP HANA)

    hdbcons “runtimedump dump -f /test/rte_dump.txt”

Also for a suspected memory issue, please see the below two Notes for more details.

1. Note 1786918 – SAP HANA Database: Provide Information with hdbcons 

2. Note 1804811 – SAP HANA Database: Kernel Profiler Trace

The SAP HANA is a database, therefore if some issue occurs then the initial action is really important to solve that issue without any business impact.

Perhaps the worst case, for example not easy to log in due to bad performance, the “hdbcons” might be helpful for troubleshooting HANA issues.

Please see the below table of “hdbcons” options.

You can also find all options in help of “hdbcons”.

Options

Description

Options

Description

bye

Exit console client

mutex

Mutex management

cd

ContainerDirectory management

pageaccess

PageAccess management

checktopic

CheckTopic management

page

Converter management

cnd

ContainerNameDirectory management

pcm

Performance Counter Monitor management

context

Execution context management (i.e., threads)

profiler

Profiler

converter

Converter management

quit

Exit console client

crash

Crash management

resman

ResourceManager management

debug

Debug management

runtimedump

Generate a runtime dump.

dvol

DataVolume management

savepoint

Savepoint management

ELF

ELF symbol resolution management

snapshot

Snapshot management

event

Event management

statreg

Statistics registry command

exit

Exit console client

stat

Statistics management

help

Display help for a command or command list

tracetopic

TraceTopic management

log

Show information about logger and manipulate logger

trace

Trace management

mm

Memory management

version

Version management

monitor

Monitor view command

vf

VirtualFile management

mproxy

Malloc proxy management

– Hyungsang Park

To report this post you need to login first.

14 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member

    Hi,

    Is there any link/resource available for detailed usage/examples about this. I am looking for the usage of the debug option in particular.

    Thanks in advance.

    (0) 
    1. Lars Breddemann

      That’s the thing about this tool:

      It’s exclusively designed for HANA core developers.

      The (quite spotty) documentation is SAP internal and not to be shared with non-sap folks.

      Besides that, you’d very likely be heavily disappointed about the “debug” feature you mentioned. It’s mainly used to test the error handling code in HANA and not at all related to anything you model or program in your database instance.

      But with SPS 5 there is SQL Script debugging available – so that might be a thing for you to look into.

      – Lars

      (0) 
      1. Former Member

        Thanks for the updates Lars.

        Actually, when i first saw this utility, i was wondering why i never came across this in any of the publicly available documentation provided by SAP till date. Then i thought this might be some new upcoming feature for SPS06. 🙂 So wanted to explore it more.

        It seems SAP HANA is full of many internal surprises like this one. Few days ago, i witnessed another such case for QUERY HINTS, when it was suggested as SAP-Internal-Only stuff  (Though we now have the updated “plan visualizer” for doing the stuff).

        Thanks for keeping us updated. 🙂

        (0) 
    2. Former Member Post author

      Hi Vishal,

      Please see the SAP Note 1786918 (SAP HANA Database: Provide Information with hdbcons) for example about hdbcons.

      This note might be helpful.

      Thanks.

      – Hyungsang

      (0) 
    1. Lars Breddemann

      Sorry, but I’ve got to disagree.

      This is not an excellent blog at all.

      It might be well meant, but that’s about the good part.

      In fact this contribution is one of those that will do a lot more harm than good.

      Like several other tools hdbcons is a declared unsupported and disclosed documented HANA developer tool.

      These tools are meant to serve HANA core developers – the guys’n’girls that develop the HANA platform – with information of internal HANA structures.

      Information required to run and support a HANA installation nowadays is completely available via the monitoring views.

      This includes the current call stacks for the running threads.

      Ah, while we’re at this topic: who of you had ever been able to locate a problem or tell what a specific thread was doing by creating a runtime dump?

      Well, I thought so.

      Just like e.g. ORADEBUG or DBCC hdbcons is not a supportability feature and promoting it as such is serving the HANA development badly.

      You could as well go on and state: “Hey, there’s gdb and strace on this HANA Linux box – that’s great for support!“.

      HDBCONS is just a couple of layers higher up the code chain and to use it properly you have to have knowledge that is often only available to the developers of that specific function/module.

      The time spent with figuring out how this tool does what is much better spent by familiarizing yourself with the current documentation for monitoring and administration.

      Ok –  enough ranting about the fact that you Hyungsang Park felt it was a great idea to write a bit about this unsupported internal tool.

      The second thing I really don’t like about this post is the fact that it barely contains any personal experience.

      So you found a couple of commands that worked for you with this tool. So what?

      What’s your story with that?

      Have you been able to achieve something that wouldn’t have been possible otherwise?

      Did you get a system up and running again that was considered lost?

      Please, when writing a blog or article come up with more than just technical stuff that is available in the command help text or the documentation.

      Show us the benefit, the stuff that amazed/scared/frustrated/entertained you and tell us why it did that!

      Don’t stop writing blog posts now – keep’em coming!

      But please come up with something better than this.

      – Lars

      (0) 
      1. Andy Silvey

        Hi Lars,

        in my book, anything which we’re not supposed to know about is actually what we want to know about 🙂

        Boys and girls, remember what Lars said, don’t try this at home, and handle with care.

        Lars, all the best for 2013 and looking forward to more of your excellent blogs 🙂

        Andy Silvey.

        (0) 
      2. Former Member Post author

        Hi Lars,

        Thank a lot for your advice.

        I really agree with you. I will take your advice.

        I just want to suggest that to make someone helpful to solve some worst problems.

        (ex. not easy to log in the HANA due to bad performance)

        In my point of view,

        HANA is a database so if some issue occurs then the initial action is really important to solve that issue without any restart processes(without any business impact).

        For example, we can trigger and analyze java thread dump in any situation using Solman RCA. Like this, I think HANA admin should be able to trigger and analyze thread dump by themselves in any situation.

        Anyway I will edit this post as your advice.

        Thank you.

        – Hyungsang

        (0) 
        1. Lars Breddemann

          Completely agreed!

          The good thing is: you already can do all these things via HANA Studio!

          A lot of development for SPS 5 had been just about maintainability and supportability.

          Reading call stacks from the HANA studio: easy (actually just a tick on the checkbox in the threads overview).

          But then again: what do you do with the thread dump if you don’t know the HANA source code?

          Most objects and methods have names that indicate a certain activity, but usually that’s about it (and I’ve had the pleasure to look at a lot of crash dumps with stack back traces…).

          Seriously: after more then 1 1/2 years of HANA support and troubleshooting I can honestly say that most of the really helpful insights were delivered by (in this very order):

          1. monitoring views
          2. trace/log files
          3. statistics server data
          4. activated traces
          5. performance trace/plan visualisation

          That’s why I prefer those options – not because they are officially supported and hdbcons is not – but because they allow me to do my work.

          – Lars

          (0) 
          1. Former Member

            Hello Lars,

            why am I not suprised that the SAP internal documentation on HANA is roughly as rudimentary as the public documentation? The SAP support can resort to the source code in order to troubleshoot issues.

            Anyway, how about writing a blog on your favorite monitoring views and what kind of issues can be tackled with them? There are few other people who could do that, but there are lots of people who would really like to read such a blog.

            Regards,

            Mark

            (0) 

Leave a Reply