Greetings:
We are running Solaris SPARC version 10 and I have a question about the
timezone variable. We run Apache and when it starts as part of the boot
process, it is apparently starting before the system timezone environment
variable has been set, because it logs everything as GMT (+0000). If I
take it down and restart it manually, it logs as Central Time (-0600) which
is what I want it to do. I moved the startup from /etc/rc2.d to /etc/rc3.d
thinking that would fix it but it didn't. Is the timezone available when
scripts in /etc/rc3.d are run? Or am I doing something else wrong? FWIW,
I have not noticed this behavior on any of our web servers running Apache
under Solaris 9. Thanks for any advice.
Jim McCullars
University of Alabama in Huntsville
|
|
0
|
|
|
|
Reply
|
Jim
|
1/12/2007 4:28:06 PM |
|
In article <eo8cum$l1$1@news.uah.edu>,
Jim McCullars <jim@info2.uah.edu> writes:
> Greetings:
>
> We are running Solaris SPARC version 10 and I have a question about the
> timezone variable. We run Apache and when it starts as part of the boot
> process, it is apparently starting before the system timezone environment
> variable has been set, because it logs everything as GMT (+0000). If I
> take it down and restart it manually, it logs as Central Time (-0600) which
> is what I want it to do. I moved the startup from /etc/rc2.d to /etc/rc3.d
> thinking that would fix it but it didn't. Is the timezone available when
> scripts in /etc/rc3.d are run? Or am I doing something else wrong? FWIW,
> I have not noticed this behavior on any of our web servers running Apache
> under Solaris 9. Thanks for any advice.
init (process 1) picks it up from /etc/default/init,
and everything else inherits it from that.
--
Andrew Gabriel
|
|
0
|
|
|
|
Reply
|
andrew
|
1/12/2007 5:06:54 PM
|
|
Jim McCullars <jim@info2.uah.edu> wrote:
> Greetings:
> We are running Solaris SPARC version 10 and I have a question about the
> timezone variable. We run Apache and when it starts as part of the boot
> process, it is apparently starting before the system timezone environment
> variable has been set, because it logs everything as GMT (+0000). If I
> take it down and restart it manually, it logs as Central Time (-0600) which
> is what I want it to do. I moved the startup from /etc/rc2.d to /etc/rc3.d
> thinking that would fix it but it didn't. Is the timezone available when
> scripts in /etc/rc3.d are run? Or am I doing something else wrong? FWIW,
> I have not noticed this behavior on any of our web servers running Apache
> under Solaris 9. Thanks for any advice.
init reads it normally, so everything inherits it from there. Is there
any chance you're running it out of a chroot environment that doesn't
have the timezones within the chroot tree?
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
|
|
0
|
|
|
|
Reply
|
Darren
|
1/15/2007 12:26:17 AM
|
|
Darren Dunham <ddunham@redwood.taos.com> wrote:
> Jim McCullars <jim@info2.uah.edu> wrote:
>> timezone variable. We run Apache and when it starts as part of the boot
>> process, it is apparently starting before the system timezone environment
>> variable has been set, because it logs everything as GMT (+0000). If I
>> take it down and restart it manually, it logs as Central Time (-0600) which
> init reads it normally, so everything inherits it from there. Is there
> any chance you're running it out of a chroot environment that doesn't
> have the timezones within the chroot tree?
No, but I think I found the culprit. We use logadm to keep the log files
from growing to an unmanageable size, and I noticed that after logadm has
restarted Apache it goes back to logging in UTC time. So maybe that (rather
than the boot start) is what was doing it all along. I think I can get
around the problem by playing with logadm.conf (specifically the -a part).
Thanks for the feedback...
Jim McCullars
University of Alabama in Huntsville
|
|
0
|
|
|
|
Reply
|
Jim
|
1/18/2007 9:13:41 PM
|
|
In <eoonu5$s4i$1@news.uah.edu> Jim McCullars <jim@info2.uah.edu> writes:
>Darren Dunham <ddunham@redwood.taos.com> wrote:
>> Jim McCullars <jim@info2.uah.edu> wrote:
>>> timezone variable. We run Apache and when it starts as part of the boot
>>> process, it is apparently starting before the system timezone environment
>>> variable has been set, because it logs everything as GMT (+0000). If I
>>> take it down and restart it manually, it logs as Central Time (-0600) which
>> init reads it normally, so everything inherits it from there. Is there
>> any chance you're running it out of a chroot environment that doesn't
>> have the timezones within the chroot tree?
> No, but I think I found the culprit. We use logadm to keep the log files
>from growing to an unmanageable size, and I noticed that after logadm has
>restarted Apache it goes back to logging in UTC time. So maybe that (rather
>than the boot start) is what was doing it all along. I think I can get
>around the problem by playing with logadm.conf (specifically the -a part).
Here's what I use for apache in logadm.conf:
apache -C 6 -N -a '/usr/apache/bin/apachectl graceful > /dev/null' '/var/apache/logs/*{access,error,suexec}_log'
apache2 -C 6 -N -a '/usr/apache2/bin/apachectl graceful' '/var/apache2/logs/*{access,error,suexec}_log'
/var/apache/logs/access_log -P 'Tue Jan 16 09:10:00 2007' -N
/var/apache/logs/error_log -P 'Tue Jan 16 09:10:00 2007' -N
/var/apache/logs/suexec_log -P 'Mon Jan 15 09:10:00 2007' -N
/var/apache2/logs/access_log -N
/var/apache2/logs/error_log -N
/var/apache2/logs/suexec_log -N
--
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-
|
|
0
|
|
|
|
Reply
|
Gary
|
1/18/2007 10:33:35 PM
|
|
|
4 Replies
766 Views
(page loaded in 0.059 seconds)
Similiar Articles: When is the TZ environment var set? - comp.unix.solarisGreetings: We are running Solaris SPARC version 10 and I have a question about the timezone variable. We run Apache and when it starts as part of... Solaris 10 b69 autofs problem - comp.unix.solarisWhen is the TZ environment var set? - comp.unix.solaris Solaris 10 b69 autofs problem - comp.unix.solaris When is the TZ environment var set? - comp.unix.solaris Solaris ... how to set environment variable in solaris 10 - comp.unix.solaris ...When is the TZ environment var set? - comp.unix.solaris Greetings: We are running Solaris SPARC version 10 and I have a question about the timezone variable. The "USER" environment variable - comp.unix.solarisWhen is the TZ environment var set? - comp.unix.solaris However, you could set to your time zone to UTC, in order to get the correct epoch time: TZ=UTC gawk '{d=$0 ... to ... strange output of date command with TZ variable - comp.sys.hp.hpux ...... 08 UTC 2007 If I execute the same command with TZ set to GMT+5:30, the results are: $ TZ ... the behaviour of date command with respect to various TZ environment variable ... Apache Binary for Sparc Solaris 9 - comp.unix.solarisApache Binary for Sparc Solaris 9 - comp.unix.solaris When is the TZ environment var set? - comp.unix.solaris Greetings ... for Solaris Sparc. crontab - environmental variables (platform: solaris; shell: bash ...If you need an environment variable in a cron job, you'll need to set it yourself. ... includes only the HOME, LOGNAME, SHELL, TZ, and > PATH environment variables ... Can or should the NTP protocol eventually serve timezone data ...Put the file at a standard location on a known set of servers (maybe a ... of them even make provision for users in multiple time zones with a "TZ" environment variable. cannot set locale correctly - comp.unix.solarisWhen is the TZ environment var set? - comp.unix.solaris cannot set locale correctly - comp.unix.solaris... locale is set in the /etc/default/init file correctly: TZ=US ... Synchronizing NTP in WAN and LAN - comp.protocols.time.ntp ...Most OS clocks are set to UTC. Display of this time ... such a change, as the file is read into an environment variable ... aspx > There seems to be a difference in what TZ ... Linux / UNIX: TZ Environment Variable - nixCraft: Linux Tips ...Explains how to use the TZ variable to set timezone under Linux / BSD / Apple OS X / UNIX like operating systems using a bash or any other shell profile file. Setting TZ Environment Variable on Windows - IBM - United StatesIf the time zone is correct, verify that the TZ system environment variable is set. TZ is used to establish the local time zone and is used by various time functions to ... 7/22/2012 4:24:34 PM
|