[lug] help with zic?

D. Stimits stimits at idcomm.com
Thu Jan 18 15:05:48 MST 2001


Justin wrote:
> 
> > >
> > > Does timetool work to alter time? And if the zic command (which I'm
> not
> > > familiar with) fails, try an strace log to see what it dies at:
> > > strace -oziclog.txt zic
> >
> > Hmm, i doubt that zic itself has a problem. Zic is needed when you
> > need to compile your own timezone information file, something that
> > a normal Linux user shouldn't need -- have a look
> at /usr/share/zoneinfo,
> > there should be a pile of zone info files. Usually there's a link from
> > '/etc/localtime' to one of the zone info files in this directory tree.
> >
> 
> Timetool does work to set time. All the tools to set/change time work
> fine. My link in /etc/localtime goes to the right place
> too, /usr/share/zoneinfo/US/Mountain to be exact.
> 
> > #1 Sun Jan 14 17:56:03 Local time zone must be set--see zic manuai686
> i686 unknown
> >                        |                                         |
> >                        *-----------------------------------------*
> >                            |
> >  This looks like the output of 'uname' got intermixed with the error
> message
> >  created from another program/library call. I assume if you redirect
> >  stderr to a file the output of uname will look different ('uname -a
> 2> /tmp/log').
> >
> >  What happens if you set you TZ environment variable expicitly? (man
> 3 tzset
> >  gives some info on the time zone setup BTW)?
> 
> I ran tzselect and setup the time zone info again, this went ok.
> 
> > > There'll be a lot of output, but you can assume any answers are
> probably
> > > in the last 20% or so. And even then, lines that end with = 0 will
> be
> > > success and mostly ignorable.
> >
> > I would strace uname instead. But since strace only traces system
> calls
> > this might not show the problem, ' strace -v -ff -e trace=open uname -
> a '
> > will show you what files 'uname' does attempt to open. A better tool
> > would be
> <snipped>
> 
> I ran the strace command w/ the following output:
> glowecon at newschool:~$ strace -v -ff -e trace=open uname -a
> open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> open("/lib/libc.so.6", O_RDONLY)        = 3
> Linux newschool 2.4.0 #1 Sun Jan 14 17:56:03 Local time zone must be
> set--see zic manuai686 i686 unknown
> 
> I'm not exactly sure what to derive from this, other than it looks like
> a file is missing. But I don't think that it was is causing the
> problem...
> 
> Justin

FYI, there are a lot of system config files and environment variables
that are searched for in a certain order, which don't need to be there.
For example, there are a lot of ways to customize applications for
individual users, and home directories can be filled with those config
files. None of them have to be there for success. strace will show all
of those things as they are searched for...every system call is logged.
Looking for entries with "= something Not 0" is good, but if you look at
the man page for various apps, you'll often see a list of relevant files
near the bottom. Those are the files you might want to do a text search
for in the log. For example, being denied access or failing to exist for
one of those config files is a fairly good clue.




More information about the LUG mailing list