Skip to content

Instantly share code, notes, and snippets.

@diplix
Created May 18, 2019 07:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diplix/c9fba646a2e55965d1e905bbb43f2530 to your computer and use it in GitHub Desktop.
Save diplix/c9fba646a2e55965d1e905bbb43f2530 to your computer and use it in GitHub Desktop.
limit plex media server cpu usage on os x
#!/bin/bash
# limit plex media server cpu usage, especially plex transcoder
# on os x (works on el capitan)
#
# prerequisite: install cpulimit
# brew install cpulimit
#
# arguments:
# -l 100 limits plex cpu usage to around 30-40 % on a mac mini
# running lots of other processen
# -i includes children (as plex transcoder)
# command: get Plex Media Server PID and run cpulimit with it
/usr/bin/pgrep 'Plex Media Server' | /usr/bin/xargs sudo /usr/local/bin/cpulimit -l 100 -i -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment