SRCDS Steam group


CentOS/RHEL Reduction Script.
#1
A customer of mine wanted a simple script they could use on their CentOS/RHEL/Fedora servers to reduce the amount of running services, while also reducing the amount of terminals running. By default your typical RHEL/CentOS systems come with a predefined set of services that cater to a range of users. The needs of a game server are quite minimal, in most cases you're not using network shares, printing and so on.

What will this script do?

It will disable 3 out of the 6 running terminals. Most game server administrators only need 1-2 maximum.

It will disable slightly more than half of all running services on your typical CentOS/RHEL deployments. This script was put together for a customer with many different servers, therefore I stuck to disabling friendly services. More can certainly be disabled depending on the system configuration, whether you're running raid or not and so on.

That goes without saying USE AT YOUR OWN RISK. If you have a question about a service, feel free to ask. Perhaps ill modify the script and put more commenting in on what each service does.

How does this benefit me?

It will reduce the amount of processes on your system, thus resulting in a solid amount of memory savings and possibly a nominal increase in performance, depending on how or if those services were using any resources. Keep in mind this is just a simple bash script, intended for simple results.

Usage

Designed specifically for Red Hat based systems (RHEL, CentOS, Fedora) and so on. I'll modify for Debian based systems unless someone else wants to, but since the customer was all RH it was made to be specific. Since modifications are being made to the inittab file, the script will make a backup of that in /etc/inittaback

http://www.viGeek.net/files/viGeek.sh

Download the script to your system.
chmod +x viGeek.sh
./viGeek.sh

That's all, I'll hopefully have some time and begin to add more to it such as disk parameters and live kernel settings.
Game Server Administration Services
Linux & Windows performance specialist.
http://www.viGeek.net
Reply
#2
This is very nice.. I didn't benefit much from it, But I'm sure others with unoptimized systems will. Not to mention this is great for initial setup of the server no need to do it all manually. Nice work vigor
*Windows lack of output*
You: Hey, I want to run this program!
Windows: Ok.. It crashed... Now what? Give up?
You:...wtf...
*linux output helpful?*
You: ./My_program
Linux:...Failed!...oo kitties!
You:...wtf...
Reply
#3
I get this.

-bash: ./viGeek.sh: /bin/sh^M: bad interpreter: No such file or directory
Reply
#4
Edit the file and change the first line to: #!/bin/bash
Game Server Administration Services
Linux & Windows performance specialist.
http://www.viGeek.net
Reply
#5
Okay I will try that. After I run it. Do I have to restart my game servers or anything?

EDIT: I did that and it still says that...
Reply
#6
What OS and release etc.
Game Server Administration Services
Linux & Windows performance specialist.
http://www.viGeek.net
Reply
#7
CentOS 5.2
Reply
#8
Flonn Wrote:CentOS 5.2

Download script again, try it again. (made adjustments)

If that doesn't work run this on the file and it should clear it up.

perl -i -pe's/\r$//;' viGeek.sh
Game Server Administration Services
Linux & Windows performance specialist.
http://www.viGeek.net
Reply
#9
Okay I re-downloaded it and this is what it says.

Script executed running now...
Backup of inittab made in /etc/inittaback...
Disabling extra terminals
sed: can't read ls: No such file or directory
Disabling services....
Script has run it's course.


Does that mean everything is right?
Reply
#10
(12-19-2008, 01:40 AM)vigor Wrote:  A customer of mine wanted a simple script they could use on their CentOS/RHEL/Fedora servers to reduce the amount of running services, while also reducing the amount of terminals running.  By default your typical RHEL/CentOS systems come with a predefined set of services that cater to a range of users.  The needs of a game server are quite minimal, in most cases you're not using network shares, printing and so on.

What will this script do?

It will disable 3 out of the 6 running terminals.  Most game server administrators only need 1-2 maximum.

It will disable slightly more than half of all running services on your typical CentOS/RHEL deployments.  This script was put together for a customer with many different servers, therefore I stuck to disabling friendly services.  More can certainly be disabled depending on the system configuration, whether you're running raid or not and so on.

That goes without saying USE AT YOUR OWN RISK.  If you have a question about a service, feel free to ask.  Perhaps ill modify the script and put more commenting in on what each service does.

How does this benefit me?

It will reduce the amount of processes on your system, thus resulting in a solid amount of memory savings and possibly a nominal increase in performance, depending on how or if those services were using any resources.  Keep in mind this is just a simple bash script, intended for simple results.

Usage

Designed specifically for Red Hat based systems (RHEL, CentOS, Fedora) and so on.  I'll modify for Debian based systems unless someone else wants to, but since the customer was all RH it was made to be specific.  Since modifications are being made to the inittab file, the script will make a backup of that in /etc/inittaback

http://www.viGeek.net/files/viGeek.sh

Download the script to your system.
chmod +x viGeek.sh
./viGeek.sh

That's all, I'll hopefully have some time and begin to add more to it such as disk parameters and live kernel settings.

Hi i need to Debian,
Thanks !!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)