Is there any linux command or java code to find the MAC address of the Mainfrane machine? . I have tried to execute 'ifconfig' command from the OMVS region and it doesnot work. Any help would be much appreciated. Thanks in advance.
Asked
Active
Viewed 1,037 times
0
-
Really, get everything you need from your technical support. They'll be able to tell you, and to tell you if what you want to do with it is something they will allow. – Bill Woodger Mar 08 '17 at 00:01
-
I'd agree with Bill, but also ask, why do you want to know? Mainframes are usually very heavily virtualized; chances are good that any OSA card is being used by multiple images. – Kevin McKenzie Mar 08 '17 at 02:38
-
Just a few clarifiers...you mention "linux command" - the response below is a z/OS command, not a linux command. If you're really running Linux on your mainframe, then the information below isn't what you want. Of course, since you mention OMVS, you probably really didn't mean linux - you meant "is there a command like linux ifconfig that I can use in z/OS", and then the command below is what you want. – Valerie R Mar 08 '17 at 15:15
-
Second point, be aware that mainframe may have zero to many MAC addresses, depending on how your system is connected to your network. z/OS lets you run multiple TCP/IP stacks concurrently, and each can have different configurations. To get an accurate answer, even with the DISPLAY TCPIP command, you'd need to understand which TCP/IP stack you are connecting to if more than one exists, and of course, each could have many connected interfaces, giving you multiple MAC addresses to choose from. – Valerie R Mar 08 '17 at 15:18
-
Third point is that MAC address tends to imply Ethernet connections of some type, but there are other options commonly used on mainframes. An example would be virtual CTC (channel to channel) adapters...this lets one system act almost as a gateway or firewall to multiple LPARs, and in this type of configuration, your particular z/OS might not have any sort of Ethernet hardware directly connected - there would be no MAC address at all in this case. – Valerie R Mar 08 '17 at 15:21
-
Thanks @Valerie R. My requirement is that I have to provide license for my software that should be installed only on that machine. The license should work only on that machine. In windows we use MAC address to tie the software license to the system. How can we achieve the same here in mainframe ? – Vel Mar 08 '17 at 15:25
-
MAC address is not the correct solution for licensing controls on the mainframe - there are just too many unusual cases that make this problematic for mainframe customers. For instance, one I didn't mention is z/OS running under z/VM (think VMware for mainframes)...in this environment, MAC's are completely meaningless. – Valerie R Mar 08 '17 at 15:53
-
1I know the mainframe licensing issue well (I'm a former developer from a company that sold lots of mainframe software)...if you're selling to these folks, you're selling to the largest companies in the world, and almost all aren't out to cheat. I'd lean towards creating a log file (many use SMF) so that you can see the usage of your product...contractually require the customer to submit this log periodically and use it to do a "true up" - much friendlier than enforcing something based on unique identifier such as a MAC address. – Valerie R Mar 08 '17 at 15:57
-
If you must, the unique thing on a mainframe is the CPU serial number - in C/C++, there's a __get_cpuid() function that gives you the model number and serial number for the system you're running on. You can use this directly, or if you have stuff expecting MACs, it's not too hard to morph the CPU serial number into a "virtual" identifier that looks something like a MAC. Keep in mind though that mainframe sites tend to switch processors on a regular basis, so it can be challenging to keep up with the changes in a large site if you go this way (and frustrating to the customer). – Valerie R Mar 08 '17 at 16:01
-
Thanks for your reply. It was really helpful. – Vel Mar 20 '17 at 18:01
-
I am suck with this issue. Any help would be much appreciable. http://stackoverflow.com/questions/42910613/fwrite-failed-edc5024ian-attempt-was-made-to-close-a-file-that-had-been-ope – Vel Mar 20 '17 at 18:01
1 Answers
2
Can not really say that I know, I have limited Mainframe skills.
But with some IBM search I found this:
Use the DISPLAY TCPIP,,OSAINFO command to retrieve information for active IPAQENET and IPAQENET6 interfaces.
https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.halu101/dosainfo.htm
and look at page 236:
Diagnostic TCP/IP commands Commands used to display TCP/IP and network
information include NETSTAT, PING, and TRACERTE. The following
commands can be issued from an ISPF/TSO session. By omitting the TSO
prefix, the same commands can be entered at a UNIX System Services
prompt. However, the command must be in lower case. The UNIX command
options for Netstat are shown in parentheses.
TSO NETSTAT ROUTE
Displays routing information (-r).
TSO NETSTAT HOME
Displays the home IP addresses for the IP stack (-h).
TSO NETSTAT DEV
Displays the device status for the defined network interfaces (-d).
TSO NETSTAT STATS
Displays performance statistics (-S).
TSO NETSTAT VIPADCFG
Displays dynamic VIPA configuration data (-F).
TSO NETSTAT SOCKETS
Displays sockets based on client name (-s).
TCP/IP connections (-c)
Displays information for all TCP/IP connections (-c).
in https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.znetwork/znetwork_book.pdf

MrSimpleMind
- 7,890
- 3
- 40
- 45
-
1Just a brief FYI. At this moment, all the IBM links seem busted (to anything). Normal service will be resumed... the links in the answer are correct. – Bill Woodger Mar 08 '17 at 00:00