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

Fix for network-throughput widget #164

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions network-throughput/network-throughput.widget/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ network_interface = 'en0'

# Sample for one second, one time
# The command actually takes longer than 1 second to execute
command: "sar -n DEV 1 1 | grep #{network_interface} | tail -n1 | awk '{print $4,$6}'"
command: "sar -n DEV 1 1 2> /dev/null | awk '/#{network_interface}/{x++}x==2 {print $4,$6;exit}'"

# Even though the command takes longer than 1 second to execute, 1000ms
# seems to work best (widget output updates approx every 3 seconds)
refreshFrequency: 1000
refreshFrequency: 3000

style: """
top: 20px
Expand Down