Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance / reduce CPU load and disk IO #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andreasbrett
Copy link

Tail'ing the last 1000 lines twice every second results in unnecessary CPU load and disk I/O. I changed this to use the -Wait feature of Get-Content. Could shave down CPU usage from 3-4% to 0-1%.

First run will fetch the last 1000 lines of the Teams logfile and process them. After that Get-Content will monitor the file for changes and only report those to the subsequent Scriptblock.

@jimmyeao
Copy link

jimmyeao commented Dec 3, 2021

nice, running this and it works well

@vmax77
Copy link

vmax77 commented Dec 15, 2021

This is really nice. I seem to get an error when I use the script from this commit. Any idea what I might be doing wrong?

image

@andreasbrett
Copy link
Author

This is really nice. I seem to get an error when I use the script from this commit. Any idea what I might be doing wrong?

image

Sorry, I can't help here. I'm not using this script as a service as that is not permitted on my work laptop (for good reasons).

@felipecrs
Copy link

felipecrs commented Dec 21, 2021

I'm using as a service and it's working for me just fine. I would advise to merge this, as it brings major benefits.

@vmax77
Copy link

vmax77 commented Dec 22, 2021

I fixed it with changing the ENV var back to full path, and then it works

@chriscolden
Copy link

im using this as a service with the full path not env and its working great.

@AntoineGS
Copy link

Since this project seems abandoned I've created a copy here: https://github.com/AntoineGS/TeamsStatusV2
I have merged your PR in it already!

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.

6 participants