From: | PAWAN SHARMA <er(dot)pawanshr0963(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Fwd: getting error while parsing log file using pgbadger |
Date: | 2017-07-26 12:01:19 |
Message-ID: | CAPgXFMRPhFF+RyTYsY0gbkz7Szyb18UUHmjYJN0u=k3A8BxVRw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jul 26, 2017 at 3:18 PM, PAWAN SHARMA <er(dot)pawanshr0963(at)gmail(dot)com>
wrote:
>
> On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier <
> michael(dot)paquier(at)gmail(dot)com> wrote:
>
>> On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA
>> <er(dot)pawanshr0963(at)gmail(dot)com> wrote:
>> >
>> > Hi All,
>> >
>> > I am facing below error while parsing log file.
>> >
>> > [postgres(at)abc pgaudit]$ pgbadger -f stderr
>> postgres-2017-07-25_121445.csv
>> > Can't locate Text/CSV_XS.pm in @INC (@INC contains:
>> /usr/local/lib64/perl5
>> > /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
>> > /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
>> > /bin/pgbadger line 2620.
>> >
>> > Please suggest..!!
>>
>> This means that you need to install the perl module Text::CVS_XS:
>> http://search.cpan.org/~hmbrand/Text-CSV_XS-1.31/CSV_XS.pm
>> This is defined in the requirements of pgbadger's README when parsing csv
>> files:
>> https://github.com/dalibo/pgbadger/blob/master/README
>> --
>> Michael
>>
>
>
> Hi Michal,
>
> Thanks for the response.
>
> I have tried to install Text::CSV_XS, but still facing same error.
>
>
> cpan[1]> install Text::CSV_XS
> Reading '/root/.cpan/Metadata'
> Database was generated on Wed, 26 Jul 2017 09:17:02 GMT
> Running install for module 'Text::CSV_XS'
> Running make for H/HM/HMBRAND/Text-CSV_XS-1.31.tgz
> Fetching with HTTP::Tiny:
> http://mirror.liquidtelecom.com/CPAN/authors/id/H/HM/
> HMBRAND/Text-CSV_XS-1.31.tgz
> Fetching with HTTP::Tiny:
> http://mirror.liquidtelecom.com/CPAN/authors/id/H/HM/HMBRAND/CHECKSUMS
> Checksum for /root/.cpan/sources/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.31.tgz
> ok
> Scanning cache /root/.cpan/build for sizes
> ............................................................
> ................DONE
>
> CPAN.pm: Building H/HM/HMBRAND/Text-CSV_XS-1.31.tgz
>
> Checking if your kit is complete...
> Looks good
> Generating a Unix-style Makefile
> Writing Makefile for Text::CSV_XS
> Writing MYMETA.yml and MYMETA.json
> cp CSV_XS.pm blib/lib/Text/CSV_XS.pm
> Running Mkbootstrap for CSV_XS ()
> chmod 644 "CSV_XS.bs"
> "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs
> blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644
> "/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap
> '/usr/share/perl5/ExtUtils/typemap' CSV_XS.xs > CSV_XS.xsc
> mv CSV_XS.xsc CSV_XS.c
> gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
> -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp ,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
> -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"1.31\"
> -DXS_VERSION=\"1.31 \" -fPIC "-I/usr/lib64/perl5/CORE" CSV_XS.c
> rm -f blib/arch/auto/Text/CSV_XS/CSV_XS.so
> gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
> -m64 -mtune=generic -Wl,- z,relro CSV_XS.o -o blib/arch/auto/Text/CSV_XS/CSV_XS.so
> \
> \
>
> chmod 755 blib/arch/auto/Text/CSV_XS/CSV_XS.so
> Manifying 1 pod document
> HMBRAND/Text-CSV_XS-1.31.tgz
> /bin/make -- OK
> 'YAML' not installed, will not store persistent state
> Running make test
> "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs
> blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644
> PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM"
> "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0,
> 'blib/lib', 'blib/arch')" t/*.t
> t/00_pod.t ........ skipped: Test::Pod 1.00 required for testing POD
> t/01_pod.t ........ skipped: Test::Pod::Coverage required for testing POD
> Coverage
> t/10_base.t ....... ok
> t/12_acc.t ........ ok
> t/15_flags.t ...... ok
> t/20_file.t ....... ok
> t/21_lexicalio.t .. ok
> t/22_scalario.t ... ok
> t/30_types.t ...... ok
> t/40_misc.t ....... ok
> t/41_null.t ....... ok
> t/45_eol.t ........ ok
> t/46_eol_si.t ..... ok
> t/50_utf8.t ....... ok
> t/51_utf8.t ....... ok
> t/55_combi.t ...... ok
> t/60_samples.t .... ok
> t/65_allow.t ...... ok
> t/70_rt.t ......... ok
> t/75_hashref.t .... ok
> t/76_magic.t ...... ok
> t/77_getall.t ..... ok
> t/78_fragment.t ... ok
> t/79_callbacks.t .. ok
> t/80_diag.t ....... ok
> t/81_subclass.t ... ok
> t/85_util.t ....... ok
> t/90_csv.t ........ ok
> t/91_csv_cb.t ..... ok
> All tests successful.
> Files=29, Tests=50834, 45 wallclock secs ( 4.18 usr 0.16 sys + 43.91 cusr
> 0.69 csys = 48.94 CPU)
> Result: PASS
> HMBRAND/Text-CSV_XS-1.31.tgz
> /bin/make test -- OK
> Running make install
> "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs
> blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644
> Manifying 1 pod document
> Files found in blib/arch: installing files in blib/lib into architecture
> dependent library tree
> Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Text/
> CSV_XS/CSV_XS.so
> Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/Text/CSV_XS.pm
> Installing /root/perl5/man/man3/Text::CSV_XS.3pm
> Appending installation info to /root/perl5/lib/perl5/x86_64-
> linux-thread-multi/perllocal.pod
> HMBRAND/Text-CSV_XS-1.31.tgz
> /bin/make install -- OK
>
> cpan[2]> quit
> Terminal does not support GetHistory.
> Lockfile removed.
> [root(at)abc:/home/psharm89]#
> #-> rpm -qa | grep perl-CPAN
> perl-CPAN-1.9800-286.el7.noarch
>
>
> [postgres(at)abc pgaudit]$ pgbadger -f stderr postgres-2017-07-26_000000.csv
> -o abc.html
> Can't locate Text/CSV_XS.pm in @INC (@INC contains: /usr/local/lib64/perl5
> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/ perl5 /usr/share/perl5 .) at
> /bin/pgbadger line 2620.
>
>
>
Hi Michal,
For root user its working fine
[root(at)abc :/opt/PostgreSQL/9.5/data/pgaudit]#
#-> pgbadger -f stderr postgres-2017-07-26_000000.csv -o abc.html
[======================> ] Parsed 1873673 bytes of 1991998 (94.06%),
queries: 0, events: 845
LOG: Ok, generating html report...
but for the Postgres user, its showing the below error.
[postgres(at)abcpgaudit]$ pgbadger -f stderr postgres-2017-07-26_000000.csv
-o xyz.html
Can't locate Text/CSV_XS.pm in @INC (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
/opt/PostgreSQL/9.5/bin/pgbadger line 2652.
[postgres(at)abc~]$ rpm -qa | grep perl-CPAN
perl-CPAN-1.9800-286.el7.noarch
[postgres(at)itsusraorclic05 ~]$ logout
[root(at)abc:/opt/PostgreSQL/9.5/data/pgaudit]#
#-> rpm -qa | grep perl-CPAN
perl-CPAN-1.9800-286.el7.noarch
Please suggest..!!!!!!!
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-07-26 12:08:25 | Re: Fwd: getting error while parsing log file using pgbadger |
Previous Message | PAWAN SHARMA | 2017-07-26 09:48:13 | Re: Fwd: getting error while parsing log file using pgbadger |