I was installing a .iso 8,2 version in a vmware to learn unix., and i am stuck with iostat command, i run iostat 3
and is keep going to show me the results, but whem i put exit
or q
or q!
to exit, he not want to go out from iostat 3
.

- 829,060

- 35
1 Answers
As @vakufo said, have you tried sending it an appropriate signal? Some of the more useful ones can be issued from a terminal keyboard: Ctrl-C and Ctrl\ issue two of the more standard ones. The former is nicer than the latter.
Or you could use job control: Ctrl-Z, then type kill %%
.
Or you could switch to another virtual console and type kill PID
, where PID is the process ID of the iostat
process, which you can find with ps
. Or, if you know you only have one running, just say pkill iostat
. It's been a while since I last ran one of my BSDs, I can't remember if they have pkill
(it's there on Solaris and recent Linux distributions).
A Unix tutorial will cover all of these, by the way.
Is Your Terminal Paused?
Also, if things aren't responding, you may want to consider pressing Ctrl-Q. It could be that you inadvertently pressed Ctrl-S, which stops output to the terminal (as per XON/XOFF, aka software flow control — this works on a virtual terminal too, as well as on most X11 terminal emulators, not just serial ports). You may have already quit the program, but with terminal output paused you'd never know. On the Linux console (the white-on-black text-only thing you boot into before X), the keyboard Scroll Lock light illuminates when this mode is active. Can't remember what the BSDs do, if anything.
Feel free to read more information about this feature here. It's a common thing among beginners to freeze a TTY. I still do it by mistake, so I've developed a reflex to unpause the terminal if characters aren't echoing.
-
great answer Alexios, many thanks .. and trust me i have open +10 tabs in browser to find this solution and nothing! is working with the first command Ctrl+C – pstnc Mar 09 '12 at 12:12
-
No problem! You should get familiar with the Unix terminal emulators early, by the way. It has many traps (and many nice features). And in the unlikely case you ever encounter real hardware terminals, you'll know how to use them. :) – Alexios Mar 09 '12 at 12:16
-
iostat
seems to ignore Ctrl-C in some terminals & environments. I noticed that this is reproducible on CoreOS using this docker image:chriswayg/toolbox
with thetoolbox
command. However, if you installtmux
and use it (apk update && apk add tmux && tmux
, then runiostat -xk 5
), Ctrl-C does work! In the default CoreOStoolbox
shell environment, something is catching Ctrl-C first or blockingiostat
from getting it! – TrinitronX Nov 10 '17 at 21:56
kill
. Don't be afraid from the word 'kill', it has got options which don't stop (or even kill) the application. (sorry if it is chaotic, my English could be better) – vakufo Mar 09 '12 at 12:21