inv2004 / ttop

System monitoring tool with historical data service, triggers and top-like TUI
MIT License
319 stars 4 forks source link

can't run ttop. cannot read from stream #34

Closed ITwrx closed 3 months ago

ITwrx commented 3 months ago

I can't run ttop static binary (or when i use nimble build).

I get:

cannot read from stream
streams.nim(426)         read

trying to build from source with nim c -r ttop.nim fails with:

/ttop-1.5.0/src/ttop/tui.nim(530, 13) Error: undeclared identifier: 'getKeyWithTimeout'

I guess due to the illwill situation.

I'm running f39

thanks

inv2004 commented 3 months ago

@ITwrx

Can you try to do the thing I mentioned here: https://github.com/inv2004/ttop/issues/31#issuecomment-2006302921

I suppose that you have old version in nimble pkgs

Please let me know if it helps

ITwrx commented 3 months ago
ttop$ rm -rf ~/.nimble/pkgs2/illwill-*
ttop$ nimble build
  Verifying dependencies for ttop@1.5.0
 Installing https://github.com/inv2004/illwill@any version
Downloading https://github.com/inv2004/illwill using git
   Warning: The package has no tagged releases, downloading HEAD instead.
  Verifying dependencies for illwill@0.4.0
 Installing illwill@0.4.0
  Success:  illwill installed successfully.
     Info:  Dependency on zippy@any version already satisfied
  Verifying dependencies for zippy@0.10.12
     Info:  Dependency on asciigraph@any version already satisfied
  Verifying dependencies for asciigraph@0.1.2
     Info:  Dependency on parsetoml@any version already satisfied
  Verifying dependencies for parsetoml@0.7.1
     Info:  Dependency on https://github.com/inv2004/jsony@#non_quoted_key already satisfied
  Verifying dependencies for jsony@1.1.5
   Building ttop/ttop using c backend

results in:

ttop$ ./ttop
cannot read from stream
ttop.nim(65) ttop
ttop.nim(30) main
tui.nim(574) tui
/src/ttop/blog.nim(106) hist
.choosenim/toolchains/nim-2.0.4/lib/pure/streams.nim(796) readUint32
.choosenim/toolchains/nim-2.0.4/lib/pure/streams.nim(426) read

thanks

inv2004 commented 3 months ago

@ITwrx I think I got it

Q1: did you run old version of ttop before? I was trying to save .blog files compatibility, but maybe lost it somewhere.

My suggestion, if it is ok to loose historical data, you can try to delete ~/.cache/ttop/*.blog , maybe /var/log/ttop/*.blog if it was installed from root

ITwrx commented 3 months ago

deleting the .blog files did the trick. thanks!