Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39583 > unrolled thread
| Started by | Groo Vee <groovee@cyberdude.com> |
|---|---|
| First post | 2021-03-05 20:11 -0800 |
| Last post | 2021-03-06 18:37 +0100 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.javascript
Is it possible to check system resources in-browser? Groo Vee <groovee@cyberdude.com> - 2021-03-05 20:11 -0800
Re: Is it possible to check system resources in-browser? John G Harris <niam@jghnorth.org.uk.invalid> - 2021-03-06 11:12 +0000
Re: Is it possible to check system resources in-browser? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-03-06 08:06 -0800
Re: Is it possible to check system resources in-browser? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-03-06 23:53 +0100
Re: Is it possible to check system resources in-browser? Arno Welzel <usenet@arnowelzel.de> - 2021-03-06 18:37 +0100
| From | Groo Vee <groovee@cyberdude.com> |
|---|---|
| Date | 2021-03-05 20:11 -0800 |
| Subject | Is it possible to check system resources in-browser? |
| Message-ID | <07d94127-761b-4614-bd5e-172891186cd3n@googlegroups.com> |
How do I check how much CPU is free (indeed, WHAT CPU is there on the system, how many cores), and how much RAM is free, in JS? Is there a way to do this?
[toc] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2021-03-06 11:12 +0000 |
| Message-ID | <kmo64gp4ia1k7fntuvjrp4t934koeqb0f7@4ax.com> |
| In reply to | #39583 |
On Fri, 5 Mar 2021 20:11:31 -0800 (PST), Groo Vee <groovee@cyberdude.com> wrote: <snip> > how much CPU is free <snip> If the computer is running a citizen science program that uses up all the spare time then the answer is 0, all day, every day. John
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2021-03-06 08:06 -0800 |
| Message-ID | <da461492-6739-4262-afad-c2da857ea18fn@googlegroups.com> |
| In reply to | #39583 |
On Friday, March 5, 2021 at 10:11:36 PM UTC-6, Groo Vee wrote:
> How do I check how much CPU is free (indeed, WHAT CPU is there on the system, how many cores), and how much RAM is free, in JS? Is there a way to do this?
Due to privacy concerns, no. This information is not available in a regular webpage
With that being said though, the navigator object may have some of this information though it would probably be inaccurate. on my system for example I have a navigator object with the following properties:
```
Navigator {
connection {
effectiveType: "4g",
rtt: 50,
downlink: 2.85,
...
},
deviceMemory: 8, // inaccurate
hardwareConcurrency: 5, //inaccurate
platform: "Win32"
...
}
```
Chromium based browsers such as Edge, Chrome, and Brave have a Task Manager built in. Through a browser extension there is an API that may provide this information. Compatibility across browsers though is questionable:
<https://discourse.mozilla.org/t/how-to-get-current-cpu-and-memory-usage-of-the-system/13202/6>
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2021-03-06 23:53 +0100 |
| Message-ID | <3410683.R56niFO833@PointedEars.de> |
| In reply to | #39589 |
Michael Haufe (TNO) wrote:
> With that being said though, the navigator object may have some of this
> information though it would probably be inaccurate. on my system for
> example I have a navigator object with the following properties:
>
> ```
> Navigator {
> connection {
> effectiveType: "4g",
> rtt: 50,
> downlink: 2.85,
> ...
> },
> deviceMemory: 8, // inaccurate
> hardwareConcurrency: 5, //inaccurate
> platform: "Win32"
> ...
> }
> ```
Though partially inaccurate, it is amazing how much information is provided
by the “navigator” object now. I think this will be helpful for improving
the ECMAScript Support Matrix and in other instances, so thank you for
pointing it out :)
--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2021-03-06 18:37 +0100 |
| Message-ID | <iahsttFq48gU2@mid.individual.net> |
| In reply to | #39583 |
Groo Vee: > How do I check how much CPU is free (indeed, WHAT CPU is there on the > system, how many cores), and how much RAM is free, in JS? Is there a > way to do this? No, there is no way to check this in JavaScript. -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web