Commit Graph

107 Commits

Author SHA1 Message Date
f4b6faffaa Add helpful post-install message to guide users on enabling socktop-agent service 2025-11-21 00:41:41 -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
c80f8cc363 fix unit test, move to macro cargo_bin! 2025-11-21 00:26:34 -08:00
350611b3b1 Add Debian packaging support with cargo-deb
- Add cargo-deb metadata to socktop and socktop_agent Cargo.toml
- Create systemd service file for socktop_agent
- Add postinst/postrm maintainer scripts for user/group management
- Create GitHub Actions workflow to build .deb packages for AMD64 and ARM64
- Add comprehensive documentation in docs/DEBIAN_PACKAGING.md
- Packages will be available as artifacts on every push
- Automatic GitHub releases for version tags
2025-11-20 23:39:26 -08:00
518ae8c2bf update axum server version
Some checks failed
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
2025-11-17 15:09:53 -08:00
9d302ad475 patch header for small monitors and increase cargo version in advance of publish. 2025-11-17 11:52:22 -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
Some checks failed
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
b4ed036357 bump version
Some checks failed
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
2025-09-10 13:05:50 -07:00
08f248c696 Housekeeping and QOL
non functional update:

- refactor stream of consciousness into separate files.
- combine equivelent functions used in networking and wasm features.
- cleanups and version bumps.
2025-09-10 10:39:21 -07:00
06cd6d0c82 Reference: Usage as a lib #8
- Implement protocol versioning
- migrate to thisError
- general error handling improvements in socktop_connector lib
- improve documentation
- increment  version
2025-09-07 18:55:23 -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
0c5a1d7553 update readme 2025-08-30 01:59: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
f13ea45360 increment version 2025-08-26 10:57:01 -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
322981ada7 cargo fmt and version bump 2025-08-26 00:20:52 -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
b6e656738b chore(release): bump to 1.40.0
Some checks failed
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
2025-08-24 18:56:40 -07:00