Commit Graph

98 Commits

Author SHA1 Message Date
David Anderson a56428ae3a client (Unix): when get vbox version, make sure it's not an error msg 2014-09-30 05:28:58 -07:00
David Anderson f8538c29b3 client: add <dont_use_vbox> cc_config option 2014-09-25 01:28:19 -07:00
Rom Walton df4232d41e client: fix build break 2014-08-26 02:47:17 -04:00
Rom Walton ffd0e55bf6 client: Remove references to unneeded XSS header files 2014-08-25 13:10:08 -04:00
Rom Walton bfae1032e5 client: Use /dev/input/* to determine idle input detection on Linux.
This would also cover digitizers and bluetooth devices.
2014-08-25 13:03:47 -04:00
Charlie Fenton 6245f691bf client: Simplify logic to get VirtualBox version on Mac and fix a crash bug when VirtualBox is installed only on a different boot partition. 2014-03-27 19:21:05 -07:00
Charlie Fenton c3b5dcc903 client: Show VirtualBox revision number along with its version number on Mac and Linux. 2014-03-27 17:14:54 -07:00
Rom Walton cedfa909f1 client: Fix the stuff I broke with my previous commit. Somehow I picked up a version of hostinfo_unix.cpp that was older than the current version. 2014-03-17 15:50:43 -04:00
Rom Walton edcc9ce9d5 client & MGR: Remove byte order markers from UTF-8 encoded files. 2014-03-17 15:44:11 -04:00
Rom Walton 28f7f95098 client: Default to /usr/bin when looking for VboxManage.
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.
2014-02-07 15:41:02 -05:00
David Anderson 5a22c7684e client, Linux: improve error-checking in idle-detection code 2014-02-03 15:37:47 -08:00
David Anderson 0811886cbb client: fix for idle detection on Linux (from Gianfranco) 2014-02-03 12:46:43 -08:00
Charlie Fenton 223531fddd client & Mac Installer: Convert several files to UTF-8 encoding and change “smart” quotation marks to ASCII quotation marks 2014-01-29 01:43:31 -08:00
Rom Walton 3dbe238996 client & manager: Convert several files to UTF-8 encoding. BOINCBaseView.cpp needed to be converted on a Windows machine to properly handle the original encoding. 2014-01-28 15:29:59 -05:00
Charlie Fenton ccb339841d client: Convert Mac and Haiku CPU features strings to match that returned by Linux 2013-12-01 23:44:21 -08:00
Charlie Fenton a58db314a4 client: tweaks to get_max_cpu_temperature() for Macintosh 2013-11-23 16:01:46 -08:00
Charlie Fenton f8d822e7d2 client: update get_max_cpu_temperature() for Macintosh
- Return temperature in Celsius as a double
 - Add support for (hopefully) all Macintosh models
2013-11-23 03:31:57 -08:00
David Anderson 634613abcc client: generate host CPID as a function of MAC address
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
2013-11-18 20:31:14 -08:00
Charlie Fenton 7c70f89b80 Mac: Fixes to allow minor OS versions > 9 and major OS versions > 10 2013-11-15 05:02:04 -08:00
David Anderson 9607f3342c client, FreeBSD: report "pni" instead of "sse3" 2013-08-08 11:52:01 -07:00
Joachim Fritzsch 9ac8818c19 android: attempt to fix bug #1300, number of cpu cores detection.
Parsing information at /sys/devices/system/cpu/present should represent possible number of CPUs indepentendly of CPU throttling.
2013-07-24 15:21:06 +02:00
Joachim Fritzsch 520b9852d7 android: bug fix for number cpu core detection. issue #1300.
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.
2013-07-17 14:01:39 +02:00
Joachim Fritzsch bcaf537228 android: bug fix for changing p_ncpus in host_info. issue #1300.
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.
2013-07-13 13:46:29 +02:00
David Anderson a8485f3d3f Various: Fix some compile warnings; from Gianfranco 2013-07-09 10:34:32 -07:00
Rom Walton f438e7f297 Linux: Add missing header reference 2013-06-19 15:01:54 -04:00
Charlie Fenton a5072a25d9 client: fill in HOST_INFO producet_name field for Macintosh.
This returns an Apple hardware model designation such as "MacPro3,1".  One source for converting this to a common model name is:
<http://www.everymac.com/systems/by_capability/mac-specs-by-machine-model-machine-id.html>
2013-06-15 03:18:23 -07:00
David Anderson 846b8c7757 all components: change strcpy() to strlcpy() when possible.
This commit should cover the client and manager code.
2013-06-03 20:24:48 -07:00
Rom Walton 4c4c1b17de client: reintroduce xidletime code to detect idle time on Linux. Include reference to source site and authors. 2013-05-29 12:04:20 -04:00
David Anderson f12fdcc985 client: fix Android build break 2013-05-23 09:02:09 -07:00
Rom Walton 514484e022 client: Remove Display Power Management query for idle detection until a new variant can be found. 2013-05-22 12:00:22 -04:00
David Anderson e0871c380f client (Android): remove unused code 2013-05-15 11:17:45 -07:00
David Anderson 61913b181f client (Android): GUI reports battery and wifi status to client
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.
2013-05-14 12:28:09 -07:00
Joachim Fritzsch 5ba9644302 -client: bugfix for Android in host_is_running_on_batteries(). Change filehandling back to fopen and fclose from rewind. 2013-04-11 11:50:26 +02:00
David Anderson e41800082e - client (FreeBSD): detect running on batteries; from rustyBSD 2013-03-07 11:28:43 +01:00
Rom Walton 4325ba01bf Android: Initialize variable 2013-03-05 16:40:25 +01:00
Rom Walton b26fdda827 Android: Add different locations that can host battery information.
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.
2013-03-05 16:38:42 +01:00
Rom Walton 45120de247 Android: Fix crashing bug when we poll for battery information 2013-03-05 16:38:42 +01:00
Rom Walton 6012f9261f Android: Remove debug code for Android, the required functions are called and function.
Android: Remove separate copy_asset.sh script and make that the last part of the build_boinc.sh script.
2013-03-05 16:38:42 +01:00
Rom Walton ff53e509cf Android: Add trace statements to track down battery issues 2013-03-05 16:38:41 +01:00
Oliver Bock 05eba7c951 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc 2013-03-05 16:35:14 +01:00
David Anderson 06eadde310 - client (Unix): check whether VBoxManager is executable by us
before trying to run it.
    Otherwise we get lots of msgs in stderr.
2013-03-05 16:33:39 +01:00
Rom Walton f6807efe18 client: Properly return the battery status as full when it is. 2013-03-05 16:31:08 +01:00
Rom Walton af7948910e client: Adjust logging on Android so that all messages that show up in the event log are also dumped to LogCat, things were originally setup with that intent but I don't think __VA_ARGS__ was having the desired effect. 2013-03-05 15:57:34 +01:00
Oliver Bock eb79b9e78b Merge branch 'master' of ssh://boinc.berkeley.edu/boinc
Conflicts:
	client/hostinfo_unix.cpp
2013-03-05 15:45:13 +01:00
Rom Walton c9717d068b client: Fix typo for Android 2013-03-05 15:40:04 +01:00
David Anderson 3b18584cb3 - client (Android): change battery-status function so that it
keeps file descriptors open
    (slight simplification and performance enhancement).
2013-03-05 15:33:54 +01:00
David Anderson 21f580d9ef - client (Android): suspend processing if battery temperature > 45 C.
We can adjust this or make it configurable later.
2013-03-05 15:28:00 +01:00
David Anderson 607060ffaa - client (Android)
- 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).
2013-03-05 15:24:01 +01:00
Rom Walton 9ce39485b5 client: Basic detection of the battery state for a given host for Windows and Android. Useful for detecting if the battery is overheating. 2013-03-05 15:12:52 +01:00
Rom Walton 759b3b8078 client: Basic detection of how much capacity a host's battery has on Android and Windows. 2013-03-05 15:12:52 +01:00