Tiemo,

You may need to use two commands if you need the information from both Macs and 
PCs.

On the Mac, "networksetup -listallhardwareports” in the shell should give you a 
report that looks like this:
MLRCTBHUB:~ msiskin$ networksetup -listallhardwareports

Hardware Port: Thunderbolt Ethernet Slot 2
Device: en6
Ethernet Address: 00:10:74:b8:02:fd

Hardware Port: Thunderbolt FireWire
Device: fw0
Ethernet Address: 00:0a:27:02:00:6d:57:03

Hardware Port: Wi-Fi
Device: en0
Ethernet Address: f4:5c:89:9e:70:d7

Hardware Port: Bluetooth PAN
Device: en3
Ethernet Address: 7c:d1:c3:9a:1b:cd

Hardware Port: Thunderbolt 1
Device: en1
Ethernet Address: 6a:00:01:b2:92:70

Hardware Port: Thunderbolt 2
Device: en2
Ethernet Address: 6a:00:01:b2:92:71

Hardware Port: Thunderbolt Bridge
Device: bridge0
Ethernet Address: 00:10:74:b8:02:fd

VLAN Configurations
===================
MLRCTBHUB:~ msiskin$

On PCs, you may be able to use the command “getmac” in a shell which should 
give you a report that looks like this:


C:\>getmac
Physical Address    Transport Name
=================== ==========================================================
2C-3F-45-02-1B-32   \Device\Tcpip_{7E49B486-120A-4BC2-2114-B345A4D5C5}
10-13-17-BC-12-48   Media disconnected
22-B3-C5-30-76-78   \Device\Tcpip_{213E8D2A-1DBE-4240-8301-BE6F3EACAF9D}
00-05-2A-3C-78-00   \Device\Tcpip_{F01E3FC2-A5A1-6940-D1A1-C7521AEC4296}
2C-23-45-14-23-AD   Media disconnected
C:\>

Now I haven’t tried this on PCs, so your milage may vary.  But the macOS 
version does work.

Good luck,
Marc


On Mar 30, 2017, at 8:40 AM, Tiemo Hollmann TB via use-livecode 
<use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>> wrote:

Hi Marc,
I need the MAC addresses from all network adapters. How can you narrow the
scope of this request?
Tiemo


-----Ursprüngliche Nachricht-----
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von Marc Siskin via use-livecode
Gesendet: Donnerstag, 30. März 2017 14:15
An: How to use LiveCode 
<use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>>
Cc: Marc Siskin <msis...@andrew.cmu.edu<mailto:msis...@andrew.cmu.edu>>
Betreff: Re: shell("netstat -i") has getting slow on MacOS10.x

Tiemo,

I ran the command directly on my Macos 12.4 laptop and it took about 20
seconds to generate the entire listing.

Is there specific information you are looking to obtain?  You may be able to
narrow the scope of the request and generate it faster.

Marc Siskin

On Mar 30, 2017, at 7:57 AM, Tiemo Hollmann TB via use-livecode
<use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com><mailto:use-livecode@lists.runrev.com>>
 wrote:

Hello,

I am not sure where to start searching and I am not good under the hood of
Macs.

I am retrieving MAC addresses:

put "netstat -I" into myShell

put shell(myShell) into tRes

In former times that has taken "a few" seconds, now it takes around 20
seconds. First I tested, if it was a slowdown of LC 8/9, but in LC 6.7.10 it
is almost the same 20 secs. I am not sure, when the decrease actually
happened, but if it is not LC then it must be an issue of one of the latest
MacOSs.

Has anybody any idea, if I can optimize anything in the performance of this
shell request? Could it be any permission issue in the new OS? Anything I
could workaround, or do I have to take this shell call as it is?

Thanks for any ideas

Tiemo







_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com><mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

---------------
Marc Siskin
Manager, Modern Language Resource Center Carnegie Mellon University
msis...@andrew.cmu.edu<mailto:msis...@andrew.cmu.edu>



_______________________________________________
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

---------------
Marc Siskin
Manager, Modern Language Resource Center
Carnegie Mellon University
msis...@andrew.cmu.edu<mailto:msis...@andrew.cmu.edu>



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to