Comments (18)
Yep that works with tmux
+ my .zshrc
for saving command outputs, but doesn't seem to catch the finish of the sessions (that won't matter to me much, but may be something for you to look into).
Thanks for the help!
from nhi.
@crides
Can you show me the content of /tmp/nhi.log
file (this file is created if error occurs, if it doesn't exist that's okay. You need root access to access that file).
and can you run this command and send me the output:
getent group tty
And check if source /etc/nhi/nhi.bash
is added to the end of .bashrc
or source /etc/nhi/nhi.zsh
to the end of .zshrc
, accordingly to your shell of choice
from nhi.
Contents of /tmp/nhi.log
:
2021-11-13 22:28:52 | process_vm_readv failed at get_shell_environ
2021-11-13 22:28:52 | no such table: 0
2021-11-13 22:28:53 | process_vm_readv failed at get_shell_environ
2021-11-13 22:28:53 | no such table: 0
2021-11-13 22:28:57 | process_vm_readv failed at get_shell_environ
2021-11-13 22:28:57 | no such table: 0
2021-11-13 22:29:02 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:02 | no such table: 0
2021-11-13 22:29:05 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:05 | no such table: 0
2021-11-13 22:29:08 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:08 | no such table: 0
2021-11-13 22:29:12 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:12 | no such table: 0
2021-11-13 22:29:16 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:16 | no such table: 0
2021-11-13 22:54:52 | process_vm_readv failed at get_shell_environ
2021-11-13 22:54:52 | no such table: 0
2021-11-13 22:55:00 | process_vm_readv failed at get_shell_environ
2021-11-13 22:55:00 | no such table: 0
2021-11-13 22:55:02 | process_vm_readv failed at get_shell_environ
2021-11-13 22:55:02 | no such table: 0
2021-11-13 22:56:31 | process_vm_readv failed at get_shell_environ
2021-11-13 22:56:31 | no such table: 0
2021-11-13 22:58:12 | process_vm_readv failed at get_shell_environ
2021-11-13 22:58:12 | no such table: 0
2021-11-13 22:58:13 | process_vm_readv failed at get_shell_environ
2021-11-13 22:58:13 | no such table: 0
2021-11-13 22:59:56 | process_vm_readv failed at get_shell_environ
2021-11-13 22:59:56 | no such table: 0
2021-11-13 23:00:38 | process_vm_readv failed at get_shell_environ
2021-11-13 23:00:38 | no such table: 0
$getent group tty
tty:x:5:brltty
And yes, I do have source /etc/nhi/nhi.zsh
in .zshrc
from nhi.
Can you execute one last command: objdump -T $(which zsh) | awk -v sym=environ ' $NF == sym && $4 == ".bss" { print $1; exit }'
and also post here the output
from nhi.
Output is: 00000000000d4da0
from nhi.
I think that I need to replicate this bug myself, what distro are you using?
from nhi.
Arch. And just in case terminal matters for some reason, it's Alacritty
Thanks for the fast responses by the way.
from nhi.
I will install Alacritty on my arch device and will let you know how it went.
Also, can you temporarly comment out everything besides source /etc/nhi/nhi.zsh
from you .zshrc
and restart your terminal and see if nhi works?
from nhi.
Hmm it does, but only outside of tmux
.
And I might bisect the .zshrc
later, but it's here if you want to see it. I do have some local changes not yet commited but those are just aliases and functions.
from nhi.
So without tmux everything works fine? Keep in mind that some shell builtins are not being traced yet, however everything else is traced.
from nhi.
Without tmux
and without my .zshrc
that is. And I'm testing using the finish time in nhi log
from nhi.
But does without tmux and with your zshrc everything works?
from nhi.
No
from nhi.
@crides
Okay I found why nhi wasn't working with your .zshrc
and how to fix that. For now I found only "dirty fix", but it works. I will try to fix and patch repository in a few days. (You will need to replace current nhid
binary (and maybe nhi.bpf.o
file) with new/future one)
(I did not test it on tmux though)
from nhi.
Thanks! I'll checkout the commit later (after it happens)
from nhi.
@crides I will let you know when it will be done, in this issue, and create a new release with the patch
from nhi.
@crides
Should be fixed 👍 in your case download nhid
only (from v0.2.2 release) and replace it in the place of old nhid
in /usr/bin
and give 755
permission to the new nhid
and restart your computer.
from nhi.
tmux
may break some stuff, but if it works that's good. For now I make sure that nhi
supports bash
and zsh
(without multiplexers and stuff like that).
from nhi.
Related Issues (20)
- [BPF] Improve safety of potentially concurrent calls HOT 1
- Add full support for rxvt based terminals
- Add full support to all builtins
- Create basic config file
- Save owner of shell and commands executed
- Keep record of CPU and memory activity of a process
- [bpf] Move as much functions as possible to tracepoints from fentry
- Add support for different init systems
- bash + gnome terminal disturb saving of complex apt outputs
- Make nhi available via package manager HOT 8
- `nhid` segfaults on 0.2.2 while using tmux HOT 1
- Support fish shell HOT 1
- nhi does not work on Archlinux HOT 14
- Is there any way to make this work on Ubuntu 20.04? HOT 3
- Output of commands not saved when vim is ran HOT 4
- libbpf: elf: legacy map definitions in 'maps' section are not supported by libbpf v1.0+ HOT 1
- no such shell session: 0 HOT 2
- Debian 11 problem HOT 40
- Update bash package in default-bash-and-zsh ppa with /etc/bash.bashrc support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nhi.