Re: [linux-lvm] indistinguishable column names ( BA Start Start Start Start )
use json output and familiarize yourself with JQ.On Wednesday, August 23, 2023 at 02:53:23 AM EDT, Roland wrote: Hi, > Hi Roland, is `lvs --reportformat json` or `lvs --nameprefixes` good enough? good when using scripting / automated processing - but not good, when we need it human readable. i'd even would call it a bug, when using same strings for "translated" names. would anybody accept something like this (just for saving column space) ? ok, that's a little bit over the top - but i wand to underline what i mean getpersondetails -o forename, surname, streetname, cityname name name name name john doe highstreet washington roland Am 21.08.23 um 18:00 schrieb Marian Csontos: Hi Roland, is `lvs --reportformat json` or `lvs --nameprefixes` good enough? On Sat, Aug 19, 2023 at 6:06 PM Roland wrote: > furthermore, it's a little bit weird that some columns being printed by default when using -o, is > there an easier way to remove those besides explictly removing them one by one with several -o options ? "-o-opt1,-opt2,..." doesn't work sorry for this noise, i was too dumb for that , "-o+opt1,opt2 -o-opt3,opt4" works as desired (as documented in manpage) > themselves,and there also seems no way to add separators in between (like with printf) for separation/formatting also sorry for this, as we can use --separator="," (apparently did have too much coffee and had overseen that in the manpage) the question regarding native column headers/description remains roland Am 19.08.23 um 17:20 schrieb Roland: > hello, > > does somebody know how we can have native (i.e. non translated) column > field names in first line of output of pvs ? > > in its current implementation, output is hard to read , difficult to > distinguish and also not scriptable/parseable, as whitespace is used > for field separator and there are fields which also contain whitespace > themselves,and there also seems no way to add separators in between > (like with printf) for separation/formatting > > # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start > PV VG Fmt Attr PSize PFree BA Start Start > Start Start > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 0 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 1 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5309 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5587 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5588 > > i mean like this: > > # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start > PV VG Fmt Attr PSize PFree pv_ba_start > seg_start seg_start_pe pvseg_start > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 0 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 1 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 > 5309 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S > 0 5587 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S > 0 5588 > > furthermore, it's a little bit weird that some columns being printed > by default when using -o, is there an easier way to remove those > besides explictly removing them one by one with several -o options ? > "-o-opt1,-opt2,..." doesn't work > > # pvs --units s -o+pv_ba_start,seg_start,pvseg_start,seg_start_pe > -o-vg_name -o-pv_name -o-pv_fmt -o-attr -o -pv_size -o -pv_free > BA Start Start Start Start > 0S 2097152S 0 1 > 0S 2097152S 1 1 > 0S 0S 5309 0 > 0S 0S 5587 0 > 0S 0S 5588 0 > > roland > ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Re: [linux-lvm] indistinguishable column names ( BA Start Start Start Start )
Hi, > Hi Roland, is `lvs --reportformat json` or `lvs --nameprefixes` good enough? good when using scripting / automated processing - but not good, when we need it human readable. i'd even would call it a bug, when using same strings for "translated" names. would anybody accept something like this (just for saving column space) ? ok, that's a little bit over the top - but i wand to underline what i mean getpersondetails -o forename, surname, streetname, cityname name name name name john doe highstreet washington roland Am 21.08.23 um 18:00 schrieb Marian Csontos: Hi Roland, is `lvs --reportformat json` or `lvs --nameprefixes` good enough? On Sat, Aug 19, 2023 at 6:06 PM Roland wrote: > furthermore, it's a little bit weird that some columns being printed by default when using -o, is > there an easier way to remove those besides explictly removing them one by one with several -o options ? "-o-opt1,-opt2,..." doesn't work sorry for this noise, i was too dumb for that , "-o+opt1,opt2 -o-opt3,opt4" works as desired (as documented in manpage) > themselves,and there also seems no way to add separators in between (like with printf) for separation/formatting also sorry for this, as we can use --separator="," (apparently did have too much coffee and had overseen that in the manpage) the question regarding native column headers/description remains roland Am 19.08.23 um 17:20 schrieb Roland: > hello, > > does somebody know how we can have native (i.e. non translated) column > field names in first line of output of pvs ? > > in its current implementation, output is hard to read , difficult to > distinguish and also not scriptable/parseable, as whitespace is used > for field separator and there are fields which also contain whitespace > themselves,and there also seems no way to add separators in between > (like with printf) for separation/formatting > > # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start > PV VG Fmt Attr PSize PFree BA Start Start > Start Start > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 0 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 1 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5309 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5587 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5588 > > i mean like this: > > # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start > PV VG Fmt Attr PSize PFree pv_ba_start > seg_start seg_start_pe pvseg_start > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 0 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S > 2097152S 1 1 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 > 5309 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S > 0 5587 > /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S > 0 5588 > > furthermore, it's a little bit weird that some columns being printed > by default when using -o, is there an easier way to remove those > besides explictly removing them one by one with several -o options ? > "-o-opt1,-opt2,..." doesn't work > > # pvs --units s -o+pv_ba_start,seg_start,pvseg_start,seg_start_pe > -o-vg_name -o-pv_name -o-pv_fmt -o-attr -o -pv_size -o -pv_free > BA Start Start Start Start > 0S 2097152S 0 1 > 0S 2097152S 1 1 > 0S 0S 5309 0 > 0S 0S 5587 0 > 0S 0S 5588 0 > > roland > ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO athttp://tldp.org/HOWTO/LVM-HOWTO/ ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Re: [linux-lvm] indistinguishable column names ( BA Start Start Start Start )
Hi Roland, is `lvs --reportformat json` or `lvs --nameprefixes` good enough? On Sat, Aug 19, 2023 at 6:06 PM Roland wrote: > > furthermore, it's a little bit weird that some columns being printed > by default when using -o, is > > there an easier way to remove those besides explictly removing them > one by one with several -o options ? "-o-opt1,-opt2,..." doesn't work > > sorry for this noise, i was too dumb for that , "-o+opt1,opt2 > -o-opt3,opt4" works as desired (as documented in manpage) > > > themselves,and there also seems no way to add separators in between > (like with printf) for separation/formatting > > also sorry for this, as we can use --separator="," (apparently did > have too much coffee and had overseen that in the manpage) > > the question regarding native column headers/description remains > > roland > > Am 19.08.23 um 17:20 schrieb Roland: > > hello, > > > > does somebody know how we can have native (i.e. non translated) column > > field names in first line of output of pvs ? > > > > in its current implementation, output is hard to read , difficult to > > distinguish and also not scriptable/parseable, as whitespace is used > > for field separator and there are fields which also contain whitespace > > themselves,and there also seems no way to add separators in between > > (like with printf) for separation/formatting > > > > # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start > > PV VGFmt Attr PSizePFree BA Start Start > > Start Start > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S > > 2097152S 1 0 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S > > 2097152S 1 1 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S 0S 0 5309 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S 0S 0 5587 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S 0S 0 5588 > > > > i mean like this: > > > > # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start > > PV VGFmt Attr PSizePFree pv_ba_start > > seg_start seg_start_pe pvseg_start > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S > > 2097152S1 0 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S > > 2097152S1 1 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S 0S0 > >5309 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S 0S > > 05587 > > /dev/sdb VGrecycle lvm2 a-- 11720982528S0S 0S 0S > > 05588 > > > > furthermore, it's a little bit weird that some columns being printed > > by default when using -o, is there an easier way to remove those > > besides explictly removing them one by one with several -o options ? > > "-o-opt1,-opt2,..." doesn't work > > > > # pvs --units s -o+pv_ba_start,seg_start,pvseg_start,seg_start_pe > > -o-vg_name -o-pv_name -o-pv_fmt -o-attr -o -pv_size -o -pv_free > > BA Start StartStart Start > > 0S 2097152S 0 1 > > 0S 2097152S 1 1 > > 0S 0S 5309 0 > > 0S 0S 5587 0 > > 0S 0S 5588 0 > > > > roland > > > ___ > linux-lvm mailing list > linux-lvm@redhat.com > https://listman.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Re: [linux-lvm] indistinguishable column names ( BA Start Start Start Start )
Am 21.08.23 um 18:17 schrieb David Teigland: On Sat, Aug 19, 2023 at 06:05:58PM +0200, Roland wrote: furthermore, it's a little bit weird that some columns being printed by default when using -o, is there an easier way to remove those besides explictly removing them one by one with several -o options ? "-o-opt1,-opt2,..." doesn't work sorry for this noise, i was too dumb for that , "-o+opt1,opt2 -o-opt3,opt4" works as desired (as documented in manpage) Usually if you're interested in exact fields, you'd avoid the default options and just use "-o opt1,opt2,..." without +/-. yes, that makes totally sense - there are default options, "+" adds some options, "- removes some , and -o without "+/-" just makes it print exactly what we want. totally straightforward if understood, i was just too lazy, sorry. # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start PV VG Fmt Attr PSize PFree pv_ba_start seg_start seg_start_pe pvseg_start It does sound better than some of the strange header abbreviations. It could also use the key words that appear with --nameprefixes. i have found the place where to add an RFE and did that : https://bugzilla.redhat.com/show_bug.cgi?id=226 thank you roland ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Re: [linux-lvm] indistinguishable column names ( BA Start Start Start Start )
On Sat, Aug 19, 2023 at 06:05:58PM +0200, Roland wrote: > furthermore, it's a little bit weird that some columns being printed by > default when using -o, is there an easier way to remove those besides > explictly removing them one by one with several -o options ? > "-o-opt1,-opt2,..." doesn't work > > sorry for this noise, i was too dumb for that , "-o+opt1,opt2 -o-opt3,opt4" > works as desired (as documented in manpage) Usually if you're interested in exact fields, you'd avoid the default options and just use "-o opt1,opt2,..." without +/-. > # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start > PV VG Fmt Attr PSize PFree pv_ba_start > seg_start seg_start_pe pvseg_start It does sound better than some of the strange header abbreviations. It could also use the key words that appear with --nameprefixes. Dave ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Re: [linux-lvm] indistinguishable column names ( BA Start Start Start Start )
> furthermore, it's a little bit weird that some columns being printed by default when using -o, is > there an easier way to remove those besides explictly removing them one by one with several -o options ? "-o-opt1,-opt2,..." doesn't work sorry for this noise, i was too dumb for that , "-o+opt1,opt2 -o-opt3,opt4" works as desired (as documented in manpage) > themselves,and there also seems no way to add separators in between (like with printf) for separation/formatting also sorry for this, as we can use --separator="," (apparently did have too much coffee and had overseen that in the manpage) the question regarding native column headers/description remains roland Am 19.08.23 um 17:20 schrieb Roland: hello, does somebody know how we can have native (i.e. non translated) column field names in first line of output of pvs ? in its current implementation, output is hard to read , difficult to distinguish and also not scriptable/parseable, as whitespace is used for field separator and there are fields which also contain whitespace themselves,and there also seems no way to add separators in between (like with printf) for separation/formatting # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start PV VG Fmt Attr PSize PFree BA Start Start Start Start /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 0 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 1 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5309 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5587 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5588 i mean like this: # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start PV VG Fmt Attr PSize PFree pv_ba_start seg_start seg_start_pe pvseg_start /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 0 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 1 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5309 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5587 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5588 furthermore, it's a little bit weird that some columns being printed by default when using -o, is there an easier way to remove those besides explictly removing them one by one with several -o options ? "-o-opt1,-opt2,..." doesn't work # pvs --units s -o+pv_ba_start,seg_start,pvseg_start,seg_start_pe -o-vg_name -o-pv_name -o-pv_fmt -o-attr -o -pv_size -o -pv_free BA Start Start Start Start 0S 2097152S 0 1 0S 2097152S 1 1 0S 0S 5309 0 0S 0S 5587 0 0S 0S 5588 0 roland ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
[linux-lvm] indistinguishable column names ( BA Start Start Start Start )
hello, does somebody know how we can have native (i.e. non translated) column field names in first line of output of pvs ? in its current implementation, output is hard to read , difficult to distinguish and also not scriptable/parseable, as whitespace is used for field separator and there are fields which also contain whitespace themselves,and there also seems no way to add separators in between (like with printf) for separation/formatting # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start PV VG Fmt Attr PSize PFree BA Start Start Start Start /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 0 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 1 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5309 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5587 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5588 i mean like this: # pvs --units s -o+pv_ba_start,seg_start,seg_start_pe,pvseg_start PV VG Fmt Attr PSize PFree pv_ba_start seg_start seg_start_pe pvseg_start /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 0 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 2097152S 1 1 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5309 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5587 /dev/sdb VGrecycle lvm2 a-- 11720982528S 0S 0S 0S 0 5588 furthermore, it's a little bit weird that some columns being printed by default when using -o, is there an easier way to remove those besides explictly removing them one by one with several -o options ? "-o-opt1,-opt2,..." doesn't work # pvs --units s -o+pv_ba_start,seg_start,pvseg_start,seg_start_pe -o-vg_name -o-pv_name -o-pv_fmt -o-attr -o -pv_size -o -pv_free BA Start Start Start Start 0S 2097152S 0 1 0S 2097152S 1 1 0S 0S 5309 0 0S 0S 5587 0 0S 0S 5588 0 roland ___ linux-lvm mailing list linux-lvm@redhat.com https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/