{"componentChunkName":"component---src-components-mark-down-block-js","path":"/docs/how-works/","result":{"data":{"markdownRemark":{"html":"<h2 id=\"how-appscope-works\" style=\"position:relative;\"><a href=\"#how-appscope-works\" aria-label=\"how appscope works permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How AppScope Works</h2>\n<p>AppScope extracts information by interposing functions. When an application calls a function, it actually calls a function of the same name in the AppScope library (<code>libscope</code>), which extracts details from the function. Then the original function call proceeds. This interposition of function calls requires no change to an application: it works with unmodified binaries, and its CPU and memory overhead are minimal.</p>\n<p>Child processes are created with the AppScope library present, if the library was present in the parent. In this manner, a single executable is able to start, daemonize, and create any number of children, all of which include interposed functions.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/c68f3ec9afa867add4bf4b76a3f44f8e/d61c2/AppScope-system-level-design_w1800.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 57.00000000000001%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB60lEQVQoz31TwWrbQBD1b+Sfekko9NJi8CcEH3wp9NgPsGnwLQm0lzqQxE4xxmDTmEIphZLIaRs3tR2lsSNLciRLK1krve7syk5wTQdGWu3Mvn3zZpRJkgSj0QjtdnvpnU4HLAhAFnCO3cEAV7qOa/G+Mwy5T+fIVy1Dj3K5jGw2i0KhgFwuh3w+D8/zlgdjxsB8H7PZDEF60X8B6/U6isUi9vb2USqV0Gw2Eccx1lmSgpHFdFnqi71MFEUIw1BkCYCEiyyO+XwunZIoTuDxCpt17Ggvw4VGruvi8uYOXX2C/tiC4zgSkMy2bUw9JtffRi7efLnBxFex4ZTht+WjbzNEccpQAgptXp32sHl4jpcfe7h3XDDBmpJIs/7UgxNybLd+YWPnE97/NGTs6XEXm0cato41/JmFDyUTQ92+R28yxdC0lwwpZpoTGI5q0Oexg9dfr2EQQ0GodmXi7cUYB5cGvDlXgFS3LI8r/ZJI6bdoCukbidiqYn7E8eLkO56fXOBZtQtteCvPyi4r4VW3AgIQ3/8Kr+I81YpK/iAYvksZOuxRyY1GA7VaDa1WC9VqFZVKBboYZDkagqmaOQW6uIQYbh1qQncNTw7O8OPWfCjZsiwY4g+gji7Wjwd43bgQ24ErGuYy6SFXGv4FlMc27Jl3lUoAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AppScope system-level design\"\n        title=\"AppScope system-level design\"\n        src=\"/static/c68f3ec9afa867add4bf4b76a3f44f8e/5a190/AppScope-system-level-design_w1800.png\"\n        srcset=\"/static/c68f3ec9afa867add4bf4b76a3f44f8e/772e8/AppScope-system-level-design_w1800.png 200w,\n/static/c68f3ec9afa867add4bf4b76a3f44f8e/e17e5/AppScope-system-level-design_w1800.png 400w,\n/static/c68f3ec9afa867add4bf4b76a3f44f8e/5a190/AppScope-system-level-design_w1800.png 800w,\n/static/c68f3ec9afa867add4bf4b76a3f44f8e/c1b63/AppScope-system-level-design_w1800.png 1200w,\n/static/c68f3ec9afa867add4bf4b76a3f44f8e/29007/AppScope-system-level-design_w1800.png 1600w,\n/static/c68f3ec9afa867add4bf4b76a3f44f8e/d61c2/AppScope-system-level-design_w1800.png 1800w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n  </a>\n    </span></p>\n<p>If you're curious about the thought process that led to the creation of AppScope, see this <a href=\"https://cribl.io/blog/the-appscope-origin-story/\">blog</a> by the AppScope team.</p>\n<h3 id=\"performance-overhead\" style=\"position:relative;\"><a href=\"#performance-overhead\" aria-label=\"performance overhead permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Performance Overhead</h3>\n<p>AppScope collects data with, at most, around 2% CPU overhead, and <strong>minimal</strong> latency penalty. In most cases, the overhead is markedly less than 2%, which is significantly more efficient than legacy and current monitoring systems.</p>\n<h2 id=\"system-level-design\" style=\"position:relative;\"><a href=\"#system-level-design\" aria-label=\"system level design permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>System-level Design</h2>\n<p>The AppScope library (<code>libscope</code>) is the core component that resides in application processes, extracting data as an application executes. You have fine-grained control of the library's behavior, using environment variables or a <a href=\"/docs/config-file\">configuration file</a>.</p>\n<p>Whenever you work with AppScope, you are always using the <code>libscope</code> library. You can control the library directly using environment variables and/or the AppScope config file. Or, you can use the AppScope CLI, which communicates with the library.</p>","frontmatter":{"title":"How AppScope Works"}}},"pageContext":{"slug":"/how-works/","id":"16152603-f6ac-5340-a5a3-2ef1e62e75d4"}},"staticQueryHashes":["2787008656","306729481","625673991","640077088"]}