LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-28-2012, 11:02 PM   #1
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 66
systemd: replacing an init script for cpu scaling governors


With sysvinit I had a script for setting up cpu power management. I now start it via a systemd service. I'd like opinions if you think there's a better (more systemd) way to do this.

The script is simple:
Code:
#!/bin/bash
echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo -n ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo -n ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo -n ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo -n 40       > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
The current service file is:
Code:
[Unit]
Description=Configure cpufreq

[Service]
Type=oneshot
ExecStart=/usr/local/bin/config_cpufreq
 
Old 08-29-2012, 11:45 AM   #2
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 138Reputation: 138
Amazing how much the service file looks like a Windows 3.1 ini file ... of course it's much like a windows app anyway.
 
Old 08-29-2012, 11:59 AM   #3
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Original Poster
Rep: Reputation: 66
Please don't troll my thread. (Thanks for the bump though.)

Yes, systemd uses the ini format, so do a lot of other projects; git, for example.
 
Old 08-29-2012, 01:24 PM   #4
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 138Reputation: 138
Wasn't a troll but an observation. You're welcome for the bump.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Here We Go Again, Another Linux Init: Intro to systemd LXer Syndicated Linux News 0 12-13-2011 07:51 PM
LXer: Here We Go Again, Another Linux Init: Intro to systemd LXer Syndicated Linux News 0 12-13-2011 07:02 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM
Informaton on systemd init system? arashi256 Linux - Newbie 1 06-04-2011 07:06 PM
cpu frequency scaling with Pentium(R) Dual-Core CPU E5200 @ 2.50GHz tramni1980 Slackware 5 08-16-2009 08:29 AM


All times are GMT -5. The time now is 05:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration