Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
On 3/31/06, Ranga Nathan [EMAIL PROTECTED] wrote: Agree. But there are situations when you have to operate in single user mode to fix problems. You have to log into the console. The z/VM environment allows the virtual machine to be stopped when the terminal session is interrupted - by mistake or due to the network dropping out. You can use SCIF in an interactive mode, though it takes some programming to make it work nicely. This quick dirty program will set SECUSER and allow you to work with the target userid almost like if you were logged on to it. You can still get it into CP READ but not because your terminal session was terminated. /* LNXSEC EXEC Play secondary console for disconnected server */ /* Author: Rob van der Heij, 20 Feb 2006 */ arg uid . if uid = '' then exit 24 signal on error signal on novalue 'PIPE (end \)', '\ console eof /*/ asynch', '| f: fanout', '| take last', '| g: gate', '\ f:', '| cp: if pick w1 == ,CP,', '| spec ,SEND CP' uid ', 1 w2-* nw', '| cp:', '| spec ,SEND' uid ', 1 1-* nw', '| cp:', '| cp', '\ starmsg SET SECUSER' uid '*', '| g:', '| locate 8 /8/ ', '| pick 9.8 == ,'left(uid,8)', ', '| not chop after string /: /', '| split 15', '| locate', '| chop', '| cons', 'SET SECUSER' uid 'RESET' error: return rc -- Rob van der Heij Velocity Software, Inc -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
Do you have set run on in the CMS startup exec for your guests? Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Ranga Nathan Sent: Friday, March 31, 2006 12:29 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device -snip- ...there are situations when you have to operate in single user mode to fix problems. You have to log into the console. The z/VM environment allows the virtual machine to be stopped when the terminal session is interrupted - by mistake or due to the network dropping out. I see this as a weakness in a production situation. Having raised this issue a few times on this mailing list, I would like to know how best one can prevent or overcome it. No one is suggesting wanton log in to a terminal session and carelessly terminating without a disconnect. Suppose someone pulls the plug on me or my VPN session disconnects while I am not at my laptop. Any number of situations can lead to a production guest disappearing. My point is that we need to identify, understand the threat and find a way to deal with it. If there is no other way, then we will accept that and work that into the procedure. From what I understand that is probably the case here. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
Yes. I have, in all the guests. Post, Mark K wrote: Do you have set run on in the CMS startup exec for your guests? Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Ranga Nathan Sent: Friday, March 31, 2006 12:29 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device -snip- ...there are situations when you have to operate in single user mode to fix problems. You have to log into the console. The z/VM environment allows the virtual machine to be stopped when the terminal session is interrupted - by mistake or due to the network dropping out. I see this as a weakness in a production situation. Having raised this issue a few times on this mailing list, I would like to know how best one can prevent or overcome it. No one is suggesting wanton log in to a terminal session and carelessly terminating without a disconnect. Suppose someone pulls the plug on me or my VPN session disconnects while I am not at my laptop. Any number of situations can lead to a production guest disappearing. My point is that we need to identify, understand the threat and find a way to deal with it. If there is no other way, then we will accept that and work that into the procedure. From what I understand that is probably the case here. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- __ Ranga Nathan Work: 714-442-7591 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 begin:vcard fn:Ranga Nathan n:Nathan;Ranga email;internet:[EMAIL PROTECTED] tel;work:714-442-7591 version:2.1 end:vcard
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
Then you've done about all you can do from within the guest itself. If this is a frequent occurrence, then you might want to set up a lightweight healthcheck monitor, such as Hobbit, external to your guests. That should be able to give you sufficient warning that a guest is not responding to allow manual intervention that will keep it from being forced off by CP. Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Ranga Nathan Sent: Sunday, April 02, 2006 4:57 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device Yes. I have, in all the guests. Post, Mark K wrote: Do you have set run on in the CMS startup exec for your guests? Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Ranga Nathan Sent: Friday, March 31, 2006 12:29 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device -snip- ...there are situations when you have to operate in single user mode to fix problems. You have to log into the console. The z/VM environment allows the virtual machine to be stopped when the terminal session is interrupted - by mistake or due to the network dropping out. I see this as a weakness in a production situation. Having raised this issue a few times on this mailing list, I would like to know how best one can prevent or overcome it. No one is suggesting wanton log in to a terminal session and carelessly terminating without a disconnect. Suppose someone pulls the plug on me or my VPN session disconnects while I am not at my laptop. Any number of situations can lead to a production guest disappearing. My point is that we need to identify, understand the threat and find a way to deal with it. If there is no other way, then we will accept that and work that into the procedure. From what I understand that is probably the case here. -- __ Ranga Nathan Work: 714-442-7591 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
[snip] BTW is it enough for a guest to send the Q NAME command to keep the guest alive? I am trying to overcome the problem of a guest logging off after someone accidentally disconnects a terminal session. Following an earlier suggestion on this mailing list, I want to schedule a cron to issue a CP Q NAME or CP Q V STORE only to keep the session alive. Would it work? No. If the virtual machine is interrupted or placed in VM READ/CP READ due to the console going away, then your Linux-based command automation will never run -- the virtual machine is stopped waiting for that BEGIN command. The solution to your problem is to educate people to do what they need to do via SCIF (CP SEND) or other means. There's zero reason to be actually logging into the machine via the console during normal operations. -- db -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
David Boyes wrote: [snip] BTW is it enough for a guest to send the Q NAME command to keep the guest alive? I am trying to overcome the problem of a guest logging off after someone accidentally disconnects a terminal session. Following an earlier suggestion on this mailing list, I want to schedule a cron to issue a CP Q NAME or CP Q V STORE only to keep the session alive. Would it work? No. If the virtual machine is interrupted or placed in VM READ/CP READ due to the console going away, then your Linux-based command automation will never run -- the virtual machine is stopped waiting for that BEGIN command. The solution to your problem is to educate people to do what they need to do via SCIF (CP SEND) or other means. There's zero reason to be actually logging into the machine via the console during normal operations. Agree. But there are situations when you have to operate in single user mode to fix problems. You have to log into the console. The z/VM environment allows the virtual machine to be stopped when the terminal session is interrupted - by mistake or due to the network dropping out. I see this as a weakness in a production situation. Having raised this issue a few times on this mailing list, I would like to know how best one can prevent or overcome it. No one is suggesting wanton log in to a terminal session and carelessly terminating without a disconnect. Suppose someone pulls the plug on me or my VPN session disconnects while I am not at my laptop. Any number of situations can lead to a production guest disappearing. My point is that we need to identify, understand the threat and find a way to deal with it. If there is no other way, then we will accept that and work that into the procedure. From what I understand that is probably the case here. -- db -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- __ Ranga Nathan Work: 714-442-7591 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 begin:vcard fn:Ranga Nathan n:Nathan;Ranga email;internet:[EMAIL PROTECTED] tel;work:714-442-7591 version:2.1 end:vcard
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
I must be missing something here. I performed the steps you suggested and tried again. Got the same result. Checked modprobe list and found that there are two files and one is old: -rw-r--r-- 1 root root 20319 Mar 27 15:16 /lib/modules/2.6.5-7.97-s390/kernel/drivers/s390/char/cpint_mod.ko -rw-r--r-- 1 root root 19177 Jul 2 2004 /lib/modules/2.6.5-7.97-s390/extra/cpint.ko Regards Neale Ferguson wrote: There are a couple of ioctls that the driver uses. The most probable is the one that retrieves the return code. Does the zlt1 virtual machine receive the B? Can you use strace to trace the syscalls of hcp? Hang on a minute /dev/cpcmd isn't a device, there's no major/minor number. It's not even a symbolic link to one. What happens if you modprobe -r and then rm /dev/cpcmd. Then modprobe the module and see if the hotplug agent creates the device node correctly. Neale -Original Message- I downloaded and installed cpint 2.5.3 on SuSE9 s/390 Linux guest. Looks like the install went OK. But when I issue hcp cp send zlt1 q name I get the response zlt1:/home/tssrxn1 # hcp cp send zlt1 B Ioctl: Inappropriate ioctl for device Looks like the cpcmd device is in place. -rw-r--r-- 1 root root 20 Mar 27 15:53 /dev/cpcmd What am I doing wrong? Thanks Version info: Linux zlt1 2.6.5-7.97-s390 #1 SMP Fri Jul 2 14:21:59 UTC 2004 s390 s390 s390 GNU/Linux zlt1:/home/tssrxn1 # SPident CONCLUSION: ServicePack Level: SLES-9-s390 + updates = up-to-date Here is the install output zlt1:/home/tssrxn1/cpint-2.5.3 # make -C /lib/modules/`uname -r`/build M=`pwd` SUBDIRS=`pwd` modules make: Entering directory `/usr/src/linux-2.6.5-7.97-obj/s390/s390' make -C ../../../linux-2.6.5-7.97 O=../linux-2.6.5-7.97-obj/s390/s390 modules WARNING: Symbol version dump /usr/src/linux-2.6.5-7.97-obj/s390/s390/Module.symvers is missing, modules will have CONFIG_MODVERSIONS disabled. CC [M] /home/tssrxn1/cpint-2.5.3/cpint.o /home/tssrxn1/cpint-2.5.3/cpint.c: In function `cpint_init': /home/tssrxn1/cpint-2.5.3/cpint.c:274: warning: unused variable `i_conv' /home/tssrxn1/cpint-2.5.3/cpint.c: In function `cpint_cleanup': /home/tssrxn1/cpint-2.5.3/cpint.c:371: warning: unused variable `i_conv' CC [M] /home/tssrxn1/cpint-2.5.3/cmdmain.o CC [M] /home/tssrxn1/cpint-2.5.3/idmain.o CC [M] /home/tssrxn1/cpint-2.5.3/monmain.o /home/tssrxn1/cpint-2.5.3/monmain.c: In function `applMonGen': /home/tssrxn1/cpint-2.5.3/monmain.c:123: warning: comparison is always false due to limited range of data type CC [M] /home/tssrxn1/cpint-2.5.3/actmain.o LD [M] /home/tssrxn1/cpint-2.5.3/cpint_mod.o Building modules, stage 2. MODPOST CC /home/tssrxn1/cpint-2.5.3/cpint_mod.mod.o LD [M] /home/tssrxn1/cpint-2.5.3/cpint_mod.ko make: Leaving directory `/usr/src/linux-2.6.5-7.97-obj/s390/s390' zlt1:/home/tssrxn1/cpint-2.5.3 # make tools cc -o hcp.o -I. -O2 -c hcp.c cc -o hcp hcp.o cc -o mongen.o -I. -O2 -c mongen.c cc -o mongen mongen.o cc -o monstat.o -I. -O2 -c monstat.c cc -o sysinfo.o -I. -O2 -c sysinfo.c cc -o monstat monstat.o sysinfo.o cc -o actgen.o -I. -O2 -c actgen.c cc -o actgen actgen.o cc -o diag0.o -I. -O2 -c diag0.c cc -o diag0 diag0.o zlt1:/home/tssrxn1/cpint-2.5.3 # make install install -c -m 750 mongen /usr/sbin install -c -m 750 monstat /usr/sbin install -c -m 750 hcp /usr/sbin cp cpint_mod.ko /lib/modules/`uname -r`/kernel/drivers/s390/char/ rm -rf /dev/cpcmd /dev/cpmod /dev/cpappl /dev/cpid \ /dev/cpint0 /dev/cpint8 /dev/cpint76 /dev/cpint222 modprobe -qr cpint_mod depmod -a -- __ Ranga Nathan Work: 714-442-7591 -- __ Ranga Nathan Work: 714-442-7591 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- __ Ranga Nathan Work: 714-442-7591 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 begin:vcard fn:Ranga Nathan n:Nathan;Ranga email;internet:[EMAIL PROTECTED] tel;work:714-442-7591 version:2.1 end:vcard
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
Are there any messages on syslog when you load the driver? What does ls -l /dev/cpcmd show now? -Original Message- I must be missing something here. I performed the steps you suggested and tried again. Got the same result. Checked modprobe list and found that there are two files and one is old: -rw-r--r-- 1 root root 20319 Mar 27 15:16 /lib/modules/2.6.5-7.97-s390/kernel/drivers/s390/char/cpint_mod.ko -rw-r--r-- 1 root root 19177 Jul 2 2004 /lib/modules/2.6.5-7.97-s390/extra/cpint.ko -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
OK. I got it working. I performed a make install again, did a modprobe -r cpint_mod and then modprobe cpint_mod zlt1:/home/tssrxn1/cpint-2.5.3 # make install install -c -m 750 mongen /usr/sbin install -c -m 750 monstat /usr/sbin install -c -m 750 hcp /usr/sbin cp cpint_mod.ko /lib/modules/`uname -r`/kernel/drivers/s390/char/ rm -rf /dev/cpcmd /dev/cpmod /dev/cpappl /dev/cpid \ /dev/cpint0 /dev/cpint8 /dev/cpint76 /dev/cpint222 modprobe -qr cpint_mod depmod -a zlt1:/home/tssrxn1/cpint-2.5.3 # modprobe -r cpint_mod zlt1:/home/tssrxn1/cpint-2.5.3 # modprobe cpint_mod zlt1:/home/tssrxn1/cpint-2.5.3 # ls -l /dev/cpcmd crw-rw 1 root root 254, 8 Mar 29 19:58 /dev/cpcmd zlt1:/home/tssrxn1/cpint-2.5.3 # hcp cp send zlt1 B HCPSEC068E SEND command failed; receiver has not authorized sender OK, I know why. So I issued Q Name zlt1:/home/tssrxn1/cpint-2.5.3 # hcp cp q name ZLP3 - DSC , ZLP2 - DSC , DATAMOVE - DSC , DIRMAINT - DSC VSWCTRL1 - DSC , VMSERVR - DSC , VMSERVU - DSC , VMSERVS - DSC OPERSYMP - DSC , EREP - DSC , FTPSERVE - DSC , OPERATOR - DSC ZLP1 - DSC , ZLT3 - DSC , ZLT2 - DSC , TCPIP- DSC ZLT1 - DSC VSM - TCPIP I think I must have had a previous version of cpint somehow. The make install could have warned me of that. Thanks for 'waking' me up. BTW is it enough for a guest to send the Q NAME command to keep the guest alive? I am trying to overcome the problem of a guest logging off after someone accidentally disconnects a terminal session. Following an earlier suggestion on this mailing list, I want to schedule a cron to issue a CP Q NAME or CP Q V STORE only to keep the session alive. Would it work? TIA. Neale Ferguson wrote: Are there any messages on syslog when you load the driver? What does ls -l /dev/cpcmd show now? -Original Message- I must be missing something here. I performed the steps you suggested and tried again. Got the same result. Checked modprobe list and found that there are two files and one is old: -rw-r--r-- 1 root root 20319 Mar 27 15:16 /lib/modules/2.6.5-7.97-s390/kernel/drivers/s390/char/cpint_mod.ko -rw-r--r-- 1 root root 19177 Jul 2 2004 /lib/modules/2.6.5-7.97-s390/extra/cpint.ko -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- __ Ranga Nathan Work: 714-442-7591 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 begin:vcard fn:Ranga Nathan n:Nathan;Ranga email;internet:[EMAIL PROTECTED] tel;work:714-442-7591 version:2.1 end:vcard
Re: cpint install problem - what am I doing wrong? Ioctl: Inappropriate ioctl for device
There are a couple of ioctls that the driver uses. The most probable is the one that retrieves the return code. Does the zlt1 virtual machine receive the B? Can you use strace to trace the syscalls of hcp? Hang on a minute /dev/cpcmd isn't a device, there's no major/minor number. It's not even a symbolic link to one. What happens if you modprobe -r and then rm /dev/cpcmd. Then modprobe the module and see if the hotplug agent creates the device node correctly. Neale -Original Message- I downloaded and installed cpint 2.5.3 on SuSE9 s/390 Linux guest. Looks like the install went OK. But when I issue hcp cp send zlt1 q name I get the response zlt1:/home/tssrxn1 # hcp cp send zlt1 B Ioctl: Inappropriate ioctl for device Looks like the cpcmd device is in place. -rw-r--r-- 1 root root 20 Mar 27 15:53 /dev/cpcmd What am I doing wrong? Thanks Version info: Linux zlt1 2.6.5-7.97-s390 #1 SMP Fri Jul 2 14:21:59 UTC 2004 s390 s390 s390 GNU/Linux zlt1:/home/tssrxn1 # SPident CONCLUSION: ServicePack Level: SLES-9-s390 + updates = up-to-date Here is the install output zlt1:/home/tssrxn1/cpint-2.5.3 # make -C /lib/modules/`uname -r`/build M=`pwd` SUBDIRS=`pwd` modules make: Entering directory `/usr/src/linux-2.6.5-7.97-obj/s390/s390' make -C ../../../linux-2.6.5-7.97 O=../linux-2.6.5-7.97-obj/s390/s390 modules WARNING: Symbol version dump /usr/src/linux-2.6.5-7.97-obj/s390/s390/Module.symvers is missing, modules will have CONFIG_MODVERSIONS disabled. CC [M] /home/tssrxn1/cpint-2.5.3/cpint.o /home/tssrxn1/cpint-2.5.3/cpint.c: In function `cpint_init': /home/tssrxn1/cpint-2.5.3/cpint.c:274: warning: unused variable `i_conv' /home/tssrxn1/cpint-2.5.3/cpint.c: In function `cpint_cleanup': /home/tssrxn1/cpint-2.5.3/cpint.c:371: warning: unused variable `i_conv' CC [M] /home/tssrxn1/cpint-2.5.3/cmdmain.o CC [M] /home/tssrxn1/cpint-2.5.3/idmain.o CC [M] /home/tssrxn1/cpint-2.5.3/monmain.o /home/tssrxn1/cpint-2.5.3/monmain.c: In function `applMonGen': /home/tssrxn1/cpint-2.5.3/monmain.c:123: warning: comparison is always false due to limited range of data type CC [M] /home/tssrxn1/cpint-2.5.3/actmain.o LD [M] /home/tssrxn1/cpint-2.5.3/cpint_mod.o Building modules, stage 2. MODPOST CC /home/tssrxn1/cpint-2.5.3/cpint_mod.mod.o LD [M] /home/tssrxn1/cpint-2.5.3/cpint_mod.ko make: Leaving directory `/usr/src/linux-2.6.5-7.97-obj/s390/s390' zlt1:/home/tssrxn1/cpint-2.5.3 # make tools cc -o hcp.o -I. -O2 -c hcp.c cc -o hcp hcp.o cc -o mongen.o -I. -O2 -c mongen.c cc -o mongen mongen.o cc -o monstat.o -I. -O2 -c monstat.c cc -o sysinfo.o -I. -O2 -c sysinfo.c cc -o monstat monstat.o sysinfo.o cc -o actgen.o -I. -O2 -c actgen.c cc -o actgen actgen.o cc -o diag0.o -I. -O2 -c diag0.c cc -o diag0 diag0.o zlt1:/home/tssrxn1/cpint-2.5.3 # make install install -c -m 750 mongen /usr/sbin install -c -m 750 monstat /usr/sbin install -c -m 750 hcp /usr/sbin cp cpint_mod.ko /lib/modules/`uname -r`/kernel/drivers/s390/char/ rm -rf /dev/cpcmd /dev/cpmod /dev/cpappl /dev/cpid \ /dev/cpint0 /dev/cpint8 /dev/cpint76 /dev/cpint222 modprobe -qr cpint_mod depmod -a -- __ Ranga Nathan Work: 714-442-7591 -- __ Ranga Nathan Work: 714-442-7591 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390