9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] cpu temp in drawterm
@ 2023-02-14 21:05 jimerickso
  2023-02-14 21:28 ` Skip Tavakkolian
  0 siblings, 1 reply; 6+ messages in thread
From: jimerickso @ 2023-02-14 21:05 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

what is the trick to getting the cpu temperature to read correctly in stats in a drawterm session? i have googled quite a bit on this topic and can't find anything helpful. thanks!
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc8476d0fe749cf6c-M59b4b4eeec20c47e35736007
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 900 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] cpu temp in drawterm
  2023-02-14 21:05 [9fans] cpu temp in drawterm jimerickso
@ 2023-02-14 21:28 ` Skip Tavakkolian
  2023-02-14 22:04   ` David du Colombier
  0 siblings, 1 reply; 6+ messages in thread
From: Skip Tavakkolian @ 2023-02-14 21:28 UTC (permalink / raw)
  To: 9fans

I don't believe 9legacy '#c/sysstat' (/sys/src/9/port/devcons.c)
supports temperature reporting. If both drawterm's '#c/sysstat' and
Plan 9's '#c/sysstat' implement it, they would need to agree on the
format, because when using drawterm (as opposed to a real Plan 9
term), the commands run on the cpu but use the namespace exported by
drawterm.

On Tue, Feb 14, 2023 at 1:06 PM <jimerickso@gmail.com> wrote:
>
> what is the trick to getting the cpu temperature to read correctly in stats in a drawterm session? i have googled quite a bit on this topic and can't find anything helpful. thanks!
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc8476d0fe749cf6c-Meeed6f8c97015fa9abab97ac
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] cpu temp in drawterm
  2023-02-14 21:28 ` Skip Tavakkolian
@ 2023-02-14 22:04   ` David du Colombier
  2023-02-14 22:13     ` moody
  2023-02-15  6:37     ` Skip Tavakkolian
  0 siblings, 2 replies; 6+ messages in thread
From: David du Colombier @ 2023-02-14 22:04 UTC (permalink / raw)
  To: 9fans

9legacy supports temperature reporting on x86, using /dev/cputemp.

-- 
David du Colombier

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc8476d0fe749cf6c-M2a3473706c2d1e85ad580680
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] cpu temp in drawterm
  2023-02-14 22:04   ` David du Colombier
@ 2023-02-14 22:13     ` moody
  2023-02-14 23:55       ` Jim Erickson
  2023-02-15  6:37     ` Skip Tavakkolian
  1 sibling, 1 reply; 6+ messages in thread
From: moody @ 2023-02-14 22:13 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

Resending this through the web interface because my email was dropped.

Temperature stats are read from /dev/cputemp. How that file is served depends on your system.
On my machine the file is just in arch(3), other machines use acpi(8) to serve this.
You just need to ensure this file is in the namespace stats(1) is run within.

For getting the temperature of the machine you are connecting to, either:
% bind -a '#P' /dev # if your machine is like mine
% aux/acpi # if your machine uses acpi
You will likely have more success in just cracking open the code and reading it then you will with google.
moody

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc8476d0fe749cf6c-Meb226150653c010c57b2a088
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1521 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] cpu temp in drawterm
  2023-02-14 22:13     ` moody
@ 2023-02-14 23:55       ` Jim Erickson
  0 siblings, 0 replies; 6+ messages in thread
From: Jim Erickson @ 2023-02-14 23:55 UTC (permalink / raw)
  To: 9fans

thank you moody! 'bind -a '#P' /dev' did the trick! i appreciate the
feedback. thanks to all for your time.

On Tue, Feb 14, 2023 at 4:13 PM <moody@posixcafe.org> wrote:
>
> Resending this through the web interface because my email was dropped.
>
> Temperature stats are read from /dev/cputemp. How that file is served depends on your system.
> On my machine the file is just in arch(3), other machines use acpi(8) to serve this.
> You just need to ensure this file is in the namespace stats(1) is run within.
>
>
> For getting the temperature of the machine you are connecting to, either:
> % bind -a '#P' /dev # if your machine is like mine
> % aux/acpi # if your machine uses acpi
>
> You will likely have more success in just cracking open the code and reading it then you will with google.
>
> moody
>
>
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc8476d0fe749cf6c-Mc4d14e19a0d57e11c6b4888c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] cpu temp in drawterm
  2023-02-14 22:04   ` David du Colombier
  2023-02-14 22:13     ` moody
@ 2023-02-15  6:37     ` Skip Tavakkolian
  1 sibling, 0 replies; 6+ messages in thread
From: Skip Tavakkolian @ 2023-02-15  6:37 UTC (permalink / raw)
  To: 9fans

Cool! Thanks.

FYI, the patch is in http://9legacy.org/patch.html, but not on sources
(not applied to pc/devarch.c and not in the patch directory)

On Tue, Feb 14, 2023 at 2:06 PM David du Colombier <0intro@gmail.com> wrote:
> 
> 9legacy supports temperature reporting on x86, using /dev/cputemp.
> 
> --
> David du Colombier

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc8476d0fe749cf6c-M032adb2bef6abb8bcc189e8c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-15  6:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 21:05 [9fans] cpu temp in drawterm jimerickso
2023-02-14 21:28 ` Skip Tavakkolian
2023-02-14 22:04   ` David du Colombier
2023-02-14 22:13     ` moody
2023-02-14 23:55       ` Jim Erickson
2023-02-15  6:37     ` Skip Tavakkolian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).