This is the same as 'write $SYSTEM.INetInfo.EthernetAddress(0)' in recent versions.
As said we prefer to not use $zu anymore, but since availability of the helper classes depend on what version is used, $zu might be the only possibility unless they upgrade.
I checked for versions 2009.1/2010.1: unfortunately, the $zu(114,0) returns nothing, therefore, remains variant with the command line.
Example for Windows, provided that the system has a single network card:
#include %syConfig
n result
w $zu(144,1,$$$DEFETHADDR),!,"------",!
d $system.OBJ.DisplayError(##class(%Net.Remote.Utility).RunCommandViaCPIPE("getmac /NH /fo table",,.result))
w $p(result," ",1)
By default, the mac address of the computer on which the DBMS instance is running is returned.
But you can get the mac address of any other computer, see getmac /?.
Look at https://irisdocs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls for more info.
Thanks.But I have something wrong with my description,I want know how to use M get Computer physical address.
Really thank you,sir.Version 2010 don't have,version 2016 have this method.
Hi Vitaliy,
This is the same as 'write $SYSTEM.INetInfo.EthernetAddress(0)' in recent versions.
As said we prefer to not use $zu anymore, but since availability of the helper classes depend on what version is used, $zu might be the only possibility unless they upgrade.
Thank you Vitaliy,but just as Danny say,it is the same as 'write $SYSTEM.INetInfo.EthernetAddress(0)',and in cache 2010 I can not use '
w $$$DEFETHADDR
'
What version are you using and on what platform (Caché/Ensemble/Iris) ?
I use cache 2010.
I know.
After all the author requested the solution on pure M and not COS.
I checked for versions 2009.1/2010.1: unfortunately, the $zu(114,0) returns nothing, therefore, remains variant with the command line.
Example for Windows, provided that the system has a single network card:
PS: for other OS command line may be different.
Thank you again ,Vitaliy .
d $system.OBJ.DisplayError(##class(%Net.Remote.Utility).RunCommandViaCPIPE("getmac /NH /fo table",,.result)) w $p(result," ",1)
this method might be return the server physical address.If I use this method on my pc (PC as server),it return ture physical address.
By default, the mac address of the computer on which the DBMS instance is running is returned.
But you can get the mac address of any other computer, see getmac /?.
Hello,
This isn't the question you asked, but since you mentioned $ZU functions, please bear in mind that:
Your specific example, $ZU(67,15,$j), is replaced by ##class(%SYSTEM.Process).ClientIPAddress($j).
Best,
Aaron
Try this:
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue