项目作者: chausner

项目描述 :
PowerShell module for managing BOINC clients on local and remote hosts
高级语言: C#
项目地址: git://github.com/chausner/PSBoinc.git
创建时间: 2016-11-23T20:40:13Z
项目社区:https://github.com/chausner/PSBoinc

开源协议:GNU Lesser General Public License v3.0

下载


PSBoinc

PowerShell module for managing BOINC clients on local and remote hosts

PowerShell Gallery Version
license

Installation

Install via Install-Module PSBoinc -Scope CurrentUser.

Usage

RPC cmdlets operate in local or remote sessions. Local sessions are authenticated automatically:

  1. Enter-BoincSession

Remote sessions require the RPC password (can be looked up from gui_rpc_auth.cfg):

  1. Enter-BoincSession "192.168.0.11" "9096083b1c5a02d473a81784eb8e0862"

After a session has been opened, RPC cmdlets can be used to manage the client. Sessions are closed explicitly with Exit-BoincSession and implicitly when opening another session.

Help

Get a list of all cmdlets in PSBoinc:

  1. Get-Command -Module PSBoinc

Get help on command Add-BoincAccountManager:

  1. Get-Help Add-BoincAccountManager -Detailed

Examples

Do not receive new work from any project:

  1. Get-BoincProject | Set-BoincProject -NoMoreWork

Abort all tasks that are at least 3 days behind their deadline:

  1. Get-BoincTask | where { ([DateTimeOffset]::Now - $_.ReportDeadline).TotalDays -ge 3 } | Stop-BoincTask

Show a list of all current tasks from Rosetta@home and PrimeGrid, grouped by project and sorted by progress:

  1. Get-BoincTask -Project rosetta*,prime* | sort FractionDone -Descending | fl -GroupBy ProjectUrl -Property WorkunitName,FractionDone

Suspend tasks after their next checkpoint and shutdown the machine:

  1. while ($true)
  2. {
  3. Get-BoincTask | where { ($_.CurrentCpuTime - $_.CheckpointCpuTime).TotalSeconds -le 30 } | Suspend-BoincTask
  4. if (-not (Get-BoincTask | where Suspended -NE $true))
  5. {
  6. break
  7. }
  8. Start-Sleep -Seconds 10
  9. }
  10. Stop-Computer

Attach multiple remote clients to a project:

  1. "pc-01","pc-02","pc-03" | foreach {
  2. Enter-BoincSession $_ "9096083b1c5a02d473a81784eb8e0862"
  3. Add-BoincProject "http://boinc.bakerlab.org/rosetta" "johndoe@example.com" "P@ssW0rD!"
  4. }

Show benchmark results for a list of remote clients:

  1. "pc-01","pc-02","pc-03" | foreach {
  2. Enter-BoincSession $_
  3. $hostinfo = Get-BoincHostInformation
  4. [pscustomobject]@{Machine=$_;Whetstone=$hostinfo.FloatingPointOperations;Drhystone=$hostinfo.IntegerOperations}
  5. }