€•3zŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ'/translations/zh_CN/arch/s390/monreader”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/zh_TW/arch/s390/monreader”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/it_IT/arch/s390/monreader”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ja_JP/arch/s390/monreader”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ko_KR/arch/s390/monreader”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/pt_BR/arch/s390/monreader”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/sp_SP/arch/s390/monreader”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ1Linux API for read access to z/VM Monitor Records”h]”hŒ1Linux API for read access to z/VM Monitor Records”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒA/var/lib/git/docbuild/linux/Documentation/arch/s390/monreader.rst”h´KubhŒ paragraph”“”)”}”(hŒDate : 2004-Nov-26”h]”hŒDate : 2004-Nov-26”…””}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)”}”(hŒ-Author: Gerald Schaefer (geraldsc@de.ibm.com)”h]”(hŒAuthor: Gerald Schaefer (”…””}”(hhÛh²hh³Nh´NubhŒ reference”“”)”}”(hŒgeraldsc@de.ibm.com”h]”hŒgeraldsc@de.ibm.com”…””}”(hhåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:geraldsc@de.ibm.com”uh1hãhhÛubhŒ)”…””}”(hhÛh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)”}”(hhh]”(h»)”}”(hŒ Description”h]”hŒ Description”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhÿh²hh³hÊh´K ubhÌ)”}”(hŒÊThis item delivers a new Linux API in the form of a misc char device that is usable from user space and allows read access to the z/VM Monitor Records collected by the `*MONITOR` System Service of z/VM.”h]”(hŒ¨This item delivers a new Linux API in the form of a misc char device that is usable from user space and allows read access to the z/VM Monitor Records collected by the ”…””}”(hjh²hh³Nh´NubhŒtitle_reference”“”)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubhŒ System Service of z/VM.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhÿh²hubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1hµhh·h²hh³hÊh´K ubh¶)”}”(hhh]”(h»)”}”(hŒUser Requirements”h]”hŒUser Requirements”…””}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj:h²hh³hÊh´KubhÌ)”}”(hXÆThe z/VM guest on which you want to access this API needs to be configured in order to allow IUCV connections to the `*MONITOR` service, i.e. it needs the IUCV `*MONITOR` statement in its user entry. If the monitor DCSS to be used is restricted (likely), you also need the NAMESAVE statement. This item will use the IUCV device driver to access the z/VM services, so you need a kernel with IUCV support. You also need z/VM version 4.4 or 5.1.”h]”(hŒuThe z/VM guest on which you want to access this API needs to be configured in order to allow IUCV connections to the ”…””}”(hjKh²hh³Nh´Nubj)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjKubhŒ! service, i.e. it needs the IUCV ”…””}”(hjKh²hh³Nh´Nubj)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjKubhX statement in its user entry. If the monitor DCSS to be used is restricted (likely), you also need the NAMESAVE statement. This item will use the IUCV device driver to access the z/VM services, so you need a kernel with IUCV support. You also need z/VM version 4.4 or 5.1.”…””}”(hjKh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj:h²hubhÌ)”}”(hX)There are two options for being able to load the monitor DCSS (examples assume that the monitor DCSS begins at 144 MB and ends at 152 MB). You can query the location of the monitor DCSS with the Class E privileged CP command Q NSS MAP (the values BEGPAG and ENDPAG are given in units of 4K pages).”h]”hX)There are two options for being able to load the monitor DCSS (examples assume that the monitor DCSS begins at 144 MB and ends at 152 MB). You can query the location of the monitor DCSS with the Class E privileged CP command Q NSS MAP (the values BEGPAG and ENDPAG are given in units of 4K pages).”…””}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj:h²hubhÌ)”}”(hŒÞSee also "CP Command and Utility Reference" (SC24-6081-00) for more information on the DEF STOR and Q NSS MAP commands, as well as "Saved Segments Planning and Administration" (SC24-6116-00) for more information on DCSSes.”h]”hŒæSee also “CP Command and Utility Reference†(SC24-6081-00) for more information on the DEF STOR and Q NSS MAP commands, as well as “Saved Segments Planning and Administration†(SC24-6116-00) for more information on DCSSes.”…””}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K!hj:h²hubh¶)”}”(hhh]”(h»)”}”(hŒ 1st option:”h]”hŒ 1st option:”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj™h²hh³hÊh´K&ubhÌ)”}”(hŒˆYou can use the CP command DEF STOR CONFIG to define a "memory hole" in your guest virtual storage around the address range of the DCSS.”h]”hŒŒYou can use the CP command DEF STOR CONFIG to define a “memory hole†in your guest virtual storage around the address range of the DCSS.”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K'hj™h²hubhÌ)”}”(hŒ)Example: DEF STOR CONFIG 0.140M 200M.200M”h]”hŒ)Example: DEF STOR CONFIG 0.140M 200M.200M”…””}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K*hj™h²hubhÌ)”}”(hX This defines two blocks of storage, the first is 140MB in size an begins at address 0MB, the second is 200MB in size and begins at address 200MB, resulting in a total storage of 340MB. Note that the first block should always start at 0 and be at least 64MB in size.”h]”hX This defines two blocks of storage, the first is 140MB in size an begins at address 0MB, the second is 200MB in size and begins at address 200MB, resulting in a total storage of 340MB. Note that the first block should always start at 0 and be at least 64MB in size.”…””}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K,hj™h²hubeh}”(h]”Œ st-option”ah ]”h"]”Œ 1st option:”ah$]”h&]”uh1hµhj:h²hh³hÊh´K&ubh¶)”}”(hhh]”(h»)”}”(hŒ 2nd option:”h]”hŒ 2nd option:”…””}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÜh²hh³hÊh´K2ubhÌ)”}”(hŒËYour guest virtual storage has to end below the starting address of the DCSS and you have to specify the "mem=" kernel parameter in your parmfile with a value greater than the ending address of the DCSS.”h]”hŒÏYour guest virtual storage has to end below the starting address of the DCSS and you have to specify the “mem=†kernel parameter in your parmfile with a value greater than the ending address of the DCSS.”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K3hjÜh²hubhÌ)”}”(hŒ Example::”h]”hŒExample:”…””}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K7hjÜh²hubhŒ literal_block”“”)”}”(hŒ DEF STOR 140M”h]”hŒ DEF STOR 140M”…””}”hj sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j h³hÊh´K9hjÜh²hubhÌ)”}”(hŒbThis defines 140MB storage size for your guest, the parameter "mem=160M" is added to the parmfile.”h]”hŒfThis defines 140MB storage size for your guest, the parameter “mem=160M†is added to the parmfile.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K;hjÜh²hubeh}”(h]”Œ nd-option”ah ]”h"]”Œ 2nd option:”ah$]”h&]”uh1hµhj:h²hh³hÊh´K2ubeh}”(h]”Œuser-requirements”ah ]”h"]”Œuser requirements”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒUser Interface”h]”hŒUser Interface”…””}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj9h²hh³hÊh´K@ubhÌ)”}”(hX‹The char device is implemented as a kernel module named "monreader", which can be loaded via the modprobe command, or it can be compiled into the kernel instead. There is one optional module (or kernel) parameter, "mondcss", to specify the name of the monitor DCSS. If the module is compiled into the kernel, the kernel parameter "monreader.mondcss=" can be specified in the parmfile.”h]”hX—The char device is implemented as a kernel module named “monreaderâ€, which can be loaded via the modprobe command, or it can be compiled into the kernel instead. There is one optional module (or kernel) parameter, “mondcssâ€, to specify the name of the monitor DCSS. If the module is compiled into the kernel, the kernel parameter “monreader.mondcss=†can be specified in the parmfile.”…””}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KAhj9h²hubhÌ)”}”(hX=The default name for the DCSS is "MONDCSS" if none is specified. In case that there are other users already connected to the `*MONITOR` service (e.g. Performance Toolkit), the monitor DCSS is already defined and you have to use the same DCSS. The CP command Q MONITOR (Class E privileged) shows the name of the monitor DCSS, if already defined, and the users connected to the `*MONITOR` service. Refer to the "z/VM Performance" book (SC24-6109-00) on how to create a monitor DCSS if your z/VM doesn't have one already, you need Class E privileges to define and save a DCSS.”h]”(hŒThe default name for the DCSS is “MONDCSS†if none is specified. In case that there are other users already connected to the ”…””}”(hjXh²hh³Nh´Nubj)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjXubhŒñ service (e.g. Performance Toolkit), the monitor DCSS is already defined and you have to use the same DCSS. The CP command Q MONITOR (Class E privileged) shows the name of the monitor DCSS, if already defined, and the users connected to the ”…””}”(hjXh²hh³Nh´Nubj)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjXubhŒÁ service. Refer to the “z/VM Performance†book (SC24-6109-00) on how to create a monitor DCSS if your z/VM doesn’t have one already, you need Class E privileges to define and save a DCSS.”…””}”(hjXh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KHhj9h²hubh¶)”}”(hhh]”(h»)”}”(hŒExample:”h]”hŒExample:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjŠh²hh³hÊh´KSubj )”}”(hŒ!modprobe monreader mondcss=MYDCSS”h]”hŒ!modprobe monreader mondcss=MYDCSS”…””}”hj›sbah}”(h]”h ]”h"]”h$]”h&]”jjuh1j h³hÊh´KWhjŠh²hubhÌ)”}”(hŒ9This loads the module and sets the DCSS name to "MYDCSS".”h]”hŒ=This loads the module and sets the DCSS name to “MYDCSSâ€.”…””}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KYhjŠh²hubeh}”(h]”Œexample”ah ]”h"]”h$]”Œexample:”ah&]”uh1hµhj9h²hh³hÊh´KSŒ referenced”Kubh¶)”}”(hhh]”(h»)”}”(hŒNOTE:”h]”hŒNOTE:”…””}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÀh²hh³hÊh´K\ubhÌ)”}”(hŒ×This API provides no interface to control the `*MONITOR` service, e.g. specify which data should be collected. This can be done by the CP command MONITOR (Class E privileged), see "CP Command and Utility Reference".”h]”(hŒ.This API provides no interface to control the ”…””}”(hjÑh²hh³Nh´Nubj)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÑubhŒ£ service, e.g. specify which data should be collected. This can be done by the CP command MONITOR (Class E privileged), see “CP Command and Utility Referenceâ€.”…””}”(hjÑh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K]hjÀh²hubeh}”(h]”Œnote”ah ]”h"]”h$]”Œnote:”ah&]”uh1hµhj9h²hh³hÊh´K\j¿Kubh¶)”}”(hhh]”(h»)”}”(hŒDevice nodes with udev:”h]”hŒDevice nodes with udev:”…””}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjùh²hh³hÊh´KbubhÌ)”}”(hŒoAfter loading the module, a char device will be created along with the device node //monreader.”h]”hŒoAfter loading the module, a char device will be created along with the device node //monreader.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kchjùh²hubeh}”(h]”Œdevice-nodes-with-udev”ah ]”h"]”Œdevice nodes with udev:”ah$]”h&]”uh1hµhj9h²hh³hÊh´Kbubh¶)”}”(hhh]”(h»)”}”(hŒDevice nodes without udev:”h]”hŒDevice nodes without udev:”…””}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´KgubhÌ)”}”(hXIf your distribution does not support udev, a device node will not be created automatically and you have to create it manually after loading the module. Therefore you need to know the major and minor numbers of the device. These numbers can be found in /sys/class/misc/monreader/dev.”h]”hXIf your distribution does not support udev, a device node will not be created automatically and you have to create it manually after loading the module. Therefore you need to know the major and minor numbers of the device. These numbers can be found in /sys/class/misc/monreader/dev.”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhj h²hubhÌ)”}”(hŒðTyping cat /sys/class/misc/monreader/dev will give an output of the form :. The device node can be created via the mknod command, enter mknod c , where is the name of the device node to be created.”h]”hŒðTyping cat /sys/class/misc/monreader/dev will give an output of the form :. The device node can be created via the mknod command, enter mknod c , where is the name of the device node to be created.”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kmhj h²hubeh}”(h]”Œdevice-nodes-without-udev”ah ]”h"]”Œdevice nodes without udev:”ah$]”h&]”uh1hµhj9h²hh³hÊh´Kgubh¶)”}”(hhh]”(h»)”}”(hŒExample:”h]”hŒExample:”…””}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjUh²hh³hÊh´Ksubj )”}”(hŒ]# modprobe monreader # cat /sys/class/misc/monreader/dev 10:63 # mknod /dev/monreader c 10 63”h]”hŒ]# modprobe monreader # cat /sys/class/misc/monreader/dev 10:63 # mknod /dev/monreader c 10 63”…””}”hjfsbah}”(h]”h ]”h"]”h$]”h&]”jjuh1j h³hÊh´KwhjUh²hubhÌ)”}”(hŒXThis loads the module with the default monitor DCSS (MONDCSS) and creates a device node.”h]”hŒXThis loads the module with the default monitor DCSS (MONDCSS) and creates a device node.”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K|hjUh²hubeh}”(h]”Œid1”ah ]”h"]”h$]”j½ah&]”uh1hµhj9h²hh³hÊh´Ksj¿Kubh¶)”}”(hhh]”(h»)”}”(hŒFile operations:”h]”hŒFile operations:”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj‰h²hh³hÊh´K€ubhÌ)”}”(hŒèThe following file operations are supported: open, release, read, poll. There are two alternative methods for reading: either non-blocking read in conjunction with polling, or blocking read without polling. IOCTLs are not supported.”h]”hŒèThe following file operations are supported: open, release, read, poll. There are two alternative methods for reading: either non-blocking read in conjunction with polling, or blocking read without polling. IOCTLs are not supported.”…””}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj‰h²hubeh}”(h]”Œfile-operations”ah ]”h"]”Œfile operations:”ah$]”h&]”uh1hµhj9h²hh³hÊh´K€ubh¶)”}”(hhh]”(h»)”}”(hŒRead:”h]”hŒRead:”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj°h²hh³hÊh´K‡ubhÌ)”}”(hXæReading from the device provides a 12 Byte monitor control element (MCE), followed by a set of one or more contiguous monitor records (similar to the output of the CMS utility MONWRITE without the 4K control blocks). The MCE contains information on the type of the following record set (sample/event data), the monitor domains contained within it and the start and end address of the record set in the monitor DCSS. The start and end address can be used to determine the size of the record set, the end address is the address of the last byte of data. The start address is needed to handle "end-of-frame" records correctly (domain 1, record 13), i.e. it can be used to determine the record start offset relative to a 4K page (frame) boundary.”h]”hXêReading from the device provides a 12 Byte monitor control element (MCE), followed by a set of one or more contiguous monitor records (similar to the output of the CMS utility MONWRITE without the 4K control blocks). The MCE contains information on the type of the following record set (sample/event data), the monitor domains contained within it and the start and end address of the record set in the monitor DCSS. The start and end address can be used to determine the size of the record set, the end address is the address of the last byte of data. The start address is needed to handle “end-of-frame†records correctly (domain 1, record 13), i.e. it can be used to determine the record start offset relative to a 4K page (frame) boundary.”…””}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kˆhj°h²hubhÌ)”}”(hŒæSee "Appendix A: `*MONITOR`" in the "z/VM Performance" document for a description of the monitor control element layout. The layout of the monitor records can be found here (z/VM 5.1): https://www.vm.ibm.com/pubs/mon510/index.html”h]”(hŒSee “Appendix A: ”…””}”(hjÏh²hh³Nh´Nubj)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÏubhŒ¤â€ in the “z/VM Performance†document for a description of the monitor control element layout. The layout of the monitor records can be found here (z/VM 5.1): ”…””}”(hjÏh²hh³Nh´Nubhä)”}”(hŒ-https://www.vm.ibm.com/pubs/mon510/index.html”h]”hŒ-https://www.vm.ibm.com/pubs/mon510/index.html”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jëuh1hãhjÏubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K“hj°h²hubhÌ)”}”(hŒNThe layout of the data stream provided by the monreader device is as follows::”h]”hŒMThe layout of the data stream provided by the monreader device is as follows:”…””}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K—hj°h²hubj )”}”(hŒ·... <0 byte read> \ | ... |- data set | / <0 byte read> ...”h]”hŒ·... <0 byte read> \ | ... |- data set | / <0 byte read> ...”…””}”hj sbah}”(h]”h ]”h"]”h$]”h&]”jjuh1j h³hÊh´K™hj°h²hubhÌ)”}”(hXThere may be more than one combination of MCE and corresponding record set within one data set and the end of each data set is indicated by a successful read with a return value of 0 (0 byte read). Any received data must be considered invalid until a complete set was read successfully, including the closing 0 byte read. Therefore you should always read the complete set into a buffer before processing the data.”h]”hXThere may be more than one combination of MCE and corresponding record set within one data set and the end of each data set is indicated by a successful read with a return value of 0 (0 byte read). Any received data must be considered invalid until a complete set was read successfully, including the closing 0 byte read. Therefore you should always read the complete set into a buffer before processing the data.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K£hj°h²hubhÌ)”}”(hX^The maximum size of a data set can be as large as the size of the monitor DCSS, so design the buffer adequately or use dynamic memory allocation. The size of the monitor DCSS will be printed into syslog after loading the module. You can also use the (Class E privileged) CP command Q NSS MAP to list all available segments and information about them.”h]”hX^The maximum size of a data set can be as large as the size of the monitor DCSS, so design the buffer adequately or use dynamic memory allocation. The size of the monitor DCSS will be printed into syslog after loading the module. You can also use the (Class E privileged) CP command Q NSS MAP to list all available segments and information about them.”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kªhj°h²hubhÌ)”}”(hŒµAs with most char devices, error conditions are indicated by returning a negative value for the number of bytes read. In this case, the errno variable indicates the error condition:”h]”hŒµAs with most char devices, error conditions are indicated by returning a negative value for the number of bytes read. In this case, the errno variable indicates the error condition:”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K°hj°h²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ„EIO: reply failed, read data is invalid and the application should discard the data read since the last successful read with 0 size.”h]”(hŒterm”“”)”}”(hŒEIO:”h]”hŒEIO:”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´KµhjKubhŒ definition”“”)”}”(hhh]”hÌ)”}”(hŒreply failed, read data is invalid and the application should discard the data read since the last successful read with 0 size.”h]”hŒreply failed, read data is invalid and the application should discard the data read since the last successful read with 0 size.”…””}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kµhjaubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjKubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KµhjFubjJ)”}”(hŒŽEFAULT: copy_to_user failed, read data is invalid and the application should discard the data read since the last successful read with 0 size.”h]”(jP)”}”(hŒEFAULT:”h]”hŒEFAULT:”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K¸hj~ubj`)”}”(hhh]”hÌ)”}”(hŒ†copy_to_user failed, read data is invalid and the application should discard the data read since the last successful read with 0 size.”h]”hŒ†copy_to_user failed, read data is invalid and the application should discard the data read since the last successful read with 0 size.”…””}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¸hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj~ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K¸hjFh²hubjJ)”}”(hŒ¶EAGAIN: occurs on a non-blocking read if there is no data available at the moment. There is no data missing or corrupted, just try again or rather use polling for non-blocking reads.”h]”(jP)”}”(hŒEAGAIN:”h]”hŒEAGAIN:”…””}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K¼hj­ubj`)”}”(hhh]”hÌ)”}”(hŒ®occurs on a non-blocking read if there is no data available at the moment. There is no data missing or corrupted, just try again or rather use polling for non-blocking reads.”h]”hŒ®occurs on a non-blocking read if there is no data available at the moment. There is no data missing or corrupted, just try again or rather use polling for non-blocking reads.”…””}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K»hj¿ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj­ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K¼hjFh²hubjJ)”}”(hŒ‹EOVERFLOW: message limit reached, the data read since the last successful read with 0 size is valid but subsequent records may be missing. ”h]”(jP)”}”(hŒ EOVERFLOW:”h]”hŒ EOVERFLOW:”…””}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´KÀhjÜubj`)”}”(hhh]”hÌ)”}”(hŒmessage limit reached, the data read since the last successful read with 0 size is valid but subsequent records may be missing.”h]”hŒmessage limit reached, the data read since the last successful read with 0 size is valid but subsequent records may be missing.”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¿hjîubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjÜubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KÀhjFh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jDhj°h²hh³hÊh´NubhÌ)”}”(hŒÏIn the last case (EOVERFLOW) there may be missing data, in the first two cases (EIO, EFAULT) there will be missing data. It's up to the application if it will continue reading subsequent data or rather exit.”h]”hŒÑIn the last case (EOVERFLOW) there may be missing data, in the first two cases (EIO, EFAULT) there will be missing data. It’s up to the application if it will continue reading subsequent data or rather exit.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÂhj°h²hubeh}”(h]”Œread”ah ]”h"]”Œread:”ah$]”h&]”uh1hµhj9h²hh³hÊh´K‡ubh¶)”}”(hhh]”(h»)”}”(hŒOpen:”h]”hŒOpen:”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj'h²hh³hÊh´KÇubhÌ)”}”(hXÂOnly one user is allowed to open the char device. If it is already in use, the open function will fail (return a negative value) and set errno to EBUSY. The open function may also fail if an IUCV connection to the `*MONITOR` service cannot be established. In this case errno will be set to EIO and an error message with an IPUSER SEVER code will be printed into syslog. The IPUSER SEVER codes are described in the "z/VM Performance" book, Appendix A.”h]”(hŒÖOnly one user is allowed to open the char device. If it is already in use, the open function will fail (return a negative value) and set errno to EBUSY. The open function may also fail if an IUCV connection to the ”…””}”(hj8h²hh³Nh´Nubj)”}”(hŒ `*MONITOR`”h]”hŒ*MONITOR”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj8ubhŒæ service cannot be established. In this case errno will be set to EIO and an error message with an IPUSER SEVER code will be printed into syslog. The IPUSER SEVER codes are described in the “z/VM Performance†book, Appendix A.”…””}”(hj8h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÈhj'h²hubeh}”(h]”Œopen”ah ]”h"]”Œopen:”ah$]”h&]”uh1hµhj9h²hh³hÊh´KÇubh¶)”}”(hhh]”(h»)”}”(hŒNOTE:”h]”hŒNOTE:”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj`h²hh³hÊh´KÐubhÌ)”}”(hŒòAs soon as the device is opened, incoming messages will be accepted and they will account for the message limit, i.e. opening the device without reading from it will provoke the "message limit reached" error (EOVERFLOW error code) eventually.”h]”hŒöAs soon as the device is opened, incoming messages will be accepted and they will account for the message limit, i.e. opening the device without reading from it will provoke the “message limit reached†error (EOVERFLOW error code) eventually.”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÑhj`h²hubeh}”(h]”Œid2”ah ]”h"]”h$]”j÷ah&]”uh1hµhj9h²hh³hÊh´KÐj¿Kubeh}”(h]”Œuser-interface”ah ]”h"]”Œuser interface”ah$]”h&]”uh1hµhh·h²hh³hÊh´K@ubeh}”(h]”Œ1linux-api-for-read-access-to-z-vm-monitor-records”ah ]”h"]”Œ1linux api for read access to z/vm monitor records”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j¹Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j“jj7j4j6j3jÙjÖj.j+j‹jˆŒexample:”NŒnote:”NjjjRjOj­jªj$j!j]jZuŒ nametypes”}”(j“‰j7‰j6‰jÙ‰j.‰j‹‰jý‰jþ‰j‰jR‰j­‰j$‰j]‰uh}”(jh·j4hÿj3j:jÖj™j+jÜjˆj9j¹jŠjójÀjjùjOj j„jUjªj‰j!j°jZj'jj`uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jÇKs…”R”Œparse_messages”]”(hŒsystem_message”“”)”}”(hhh]”hÌ)”}”(hŒ+Duplicate implicit target name: "example:".”h]”hŒ/Duplicate implicit target name: “example:â€.”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËhjubah}”(h]”h ]”h"]”h$]”h&]”j„aŒlevel”KŒtype”ŒINFO”Œsource”hÊŒline”Ksuh1jhjUh²hh³hÊh´Ksubj)”}”(hhh]”hÌ)”}”(hŒ(Duplicate implicit target name: "note:".”h]”hŒ,Duplicate implicit target name: “note:â€.”…””}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËhj;ubah}”(h]”h ]”h"]”h$]”h&]”jaŒlevel”KŒtype”j8Œsource”hÊŒline”KÐuh1jhj`h²hh³hÊh´KÐubeŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.