> For the complete documentation index, see [llms.txt](https://richardweiyang-2.gitbook.io/systemtap_with_examples/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://richardweiyang-2.gitbook.io/systemtap_with_examples/language.md).

# Systemtap Language

systemtap is so powerful, because we could write scripts to program the behavior according to our purpose.

> The magic all exists in the script.

The script is like c/awk. The general idea is simple, while there are still different concepts need to understand before we can handle the script.

Based on my humble understanding, a programming language could be divided into several parts:

* [Syntax](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/syntax.md)
* [Variables](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/variables.md)
* [Control Flow](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/control_flow.md)
* [Function & Macro](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/function_macro.md)

Besides these, systemtap has several special parts:

* [TypeCase](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/typecast.md)
* [Guru Mode](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/guru_mode.md)
* [Probe Point](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/probe_point.md)
* [Predefined Functions](https://github.com/richardweiyang/systemtap_with_examples/tree/9f754ae24371d379a0745384ade3a790478f5b8f/language/language/predefined_functions.md)

When I almost finish this serials, I found a very good [Language Reference](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/systemtap_language_reference/) from RH. I believe this one is more sophisticated than my serials. I would recommend you to read that and my serials would refer to that one in some points.

BTW, I am glad to see the author was my colleague. Thanks to IBM.
