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

Does anyone have a working network-speed configuration for mac? #5

Open
dhaley opened this issue Apr 12, 2013 · 4 comments
Open

Does anyone have a working network-speed configuration for mac? #5

dhaley opened this issue Apr 12, 2013 · 4 comments

Comments

@dhaley
Copy link

dhaley commented Apr 12, 2013

I am tying on OS X with this config https://gist.github.com/dhaley/5373450.

Here is the output of my ifconfig command for both my wireless and wired devices.

https://gist.github.com/dhaley/5373463

What do I need to change in my network-speed-format-string to see my speed?

Perhaps this could be included in the doco for Mac folks.

Thanks.

@agpchil
Copy link
Collaborator

agpchil commented Apr 12, 2013

I'm not a mac user but I think the %RX, %TX and %AX formats in your network-speed-format-string should display the speed (RX for received, TX for transmitted and AX for RX+TX). It's not working? Can you provide more info like what values are displayed in your mode-line? Any error message during start or after eval network-speed?

@dhaley
Copy link
Author

dhaley commented Apr 15, 2013

@agpchil

After further digging, it appears OS X has no /proc/net/dev

So it makes sense with this network-speed-format-string:

%NI#%RB#%TB#%RX#%TX#%AX

I see the following values:

Interface: en1
Received bytes: 0 B
Transmitted bytes: 0 B
Download speed: *
Upload speed: *

I'll try to see if there is an OS equivalent for /proc/net/dev. So far the closest I can find this this command:

/usr/sbin/netstat -bi | grep en1, which provides this output:

en1 1500 <Link#5> 00:00:00:00:00:00 13112 0 1891446 617 0 90890 0
en1 1500 host.local fe00:0::0ed0:c0ff 13112 - 1891446 617 - 90890 -
en1 1500 10.0.0/22 rl1-2-198-247-d 13112 - 1891446 617 - 90890 -

Let me know if anyone reports a solution.

@agpchil
Copy link
Collaborator

agpchil commented Apr 15, 2013

Yes. That's the problem. /proc/net/dev is used to fetch the stats...

@Idorobots has a TODO entry to redo the network stats. It would be great if it can be done with OSX compatibility.

I'm currently trying to write a mode to easier the use and config of mode-line-stats.
If no one have solved this when I finish I'll give a try.

@agpchil
Copy link
Collaborator

agpchil commented Oct 6, 2013

@dhaley any updates on this issue?

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

No branches or pull requests

2 participants