Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > quick terminal command question

quick terminal command question
Thread Tools
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 27, 2003, 03:17 PM
 
what is the command to show virtual memory usage in the terminal? the one where it shows pageins/pageouts after an interval of say 't' secs.
thanks
     
Addicted to MacNN
Join Date: Aug 2000
Location: Retired
Status: Offline
Reply With Quote
Apr 27, 2003, 03:19 PM
 
Originally posted by 7Macfreak:
what is the command to show virtual memory usage in the terminal? the one where it shows pageins/pageouts after an interval of say 't' secs.
thanks
I believe its the top command
Power Macintosh Dual G4
SGI Indigo2 6.5.21f
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 27, 2003, 03:29 PM
 
Originally posted by MacGorilla:
I believe its the top command
no no, its vm_ something
i think
     
Senior User
Join Date: Dec 2001
Status: Offline
Reply With Quote
Apr 27, 2003, 03:35 PM
 
Originally posted by 7Macfreak:
no no, its vm_ something
i think
Try typing that in the terminal and hitting the tab key.
"Think Different. Like The Rest Of Us."

iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
     
Mac Enthusiast
Join Date: Sep 2000
Status: Offline
Reply With Quote
Apr 27, 2003, 03:35 PM
 
vm_stats
Even Einstein feared the power of "spooky action at a distance"
     
Forum Regular
Join Date: Oct 2002
Location: Atlanta
Status: Offline
Reply With Quote
Apr 27, 2003, 03:47 PM
 
It's just vm_stat actually, without that extra S at the end

But as macmike42 suggested - the Tab key is great if you just remember the first couple of characters in a command. Type those first characters and press Tab twice and it will show you commands available that begin with those characters. I use it all the time, but mainly because I'm too lazy to type the whole command through For example, typing "vm_" and pressing Tab twice will complete the vm_stat command for you. Very nice!
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 27, 2003, 04:17 PM
 
vm_stats, that's it, thanks guys

btw, hitting the tab key hint is not consistent. i tried it by typing "to" or just "t" and it SHOULD show top right? but it doesnt.

ah.. just tried it again with 'upt' and it shows uptime
so i guess it requires a minimum of three characters.

oh, another question.. how can i make the terminal save commands that i type in so i can bring them back by hitting the up arrow. basically saving 'history of commands'. this was on by default in 10.1
     
Forum Regular
Join Date: Aug 2000
Location: UK
Status: Offline
Reply With Quote
Apr 27, 2003, 04:28 PM
 
Originally posted by 7Macfreak:
ah.. just tried it again with 'upt' and it shows uptime
so i guess it requires a minimum of three characters.
No, it's becuase there is more than one result that starts with 'up' - there's update_prebinding, update-passwd etc. You have to press tab twice to see the full list.
     
Forum Regular
Join Date: Oct 2002
Location: Atlanta
Status: Offline
Reply With Quote
Apr 27, 2003, 04:38 PM
 
oh, another question.. how can i make the terminal save commands that i type in so i can bring them back by hitting the up arrow. basically saving 'history of commands'. this was on by default in 10.1
Yes, it's actually quite simple. Check out the README in /usr/share/tcsh/examples. Basically, if you don't have a .tcshrc-file in your home directory, do this:

Code:
echo "source /usr/share/tcsh/examples/rc" > ~/.tcshrc
That will get your command-history working.
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 27, 2003, 04:45 PM
 
thanks again!
and i seem to come up with another question each time one is answered..
whats the command to show the darwin version/info on the kernel?
     
Forum Regular
Join Date: Oct 2002
Location: Atlanta
Status: Offline
Reply With Quote
Apr 27, 2003, 04:50 PM
 
Originally posted by 7Macfreak:
thanks again!
and i seem to come up with another question each time one is answered..
whats the command to show the darwin version/info on the kernel?
Try this:

Code:
uname -a
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 27, 2003, 04:54 PM
 
THANKS!
and now i'll stop
     
Forum Regular
Join Date: Oct 2002
Location: Atlanta
Status: Offline
Reply With Quote
Apr 27, 2003, 05:19 PM
 
Originally posted by 7Macfreak:
THANKS!
and now i'll stop
Cheers! I know how frustating it can be when you know about a command but just can figure out what it is. One thing to do in a situation like that is to use the command apropos or whatis to search for keywords in man-pages.
     
Senior User
Join Date: Feb 2003
Location: Atlanta
Status: Offline
Reply With Quote
Apr 27, 2003, 05:22 PM
 
Originally posted by 7Macfreak:
no no, its vm_ something
i think
Top shows the vm stats also. That's what I've always used.
     
Forum Regular
Join Date: Oct 2002
Location: Atlanta
Status: Offline
Reply With Quote
Apr 27, 2003, 05:33 PM
 
Originally posted by coolmacdude:
Top shows the vm stats also. That's what I've always used.
Yes, but vm_stat shows more detailed information about your virtual memory. Running

Code:
vm_stat 1
will for example give you updated information every second. Top works as well, but will not give you as extensive information as vm_stat.

Gosh, am I talking in circles? Maybe I need some sleep

     
Forum Regular
Join Date: Jan 2002
Location: Manitoba
Status: Offline
Reply With Quote
Apr 27, 2003, 05:59 PM
 
why ot save yourself some time and just alias commands that you will use frequently? i believe that is in the documentation too but essentally you would take a command suh as this:


cdrecord -v speed=16 dev=IODVDServices driveropts=burnfree -data /tmp/bacon.iso

and alias it to somethiung simple like 'burnd' with a line like this in your .tcshrc:

alias burnd="cdrecord -v......."


it is a simple way of not having to remember specific command and their options or for those lazy people like me that get tired of writing out huge command in the terminal. essentially you can almost hotkey all of your commands if you like (ie. vm_stat becomes vm).
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 27, 2003, 06:06 PM
 
Originally posted by leffo:
Cheers! I know how frustating it can be when you know about a command but just can figure out what it is. One thing to do in a situation like that is to use the command apropos or whatis to search for keywords in man-pages.
the thing is, i had a file with all these commands explained but i lost the file either while installing 10.2 or switching over to my new PB
thanks for the tip tho.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:50 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2