Skip to content

Instantly share code, notes, and snippets.

View Termiux's full-sized avatar

Jorge Moreno Termiux

View GitHub Profile
@Termiux
Termiux / gist:6889447
Last active December 25, 2015 00:39
Limit php process using cpulimit program on linux boxes
#! /bin/sh
# /etc/init.d/limitcpu
#
# Some things that run always
#
INTERVAL=30
LIMIT=75
PIDS=$(top -b -n1 -c | grep php | awk '$9>75 {print $1}')