 |
 |
10.3 Terminal behaves differently. How do I fix that?
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status:
Offline
|
|
I used the Terminal to run top once and a while. In 10.2, I would hit "q" to stop top. Then I would identify the PID of a stuck process and kill it.
In 10.3, when I hit "q" during top, the list of processes disappears (the screen clears). So I have to quickly memorize the PID of the process I want to kill.
Is there a way to make the 10.3 Terminal behave like it did in 10.2? I just want the top list to remain on screen after I quit top.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Dec 2002
Location: Miami, FL
Status:
Offline
|
|
try using 'ps -ax' or 'ps -ax | grep <username>'
instead of top ?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status:
Offline
|
|
Originally posted by zewm:
try using 'ps -ax' or 'ps -ax | grep <username>'
instead of top ?
I use that too, but it doesn't show me the CPU consumption of the processes. I wonder why quitting top clears the terminal window in 10.3, but using 'ps -ax' doesn't.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status:
Offline
|
|
ps -auxc will give you all processes running and the command name instead of the full path and name, sorted by processor usage.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2003
Status:
Offline
|
|
Originally posted by Spliff:
I use that too, but it doesn't show me the CPU consumption of the processes. I wonder why quitting top clears the terminal window in 10.3, but using 'ps -ax' doesn't.
I don't think I've looked at top under OS X, but with Linux distros like Redhat, the screen is cleared as well.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2000
Location: Augusta, GA
Status:
Offline
|
|
Have you had a look at the new Activity Monitor? It isn't as "Geek Chic" as using Terminal, but it's pretty easy to see what is doing what.
To kill a process, just double click on it and choose quit.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2002
Location: Atlanta
Status:
Offline
|
|
I may be wrong, bit I think Panther is moving from the tcsh to the bash shell as the default.
|
|
MacBook Pro C2D 2.16GHz 2GB 120GB OSX 10.4.9, Boot Camp 1.2, Vista Home Premium
mac mini 1.42, 60GB 7200rpm, 1GB (sold), dual 2GHz/G5 (sold), Powerbook 15" 1GHz (sold)
dual G4 800MHz (sold), dual G4 450MHz (sold), G4 450MHz (sold), Powerbook Pismo G3 500MHz (sold)
PowerMac 9500 132MHz 601, dual 180MHz 604e, Newer G3 400MHz (in closet)
Powermac 7100 80MHz (sold), Powermac 7100 66MHz (sold)
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Sep 2003
Status:
Offline
|
|
Originally posted by sodamnregistered2:
I may be wrong, bit I think Panther is moving from the tcsh to the bash shell as the default.
This is correct.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2002
Location: Portland, OR
Status:
Offline
|
|
Originally posted by Spliff:
I used the Terminal to run top once and a while. In 10.2, I would hit "q" to stop top. Then I would identify the PID of a stuck process and kill it.
In 10.3, when I hit "q" during top, the list of processes disappears (the screen clears). So I have to quickly memorize the PID of the process I want to kill.
Is there a way to make the 10.3 Terminal behave like it did in 10.2? I just want the top list to remain on screen after I quit top.
This is a feature of top. Top will check the TERM environment variable to determine the capabilities of your terminal. In Panther, Apple has changed the default TERM variable to be xterm-color which a lot more applications are going to recognize than "Apple_Terminal" which is what they used before. Since before it didn't recognize the terminal type it just treated it as a vt100 and didn't clear the screen on quit. Vim does the exact same thing and so does the less command as well as lots of other gnu-ish software, so I suspect the feature lies within the ncurses screen-handling library, actually.
If you want you can just change your terminal type to something basic like vt100 :
export TERM="vt100"
and you will get the old behavior back. If you want the setting to stick, then you can change it in the terminal preferences. I recommend just living with it, though as you will get better results with other unix software with the term set to xterm-color.
This kind of thing has nothing to do with what shell you are running. Panther does use more modern versions of all the *nix utilities though, so it will feel a bit more like Linux/bash. If you leave your TERM set to xterm-color you can even do color directory listings:
ls -G
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2003
Location: Austin, TX
Status:
Offline
|
|
Go to Preferences in Terminal.app (command-,)
Select a different terminal type (instead of x-term color) such as vt100.
That's it.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status:
Offline
|
|
And after ^^^ open a new shell before it will work.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2001
Location: /(bb|[^b]{2})/
Status:
Offline
|
|
Originally posted by Spliff:
I used the Terminal to run top once and a while. In 10.2, I would hit "q" to stop top. Then I would identify the PID of a stuck process and kill it.
In 10.3, when I hit "q" during top, the list of processes disappears (the screen clears). So I have to quickly memorize the PID of the process I want to kill.
Is there a way to make the 10.3 Terminal behave like it did in 10.2? I just want the top list to remain on screen after I quit top.
You know, you could just hit "k" while in top...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status:
Offline
|
|
Originally posted by arhra:
You know, you could just hit "k" while in top...
Which does what? In xterm-color, the default now for terminal, it does nothing. Changing the prefs back to vt100 emulation make it act like it did in 10.2
Using "k" as you describe does nothing in xterm-color mode, or vt100 except make Terminal start sucking lots of cpu% for me.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2001
Location: /(bb|[^b]{2})/
Status:
Offline
|
|
It /should/ prompt you to enter a PID to kill, unless Apple's version of top doesn't do that... i can't check on an osx machine right now, but it certainly works in the version of top on the debian box i'm using atm... hitting "h" should give you a list of available commands.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status:
Offline
|
|
"ps -auxcr" is what you're looking for. It will not only give you a nice clean list of names without long paths but will also sort them according to cpu usage, the one with the most cpu usage at the top.
Since Panther uses bash by default, have you thought about looking at the bash man pages for some info about how bash handles running processes exiting?
|
|
weird wabbit
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 1999
Location: Zurich, Switzerland
Status:
Offline
|
|
Uhhh, how about just opening a second terminal window?!?
tooki
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|