SHARE
TWEET

Untitled

a guest Dec 2nd, 2012 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. sleep 15
  4.  
  5. OLDPID='a'
  6.  
  7. while true; do
  8.  
  9.         PS2PID=`ps -A | grep -m 1 'PlanetSide2.exe' | awk '{print $1}'`
  10.         WINESVRPID=`ps -A | grep -m 1 'wineserver' | awk '{print $1}'`
  11.         WINEDEVPID=`ps -A | grep -m 1 'winedevice.exe' | awk '{print $1}'`
  12.  
  13.         if [ ! $PS2PID ]; then
  14.                 echo 'PlanetSide 2 is not running'
  15.         elif [ $OLDPID != $PS2PID ]; then
  16.                         echo 'PlanetSide 2 is getting tuned'
  17.                         OLDPID=$PS2PID
  18.                         taskset -pc 0-7 $WINESVRPID     #0-3 will use cores 0,1,2 and 3 ( quad )
  19.                         taskset -pc 0-7 $WINEDEVPID
  20.                         taskset -pc 0-7 $PS2PID
  21.                         exit    #terminates the script when the job is done
  22.                 else
  23.                         echo 'PlanetSide 2 is already tuned.'
  24.         fi
  25.         sleep 15
  26. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top