|
Download README.md from harpertoken/stat: direct link, hf CLI and curl.
- Browser
- Download file 5.07 kB
-
https://huggingface.co/datasets/harpertoken/stat/resolve/main/README.md
- Command line
-
hf download hf://datasets/harpertoken/stat/README.md
-
curl -L -o README.md https://huggingface.co/datasets/harpertoken/stat/resolve/main/README.md
5.07 kB
| 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 |