Re: Reading VMLOGS files from Linux (cmsfs-fuse)
Thank You Alan! Had wanted to figure that out for a long time but never had time to do all the research. Best Regards, Doug On May 19, 2016, at 16:42, Alan Altmark wrote: On Thursday, 05/19/2016 at 08:24 GMT, Mauro Souza wrote: > That was a question I had for some time but never got time to pursue: how > to unpack the files? It's something from Linux or from zVM? Without an update to cms-fuse, it's simplest just to unpack them with CMS before you mount the disk. There's nothing magical about packed files. Those of you who have loaded the VM source (and who can read assembler) can see exactly how you expand a packed by by looking at label DMSXINPK in module DMSXIN ASSEMBLE. Alan Altmark Senior Managing z/VM and Linux Consultant Lab Services System z Delivery Practice IBM Systems & Technology Group ibm.com/systems/services/labservices office: 607.429.3323 mobile; 607.321.7556 alan_altm...@us.ibm.com IBM Endicott -- 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/
Re: How to unformat a dasd drive?
On 19 May 2016 at 21:51, Mark Post wrote: On 5/19/2016 at 04:41 PM, Alan Altmark wrote: > >> I did. Unfortunately, being ignorant of script writing on Linux, I don't >> know any more than I did before I read it. :-) > > Ah, well... In that case, I check to see if there's 1 or 3 numbers separated > by periods specified for the device. So, 0123 versus 0.0.0123. If one > number, then I pre-pend 0.0. to it, otherwise I leave it alone, other than to > make sure the first two "levels" are a single digit each. Then I look in > /sys/bus/ccw/devices/ to see if that busid exists. If not, bail out. > > There are other sanity checks, but in essence, I already did what you > suggested when I first wrote the script. I just didn't allow 0.0123 as a > valid input. > leading zeros can be ignored. E.g. with chzdev - 200, 0200, 0.0.0200 are all valid... Funnily enough "0.0200" is not valid, although it is stable id too. -- Regards, Dimitri. -- 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: How to unformat a dasd drive?
>>> On 5/19/2016 at 04:41 PM, Alan Altmark wrote: > I did. Unfortunately, being ignorant of script writing on Linux, I don't > know any more than I did before I read it. :-) Ah, well... In that case, I check to see if there's 1 or 3 numbers separated by periods specified for the device. So, 0123 versus 0.0.0123. If one number, then I pre-pend 0.0. to it, otherwise I leave it alone, other than to make sure the first two "levels" are a single digit each. Then I look in /sys/bus/ccw/devices/ to see if that busid exists. If not, bail out. There are other sanity checks, but in essence, I already did what you suggested when I first wrote the script. I just didn't allow 0.0123 as a valid input. Mark Post -- 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: Reading VMLOGS files from Linux (cmsfs-fuse)
On Thursday, 05/19/2016 at 08:24 GMT, Mauro Souza wrote: > That was a question I had for some time but never got time to pursue: how > to unpack the files? It's something from Linux or from zVM? Without an update to cms-fuse, it's simplest just to unpack them with CMS before you mount the disk. There's nothing magical about packed files. Those of you who have loaded the VM source (and who can read assembler) can see exactly how you expand a packed by by looking at label DMSXINPK in module DMSXIN ASSEMBLE. Alan Altmark Senior Managing z/VM and Linux Consultant Lab Services System z Delivery Practice IBM Systems & Technology Group ibm.com/systems/services/labservices office: 607.429.3323 mobile; 607.321.7556 alan_altm...@us.ibm.com IBM Endicott -- 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: Reading VMLOGS files from Linux (cmsfs-fuse)
We could teach the “file" command on linux to recognize such files. It just uses signature-type information. On 5/19/16, 4:27 PM, "Linux on 390 Port on behalf of Scott Rohling" wrote: >If I 'browse' (or TYPE for that matter) a COPYFILE packed file - it looks >much the same as it did from the Linux... > >That being said - if I was the cms-fuse developer I would probably push >back on this... just because XEDIT was smart and did the unpack >internally doesn't mean the driver should try and do the same. Isn't the >onus on the application opening the file to read it correctly - just as it >is in under CMS?Is cms-fuse supposed to incorporate the unpack? What >about terse, vmarc, et al?Seems like a slippery slope unless I just >plain misunderstood you. (never happens :-) -- 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: How to unformat a dasd drive?
On Thursday, 05/19/2016 at 08:18 GMT, Mark Post wrote: > Take a look at my script. I did. Unfortunately, being ignorant of script writing on Linux, I don't know any more than I did before I read it. :-) Alan Altmark Senior Managing z/VM and Linux Consultant Lab Services System z Delivery Practice IBM Systems & Technology Group ibm.com/systems/services/labservices office: 607.429.3323 mobile; 607.321.7556 alan_altm...@us.ibm.com IBM Endicott -- 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: Reading VMLOGS files from Linux (cmsfs-fuse)
If I 'browse' (or TYPE for that matter) a COPYFILE packed file - it looks much the same as it did from the Linux... That being said - if I was the cms-fuse developer I would probably push back on this... just because XEDIT was smart and did the unpack internally doesn't mean the driver should try and do the same. Isn't the onus on the application opening the file to read it correctly - just as it is in under CMS?Is cms-fuse supposed to incorporate the unpack? What about terse, vmarc, et al?Seems like a slippery slope unless I just plain misunderstood you. (never happens :-) Scott Rohling On Thu, May 19, 2016 at 1:00 PM, Alan Altmark wrote: > On Thursday, 05/19/2016 at 06:28 GMT, Tito Garrido > wrote: > > Issue solved by Alan, the files were packed by VMLOGS... I had unpacked > the > > file and Linux can read it. > > I would probably open a ticket on the cms-fuse support. Alas, there's no > indicator of "packed-ness" in the file descriptor (FST), so cms-fuse would > have to heuristically determine the packed/unpacked status of a file. > (That's how XEDIT works.) > > Alan Altmark > > Senior Managing z/VM and Linux Consultant > Lab Services System z Delivery Practice > IBM Systems & Technology Group > ibm.com/systems/services/labservices > office: 607.429.3323 > mobile; 607.321.7556 > alan_altm...@us.ibm.com > IBM Endicott > > -- > 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/
Re: Reading VMLOGS files from Linux (cmsfs-fuse)
That was a question I had for some time but never got time to pursue: how to unpack the files? It's something from Linux or from zVM? On May 19, 2016 17:02, "Alan Altmark" wrote: > On Thursday, 05/19/2016 at 06:28 GMT, Tito Garrido > wrote: > > Issue solved by Alan, the files were packed by VMLOGS... I had unpacked > the > > file and Linux can read it. > > I would probably open a ticket on the cms-fuse support. Alas, there's no > indicator of "packed-ness" in the file descriptor (FST), so cms-fuse would > have to heuristically determine the packed/unpacked status of a file. > (That's how XEDIT works.) > > Alan Altmark > > Senior Managing z/VM and Linux Consultant > Lab Services System z Delivery Practice > IBM Systems & Technology Group > ibm.com/systems/services/labservices > office: 607.429.3323 > mobile; 607.321.7556 > alan_altm...@us.ibm.com > IBM Endicott > > -- > 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/
Re: How to unformat a dasd drive?
>>> On 5/19/2016 at 04:10 PM, Alan Altmark wrote: > I think a reasonable compromise would be that if the $devno doesn't have a > dot in it, you can prefix it with "0.0.". If it has just one dot, prefix > it with "0.". > > That way both the lazy and the OCD among us can happy! :-) Take a look at my script. Mark Post -- 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: How to unformat a dasd drive?
On Thursday, 05/19/2016 at 04:57 GMT, Malcolm Beattie wrote: > OK, best make it > my $dev = "/dev/disk/by-path/ccw-$devno"; > and have the caller ensure the argument is passed in canonical form. I think a reasonable compromise would be that if the $devno doesn't have a dot in it, you can prefix it with "0.0.". If it has just one dot, prefix it with "0.". That way both the lazy and the OCD among us can happy! :-) Alan Altmark Senior Managing z/VM and Linux Consultant Lab Services System z Delivery Practice IBM Systems & Technology Group ibm.com/systems/services/labservices office: 607.429.3323 mobile; 607.321.7556 alan_altm...@us.ibm.com IBM Endicott -- 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: Reading VMLOGS files from Linux (cmsfs-fuse)
On Thursday, 05/19/2016 at 06:28 GMT, Tito Garrido wrote: > Issue solved by Alan, the files were packed by VMLOGS... I had unpacked the > file and Linux can read it. I would probably open a ticket on the cms-fuse support. Alas, there's no indicator of "packed-ness" in the file descriptor (FST), so cms-fuse would have to heuristically determine the packed/unpacked status of a file. (That's how XEDIT works.) Alan Altmark Senior Managing z/VM and Linux Consultant Lab Services System z Delivery Practice IBM Systems & Technology Group ibm.com/systems/services/labservices office: 607.429.3323 mobile; 607.321.7556 alan_altm...@us.ibm.com IBM Endicott -- 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: Reading VMLOGS files from Linux (cmsfs-fuse)
Issue solved by Alan, the files were packed by VMLOGS... I had unpacked the file and Linux can read it. Thanks! Tito On Wed, May 18, 2016 at 4:36 PM, Tito Garrido wrote: > Hi Folks, > > I have a bunch of console logs from VMLOGS that I would like to read from > Linux. I have used cmsfs-fuse -a to mount it on /mnt but there are a lot of > strange chars in the file: > > cat MAINT9.SYSPROG > FdoDMSACP723I T (1193) R/O%nDMSACP723I B (5E5) R/O_nDMSACP723I D (51D) > R/O_nDMSACP723I E (551) R/O_▒coPRESS ENTER TO CONTINUE%▒c▒Ready; > T=0.01/0.01 14:26:05▒ebkrjob▒'▒Ready; T=0.46/0.48 > 14:29:22▒elogoff▒'▒CONNECT= 00:03:23 VIRTCPU= 000:00.46 TOTCPU= > 000:00.49(vLOGOFF AT 14:29:26 BRT FRIDAY 05/13/16)▒ > > Is there a way to fix it? > > Regards, > > Tito > -- > > Linux User #387870 > . > _/_õ|__| > ..º[ .-.___.-._| . . . . > .__( o)__( o).:___ > -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- 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: How to unformat a dasd drive?
Mark Post writes: > >>> On 5/19/2016 at 07:33 AM, Malcolm Beattie wrote: > > my $dev = sprintf("/dev/disk/by-path/ccw-0.0.%04s", $devno); > > You should not assume that the first two pieces of the busid will always be > 0.0. Even today, it can be 0.1 or 0.2, etc., depending on what CSS the > device is in. OK, best make it my $dev = "/dev/disk/by-path/ccw-$devno"; and have the caller ensure the argument is passed in canonical form. --Malcolm -- Malcolm Beattie Linux and System z Technical Consultant, zChampion IBM UK Systems and Technology Group -- 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: How to unformat a dasd drive?
>>> On 5/19/2016 at 07:33 AM, Malcolm Beattie wrote: > my $dev = sprintf("/dev/disk/by-path/ccw-0.0.%04s", $devno); You should not assume that the first two pieces of the busid will always be 0.0. Even today, it can be 0.1 or 0.2, etc., depending on what CSS the device is in. Mark Post -- 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: How to unformat a dasd drive?
Mark Post writes: > >>> On 5/18/2016 at 04:27 PM, Malcolm Beattie wrote: > -snip- > > So an ad hoc and quick and dirty way to write a couple of tracks > > of a lone R0 that'll be treated by Linux as "n/f" is (starting > > with DASD device 777 offline): > > Cool, it does indeed work. So I wrapped a script around that and uploaded it > to http://wiki.linuxvm.org/wiki/Projects_and_Software/Scripts for anyone > that's interested in it. > > Bug reports are welcome, but don't expect rapid turnaround. :) Having the following "llunformat" as the low-level script that does the unformatting (invoke as "llunformat devno") may be preferable in terms of keeping people's lunch down compared to the Perl one-liner: #!/usr/bin/perl # Copyright 2016 IBM United Kingdom Ltd # Author: Malcolm Beattie, IBM # Last update: 19 May 2016 # Sample code - NO WARRANTY # use strict; sub ckd { my ($c, $h, $r, $key, $data) = @_; my $count = pack("nnCCn", $c, $h, $r, length($key), length($data)); return $count . $key . $data; } sub track { my ($data) = @_; return $data . ("\xff" x 8) . ("\0" x (65536 - 8 - length($data))); } my $devno = shift @ARGV or die "Usage: llunformat devno\n"; my $dev = sprintf("/dev/disk/by-path/ccw-0.0.%04s", $devno); my @cmd = (qw(dd bs=65536 oflag=direct), "of=$dev"); open(DD, "|-", @cmd) or die "dd: $!\n"; for (my $h = 0; $h < 2; $h++) { print DD track(ckd(0, $h, 0, "", "\0" x 8)); } --Malcolm -- Malcolm Beattie Linux and System z Technical Consultant, zChampion IBM UK Systems and Technology Group -- 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/