DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS

OSXFAQ Mac OS X UNIX Tip-of-the-Day   back to index

Week 103 - Unix Commands Reference III (4 April 2005)

by Adrian Mayo - Editor, OSXFAQ

Tuesday - Commands for System and Kernel Stats

These commands display information on system, memory, and file usage

sc_usage ... display live system call stats
For example, 'sudo sc_usage TextEdit'

fs_usage ... display live file system usage
For example, 'sudo fs_usage TextEdit' then use text edit and open/save files.

lsof ... list open files
For example 'lsof' or 'lsof /dev/console'

fstat ... display file status
For example 'fstat' or 'fstat ~' or 'fsstat ~/letter.doc'

vm_stat ... display virtual memory statistics
Watch out for page-outs increasing by 100's per second: you need to buy more memory or run fewer processes.

(See tips week 88)

latency ... display context switches &interrupts
This must be run as root

dmesg ... display system message buffer
(See tips week 61 - Friday)

ac ... display user connect time for accounting

These commands operate on the kernel.

ktrace ... perform kernel tracing
For example, 'ktrace ls' executes 'ls' and trace it's kernel activity. This produces the file 'ktrace.out'.

kdump ... display a 'ktrace.out' file human readable
For example 'kdump' if the trace file is in the current directory.
Option -f to specify the trace file

zprint ... display information on kernel zones

sysctl ... display and set kernel state variables
Option -a to display all state variables and their current settings

kextload ... kernel extension load

kextunload ... kernel extension unload

kextstat ... display kernel extension statistics


Discuss this trick in the Learning Center forum


If you want to learn more about Mac OS X Unix visit the Learning Center  click.

  • For beginners: Mac OS X Unix Tutorials
  • For detailed information on specific topics: Advanced Unix
  • For OS X in gereral: Mac OS X Tutorials

Copyright © 2000-2010 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.