# Quick start<no value>
Don't know where to start? These seven steps will set you up quickly on Linux:

1. Set up [the linuxperf module](/docs/modules/linuxperf-cpus-running-linux) in both Adaptyst and Adaptyst Analyser.

2. Make sure that your profiled program is compiled with frame pointers (otherwise, you may get broken stack traces in the performance analysis results). If you use GCC, this can be done by using the ```-fno-omit-frame-pointer``` and ```-mno-omit-leaf-frame-pointer``` (if available) compilation flags.

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
Although not strictly necessary, we recommend having everything in your system compiled with frame pointers. Some Linux distributions already ship frame-pointer-friendly packages by default, e.g. Fedora 38+, Ubuntu 24.04+, and Arch Linux.
{{< /callout >}}

3. Run this command (it changes the kernel settings for an entire machine, so be careful if you use a shared computer!):
```bash
sysctl kernel.perf_event_max_stack=1024
```

4. Save the content below to ```system.yml``` (or other name of your choice):
```yaml
entities:
  entity1:
    options:
      handle_mode: local
      processing_threads: 1  # Change this to a higher number if you have multiple CPUs/cores
    nodes:
      cpu:
        modules:
          - name: linuxperf
```

5. Profile a command of your choice by running this **as root** (no quoting required):
```bash
adaptyst -s system.yml -d -- <command to be profiled>
```
{{< callout context="caution" title="Using shell-specific syntax" icon="outline/alert-triangle" >}}
If your command uses any shell-specific syntax (e.g. redirection using ```<``` or ```>```), you need
to pass it through your shell as Adaptyst uses direct system calls to run programs. For example, to
profile ```program123 < test.txt``` run through bash, you need to execute
```adaptyst -s system.yml -d -- /bin/bash -c "program123 < test.txt"```.
{{< /callout >}}

{{< callout context="note" title="Running Adaptyst as non-root" icon="outline/info-circle" >}}
**It is possible** to run Adaptyst with linuxperf as non-root, but this requires some permission-related sysadmin steps since linuxperf needs higher privileges than a standard non-root user has (it is not necessary to grant full root rights though!). See [here](/docs/modules/linuxperf-cpus-running-linux/#permissions-needed).
{{< /callout >}}

{{< callout context="caution" title="Warning" icon="outline/alert-triangle" >}}
If you have NUMA (non-uniform memory access), you must either disable NUMA balancing for an entire machine by running ```sysctl kernel.numa_balancing=0``` or run Adaptyst with linuxperf on a single NUMA memory node only.
{{< /callout >}}

6. When Adaptyst finishes its job, move the produced results directory (by default: ```adaptyst_<UTC timestamp>__<positive integer>```) to a new directory ```results``` (or other name of your choice), switch to the Python environment where Adaptyst Analyser is installed, and run this:
```bash
adaptyst-analyser results
```

7. Open the indicated address in your browser (the output may differ, check your terminal window!):
```
[2024-10-12 13:57:52 +0200] [2192] [INFO] Listening at: http://127.0.0.1:8000 (2192)
```

Have fun! Consult [the Adaptyst Analyser website navigation section](/docs/adaptyst/checking-results-with-adaptyst-analyser/#website-navigation) along with [the corresponding section for linuxperf](/docs/modules/linuxperf-cpus-running-linux/#features-for-adaptyst-analyser) to learn how to use the produced website most effectively.
