Re: Creating Log file - run in background.
От | John Burski |
---|---|
Тема | Re: Creating Log file - run in background. |
Дата | |
Msg-id | 3A38E645.D515FEA0@911ep.com обсуждение исходный текст |
Ответ на | Re: Creating Log file - run in background. (Chris <csmith@squiz.net>) |
Ответы |
Re: Creating Log file - run in background.
|
Список | pgsql-novice |
It looks like the "> >" between the "-D" (postmaster command line option) and the "/usr/local/pgsql/data" filename are continuations in your e-mail window. The ">>" between the "/dev/null" filename and the "/user/local/.../server.log" filename are meant to redirect the output to stdout (standard output, usually the screen) and append it the file name that follows, in this case "/usr/local/.../server.log". Here's what the command is supposed to do: nohup - Execute the following command, making it immune to "hangups" and with output to a non-tty device. /usr/local/.../postmaster -D /usr/local/pgsql/data - Execute the postmaster program, using /usr/local/pgsql/data directory as the root of the tree of database directories. < /dev/null - Input is redirected from the bit-bucket. (Don't ask me why - I've not looked closely enough at the nitty-gritty to understand that yet). >> /usr/local/pgsql/data/server.log - Redirect anything output to stdout to this file. 2>>1 - Redirect and append anything output to stderr to stdout. This causes both stdout and stderr to be logged in the same file & - Run in the background. Hope that helps. Regards. Sterling wrote: > H- > > Ok. So the new command should look like this. > > nohup /usr/local/pgsql/bin/postmaster -D > >/usr/local/pgsql/data </dev/null > >>/usr/local/pgsql/data/server.log 2>>1 & > > What are the > > 's for? Are they acting as ( ) 's like in perl or some other > language? > > If so should they match? I'm getting lost in the > > and can't figure out if the > > > is actually in the command or part of the wrapping for my window terminal (it > stays when I resize the window so...) or from my email client when it copies the > original post. > > Thanks for all your help and replies. I just need to get up to speed on what > you're telling me. 8^) > -Sterling > > Tom Lane wrote: > > > >> Should the command look like this than: > > >> nohup /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data/server.log & > > > > > That should work, yep. > > > > Uh, nope. > > > > That will try to use /usr/local/pgsql/data/server.log as a directory. > > > > Your original advice was better. > > > > regards, tom lane -- John Burski Chief IT Cook and Bottlewasher 911 Emergency Products, St. Cloud, MN (320) 656 0076
В списке pgsql-novice по дате отправления: