Welcome to the Linux Foundation Forum!

Question on introspection and seeing what is going on under the hood

As I keep learning and going through the courses, I was wondering the techniques folks use to see what is going on in the system.

For example, say there is a program running on my machine, postgresql. I can see the postgres logs if I enable them and can tail them. There are programs like htop that can give some insight on how the system is behaving. How do I get more information about the runtimes of programs?

Maybe this will be taught later in the courses.

Thanks for any hints!

Best Answer

  • KevinCSmallwood
    KevinCSmallwood Posts: 32
    Answer ✓

    It depends on what information you are looking for. pmap will give you more memory information about a process. strace and ltrace will give you system call or library call information about a binary or process. As you mentioned, top/htop/atop and ps can give you a lot of information regarding the process. It all depends on the types of information that you are seeking. If you are looking at ways to improve system performance, LFS426 (Linux Performance Tuning), which is not part of the boot camps provides that information. Programmatically, a debugger like gdb or a tracing program like ftrace, will give you all sorts of gory details of what the program is doing. It just depends on how far down the rabbit hole that you want to go.

Answers

Categories

Upcoming Training