File size: 5,072 Bytes
8ce6f51
86992c6
217aa20
8ce6f51
 
 
 
 
 
 
 
 
 
a40db9a
86992c6
 
 
 
 
 
 
 
 
 
 
 
a40db9a
86992c6
 
 
 
 
fba156c
 
 
 
 
1dcc4e4
a40db9a
86992c6
 
fba156c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86992c6
 
 
a40db9a
 
86992c6
 
 
 
 
 
 
8408830
 
 
 
86992c6
a40db9a
86992c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a40db9a
6cca0b1
 
 
a40db9a
86992c6
6cca0b1
86992c6
a40db9a
6cca0b1
 
 
 
 
 
a40db9a
 
86992c6
 
 
 
 
 
 
 
 
 
 
1dcc4e4
fba156c
 
86992c6
 
a40db9a
86992c6
 
 
79f4512
86992c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
title: harpertoken/stat
library_name: pandas
tags:
- system-monitoring
- time-series
- anomaly-detection
- predictive-maintenance
- macOS
license: mit
language:
- en
---

# harpertoken/stat

## Summary

A single-session capture of live macOS system telemetry: 6,190 samples of CPU,
memory, disk, network, and battery readings taken at one-second intervals over
roughly 1 hour 44 minutes on 2025-03-02.

This is one machine, one continuous session, one workload. It is small enough to
load in a second and structured for time-series experiments, not a benchmark.

## Contents

| Field | Type | Range | Notes |
|---|---|---|---|
| `timestamp` | timestamp | 2025-03-02 10:24:07 → 12:07:52 | 1 s median interval, 2 s max |
| `cpu_usage` | list[8] of float | 0.0 → 100.0 | One value per logical core, 8 cores |
| `memory_used_mb` | float | 2762.0 → 3585.7 | Used RAM, not total |
| `disk_read_mb` | float | 4,141,332 → 4,306,966 | **Cumulative** counter, unit unverified |
| `disk_write_mb` | float | 1,462,612 → 1,611,402 | **Cumulative** counter, unit unverified |
| `net_sent_mb` | float | 5,563.3 → 6,063.3 | **Cumulative** counter, unit unverified |
| `net_recv_mb` | float | 2,379.4 → 2,937.2 | **Cumulative** counter, unit unverified |
| `battery_status` | float | 15.0 → 35.0 | Battery percentage; falls to 15 then recovers to 35 |
| `cpu_temp` | null | none | Always null; see below |

Three things are worth knowing before you use this.

**The disk and network columns are since-boot counters, not per-interval
activity.** They only ever increase, and they start well above zero because the
machine was already running when capture began. Across the session they advance
by 165,634 (`disk_read_mb`), 148,790 (`disk_write_mb`), 500 (`net_sent_mb`) and
558 (`net_recv_mb`).

Treat those advances as **raw counts, not confirmed volumes.** The `_mb` suffix is
unverifiable from the data alone: read as MB they imply ~95 GB/h of reads and
~85 GB/h of writes, which is high but possible; read as KB they imply ~95 MB/h,
which also fits. Only a byte reading (162 KB total) is inconsistent with this
machine's CPU profile. Confirm the unit with whatever produced the capture before
reporting throughput in any physical unit.

Feed the raw values to a model and the dominant signal is "how long has this host
been up," which correlates with the target and will inflate your results.
Difference them first:

```python
df["disk_read_delta"] = df["disk_read_mb"].diff()
```

**`cpu_temp` is empty.** All 6,190 rows are `N/A`; the temperature probe was not
available on this machine. The column is retained so the schema matches the
collector, but it carries no information and should be dropped rather than
imputed.

## Loading

`load_dataset("harpertoken/stat")` works and returns all 6,190 rows in a single
`train` split, with `cpu_usage` already decoded into a list of eight floats and
`cpu_temp` as `None`. The full CSV and a Parquet rebuilt from it are published
alongside it; read one explicitly when you want to control the parsing:

```python
import pandas as pd

df = pd.read_csv(
    "https://huggingface.co/datasets/harpertoken/stat/resolve/main/system_monitoring_dataset.csv"
)
df["timestamp"] = pd.to_datetime(df["timestamp"])
df["cpu_usage"] = df["cpu_usage"].apply(
    lambda v: [float(x) for x in v.strip("[]").split(",")]
)
df = df.drop(columns=["cpu_temp"])

# per-core CPU -> mean, and cumulative counters -> per-interval deltas
df["cpu_mean"] = df["cpu_usage"].apply(sum) / df["cpu_usage"].apply(len)
for col in ["disk_read_mb", "disk_write_mb", "net_sent_mb", "net_recv_mb"]:
    df[col.replace("_mb", "_delta")] = df[col].diff()
```

Prefer a parquet round-trip, which keeps the list column typed and skips the
string parsing above. `pyarrow.read_table` will not open an HTTPS URL, so fetch the
file first:

```python
from huggingface_hub import hf_hub_download
import pyarrow.parquet as pq

path = hf_hub_download(
    "harpertoken/stat", "system_monitoring_dataset.parquet", repo_type="dataset"
)
df = pq.read_table(path).to_pandas()

# cpu_usage arrives as an array of 8 floats, and timestamp is already datetime
```

## Intended uses

Short-horizon forecasting of memory and CPU on a single host, and unsupervised
anomaly detection where an alert is raised on a burst of load or memory growth.
Because the session is one hour on one machine, treat it as a demonstration of
the collection format rather than evidence of generalization; a model tuned on
this capture will need refitting on data from the deployment host.

## Out of scope

Multimachine or fleet monitoring, multi-day trends, thermal analysis
(`cpu_temp` is null), and battery-cycle modeling: the session spans a single
discharge from 33% to 15% followed by a recharge to 35%, which is one partial
charge cycle, not enough to model cycling behaviour.

## Provenance

Collected locally on a Mac via a system-metric sampler. No network payloads,
process names, or user data are present; the telemetry is host-level only.
Licensed MIT.

Contact: coccinella.labs@icloud.com