capture vacuumdb verbose output

Поиск
Список
Период
Сортировка
Искать

capture vacuumdb verbose output

От:
Shankar K <shan0075@yahoo.com>
Дата:
hi there,

i'm trying to log the verbose output of vaccumdb to a
file along with other details, but i only end up with
logging this

-------------------------------------------------------------
Begin vacuum/analyze db at Mon Jun  2 10:37:29 PDT
2003
Vacuuming test
SET autocommit TO 'on';SET vacuum_mem to 51200;VACUUM 
VERBOSE ANALYZE 
VACUUM
Vacuuming template1
SET autocommit TO 'on';SET vacuum_mem to 51200;VACUUM 
VERBOSE ANALYZE 
VACUUM
Vacuum / Analyze db successful.
End vacuum/analyze db at Mon Jun  2 10:37:32 PDT 2003
-------------------------------------------------------------




..
echo
"-------------------------------------------------------------"
> $LOGS_DIR/$log_filename
echo "Begin vacuum/analyze db at `date`" >>
$LOGS_DIR/$log_filename

$PGSQL_HOME/bin/vacuumdb -e -a -z -v >>
$LOGS_DIR/$log_filename
...



so how to log the verbose output to a file. i tried
2>logfile, but that didn't work the way i want it to.

any ideas is really appreciated.

Shankar

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

Re: capture vacuumdb verbose output

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Shankar K  writes:
> i'm trying to log the verbose output of vaccumdb to a
> file along with other details, but i only end up with
> logging this

I think that output will go to stderr.

			regards, tom lane

Re: capture vacuumdb verbose output

От:
Jonathan Gardner <jgardner@jonathangardner.net>
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 02 June 2003 12:25, Tom Lane wrote:
> Shankar K  writes:
> > i'm trying to log the verbose output of vaccumdb to a
> > file along with other details, but i only end up with
> > logging this
>
> I think that output will go to stderr.
>

- From Bash, you can use the common idiom "2>&1".

# the_command 2>&1 >> the_logfile

This will capture stderr as well as stdout.

- -- 
Jonathan Gardner 
(was jgardn@alumni.washington.edu)
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+3g8qWgwF3QvpWNwRAp7oAKCvmS6Li6NoZeWqcutMRvwaNQ3VFgCgqP86
Og8aNP/SkGXO44B7DjYvvzU=
=Ixax
-----END PGP SIGNATURE-----

Re: capture vacuumdb verbose output

От:
Shankar K <shan0075@yahoo.com>
Дата:
Thanks Jonathan, tom...

--- Jonathan Gardner 
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Monday 02 June 2003 12:25, Tom Lane wrote:
> > Shankar K  writes:
> > > i'm trying to log the verbose output of vaccumdb
> to a
> > > file along with other details, but i only end up
> with
> > > logging this
> >
> > I think that output will go to stderr.
> >
> 
> - From Bash, you can use the common idiom "2>&1".
> 
> # the_command 2>&1 >> the_logfile
> 
> This will capture stderr as well as stdout.
> 
> - -- 
> Jonathan Gardner 
> (was jgardn@alumni.washington.edu)
> Live Free, Use Linux!
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> 
>
iD8DBQE+3g8qWgwF3QvpWNwRAp7oAKCvmS6Li6NoZeWqcutMRvwaNQ3VFgCgqP86
> Og8aNP/SkGXO44B7DjYvvzU=
> =Ixax
> -----END PGP SIGNATURE-----
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
FAQ