Guest User

Untitled

a guest
Dec 2nd, 2012
127
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×