# Logs

## Logs

## JournalCtl

> journalctl — Query the systemd journal. journalctl may be used to query the contents of the systemd journal as written by systemd-journald.service. [Homepage](https://www.freedesktop.org/software/systemd/man/journalctl.html)

Show logging space

```bash
    root@edison:~# journalctl --disk-usage
```

Limit logging space

```bash
    root@edison:~# nano /etc/systemd/journald.conf
    SystemMaxUse=20M
```

Stop logging

```bash
    root@edison:~# nano /etc/systemd/journald.conf
    #Storage=persistent
    Storage=None
```

Remove all logs

```bash
    root@edison:~# cd /var/log/journal/
    root@edison:/var/log/journal# rm -rf *
```

Show logging space

```bash
root@edison:~# journalctl --disk-usage
No journal files were found.
Journals take up 0B on disk.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://theiotlearninginitiative.gitbook.io/embedded-linux/user-space/logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
