Skip to content

Commit

Permalink
updates readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed May 7, 2021
1 parent da2cae7 commit bd3a547
Showing 1 changed file with 33 additions and 53 deletions.
86 changes: 33 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Table of Contents
<!-- toc -->

- [Usage](#usage)
* [Issues, Features, Use-Cases, Wish List](#issues-features-use-cases-wish-list)
* [Features that will not be implemented](#features-that-will-not-be-implemented)
- [Analysis](#analysis)
- [Installation](#installation)
* [Arch Linux](#arch-linux)
* [cargo install](#cargo-install)
Expand All @@ -38,51 +37,38 @@ forked processes automatically:
strace-analyzer cmd.strace.xxx
```

**Note:** Does only work with traces created with the usage example above.
There is no support for logs that contain output of multiple process IDs and
the timed output variants are supported neither. The above-mentioned `strace`
command line yields the shortest output and allows tracing the forked processes
without too much effort.

### Issues, Features, Use-Cases, Wish List

- If you think of a new (possibly high-level) analysis use case or how to
improve an existing one, please [open an issue][newissue]. If you have an
idea on how the output should look like, feel free to include a sketch of
an example.

- If you recognize missing file associations in the output, i.e. bare file
descriptor numbers without a note as to why it could not be identified,
please [open an issue][newissue] and provide access to that particular,
complete strace log, so I am able to identify the problem.

If you know that a particular file should be included, because you know
that file has been opened, it would be of great help if you would name
these files in the issue.

### Features that will not be implemented

In the spirit of the Unix philosohpy of **do one thing and do it well**,
strace-analyzer will **not** do any of the following:

- *filtering*, use tools like [grep][] or [awk][], e.g.:

```bash
strace-analyzer cmd.strace.1835 | grep pattern
strace-analyzer cmd.strace.1835 | awk '/pattern/'
```

- *sorting*, use the [sort][] command line utility, e.g.:

```bash
strace-analyzer cmd.strace.27049 | sort -k9
```

- pretty *tabular output*, use the [column][] command line utility, e.g.:

```bash
strace-analyzer read strace.log.27049 | column -t
```
**Note:** Only works with traces created with the usage example above. There is
no support for logs that contain output of multiple process IDs and the timed
output variants are supported neither. The above-mentioned `strace` command
line yields the shortest output and allows tracing the forked processes without
too much effort.


Analysis
--------

At the moment, `strace-analyzer` only analyzes reads and writes to the file
system:

```console
$ strace -s0 -ff -o tar.strace tar czfv pkgs.tar.gz /var/cache/pacman/pkg/linux-*
/var/cache/pacman/pkg/linux-5.12.1.arch1-1-x86_64.pkg.tar.zst
/var/cache/pacman/pkg/linux-api-headers-5.10.13-1-any.pkg.tar.zst
/var/cache/pacman/pkg/linux-docs-5.12.1.arch1-1-x86_64.pkg.tar.zst
/var/cache/pacman/pkg/linux-firmware-20210426.fa0efef-1-any.pkg.tar.zst
/var/cache/pacman/pkg/linux-lts-5.10.34-1-x86_64.pkg.tar.zst

$ strace-analyzer tar.strace.10099
Reads Bytes Bytes/Op File
9722 94.9M 10.0K /var/cache/pacman/pkg/linux-5.12.1.arch1-1-x86_64.pkg.tar.zst
111 1.1M 10.0K /var/cache/pacman/pkg/linux-api-headers-5.10.13-1-any.pkg.tar.zst
2244 21.9M 10.0K /var/cache/pacman/pkg/linux-docs-5.12.1.arch1-1-x86_64.pkg.tar.zst
17124 167.2M 10.0K /var/cache/pacman/pkg/linux-firmware-20210426.fa0efef-1-any.pkg.tar.zst
7642 74.6M 10.0K /var/cache/pacman/pkg/linux-lts-5.10.34-1-x86_64.pkg.tar.zst

Writes Bytes Bytes/Op File
23020 359.7M 16.0K pkgs.tar.gz
```


Installation
Expand Down Expand Up @@ -113,10 +99,4 @@ install -Dm755 target/release/strace-analyzer ~/bin/strace-analyzer


[aur-package]: https://aur.archlinux.org/packages/strace-analyzer "strace-analyzer AUR package"
[awk]: http://man7.org/linux/man-pages/man1/gawk.1.html "gawk man page"
[column]: http://man7.org/linux/man-pages/man1/column.1.html "column man page"
[grep]: http://man7.org/linux/man-pages/man1/grep.1.html "grep man page"
[newissue]: https://github.com/wookietreiber/strace-analyzer/issues "issue tracker"
[rust]: https://www.rust-lang.org/ "rust programming language home page"
[sort]: http://man7.org/linux/man-pages/man1/sort.1.html "sort man page"
[strace]: http://sourceforge.net/projects/strace/ "strace home page"

0 comments on commit bd3a547

Please sign in to comment.