Depending on the Linux distro it can be in many different locations, even if it is installed in a different location there is normally a symbolic link in /usr/bin which points to the real deal. Vboxwrapper should be able to run it successfully because it'll be in the standard search path.
This makes the host CPID stable; if you repeatedly install BOINC
on a particular node, it will get the same host CPID each time,
and your host table won't get lots of redundant entries.
A host can have multiple NICs;
we use the MAC address of the first Ethernet controller we find,
or the last NIC if there is none.
Of course, this will create problems if we get the same MAC address
for different hosts; in principle this shouldn't happen.
Remove the unused file hostinfo_network.h
previous attempt to only read sysconf for number of cores is insufficient, due to a bug in the Android system. Bug got fixed in April 2012 but is still present on many devices.
workaround: read /sys/devices/system/cpu and parse number of cores from there. sysconf uses /proc/stat/ which gets adapted to changes in cpu throttling. Read both sources and compare higher results.
previous attempt to acquire full wake lock during setup routine has not fixed this bug.
changed p_ncpus detection from sysconf(_SC_NPRROCESSORS_ONLN) to _SC_NPROCESSORS_CONF in client's get_host_info for Android devices.
Previously the client had (C++) code to
- check whether on AC or USB power
- get battery status and temperature
- check whether on wifi
These functions looked in various places under /sys.
Problem: the paths are system-dependent,
so whatever we do won't work on all devices.
The Android APIs for getting this info are in Java,
so we can't call them from the client.
Solution: have the GUI periodically get this info
and report it to the client via a GUI RPC.
The GUI must make this RPC periodically:
if the client doesn't get one within some period of time
(currently 30 sec) it suspends computing and network.
Also: if suspending jobs because of battery charge level
or temperature, leave them in memory.
Android: For all power/battery file descriptors, NULL out their buffers so the client will grab the latest information and not recycle the old information.
- Don't compute if the battery is overheated
- Don't compute until the batter is 95% charged.
Then stop computing if it falls below 90%.
(On some devices, computing causes the batter to drain
even while it's recharging).