Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
7
21
category
stringclasses
8 values
command
stringlengths
2
48
strace
stringlengths
0
8.51M
duration
float64
0
1.01
timestamp
stringdate
2025-11-02 16:53:22
2025-11-02 16:53:45
num_lines
int64
0
19.3k
size_bytes
int64
0
8.51M
cat_simple_run1
file_io
cat test.txt
7552 16:53:22.403301 execve("/usr/bin/cat", ["cat", "test.txt"], 0x7ffd2008bb00 /* 40 vars */) = 0 <0.000320> 7552 16:53:22.403809 brk(NULL) = 0x606b4f4d7000 <0.000018> 7552 16:53:22.403990 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7638c7cd2000 <0.000026> 7552 16:53:22.404...
0.012694
2025-11-02T16:53:22+00:00
116
12,575
cat_simple_run2
file_io
cat test.txt
7564 16:53:22.426796 execve("/usr/bin/cat", ["cat", "test.txt"], 0x7fffdc1819a0 /* 40 vars */) = 0 <0.000327> 7564 16:53:22.427290 brk(NULL) = 0x6001e48f0000 <0.000019> 7564 16:53:22.427490 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x799b199f3000 <0.000026> 7564 16:53:22.427...
0.012741
2025-11-02T16:53:22+00:00
116
12,575
cat_simple_run3
file_io
cat test.txt
7575 16:53:22.451834 execve("/usr/bin/cat", ["cat", "test.txt"], 0x7ffc4f656ea0 /* 40 vars */) = 0 <0.000367> 7575 16:53:22.452456 brk(NULL) = 0x56aa776b7000 <0.000011> 7575 16:53:22.452627 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x78778a554000 <0.000023> 7575 16:53:22.452...
0.013746
2025-11-02T16:53:22+00:00
116
12,575
cat_multiple_run1
file_io
cat test.txt lines.txt
7591 16:53:22.478234 execve("/usr/bin/cat", ["cat", "test.txt", "lines.txt"], 0x7ffc05b74678 /* 40 vars */) = 0 <0.000372> 7591 16:53:22.478771 brk(NULL) = 0x57e779dd4000 <0.000018> 7591 16:53:22.478929 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7144d9d5e000 <0.000026> 7591 ...
0.016682
2025-11-02T16:53:22+00:00
125
13,329
cat_multiple_run2
file_io
cat test.txt lines.txt
7602 16:53:22.505934 execve("/usr/bin/cat", ["cat", "test.txt", "lines.txt"], 0x7ffe892387a8 /* 40 vars */) = 0 <0.000298> 7602 16:53:22.506399 brk(NULL) = 0x64703ddd3000 <0.000017> 7602 16:53:22.506561 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7c9a5e331000 <0.000025> 7602 ...
0.012697
2025-11-02T16:53:22+00:00
125
13,329
cat_multiple_run3
file_io
cat test.txt lines.txt
7613 16:53:22.530271 execve("/usr/bin/cat", ["cat", "test.txt", "lines.txt"], 0x7ffc14de4cd8 /* 40 vars */) = 0 <0.000306> 7613 16:53:22.530755 brk(NULL) = 0x5ca96dedd000 <0.000018> 7613 16:53:22.530918 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x71126eb5a000 <0.000025> 7613 ...
0.012615
2025-11-02T16:53:22+00:00
125
13,329
head_default_run1
file_io
head lines.txt
7625 16:53:22.556198 execve("/usr/bin/head", ["head", "lines.txt"], 0x7ffcc0d89520 /* 40 vars */) = 0 <0.000331> 7625 16:53:22.556682 brk(NULL) = 0x5d5df0647000 <0.000018> 7625 16:53:22.556852 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x79c028ccb000 <0.000026> 7625 16:53:22....
0.013804
2025-11-02T16:53:22+00:00
113
12,377
head_default_run2
file_io
head lines.txt
7636 16:53:22.580522 execve("/usr/bin/head", ["head", "lines.txt"], 0x7fffc16e80f0 /* 40 vars */) = 0 <0.000300> 7636 16:53:22.580982 brk(NULL) = 0x5793db74f000 <0.000018> 7636 16:53:22.581136 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b09e0864000 <0.000026> 7636 16:53:22....
0.015079
2025-11-02T16:53:22+00:00
113
12,377
head_default_run3
file_io
head lines.txt
7647 16:53:22.607712 execve("/usr/bin/head", ["head", "lines.txt"], 0x7fffd10e78a0 /* 40 vars */) = 0 <0.000327> 7647 16:53:22.608203 brk(NULL) = 0x645d5546c000 <0.000018> 7647 16:53:22.608420 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ec711150000 <0.000029> 7647 16:53:22....
0.01248
2025-11-02T16:53:22+00:00
113
12,377
head_n3_run1
file_io
head -n 3 lines.txt
7659 16:53:22.634023 execve("/usr/bin/head", ["head", "-n", "3", "lines.txt"], 0x7ffcf2a43eb0 /* 40 vars */) = 0 <0.000275> 7659 16:53:22.634482 brk(NULL) = 0x5b05ca133000 <0.000015> 7659 16:53:22.634623 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x78f2720d4000 <0.000020> 7659...
0.015798
2025-11-02T16:53:22+00:00
113
12,379
head_n3_run2
file_io
head -n 3 lines.txt
7670 16:53:22.662247 execve("/usr/bin/head", ["head", "-n", "3", "lines.txt"], 0x7ffd02ad67b0 /* 40 vars */) = 0 <0.000335> 7670 16:53:22.662770 brk(NULL) = 0x61d4dfbfe000 <0.000009> 7670 16:53:22.662920 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7c46f3765000 <0.000016> 7670...
0.014987
2025-11-02T16:53:22+00:00
113
12,379
head_n3_run3
file_io
head -n 3 lines.txt
7681 16:53:22.689753 execve("/usr/bin/head", ["head", "-n", "3", "lines.txt"], 0x7ffde1b8ef50 /* 40 vars */) = 0 <0.000304> 7681 16:53:22.690213 brk(NULL) = 0x603d75d06000 <0.000019> 7681 16:53:22.690385 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x797d79dfe000 <0.000047> 7681...
0.014752
2025-11-02T16:53:22+00:00
113
12,379
tail_default_run1
file_io
tail lines.txt
7693 16:53:22.716148 execve("/usr/bin/tail", ["tail", "lines.txt"], 0x7ffd430b70d0 /* 40 vars */) = 0 <0.000319> 7693 16:53:22.716614 brk(NULL) = 0x5bb356b14000 <0.000017> 7693 16:53:22.716779 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7c4596075000 <0.000028> 7693 16:53:22....
0.012109
2025-11-02T16:53:22+00:00
118
12,738
tail_default_run2
file_io
tail lines.txt
7704 16:53:22.738983 execve("/usr/bin/tail", ["tail", "lines.txt"], 0x7ffc0119d7e0 /* 40 vars */) = 0 <0.000301> 7704 16:53:22.739445 brk(NULL) = 0x5f2b4a494000 <0.000017> 7704 16:53:22.739600 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x73d681ecd000 <0.000026> 7704 16:53:22....
0.013181
2025-11-02T16:53:22+00:00
118
12,738
End of preview. Expand in Data Studio

Linux Strace Traces Dataset

A comprehensive collection of strace traces from common Linux utilities, designed for training AI models on system call patterns, program behavior analysis, and operating system interactions.

Dataset Description

This dataset contains 357 strace traces captured from 119 different Linux command-line utilities, with each utility executed 3 times to capture runtime variations. Each trace includes detailed system call information with timestamps, arguments, and execution times.

Dataset Statistics

  • Total traces: 357 (119 unique commands × 3 runs each)
  • Categories: 8
  • Format: Parquet (Hugging Face native)
  • Raw size: ~40 MB
  • Compressed size: ~5 MB (Parquet)
  • License: MIT

Runtime Diversity

Each command was executed 3 times to capture natural variations in program execution:

  • Different process IDs (PIDs)
  • Different memory addresses (ASLR randomization)
  • Different timestamps with microsecond precision
  • Slight variations in syscall timing

This diversity helps train more robust AI models that can generalize across different execution contexts.

Categories

  1. File I/O Operations (75 traces = 25 commands × 3 runs)

    • File reading: cat, head, tail, less
    • File manipulation: cp, mv, touch, rm
    • Directory operations: mkdir, rmdir, find
    • File information: stat, file, ls, du, df
  2. Text Processing (69 traces = 23 commands × 3 runs)

    • Pattern matching: grep (simple, case-insensitive, recursive, count)
    • Text transformation: sed, awk, tr
    • Sorting & filtering: sort, uniq, cut, paste
    • Analysis: wc, diff, cmp
  3. Process & System Info (51 traces = 17 commands × 3 runs)

    • Process listing: ps, top, pgrep
    • System information: uptime, who, whoami, id, uname, hostname
    • Environment: env, printenv
    • Time: date, cal
    • Resources: free, vmstat
  4. Networking (33 traces = 11 commands × 3 runs)

    • Network requests: ping, curl, wget
    • DNS queries: host, dig, nslookup
    • Network info: ip, ss, netstat
  5. Compression & Archives (36 traces = 12 commands × 3 runs)

    • Tar operations: create, extract, list (with/without gzip)
    • Compression: gzip, bzip2
    • Zip operations: zip, unzip
  6. Scripting & Execution (45 traces = 15 commands × 3 runs)

    • Shell execution: bash, sh
    • Python execution: scripts and inline commands
    • Utilities: sleep, echo, printf, yes, seq
    • Tests: true, false, test, expr
  7. Permissions & Ownership (18 traces = 6 commands × 3 runs)

    • Permission modification: chmod (numeric, symbolic, recursive)
    • Permission viewing: ls -l
    • Umask operations
  8. Data Operations (30 traces = 10 commands × 3 runs)

    • Random data: dd with /dev/urandom and /dev/zero
    • Encoding: base64 (encode/decode)
    • Hashing: md5sum, sha1sum, sha256sum
    • Binary analysis: hexdump, od, strings

Dataset Structure

Data Fields

  • id (string): Unique identifier for the trace (e.g., "cat_simple_run1")
  • category (string): Category of the utility (e.g., "file_io")
  • command (string): Full command executed (e.g., "cat test.txt")
  • strace (string): Complete strace output with system calls
  • duration (float): Execution time in seconds
  • timestamp (string): ISO 8601 timestamp of trace capture
  • num_lines (int): Number of lines in the strace output
  • size_bytes (int): Size of the strace output in bytes
  • run_number (int): Run iteration (1, 2, or 3)

Data Splits

This dataset contains a single split:

  • train: 357 examples (119 unique commands × 3 runs)

Example

from datasets import load_dataset

dataset = load_dataset("YOUR_USERNAME/strace-dataset")

# View first example
example = dataset['train'][0]
print(f"Command: {example['command']}")
print(f"Category: {example['category']}")
print(f"Duration: {example['duration']}s")
print(f"Strace output (first 500 chars):\n{example['strace'][:500]}")

Dataset Creation

Source Data

All traces were generated in a controlled, isolated environment using the strace utility with the following flags:

  • -f: Follow child processes
  • -s 256: Capture up to 256 bytes of string arguments
  • -tt: Absolute timestamps with microsecond precision
  • -T: Show time spent in each syscall

Data Collection Process

  1. Temporary workspace created with test files (text, binary, CSV, etc.)
  2. Each utility executed with typical arguments/use cases
  3. Strace captured all system calls during execution
  4. Test data cleaned up after collection
  5. No sensitive information or system-specific paths included

Safety & Privacy

  • ✅ No sensitive data (passwords, keys, tokens)
  • ✅ No user-specific information
  • ✅ No production system paths
  • ✅ All operations performed in temporary directories
  • ✅ Safe for open-source release

Use Cases

Training AI Models

  • System call prediction: Predict next system calls based on program behavior
  • Anomaly detection: Identify unusual syscall patterns
  • Program behavior modeling: Learn normal execution patterns
  • Security analysis: Detect potential malicious behavior

Analysis & Research

  • Understanding program execution flows
  • Comparing syscall patterns across utilities
  • Educational resource for OS concepts
  • Benchmark for trace analysis tools

Code Examples

Load and explore the dataset

from datasets import load_dataset
import pandas as pd

# Load dataset
ds = load_dataset("andrew000/straces")

# Convert to pandas for analysis
df = pd.DataFrame(ds['train'])

# Group by category
print(df.groupby('category').size())

# Find longest-running commands
print(df.nlargest(5, 'duration')[['command', 'duration']])

# Analyze strace patterns
for example in ds['train']:
    if 'openat' in example['strace']:
        print(f"{example['command']} opens files")

Extract specific syscalls

import re

def extract_syscalls(strace_output):
    """Extract syscall names from strace output."""
    pattern = r'\d+\s+[\d:.]+\s+(\w+)\('
    return list(set(re.findall(pattern, strace_output)))

# Find all syscalls used by cat
cat_example = [ex for ex in ds['train'] if ex['id'] == 'cat_simple'][0]
syscalls = extract_syscalls(cat_example['strace'])
print(f"cat uses these syscalls: {syscalls}")

Limitations

  • Traces captured on a specific Linux system (kernel version may affect syscalls)
  • Limited to common command-line utilities
  • No multi-threaded or complex concurrent workloads
  • Dataset size: 357 traces (medium-sized dataset)

Future Work

  • Add more utilities and use cases
  • Include long-running processes
  • Multi-threaded application traces
  • Different input sizes for scalability analysis
  • Traces from different Linux distributions/kernels

Citation

If you use this dataset in your research, please cite:

@dataset{strace_traces_2025,
  title={Linux Strace Traces Dataset},
  author={Andrew Fasano},
  year={2025},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/datasets/andrew000/straces}}
}

License

MIT License - See LICENSE file for details

Acknowledgments

Generated using the strace utility on Linux. All traces are from standard open-source utilities.

Downloads last month
7