getting error while parsing log file using pgbadger

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

getting error while parsing log file using pgbadger

Pawan Sharma
Hi All,

I am facing below error while parsing log file.

[postgres@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..!!

-Pawan 
Reply | Threaded
Open this post in threaded view
|

Fwd: getting error while parsing log file using pgbadger

Pawan Sharma

Hi All,

I am facing below error while parsing log file.

[postgres@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..!!

-Pawan 

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

Michael Paquier
On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA
<[hidden email]> wrote:

>
> Hi All,
>
> I am facing below error while parsing log file.
>
> [postgres@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


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

Pawan Sharma

On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier <[hidden email]> wrote:
On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA
<[hidden email]> wrote:
>
> Hi All,
>
> I am facing below error while parsing log file.
>
> [postgres@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:
Fetching with HTTP::Tiny:
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@abc:/home/psharm89]#
#-> rpm -qa | grep perl-CPAN
perl-CPAN-1.9800-286.el7.noarch


[postgres@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.


Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

Pawan Sharma

On Wed, Jul 26, 2017 at 3:18 PM, PAWAN SHARMA <[hidden email]> wrote:

On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier <[hidden email]> wrote:
On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA
<[hidden email]> wrote:
>
> Hi All,
>
> I am facing below error while parsing log file.
>
> [postgres@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:
Fetching with HTTP::Tiny:
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@abc:/home/psharm89]#
#-> rpm -qa | grep perl-CPAN
perl-CPAN-1.9800-286.el7.noarch


[postgres@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@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@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@abc~]$ rpm -qa | grep perl-CPAN
perl-CPAN-1.9800-286.el7.noarch
[postgres@itsusraorclic05 ~]$ logout
[root@abc:/opt/PostgreSQL/9.5/data/pgaudit]#
#-> rpm -qa | grep perl-CPAN
perl-CPAN-1.9800-286.el7.noarch


Please suggest..!!!!!!!


Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

Michael Paquier
On Wed, Jul 26, 2017 at 2:01 PM, PAWAN SHARMA <[hidden email]> wrote:
> For root user its working fine
>
> [root@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.

There is no way to be sure what's wrong as this depends on the
environment you are using and the packaging system that you have, but
at short glance, I think that you should first try to update PERL5LIB
so as it points to the location where the module has been installed.
Good luck! It does not sound complicated to me to address anyway.
--
Michael


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

Pawan Sharma

On Wed, Jul 26, 2017 at 5:38 PM, Michael Paquier <[hidden email]> wrote:
On Wed, Jul 26, 2017 at 2:01 PM, PAWAN SHARMA <[hidden email]> wrote:
> For root user its working fine
>
> [root@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.

There is no way to be sure what's wrong as this depends on the
environment you are using and the packaging system that you have, but
at short glance, I think that you should first try to update PERL5LIB
so as it points to the location where the module has been installed.
Good luck! It does not sound complicated to me to address anyway.
--
Michael


Hi Michal,

Thanks for your support.

finally, it's done.

I have installed Text::CSV_XS using PostgreSQL user.

[postgres@abcpgaudit]$  perl -MCPAN -e shell
 
cpan> install Text::CSV_XS
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Warning: Found only 0 objects in /root/.cpan/Metadata
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
  Database was generated on Thu, 28 Nov 2013 08:17:03 GMT

  There's a new CPAN.pm version (v2.00) available!
  [Current version is v1.7602]
  You might want to try
    install Bundle::CPAN
    reload cpan
  without quitting the current session. It should be a seamless upgrade
  while we are running...

Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Running install for module Text::CSV_XS
Running make for H/HM/HMBRAND/Text-CSV_XS-1.02.tgz
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.02.tgz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/H/HM/HMBRAND/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.02.tgz ok
Scanning cache /root/.cpan/build for sizes
Text-CSV_XS-1.02/
Text-CSV_XS-1.02/examples/
Text-CSV_XS-1.02/examples/parser-xs.pl
Text-CSV_XS-1.02/examples/speed.pl
Text-CSV_XS-1.02/examples/csv2xls
Text-CSV_XS-1.02/examples/csvdiff
Text-CSV_XS-1.02/examples/csv-check
Text-CSV_XS-1.02/ChangeLog
Text-CSV_XS-1.02/META.yml
Text-CSV_XS-1.02/MANIFEST
Text-CSV_XS-1.02/ppport.h
Text-CSV_XS-1.02/Makefile.PL
Text-CSV_XS-1.02/CSV_XS.xs
Text-CSV_XS-1.02/files/
Text-CSV_XS-1.02/files/macosx.csv
Text-CSV_XS-1.02/files/utf8.csv
Text-CSV_XS-1.02/README
Text-CSV_XS-1.02/META.json
Text-CSV_XS-1.02/t/
Text-CSV_XS-1.02/t/46_eol_si.t
Text-CSV_XS-1.02/t/20_file.t
Text-CSV_XS-1.02/t/76_magic.t
Text-CSV_XS-1.02/t/81_subclass.t
Text-CSV_XS-1.02/t/util.pl
Text-CSV_XS-1.02/t/40_misc.t
Text-CSV_XS-1.02/t/70_rt.t
Text-CSV_XS-1.02/t/22_scalario.t
Text-CSV_XS-1.02/t/21_lexicalio.t
Text-CSV_XS-1.02/t/77_getall.t
Text-CSV_XS-1.02/t/12_acc.t
Text-CSV_XS-1.02/t/00_pod.t
Text-CSV_XS-1.02/t/60_samples.t
Text-CSV_XS-1.02/t/01_pod.t
Text-CSV_XS-1.02/t/75_hashref.t
Text-CSV_XS-1.02/t/65_allow.t
Text-CSV_XS-1.02/t/50_utf8.t
Text-CSV_XS-1.02/t/41_null.t
Text-CSV_XS-1.02/t/30_types.t
Text-CSV_XS-1.02/t/51_utf8.t
Text-CSV_XS-1.02/t/10_base.t
Text-CSV_XS-1.02/t/55_combi.t
Text-CSV_XS-1.02/t/80_diag.t
Text-CSV_XS-1.02/t/45_eol.t
Text-CSV_XS-1.02/t/15_flags.t
Text-CSV_XS-1.02/CSV_XS.pm

  CPAN.pm: Going to build H/HM/HMBRAND/Text-CSV_XS-1.02.tgz

Checking if your kit is complete...
Looks good
Writing Makefile for Text::CSV_XS
cp CSV_XS.pm blib/lib/Text/CSV_XS.pm
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/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 -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"   CSV_XS.c
CSV_XS.xs: In function 'cx_Print':
CSV_XS.xs:627: warning: unused variable 'l'
CSV_XS.xs: In function 'cx_c_xsParse':
CSV_XS.xs:1450: warning: unused variable 'sp'
CSV_XS.c: In function 'XS_Text__CSV_XS_error_input':
CSV_XS.xs:1665: warning: unused variable 'hv'
CSV_XS.c: At top level:
CSV_XS.xs:1546: warning: 'cx_av_free' defined but not used
Running Mkbootstrap for Text::CSV_XS ()
chmod 644 CSV_XS.bs
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 --param=ssp-buffer-size=4 -m64 -mtune=generic CSV_XS.o  -o blib/arch/auto/Text/CSV_XS/CSV_XS.so     \
             \
      
chmod 755 blib/arch/auto/Text/CSV_XS/CSV_XS.so
cp CSV_XS.bs blib/arch/auto/Text/CSV_XS/CSV_XS.bs
chmod 644 blib/arch/auto/Text/CSV_XS/CSV_XS.bs
Manifying blib/man3/Text::CSV_XS.3pm
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_pod..........skipped
        all skipped: Test::Pod 1.00 required for testing POD
t/01_pod..........skipped
        all skipped: Test::Pod::Coverage required for testing POD Coverage
t/10_base.........ok                                                         
t/12_acc..........ok                                                         
t/15_flags........ok                                                         
t/20_file.........ok                                                         
t/21_lexicalio....ok                                                         
t/22_scalario.....ok                                                         
t/30_types........ok                                                         
t/40_misc.........ok                                                         
t/41_null.........ok                                                         
t/45_eol..........ok                                                         
t/46_eol_si.......ok                                                         
t/50_utf8.........ok                                                         
t/51_utf8.........ok                                                         
t/55_combi........ok                                                         
t/60_samples......ok                                                         
t/65_allow........ok                                                         
t/70_rt...........ok                                                         
        20000/20453 skipped: Encode is too old for these tests
t/75_hashref......ok                                                         
t/76_magic........ok                                                         
t/77_getall.......ok                                                         
t/80_diag.........ok                                                         
t/81_subclass.....ok                                                         
All tests successful, 2 tests and 20000 subtests skipped.
Files=24, Tests=33652,  4 wallclock secs ( 2.29 cusr +  0.33 csys =  2.62 CPU)
  /usr/bin/make test -- OK
Running make install
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.bs
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Text/CSV_XS.pm
Installing /usr/share/man/man3/Text::CSV_XS.3pm
Writing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/.packlist
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
  /usr/bin/make install  -- OK

cpan> quit
Terminal does not support GetHistory.
Lockfile removed.
 

[postgres@abc pgaudit]$ pgbadger -f stderr postgres-2017-07-26_000000.csv  -o xyz.html
[======================>  ] Parsed 1873673 bytes of 1991998 (94.06%), queries: 0, events: 845
LOG: Ok, generating html report...

Thanks :)
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

kbrannen
In reply to this post by Pawan Sharma
On Wed, Jul 26, 2017 at 3:18 PM, PAWAN SHARMA <[hidden email]> wrote:

>
> On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier <[hidden email]> wrote:
> On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA
> <[hidden email]> wrote:
> >
> > Hi All,
> >
> > I am facing below error while parsing log file.
> >
> > [postgres@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.
>
...

> 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
...
> [postgres@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.

You have an environment problem in that the 2 different users have a different
PATH and you're getting 2 different perl executables, or at least that's what
it looks like to me. Please note that where you installed the module to is not
listed in the @INC of the other command.

I saw in another post that you have it fixed, but all you've done (from what I
can see) is that you've only put a band-aide on the problem not fixed the root issue
because you've installed the module into 2 different places. The root problem should
still exist.

You can run with a custom perl, we do; but that also means you must make sure
that all apps use it by setting PATH and PERLLIB appropriately, usually by
changing a system file and making sure all environments source it. If you do that,
then PgBadger will work just fine -and- use the same perl as all of your other programs.

HTH,
Kevin


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

Pawan Sharma


On Wed, Jul 26, 2017 at 11:36 PM, <[hidden email]> wrote:
On Wed, Jul 26, 2017 at 3:18 PM, PAWAN SHARMA <[hidden email]> wrote:
>
> On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier <[hidden email]> wrote:
> On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA
> <[hidden email]> wrote:
> >
> > Hi All,
> >
> > I am facing below error while parsing log file.
> >
> > [postgres@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.
>
...
> 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
...
> [postgres@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.

You have an environment problem in that the 2 different users have a different
PATH and you're getting 2 different perl executables, or at least that's what
it looks like to me. Please note that where you installed the module to is not
listed in the @INC of the other command.

I saw in another post that you have it fixed, but all you've done (from what I
can see) is that you've only put a band-aide on the problem not fixed the root issue
because you've installed the module into 2 different places. The root problem should
still exist.

You can run with a custom perl, we do; but that also means you must make sure
that all apps use it by setting PATH and PERLLIB appropriately, usually by
changing a system file and making sure all environments source it. If you do that,
then PgBadger will work just fine -and- use the same perl as all of your other programs.

HTH,
Kevin


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Hi Kevin,

Thanks for Response.
 
Can you please help me, how can I run this using custom, Perl.

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: getting error while parsing log file using pgbadger

kbrannen
In reply to this post by Pawan Sharma
> On Wed, Jul 27, 2017, PAWAN SHARMA <[hidden email]> wrote:
> > On Wed, Jul 26, 2017, <[hidden email]> wrote:
> >
> > You have an environment problem in that the 2 different users have a different
> > PATH and you're getting 2 different perl executables, or at least that's what
> > it looks like to me. Please note that where you installed the module to is not
> > listed in the @INC of the other command.
> > ...
> > You can run with a custom perl, we do; but that also means you must make sure
> > that all apps use it by setting PATH and PERLLIB appropriately, usually by
> > changing a system file and making sure all environments source it. If you do that,
> > then PgBadger will work just fine -and- use the same perl as all of your other programs.
>
>
> Hi Kevin,
>
> Thanks for Response.
>  
> Can you please help me, how can I run this using custom, Perl.


This is really beyond the scope of this list, but I'll give it 1 try to helpful.
Note: I can only answer for Linux type systems, and what you need to do is probably
distro specific.

The basics are to leave what was installed with the system there so the OS installed
tools will continue to work when they reference /usr/bin/perl. Install your custom
perl. Change a system file to reference it, which normally means adding the new dir
to PATH and PERLLIB; this might be /etc/bashrc or /etc/profile.d/perl.sh (yours as
it won't be from the distro) or perhaps something else. Make sure all processes get
these new values (the shotgun approach is to reboot the server). Make sure any of
your applications reference the new perl specifically (full path) or only say "perl"
to get it from PATH.

Those are the concepts; if you need more help beyond that, you should ask a good
system administrator who knows your server.

HTH,
Kevin


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general