From: Arne Fitzenreiter <Arne.Fitzenreiter@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: 'collectd' and 'cpufreq' on IPFire Duobox - wrong path in initscript?
Date: Wed, 04 Jul 2018 13:51:51 +0200 [thread overview]
Message-ID: <0e61086c7d2dabbdbbe0f0a2f369af26@ipfire.org> (raw)
In-Reply-To: <209fb2c11e4681b36caf9d5fb5b13ddb92bddf3f.camel@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2439 bytes --]
On 2018-07-04 11:17, Michael Tremer wrote:
> On Wed, 2018-07-04 at 01:09 +0200, Arne Fitzenreiter wrote:
>> On some maschines the file i
>
> The file was what?
>
This was a mistake in my mail mail. I had written about cpuinfo_cur_freq
and deleted (not complete bacause my tablet has not showed it) this part
after i have readed the mail again and found the missing "profile0" in
Matthias path.
I had added the infos to the bug and wait for comments before i change
it again...
>>
>> I think this need more investigation.
>>
>>
>>
>> > This was triggered by
>> > https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=37458540bf727df09989
>> > c10d640ad13c1a989029
>> >
>> > I thought some cpu graphs on my "Duo Box" could be helpful and
>> > installed
>> > 'cpufrequtils'.
>> >
>> > But after adding the above commit to '/etc/init.d/collectd'
>> > and restarting 'collectd' => no graphs appeared.
>> >
>> > Reason:
>> > The needed directory '/sys/devices/system/cpu/cpufreq/policy0/' doesn't
>> > exist on my machine, so the 'LoadPlugin' was always commented and
>> > deactivated.
>> >
>> > Instead there are '/sys/devices/system/cpu/cpu0' and
>> > '/sys/devices/system/cpu/cpu1'.
>> >
>> > So I tested this the hard way.
>> >
>> > After commenting the if-statement, everything is working, CPU graphs
>> > appear and show reasonable values:
>> >
>> > ...
>> > # Enable cpufreq plugin if cpufreq found
>> > #if [ ! -e /sys/devices/system/cpu/cpufreq/policy0/*_cur_freq ]; then
>> > # sed -i -e "s|^LoadPlugin cpufreq|#LoadPlugin cpufreq|g"
>> > /etc/collectd.conf
>> > #else
>> > sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g"
>> > /etc/collectd.conf
>> > #fi
>> > ...
>> >
>> > Changed this to:
>> >
>> > ...
>> > if [ ! -e /sys/devices/system/cpu/cpu0/cpufreq/*_cur_freq ]; then
>> > ..
>> >
>> > But this gave me an error:
>> >
>> > /etc/init.d/collectd: line 95: [:
>> > /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: binary operator
>> > expected
>> >
>> > I changed the line to:
>> >
>> > ...
>> > if [ ! -e /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq ]; then
>> > ...
>> >
>> > And now it is running as expected.
>> >
>> > Would this be ok for other machines?
>> > Bug or feature - can anyone confirm?
>> >
>> > Best,
>> > Matthias
>> >
>> > P.S.: I didn't forget the Telko - I was still at work. Too bad...
prev parent reply other threads:[~2018-07-04 11:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 19:52 Matthias Fischer
2018-07-03 23:09 ` Arne Fitzenreiter
2018-07-04 9:17 ` Michael Tremer
2018-07-04 11:51 ` Arne Fitzenreiter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e61086c7d2dabbdbbe0f0a2f369af26@ipfire.org \
--to=arne.fitzenreiter@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox