Re: inotify article
On Fri, 2010-09-10 at 10:06 -0500, McKown, John wrote: > I'm not a real Linux heavy programmer (even though I weigh in at 230 > pounds ). I found this article on inotify to be interesting: Have a look at inotify-tools - very handy for bash. The "tail" utility has (finally) been updated to use inotify rather than polling. Shane ... -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: inotify article
On Fri, Sep 10, 2010 at 5:06 PM, McKown, John wrote: > I'm not a real Linux heavy programmer (even though I weigh in at 230 pounds > ). I found this article on inotify to be interesting: > > http://www.ibm.com/developerworks/opensource/library/l-inotify/index.html Yes, it's neat. On my PC I have a backup application that uses it to identify the files to be backed up. Forward it to all middleware developers of a famous large software vendor too ;-) I frequently find their products implement a "hot directory" by scanning the directory in a polling loop... | Rob -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
inotify article
I'm not a real Linux heavy programmer (even though I weigh in at 230 pounds ). I found this article on inotify to be interesting: http://www.ibm.com/developerworks/opensource/library/l-inotify/index.html John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-691-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: vmur usage ?
On Fri, Sep 10, 2010 at 9:46 AM, Agblad Tore wrote: > It seams like I only have to wait for kernel 2.6.34 > > http://public.dhe.ibm.com/software/dw/linux390/docu/lk34dd06.pdf > > Chapter 24. > > It's not vmur, but it covers the same purpose :) Right, that's the stuff Sir Martin was referring to. Though it has been published upstream around 2.6.34, the distributions can retrofit on an earlier kernel in their distribution (or back-patch, as the Linux folks call it). So you'd need to know which service pack or update ships it. And for SMSG between LPARs, you'd still need several parts of CSE in place (I believe it comes with shared spool). | Rob PS You did make me notice that the "34" in the document name probably refers to the "34" in the kernel level. Never realized that... Wonder if the "06" is for the "2.6" :-) -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Wolf Rempt is er niet
I will be out of the office starting 10-09-2010 and will not return until 11-09-2010. Ik ben mobiel bereikbaar ! -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: vmur usage ?
It seams like I only have to wait for kernel 2.6.34 http://public.dhe.ibm.com/software/dw/linux390/docu/lk34dd06.pdf Chapter 24. It's not vmur, but it covers the same purpose :) ___ Tore Agblad Volvo Information Technology Infrastructure Mainframe Design & Development, Linux servers Dept 4352 DA1S SE-405 08, Gothenburg Sweden Telephone: +46-31-3233569 E-mail: tore.agb...@volvo.com http://www.volvo.com/volvoit/global/en-gb/ -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of David Boyes Sent: den 9 september 2010 16:51 To: LINUX-390@VM.MARIST.EDU Subject: Re: vmur usage ? > > Now it starts to look interesting :) > > Where is source of that example program ? > Re: AF_IUCV. Yes, it would also work, but the programming is more > complex. There's something to the ability to just use plain old 'cat' > or any language that understands file I/O to deal with IUCV that I like > about Neale's driver. In fact, it's so small, here's the whole sample program. This code takes anything delivered to the guest via *MSG (the classes you specify) and copies it to syslog and a terminal. Works for CPCONIO, MSG, SMSG, etc, etc -- anything you can SET IUCV. #include #include #include #include #include #define FSIUCV_IOC_MAGIC 'u' #define IUCV_IOCRESET _IO(FSIUCV_IOC_MAGIC, 0) #define IUCVTCS _IOW(FSIUCV_IOC_MAGIC, 1, int) #define IUCVTCG _IOR(FSIUCV_IOC_MAGIC, 1, int) #define IUCVONE _IOW(FSIUCV_IOC_MAGIC, 1, char) /* * This sample assumes we're playing with the *MSG service but it should be * able to drive any connection */ typedef struct iucvMsg { char userid[8]; char msgText[1016]; } iucvMsg; static char *class[] = { "MSG ", "WNG ", "CPIO", "SMSG", "VMIO", "EMSG", "IMSG", "SCIF" }; int main(int argc, char **argv) { iconv_t cd; int fd, i_buf, trgcls; size_t count, outCount; char buffer[1024], output[1024]; char *pBuffer, *pOutput, userName[9]; size_t *pCount = (size_t *) & count, *pOutCount = (size_t *) & outCount, iconvSz; iucvMsg *msgData = (iucvMsg *) & output[0]; printf("User ID Class\tMessage\n" "--- -\t\n"); userName[8] = 0; cd = iconv_open("ASCII", "EBCDIC-US"); fd = open("/dev/iucv0", O_RDONLY); count = read(fd, &buffer, sizeof (buffer)); while (count > 0) { pBuffer = (char *) &buffer; pOutput = (char *) &output; ioctl(fd, IUCVTCG, (char *) &trgcls); outCount = sizeof (output); iconvSz = iconv(cd, &pBuffer, pCount, &pOutput, pOutCount); output[sizeof (output) - outCount] = 0; memcpy(userName, msgData->userid, sizeof (msgData->userid)); printf("%s [%s]\t%s\n", userName, class[trgcls-1], msgData->msgText); syslog(LOG_INFO, "[%s] %s %s\n", class[trgcls - 1], userName, msgData->msgText); if (strcmp("STOP", msgData->msgText) == 0) break; count = read(fd, &buffer, sizeof (buffer)); } close(fd); iconv_close(cd); } Note that the guts of it are simply opening /dev/iucv0 as a sequential file and doing sequential blocking reads. Even Fortran can do that. 8-) It also correctly processes distributed IUCV, so if you have ISFC or TSAF active, it will work cross-system. Might also work with IPGATE; haven't tested it. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/