介绍
SETI@home是一个大型志愿者分布式计算项目,其中参与系统上运行的软件用于分析太空望远镜的无线电数据,以便识别智能生命的信号或迹象。
BOINC有一个图形应用程序,但也通过命令行工作. 这使得在Droplet或其他无头服务器上运行SETI@home非常可行。
前提条件
- 任何尺寸的 Ubuntu 14.04 或 Debian 7 Droplet.
- 一个 sudo 非 root 用户. 您可以遵循 本教程在 Ubuntu 上安装的前四步,以及 本教程在 Debian 上。
步骤一:安装 boinc 客户端
SETI@home 通过 BOINC 客户端运行,该客户端可在标准 Debian 和 Ubuntu 存储库中使用。
1sudo apt-get install boinc-client
步骤二:连接到 SETI@home 帐户
要将此主机连接到 SETI@home 帐户并获得信用,需要帐户密钥。
首先, 创建 SETI@home 帐户或登录现有的 SETI@home 帐户。
您将在下一页的顶部看到您的 SETI@home 帐户密钥. 使用您的帐户密钥执行以下命令:
1boinccmd --project_attach http://setiathome.berkeley.edu account_key
在此时,boinc将开始与默认值分离。
目前,停止 boinc-client 服务,以便设置 CPU 使用偏好。
1sudo service boinc-client stop
步骤三:配置主机 CPU 使用偏好
默认情况下,BOINC客户端将使用100%可用的CPU. 在此步骤中,我们将配置主机以使用更少的CPU。
** 注意**:在云托管环境中,您需要将 CPU 利用率从 100% 降低,以避免过度高使用率,这可能会影响邻近的 Droplets。
本地主机偏好设置在文件 /var/lib/boinc client/global_prefs_override.xml
中,最初将是空的。
编辑文件 /var/lib/boinc-client/global_prefs_override.xml
。
1sudo nano /var/lib/boinc-client/global_prefs_override.xml
你会看到一些现有的文本,看起来像这样:
1<global_preferences>
2</global_preferences>
删除它,并粘贴到此示例文件中。
1<global_preferences>
2 <run_on_batteries>0</run_on_batteries>
3 <run_if_user_active>1</run_if_user_active>
4 <run_gpu_if_user_active>0</run_gpu_if_user_active>
5 <suspend_cpu_usage>50.000000</suspend_cpu_usage>
6 <start_hour>0.000000</start_hour>
7 <end_hour>0.000000</end_hour>
8 <net_start_hour>0.000000</net_start_hour>
9 <net_end_hour>0.000000</net_end_hour>
10 <leave_apps_in_memory>0</leave_apps_in_memory>
11 <confirm_before_connecting>1</confirm_before_connecting>
12 <hangup_if_dialed>0</hangup_if_dialed>
13 <dont_verify_images>0</dont_verify_images>
14 <work_buf_min_days>0.100000</work_buf_min_days>
15 <work_buf_additional_days>0.500000</work_buf_additional_days>
16 <max_ncpus_pct>100.000000</max_ncpus_pct>
17 <cpu_scheduling_period_minutes>60.000000</cpu_scheduling_period_minutes>
18 <disk_interval>60.000000</disk_interval>
19 <disk_max_used_gb>10.000000</disk_max_used_gb>
20 <disk_max_used_pct>90.000000</disk_max_used_pct>
21 <disk_min_free_gb>1.500000</disk_min_free_gb>
22 <vm_max_used_pct>75.000000</vm_max_used_pct>
23 <ram_max_used_busy_pct>50.000000</ram_max_used_busy_pct>
24 <ram_max_used_idle_pct>90.000000</ram_max_used_idle_pct>
25 <max_bytes_sec_up>0.000000</max_bytes_sec_up>
26 <max_bytes_sec_down>0.000000</max_bytes_sec_down>
27 <cpu_usage_limit>25.000000</cpu_usage_limit>
28 <daily_xfer_limit_mb>0.000000</daily_xfer_limit_mb>
29 <daily_xfer_period_days>0</daily_xfer_period_days>
30</global_preferences>
接下来,我们将检查本示例文件中关于CPU的两个设置,这些设置是上面提到的。
第一個偏好是「cpu_usage_limit」,用來限制 SETI@home 使用的 CPU 數量. 示例檔案使用的設定為 25000000,這意味著 CPU 使用率限制在 25% 最高。
第二个偏好是suspend_cpu_usage
,用于在其他应用程序的 CPU 使用达到该级别时暂时暂停 SETI@home 操作。
您可以阅读更多关于 BOINC 偏好 在他们的维基。
保存和关闭文件后,启动 boinc-client. 这将允许 SETI@home 开始执行工作。
1sudo service boinc-client start
步骤四:验证新增的主机
大约五分钟后,新主机应该在网上出现. 连接的计算机可以在 SETI@home 帐户页面中查看。
步骤五:检查工作单位的状态
若要查看工作单元或任务的状态,请使用命令:
1boinccmd --get_simple_gui_info
请注意,此处显示您的 SETI@home 帐户信息,随后显示该特定主机上的当前执行任务。
以下是 --get_simple_gui_info 的示例输出:
1boinccmd --get_simple_gui_info
2======== Projects ========
31) -----------
4 name: SETI@home
5 master URL: http://setiathome.berkeley.edu/
6 user_name: stmiller
7 team_name: SETI.USA
8 resource share: 100.000000
9 user_total_credit: 33159.675770
10 user_expavg_credit: 1409.252845
11 host_total_credit: 0.000000
12 host_expavg_credit: 0.000000
13 nrpc_failures: 0
14 master_fetch_failures: 0
15 master fetch pending: no
16 scheduler RPC pending: no
17 trickle upload pending: no
18 attached via Account Manager: no
19 ended: no
20 suspended via GUI: no
21 don't request more work: no
22 disk usage: 0.000000
23 last RPC: 1423684749.199424
24 project files downloaded: 0.000000
25GUI URL:
26 name: Message boards
27 description: Correspond with other users on the SETI@home message boards
28 URL: http://setiathome.berkeley.edu/forum_index.php
29GUI URL:
30 name: Help
31 description: Ask questions and report problems
32 URL: http://setiathome.berkeley.edu/forum_help_desk.php
33GUI URL:
34 name: Your account
35 description: View your account information
36 URL: http://setiathome.berkeley.edu/home.php
37GUI URL:
38 name: Your preferences
39 description: View and modify your computing preferences
40 URL: http://setiathome.berkeley.edu/prefs.php?subset=global
41GUI URL:
42 name: Your results
43 description: View your last week (or more) of computational results and work
44 URL: http://setiathome.berkeley.edu/results.php?userid=9351194
45GUI URL:
46 name: Your computers
47 description: View a listing of all the computers on which you are running SETI@Home
48 URL: http://setiathome.berkeley.edu/hosts_user.php?userid=9351194
49GUI URL:
50 name: Your team
51 description: View information about your team: SETI.USA
52 URL: http://setiathome.berkeley.edu/team_display.php?teamid=115396
53GUI URL:
54 name: Donate
55 description: Donate to SETI@home
56 URL: http://setiathome.berkeley.edu/sah_donate.php
57
58======== Tasks ========
591) -----------
60 name: 25fe12ab.24545.17667.438086664204.12.226_0
61 WU name: 25fe12ab.24545.17667.438086664204.12.226
62 project URL: http://setiathome.berkeley.edu/
63 report deadline: Wed Mar 4 02:06:18 2015
64 ready to report: no
65 got server ack: no
66 final CPU time: 0.000000
67 state: downloaded
68 scheduler state: scheduled
69 exit_status: 0
70 signal: 0
71 suspended via GUI: no
72 active_task_state: EXECUTING
73 app version num: 701
74 checkpoint CPU time: 352.733700
75 current CPU time: 378.866400
76 fraction done: 0.088431
77 swap size: 110309376.000000
78 working set size: 40030207.999996
79 estimated CPU time remaining: 2505.901220
SETI@home 信用的状态也可以在您的 帐户页面中查看 计算和信用。
结论
SETI@home 论坛是有关运行 SETI@home 的新闻和问题的最佳场所。
若要加入一个团队,请参阅 团队页面!