How to programmatically find out if computer is on
91–100 of 197 posts
Re: How to programmatically find out if computer is on
#92> is_computer_on() How does this relate to computer being in Halt state, which is quite valid state for servers (there could be even a dedicated Halt button)? Technically computer hardware is ON. I remember that in such state it shows a "carrot" prompt (>>>) from the SRE console. By the way, there is also HCF instruction (Halt and Catch Fire). https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing...
Wouldn't a CPU halt state mean no code is running?
Re: How to programmatically find out if computer is on
#93 double
is_computer_on_fire(void)
{
return 0.63739;
}
https://github.com/haiku/haiku/blob/8f16317a5b6db5c672f33181...Re: How to programmatically find out if computer is on
#94Re: How to programmatically find out if computer is on
#95While this is a joke, there are some contexts in which it does make sense to ask whether the computer is on. For instance, most laptops have an embedded controller which runs all the time, even when the laptop is powered off, and manages things like battery charging and the power state. Within that embedded controller, an is_computer_on() function could legitimately return "false".
Re: How to programmatically find out if computer is on
#96Earlier quoted context omitted.
Wouldn't a CPU halt state mean no code is running?
a computer has multiple CPUs. One may be halted while another still running.
In order for the code to execute anywhere, at least one core must be powered on and not halted. Also, I would consider a halted CPU to still be powered on.
Otherwise, the function's name has no relation to it's behavior and it's a buggy function on top of being a useless but amusing thought experiment.
Re: How to programmatically find out if computer is on
#97I was working on an embedded system. I told the hardware guy that the CPU clock input wasn't running. He said, "Any reasonably intelligent software should have detected that condition and handled it." I replied, "Seems to me the software acted appropriately for the conditions."
Re: How to programmatically find out if computer is on
#98Earlier quoted context omitted.
Interesting, but I think parent was asking how to run it on silicon.
now i'm confused.
But it could also refer to the material "metal" (or the collection name for bunch of materials really), whereas computers are commonly known for being made with a lot of silicon instead of metal.
Hopefully I didn't dissect too much of the frog to kill it.