While it is clearly a joke, it has a legitimate use as a syscall that does nothing so can be used to test the syscall process itself [1]. (Its cousin `is_computer_on_fire` is not a syscall.) [1] https://github.com/haiku/haiku/commit/ccaac177f64038c160de6f...
How to programmatically find out if computer is on
161–170 of 197 posts
Re: How to programmatically find out if computer is on
#162Re: How to programmatically find out if computer is on
#163Re: How to programmatically find out if computer is on
#164Earlier quoted context omitted.
I think the parent means that you should be able to talk to the NIC about the computer, without the NIC needing to get the CPU powered on so that the CPU can tell the NIC what to do. Like a very-minimally-functional BMC.
That's AMT, provided by Intel ME. As far as I'm concerned ME-equipped NICs should unconditionally be behind VPNs, but the AMT functionality itself is really cool. Even the 10+ year old machines that don't support VNC let you remotely hit CTRL+ALT+DEL, issue an ACPI shutdown, perform a hard reset (equivalent to hitting the reset button on 486-era boxen), etc. So basically you can do either soft or hard shutdowns or re…
Lately this has been my biggest barrier to leaving a computer fully remote.
Re: How to programmatically find out if computer is on
#165// power cycle computer bool was_on = set_computer_on(true); // returns prior value if (was_on) { set_computer_on(false); set_computer_on(true); } else { // was previously off, is now on: nothing to do! }
Re: How to programmatically find out if computer is on
#166I like to call this at the end of an intialization sequence, with a throw to is_computer_even_plugged_in() .
Re: How to programmatically find out if computer is on
#167Earlier quoted context omitted.
That's AMT, provided by Intel ME. As far as I'm concerned ME-equipped NICs should unconditionally be behind VPNs, but the AMT functionality itself is really cool. Even the 10+ year old machines that don't support VNC let you remotely hit CTRL+ALT+DEL, issue an ACPI shutdown, perform a hard reset (equivalent to hitting the reset button on 486-era boxen), etc. So basically you can do either soft or hard shutdowns or re…
Can it enter the password required to decrypt my LUKS partition? Lately this has been my biggest barrier to leaving a computer fully remote.
Re: How to programmatically find out if computer is on
#168Re: How to programmatically find out if computer is on
#169Re: How to programmatically find out if computer is on
#170Why would is_computer_on_fire() return a double and not true/false? Even for a joke function, this seems like bad practice. If the function is named is_state(), I expect a boolean return. > Returns the temperature of the motherboard if the computer is currently on fire. Smoldering doesn't count. If the computer isn't on fire, the function returns some other value.
Maybe it’s a probability function. Something like “hey there’s a .7 percent chance your computer is engulfed in flames”