Operating System - HP-UX
1757679 Members
2857 Online
108862 Solutions
New Discussion юеВ

Re: Looking for a list of goodies in adb (absolute debugger)...

 
SOLVED
Go to solution
Kevin Lister
Frequent Advisor

Looking for a list of goodies in adb (absolute debugger)...

Hi Gang,

Where does one find the complete list of goodies that can be gleaned from adb?

I know several already:

itick_per_tick
itick_per_usec
physmem
processor_count
etc, etc, etc

The adb man page does not list them. I suspect I should be looking elsewhere. ;o)

thanks!

kev
10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: Looking for a list of goodies in adb (absolute debugger)...

The use of adb should be considered a kludge and you don't want to use it. I.e. it is used when there isn't a kernel parm, or for some special kernel debugging cases.

I suppose you could use google to find them.
Kevin Lister
Frequent Advisor

Re: Looking for a list of goodies in adb (absolute debugger)...

Hi Dennis!

I hope you had a fabulous holiday. ;o)

I've Googled and Googled. No complete list. If the adb shouldn't be used to glean interesting info about the system hardware and OS then what should one use? I realize there are various commands available to gather certain pieces of information. However, some of the commands are only available if your system has Ignite, or is Itanium based, or requires some other piece of software to be installed. It seems like adb is a good choice since it is available on every system and seems reliable.

kev
James R. Ferguson
Acclaimed Contributor

Re: Looking for a list of goodies in adb (absolute debugger)...

Hi Kev:

A number of uses for 'adb' can be discovered by using the Forums Advanced Search (!) and supplying the keyword 'adb'.

Other information can be found by searching the Technical Knowledge database with the keyword 'adb'.

THe caveats of which HP-UX release you are running on and whether or not your platform is a PA-RISC or an Itanium one apply, as does the '-o' switch for coercing 'adb' to apply its "old" rules.

I have never seen a compilation of any "exhaustive" list.

Regards!

...JRF...
Kevin Lister
Frequent Advisor

Re: Looking for a list of goodies in adb (absolute debugger)...

Hi James,

Thanks for the response. ;o)

I've done some pretty exhaustive searches on ITRC and Google and no complete list.

Some of the ones I already know I found from doing unrelated searches. It just surprises me that there isn't a comprehensive list somewhere on the HP docs site.

How does one find out about these things if they aren't documented?

kev
Dennis Handly
Acclaimed Contributor

Re: Looking for a list of goodies in adb (absolute debugger)...

>I've Googled and Googled. No complete list.

Of course not. You use google to "compose" the list.
echo adb site:itrc.hp.com

>It seems like adb is a good choice since it is available on every system and seems reliable.

In this case adb is never a good choice but may be your only one. ;-)

>It just surprises me that there isn't a comprehensive list somewhere on the HP docs site.

Why would you be surprised that kludges aren't documented? Using adb usually means that the piece of info you want wasn't deemed important enough to provide a command. Or the command was only added in newer OS versions.

>How does one find out about these things if they aren't documented?

Only by asking questions and reading threads and Knowledge database.

You haven't mentioned what you are really interested in? A poor man's machinfo for PA?
Bill Hassell
Honored Contributor
Solution

Re: Looking for a list of goodies in adb (absolute debugger)...

While there a fewq built-in features like date conversion, the real purpose of adb is to read and write memory locations, typically kernel memory. So when you look at something like: msgbuf+8, you are looking at the internal binary values in memory. msgbuf is an entry point or a symbol, a location that was part of the source code for the kernel compilation. So a complete list of what you can look at would be the thousands of lines of code used to build the kernel. If you use adb for a plain old program, you see the same type of information. But you need a roadmap, the symbol tables and some source code to make sense of it.

HP offers HP-UX internals training classes which will provide a wealth of information using adb (and many other tools).

A simpler (supported) source of kernel information comes from getconf (see man getconf). See also: man 5 limits


Bill Hassell, sysadmin
Kevin Lister
Frequent Advisor

Re: Looking for a list of goodies in adb (absolute debugger)...

Hi Bill,

Thanks for the info.

I already know about getconf and I'm using it to get some info. What I really want is a way to glean information about the hardware and running os programmatically. Either through a C++ or Java program. The retrieval process has to be fast.

I really had no idea that adb is considered worthless. If it shouldn't be used then why is it included in the os distribution?

Adb does provide information that is of interest to system and database administrators. If there is another interface to this information I will gladly use it! It would be nice to be able to call functions from a library to get what I want.

kev
James R. Ferguson
Acclaimed Contributor

Re: Looking for a list of goodies in adb (absolute debugger)...

Hi Kevin:

You really haven't made clear exactly the information you want to catalog. That said, have you looked at some of the functionality of 'sysconf(2)' and 'pstat(2)' and 'tuneinfo2(2) --- documented interfaces? The manpages for the aforementioned are a start.

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Looking for a list of goodies in adb (absolute debugger)...

>I really had no idea that adb is considered worthless.

Not completely worthless but the user interface is crap.

>If it shouldn't be used then why is it included in the OS distribution?

Because gdb wasn't around?
Because adb is the only tool to poke around the kernel.