Skip to content

Instantly share code, notes, and snippets.

@joubin
Created May 13, 2014 01:10
Show Gist options
  • Save joubin/225eb6bd5412eedc8766 to your computer and use it in GitHub Desktop.
Save joubin/225eb6bd5412eedc8766 to your computer and use it in GitHub Desktop.
Get kernel related usage stats from your mac. For the geeky with highly modified os installs.
kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -ef
{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | open -ef
{ launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; crontab -l 2> /dev/null; } | open -ef
ls -A /e*/{cr,la,mach}* {,/}Lib*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts .la* 2> /dev/null | open -ef
osascript -e 'tell application "System Events" to get name of login items' | open -ef
@joubin
Copy link
Author

joubin commented May 13, 2014

If you are seeing that macs kernel usage is high, use these commands to find out why.

I would love it if someone could improve on this code and add more things to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment