In article <cahm_n2k-eg5ofeh0rirvr4eddp9pwq85phmi4vf_yfoea2t...@mail.gmail.com> you wrote: > Minor suggestion; should use:
> System.out.println( new String(cpuid, > ZFile.DEFAULT_EBCDIC_CODE_PAGE) ); > otherwise, the default file.encoding is used, which is very often > "ISO8849-1" on z/OS I'm guessing you meant ISO8859-1. It's not that way at our shop, but I suppose if you deal mostly with ascii, it would make sense. > Kirk Wolf > Dovetailed Technologies > http://dovetail.com > On Wed, Sep 18, 2013 at 12:08 PM, Denis G?bler > <[email protected]>wrote: > > Hi Arye, > > > > this will give you the CPUID from the first PCCA. > > > > long cvt = ZUtil.peekOSMemory(16, 4); > > long cvtpccat = ZUtil.peekOSMemory(cvt+764, 4); > > long pcca = ZUtil.peekOSMemory(cvtpccat + 0*4, 4); > > byte[] cpuid = new byte[12]; > > ZUtil.peekOSMemory(pcca+4, cpuid, 0, 12); > > System.out.println(new String(cpuid)); > > > > Output Example: > > FF1111112097 > > > > Matches D M=CPU Output: > > RESPONSE=SYS1 > > IEE174I 16.50.42 DISPLAY M 166 > > PROCESSOR STATUS > > ID CPU SERIAL > > 00 + 1111112097 > > > > Its z/OS dependent code. Hope it helps. > > > > > > > > Denis. > > > > > > > > -----Original Message----- > > From: Arye Shemer <[email protected]> > > To: IBM-MAIN <[email protected]> > > Sent: Tue, Sep 17, 2013 9:21 pm > > Subject: Re: Get CPUID and srial number from JAVA code > > > > > > Thank you guys, > > I will consider all the options. > > > > Thanks again, > > Arye. > > > > > > On 17 September 2013 18:54, Bernd Oppolzer <[email protected] > > >wrote: > > > > > I wrote an ANSI C function that fetched this information using > > > the callable service CSRSI (System Information Service), > > > so if nothing else helps, you should IMO be able to call this > > > using JNI. > > > > > > Kind regards > > > > > > Bernd > > > > > > > > > > > > Am 17.09.2013 15:28, schrieb Arye Shemer: > > > > > >> Hi, > > >> > > >> Has anyone know how I can get CPUID and machine serial number from JAVA > > >> code ? > > >> > > >> Is there a z/OS Java forum that I can get help on this issue ? > > >> > > >> thanks, > > >> > > >> Arye Shemer. -- Don Poitras - SAS Development - SAS Institute Inc. - SAS Campus Drive [email protected] (919) 531-5637 Cary, NC 27513 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
