08 December, 2009

Playing around with your system's Init scripts

Nowadays with so much focus on usability in Linux, all the administration tasks can be done in GUI. Consequently, when things don't work, people are clueless where to look to resolve the error. Hence it's pretty much important to know the innards of system. I had a couple of tasks like disabling a couple of services & changing the cpu frequency governor. I decided to find to the most low level way of doing the same. Well, here it goes. And yes, these all all from a latest Fedora distribution perspective(I se F12).

Changing the CPU Frequency Governor in Fedora:
Assuming that you usually run in init level5, edit the file /etc/rc.d/rc5.d/S06cpuspeed and change the line default_governor=ondemand to default_governor=performance. Save and quit.
When you reboot next time, you'll notice that the CPU is running at full speed from the start.

En/Disabling a service in Fedora:
Whatever you accomplish from System->Administration->Services can also be accomplished by just removing a link from a particular file. For e.g. if you want to disable the Smolt service, you just need to remove the link /etc/rc5.d/S90Smolt by typing "unlink S90smolt". Once you reboot, you'll observe that the Smolt service is disabled.

NOTE: There are other saner ways of doing these from the command line.

2 comments:

  1. Got some important facts with your post. Thanks for sharing your knowledge regarding this topic. God speed!

    ReplyDelete