Skip to content

Conversation

@tludusan
Copy link

@tludusan tludusan commented Oct 9, 2019

…ically based on CPU utilization percentage

[x] This contribution adheres to CONTRIBUTING.md.

What does this Pull Request accomplish?

This PR creates a new asset for for examples. It also adds an initial example in the form of a python script that can track utilization automatically based on CPU utilization percentage. New README was added for the asset folder, and existing README was update.

Why should this Pull Request be merged?

This provides a useful script that can be used to mark the system as utilized (or some assets from it) whenever the CPU utilization percentage goes over a specified threshold.

What testing has been done?

The example script has been tested on the supported OS with a SystemLink Client installation.

@tludusan tludusan requested a review from joshuaprewitt October 9, 2019 13:28
@adelcast adelcast requested a review from skizunov October 14, 2019 16:05
Copy link

@adelcast adelcast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending Sergey's feedback resolution

import time
import winreg

with winreg.OpenKey(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic should be put into a private function but called globally (since you need the path for an import).

return minutes * 60


def loop():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Private function (prefix with underscore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants