AW: shell("netstat -i") has getting slow on MacOS10.x

Tiemo Hollmann TB toolbook at kestner.de
Thu Mar 30 14:17:35 EDT 2017


:)  you are right!

So I think I'll manage to replace the old and slow function using "netstat" by "ifconfig" as well as by "networksetup"
I have no idea, why the external programmer choose "netstat" at that time (2009). Does anybody see any pitfalls, why "ifconfig" or "networksetup" could return other results (after filtering, sorting etc.) or why I shouldn't use one of them? Are these commands the same available as netstat in modern Oss (> 10.9)? networksetup seems to be the easiest solution and is fast as ifconfig.

Thanks for any advice
Tiemo

-----Ursprüngliche Nachricht-----
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag von Mike Bonner via use-livecode
Gesendet: Donnerstag, 30. März 2017 20:02
An: How to use LiveCode <use-livecode at lists.runrev.com>
Cc: Mike Bonner <bonnmike at gmail.com>
Betreff: Re: shell("netstat -i") has getting slow on MacOS10.x

If you call it with no arguments, doesn't it list them all?  I'll have to get my mac running again so I can test this stuff.

On Thu, Mar 30, 2017 at 11:52 AM, Tiemo Hollmann TB via use-livecode < use-livecode at lists.runrev.com> wrote:

> Yes, using ifconfig <interface> I get exact 1 MAC (see Ken Rays script 
> as Klaus pointed out). I don't see a parameter to get all at once, but 
> I could perhaps call ifconfig 4 times with <interface> lo0, en0,en1 
> and fw0. Or I will try to use "networksetup -listallhardwareports”, as 
> Marc pointed out Don't ask me why I need exactly these 4 interfaces. 
> The old function, working with netstat is made by an external 
> programmer and I have to get exact the same results as the old 
> function has provided, so I need these 4 interfaces.
> Tiemo
>
> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im 
> Auftrag von Bob Sneidar via use-livecode
> Gesendet: Donnerstag, 30. März 2017 18:52
> An: How to use LiveCode <use-livecode at lists.runrev.com>
> Cc: Bob Sneidar <bobsneidar at iotecdigital.com>
> Betreff: Re: shell("netstat -i") has getting slow on MacOS10.x
>
> That works great for the default adapter. I think Tiemo is looking for 
> a way to enumerate ALL adapter mac addresses. I have like 24 entries 
> using netstat. Some are ipv6 addresses, others ipv4, and still others 
> have no mac address at all. Of course I am using Parallels and have 2 
> physical network adapters and a couple virtual ones.
>
> Bob S
>
>
> > On Mar 30, 2017, at 09:06 , Klaus major-k via use-livecode
> <use-livecode at lists.runrev.com> wrote:
> >
> > using this script from Ken Ray:
> > <http://www.sonsothunder.com/devres/livecode/tips/env001.htm>
> > took 30 millisecs on my Mac Mini, macOS 10.12.4 and LC 9 dp6.  :-)
> >
> >> Tiemo
> >
> > Best
> >
> > Klaus
> >
> > --
> > Klaus Major
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list