You are not logged in.
Pages: 1
Hello! I have one annoying problem on my arch installation: whenever I use terminal and scroll previously typed commands (with UP key) it starts to lag after 3-5 commands. Damn thing just stucks, I start hitting UP key furiously and after some seconds it goes again. I am not heavy terminal user (or experienced), but need it sometimes. Emulator is termite, wm is i3, but it happens to me in urxvt and openbox too. Didn't done any kind of bash configuration. Please help me.
Last edited by mooncactus (2017-08-03 09:57:16)
Offline
Paste your .bashrc
Offline
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ 'Offline
Well, it isn't that...
Does it happen in other terms (xterm, for instance)?
Offline
Yes, just tried xterm, stuck on third command ![]()
Offline
Does it happen in the TTY, or just X? You are going to have to narrow it down, to identify under what specific conditions it is reproducible, otherwise this will be a long thread with mostly guesses...
Offline
Could you please post the output of `echo $HISTSIZE`?
Also, does the problem persist if
a) you don't start X? (i.e. try to access the history in a TTY.)
b) you run `mv .bash_history .bash_history_tmp`? (This will make sure that bash starts a fresh history file. To revert, run `rm .bash_history` and `mv .bash_history_tmp .bash_history`.)
Offline
Well, same thing with TTY. I think it wasn't stuck so quick just after installation but happend always if I scroll far enough, and gets worse with time. Right now it sometimes stucks on second command! Reproducible always on arch, never saw it on other distros. Don't know what more to say, this strange problem hunts me down on arch. ![]()
Offline
Just for a check, can you run top or perhaps htop and see if any process are running high (long shot, i know)
I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.
I use it to look at funny pictures of cats and to argue with strangers.
Offline
Could you please post the output of `echo $HISTSIZE`?
Also, does the problem persist if you run `mv .bash_history .bash_history_tmp`? (This will make sure that bash starts a fresh history file. To revert, run `rm .bash_history` and `mv .bash_history_tmp .bash_history`.)
Could you please answer those?
Offline
`echo $HISTSIZE` gives me 500. Tried to delete history file, entered something like 10 commands and experienced no lag scrolling them! So it seems problem in full history, but why it lags when full? And tried to boot without display manager in TTY, same lags...
Last edited by mooncactus (2017-08-03 09:20:06)
Offline
System installed on SSD, with no problems in other applications.
Offline
`echo $HISTSIZE` gives me 500.
That looks fine.
Tried to delete history file, entered something like 10 commands and experienced no lag scrolling them! So it seems problem in full history, but why it lags when full?
So it does appear to be an issue regarding the size of your history file.
One explanation might be an issue involving the size of your history file.
Unfortunately I am not familiar with how bash reads entries from .bash_history but why don't you try setting HISTFILESIZE to some reasonable value for now?
HISTFILESIZE - The maximum number of lines contained in the history file. When this variable is assigned a value, the history file is truncated, if necessary, to contain no more than that number of lines by removing the oldest entries. The history file is also truncated to this size after writing it when a shell exits. If the value is 0, the history file is truncated to zero size. Non-numeric values and numeric values less than zero inhibit truncation. The shell sets the default value to the value of HISTSIZE after reading any startup files.
Last edited by robg (2017-08-03 09:28:06)
Offline
Will try that and report results after some use.
Offline
A badly configured hosts file or nsswitch can cause trouble but I've never seen it cause trouble in a terminal or tty. How did you install arch?
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Well, I can consider myself absolutely stupid!
The thing is, I wrote some python code and run in terminal, and didn't even realize how much times I repeated same commands! The history file was full of them! So when I scroll, I saw the same command and thought it was stuck
I am terribly sorry for taking your time to think on this thread! Suppose all this situation deserves a good laugh.
Offline
Glad it was nothing serious.
You may want to look into the HISTCONTROL setting, particularly the "ignoredups" value. 'man bash' for details.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Thank you! Already done that, "ignoredumps" was exactly for my case ![]()
Offline
...didn't even realize how much times I repeated same commands! The history file was full of them!.
I'm late to the party, but my life changed a long time ago when someone pointed out how you can use Ctrl-R in a Bash term, or "history-search-backward" more specifically, if you've changed modes or key bindings. Try it and you'll rarely need to scroll with the arrow keys again.
Offline
Thanks for the tip! Great feature!
Offline
Pages: 1