Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

do a fflush() in the awk script#19

Open
jgeraerts wants to merge 1 commit into
samoshkin:mastersamoshkin/tmux-plugin-sysstat:masterfrom
jgeraerts:fix-osx-cpujgeraerts/tmux-plugin-sysstat:fix-osx-cpuCopy head branch name to clipboard
Open

do a fflush() in the awk script#19
jgeraerts wants to merge 1 commit into
samoshkin:mastersamoshkin/tmux-plugin-sysstat:masterfrom
jgeraerts:fix-osx-cpujgeraerts/tmux-plugin-sysstat:fix-osx-cpuCopy head branch name to clipboard

Conversation

@jgeraerts

Copy link
Copy Markdown

stdbuf is not available on osx so flush the output using fflush in awk.

stdbuf is not available on osx so flush the output using fflush in awk.
Comment thread scripts/cpu_collect.sh
if command_exists "iostat"; then
iostat -w "$refresh_interval" -c "$samples_count" \
| stdbuf -o0 awk 'NR > 2 { print 100-$(NF-3); }'
| awk 'NR > 2 { print 100-$(NF-3); fflush(""); }'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@jgeraerts fix problem on M1

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.