Sometimes I need to gather information about the client's server prior to making real work there, i.e. getting info on CPU type and activity. On Linux there is mpstat and /proc/cpuinfo, both of them don't seem to exist on Mac OS X server. Any alternatives ?
Getting CPU information from command line in Mac OS X [server]
central-processing-unitcommand-line-interfacemac-osx
Related Topic
- Linux – How to determine max CPU speed of a processor in Linux
- Linux – Find out symbolic link target via command line
- How to start/stop/restart launchd services from the command line
- Linux – High system cpu load (%sys), system locks
- Redirect URL using Mac OS X Server Lion
- Linux – find Intel Processor Number for the cpu in linux
Best Answer
Lots of people have already mentioned
system_profiler
, so I'll just list some other commands I'd recommend for "looking around" a Mac OS X system:My favorite command for seeing what's going on. Shows processes sorted by CPU usage, updated every 5 seconds (I find the default of 1 second to be too fast), as well as load average, physical & VM stats, etc. Replace
-u
with-orsize
to sort by resident memory size instead.VM stats -- see man sysctl for other options, or just try -a and look through the whole list.
Shows the OS version and build
Polls an Apple server for a list of relevant software updates.
-i -a
will download and install them. Note that it will not restart the computer for updates that require it; instead they will be marked with "[restart]" in the list, and you'll need to restart manually after installing them (but be wary of firing off updates that require a reboot when you don't have physical access to the computer -- If something goes wrong you could be in trouble).Command-line access to the general and network settings normally accessed by the System Preferences GUI app. Useful, but have the most amazingly (and painfully) verbose options I've ever seen. (I mean,
-getdisablekeyboardwhenenclosurelockisengaged
? Really?)Command-line control for the remote management service (Apple Remote Desktop), which doubles as a VNC server if you need GUI access. The trick is that to make it work with a generic VNC client, you have to enable "legacy"-style authentication, with something like:
(Or, if it's not already running, use -activate instead of -restart -agent)