f9462a1633
Make GPU support optional to enable RISC-V builds without libdrm
...
- Add 'gpu' feature flag (enabled by default)
- Make gfxinfo dependency optional
- Provide no-op GPU metrics when gpu feature disabled
- Disable GPU support for RISC-V builds in CI (libdrm unavailable)
- All other architectures (amd64, arm64, armhf) still get GPU support
2025-11-21 00:58:44 -08:00
4b9d11dc9e
hotfix for issue with socktop agent not creating ssl certificate on first launch after upgrade of axum server version.
2025-11-21 00:26:34 -08:00
5ddaed298b
Optimize socktop_agent for reduced binary size and memory footprint ( #22 )
...
This commit implements several optimizations to make socktop_agent
significantly more lightweight without sacrificing functionality.
Changes:
1. Reduced Tokio Runtime Thread Pool (main.rs)
- Changed from default (num_cpus) to 2 worker threads
- Configurable via SOCKTOP_WORKER_THREADS environment variable
- Rationale: Agent is I/O-bound, not CPU-intensive
- Memory savings: ~6-12 MB on typical 8-core systems
2. Minimal Tokio Features (Cargo.toml)
- Changed from features = ["full"] to minimal set:
["rt-multi-thread", "net", "sync", "macros"]
- Removed unused features: io, fs, process, signal, time
- Binary size reduction: ~200-300 KB
- Faster compile times
3. Optional Tracing (Cargo.toml, main.rs, metrics.rs)
- Made tracing dependencies optional with "logging" feature flag
- Disabled by default for production builds
- Binary size reduction: 1.5 MB (27%!)
- Enable with: cargo build --features logging
4. Cleanup (Cargo.toml)
- Removed unused tokio-process dependency
Results:
- Binary size: 5.6 MB → 4.0 MB (28% reduction)
- Memory usage: 25-40 MB → 15-25 MB (30-40% reduction)
- Worker threads: 8+ → 2 (75% reduction on 8-core systems)
Testing:
- All tests pass with and without logging feature
- No clippy warnings
- Functionality unchanged
- Production-ready
Breaking Changes:
- None (all changes are backward compatible)
- Default behavior is now more lightweight
- Logging can be re-enabled with --features logging
To build with logging for debugging:
cargo build --package socktop_agent --release --features logging
2025-11-17 09:51:41 -08:00
4196066e57
fix: NVMe temperature detection - contains() check and /dev/ prefix
2025-10-06 11:40:49 -07:00
47e96c7d92
fix: refresh component values to collect NVMe temperatures
2025-10-06 11:15:36 -07:00
bae2ecb79a
fix: lookup temperature for parent disk, not partition
2025-10-06 11:06:30 -07:00
bd0d15a1ae
fix: correct disk size aggregation and nvme temperature detection
2025-10-06 10:52:44 -07:00
689498c5f4
fix: show parent disks with aggregated partition stats
2025-10-06 10:46:51 -07:00
34e260a612
feat: disk section enhancements - temperature, partition indentation, duplicate filtering
2025-10-06 10:30:55 -07:00
47eff3a75c
remove unused import. / clippy cleanup
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
2025-10-06 10:01:40 -07:00
0210b49219
cargo fmt
2025-10-06 09:52:36 -07:00
70a150152c
fix for windows build error
2025-10-06 09:51:11 -07:00
f4b54db399
fix for windows build error.
2025-10-06 09:50:38 -07:00
e857cfc665
add processes window cleanup
...
- refactor code
- add unit test
- fix warnings.
2025-10-05 00:07:27 -07:00
e66008f341
initial check for process summary screen
...
This check in offers alpha support for per process metrics, you can view threads, process CPU usage over time, IO, memory, CPU time, parent process, command, uptime and journal entries. This is unfinished but all major functionality is available and I wanted to make it available to feedback and testing.
2025-10-02 16:54:27 -07:00
eed04f1d5c
Fix remaining clippy warnings in socktop_agent
2025-09-04 06:04:57 -07:00
e51054811c
Refactor for additional socktop connector library
...
- socktop connector allows you to communicate with socktop agent directly from you code without needing to implement the agent API directly.
- will also be used for non tui implementation of "socktop collector" in the future.
- moved to rust 2024 to take advantage of some new features that helped with refactor.
- fixed everything that exploded with update.
- added rust docs for lib.
2025-09-04 05:30:25 -07:00
df2308e6e9
code optimizations to reduce cpu usage of agent on all platforms and additional unit test.
2025-08-28 16:03:05 -07:00
7592709a43
clamp then divide by cores for more accurate statistics
2025-08-28 13:11:48 -07:00
61fe1cc38e
socktop_agent: bump version to 1.40.65
2025-08-28 12:27:48 -07:00
ab3bb33711
socktop_agent: bump version to 1.40.64
2025-08-28 12:03:45 -07:00
7caf2f4bfb
remove ununused var
2025-08-27 17:15:35 -07:00
b249c7ba99
Update metrics.rs
2025-08-27 16:55:12 -07:00
f0858525e8
fix for macos defect where processes less than .01% were being filtered
2025-08-27 16:55:09 -07:00
2fe005ed90
ProcessesToUpdate::All enum
2025-08-27 16:20:55 -07:00
ca6a5cbdfa
use ProcessesToUpdate::All ENUM
2025-08-27 16:20:41 -07:00
56301d61fd
fixes for non linux compilation issues.
2025-08-27 16:11:17 -07:00
55e5c708fe
MACOS / NON LINUX metrics optimizations.
2025-08-27 16:00:29 -07:00
2d17cf1598
additional optimizations for macos
2025-08-27 15:05:38 -07:00
353c08c35e
increment version and macos performance
2025-08-26 12:14:32 -07:00
8ce00a5dad
non linux optimizations for macbook
2025-08-26 10:14:14 -07:00
f37b8d9ff4
chore(agent): fix clippy unused mut on non-linux process list
2025-08-26 00:22:29 -07:00
3394beab67
chore: make pre-commit resilient when cargo absent
2025-08-26 00:18:10 -07:00
c9ebea92f5
perf(agent,non-linux): enable CPU core normalization by default; tighter scaling threshold
2025-08-25 23:50:26 -07:00
e2dc5e8ac9
perf(agent,non-linux): add per-process CPU scaling heuristic to reduce overreporting
2025-08-25 23:47:31 -07:00
beddba0072
perf(agent,non-linux): reduce process collection overhead; configurable CPU sample delay
2025-08-25 23:44:28 -07:00
cacc4cba9f
cargo fmt
2025-08-25 23:24:50 -07:00
66270c16b7
perf(agent): windows/mac cpu collection tweak; add optional normalization; silence linux dead_code
2025-08-25 22:59:07 -07:00
f62b5274d2
optimize non linux metrics collection
2025-08-25 22:35:01 -07:00
ce59dd9dfe
chore(agent): fix clippy needless_return for non-linux process collection
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
2025-08-24 12:52:56 -07:00
51e702368e
cargo fmt
2025-08-24 12:40:35 -07:00
85f9a44e46
perf(agent): add hostname + TTL caches (metrics/disks/processes) and reuse sys for processes
2025-08-24 12:38:32 -07:00
b2468a5936
refactor(agent): remove unused background sampler infrastructure (request-driven only)
2025-08-24 12:29:23 -07:00
8de5943f34
test(agent): move inline port parsing test to tests/port_parse.rs
2025-08-24 12:15:32 -07:00
d0455611d5
cargo fmt
2025-08-22 14:09:02 -07:00
dc9aa4c026
agent: support extra SANs via SOCKTOP_AGENT_EXTRA_SANS env var
2025-08-22 13:47:51 -07:00
25229d6b03
cargo fmt
2025-08-22 12:49:12 -07:00
30d263c71e
agent: dynamic self-signed cert validity (~397d from now) to avoid immediate expiry
2025-08-22 12:43:48 -07:00
5b8ec7efc1
agent: add --version / -V flag
2025-08-22 11:52:51 -07:00
faf2861b29
cargo fmt
2025-08-22 10:53:47 -07:00