Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94909 - sys-process/procps: support setting sysfs values automatically at boot time using an initscript
Summary: sys-process/procps: support setting sysfs values automatically at boot time u...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://sourceforge.net/mailarchive/m...
Whiteboard:
Keywords:
: 94780 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-03 04:07 UTC by Stefano Varesi
Modified: 2020-08-27 21:36 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Init script (sysfs,1.41 KB, text/plain)
2005-06-03 04:08 UTC, Stefano Varesi
Details
Configuration file (sysfs,383 bytes, text/plain)
2005-06-03 04:09 UTC, Stefano Varesi
Details
Configuration file (sysfs,243 bytes, text/plain)
2005-06-04 07:11 UTC, Stefano Varesi
Details
Init script (sysfs,2.55 KB, text/plain)
2005-06-04 07:13 UTC, Stefano Varesi
Details
procps-3.2.5-sysfsctl.patch (procps-3.2.5-sysfsctl.patch,4.15 KB, patch)
2005-06-05 01:56 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Varesi 2005-06-03 04:07:30 UTC
I wrote a simple init script to modify sysfs files at boot and set the needed
values. It reads the files and the values to put in the sysfs files from a
config file. It can be useful to set parameters like cpu scaling frequencies, etc.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Stefano Varesi 2005-06-03 04:08:50 UTC
Created attachment 60513 [details]
Init script
Comment 2 Stefano Varesi 2005-06-03 04:09:33 UTC
Created attachment 60514 [details]
Configuration file
Comment 3 SpanKY gentoo-dev 2005-06-03 05:45:01 UTC
should be trivial to make the config file syntax work like sysctl.conf ...

maybe even have the config file install as sysfsctl.conf :)
Comment 4 Stefano Varesi 2005-06-04 01:30:36 UTC
You mean something like:
/sys/<path> = <value>
For example:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 1199970
In this way we should write in the config file the content of all the sysfs
tree, or, better, only the files that contain values usable for tuning the
system. For example we should exclude /sys/class/*, I think, because modifying
those files could cause problems and, in fact, in most cases it is impossible.
Or, simply, one can put in the config file only the files he wants to modify.
Ok, I'll modify the script to work in this simpler way.

What did you mean for "having the config file install as sysfsctl.conf" ?
Comment 5 Stefano Varesi 2005-06-04 07:11:14 UTC
Created attachment 60583 [details]
Configuration file

This is the new configuration file. It contains only one array. Each array cell
contains an assignment like "<file> = <value>".
I think this is a simpler syntax.
Comment 6 Stefano Varesi 2005-06-04 07:13:15 UTC
Created attachment 60584 [details]
Init script

The new version of the init script, to read the config file containing only one
array
Comment 7 SpanKY gentoo-dev 2005-06-05 00:25:48 UTC
*** Bug 94780 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2005-06-05 01:56:36 UTC
Created attachment 60625 [details, diff]
procps-3.2.5-sysfsctl.patch

adds support to procps for a 'sysfsctl' binary which acts just like 'sysctl'
but uses /etc/sysfsctl.conf instead of /etc/sysctl.conf

e-mailed upstream to see how they feel about it
Comment 9 Emmanuel Rosa 2005-06-05 08:19:31 UTC
This sounds good! Any idea when it will become available?

Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-12-07 07:03:54 UTC
vapier: you sent the patch to upstream, what was the outcome?
Comment 11 SpanKY gentoo-dev 2008-12-07 07:37:19 UTC
iirc, upstream responded only to me rather than the mailing lists and just said "it's in the works" ... i.e. he had bigger plans and didnt want to go the route i suggested

but i'm guessing nothing materialized