Please help, /bin/date or perl "time" is giving incorrect timing....
I have showed the result of three cases that the Linux System time is got
problem.
(1) The first command "/bin/date", I re-execute the command /bin/date one by
one, and found that the time showed sometime will less than previous one.
(2) The second command "perl a.cgi" script(included the script), the output
sometime will not equal to 1
(3) The third command "traceroute www.hongkong.com", the ttl sometime will
be negative.

Also, I using the command "hwclock" to check the bios time, and the bios is
working fine without any problem.

So I am here asking for help why the /bin/date or Linux system time are
working so strangely. Please help me to solve if anyone know what are
causing it.
Thank you.

-----------------[ Command /bin/date result]-----------------------
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:53 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:54 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:53 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:55 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:55 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:56 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:59 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:36:00 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:35:59 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:36:02 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:36:04 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:36:03 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:36:04 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
Tue Jul  1 04:36:07 HKT 2003
[EMAIL PROTECTED] root]# /bin/date
----------------------------------------------------------------------------
-----
----[perl time function result----------------------------------------------
[EMAIL PROTECTED] root]# cat a.cgi
#!/usr/bin/perl

while (1) {
   my $init_time = time;
   sleep(1);  
   print time-$init_time, "\n";
}

[EMAIL PROTECTED] root]# perl a.cgi  
1
-2
1
1
1
1
2
0
1
1
2
0
4
-2
1
1
1
1
3
1
1
-1
3
1
1
-1
1
3
1
-----------[Traceroute
result]------------------------------------------------------------------
[EMAIL PROTECTED] root]# traceroute www.hongkong.com
traceroute: Warning: www.hongkong.com has multiple addresses; using
202.84.15.28
traceroute to hongkong.com (202.84.15.28), 30 hops max, 38 byte packets
 1  ip-97-80-134-202 (202.134.80.97)  0.426 ms  0.403 ms  -1659.337 ms
 2  g100.hkb-core2.dyxnet.com (202.134.94.130)  0.864 ms  -1658.828 ms
0.740 ms
 3  p100.hkc-hkix1.dyxnet.com (202.134.68.170)  1660.955 ms  1.705 ms
1660.666 ms
 4  202.40.161.36 (202.40.161.36)  -1657.371 ms  1.574 ms  1.547 ms
 5  202.84.2.133 (202.84.2.133)  921.311 ms  927.633 ms  2.965 ms
----------------------------------------------------------------------------
---------------------

------[command of dmesg]
---------------------------------------------------------------
Linux version 2.4.18-14smp ([EMAIL PROTECTED]) (gcc version
3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #1 SMP Wed Sep 4
11:55:37 EDT 2002
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000040000000 (usable)
 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
128MB HIGHMEM available.
896MB LOWMEM available.
found SMP MP-table at 000f7e90
hm, page 000f7000 reserved twice.
hm, page 000f8000 reserved twice.
hm, page 000f7000 reserved twice.
hm, page 000f8000 reserved twice.
On node 0 totalpages: 262144
zone(0): 4096 pages.
zone(1): 225280 pages.
zone(2): 32768 pages.
Intel MultiProcessor Specification v1.4
    Virtual Wire compatibility mode.
OEM ID: ASUS     Product ID: PROD00000000 APIC at: 0xFEE00000
Processor #0 Pentium(tm) Pro APIC version 16
Processor #1 Pentium(tm) Pro APIC version 16
I/O APIC #2 Version 17 at 0xFEC00000.
Processors: 2
Kernel command line: ro root=LABEL=/
Initializing CPU#0
Detected 1666.825 MHz processor.
Speakup v-1.00 CVS: Tue Jun 11 14:22:53 EDT 2002 : initialized
Console: colour VGA+ 80x25
Calibrating delay loop... 3307.27 BogoMIPS
Memory: 1026992k/1048576k available (1426k kernel code, 17996k reserved,
1057k data, 240k init, 131072k highmem)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode cache hash table entries: 65536 (order: 7, 524288 bytes)
Mount cache hash table entries: 16384 (order: 5, 131072 bytes)
ramfs: mounted with options: <defaults>
ramfs: max_pages=128774 max_file_pages=0 max_inodes=0 max_dentries=128774
Buffer cache hash table entries: 65536 (order: 6, 262144 bytes)
Page-cache hash table entries: 262144 (order: 8, 1048576 bytes)
CPU: Before vendor init, caps: 0383fbff c1cbfbff 00000000, vendor = 2
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
CPU: After vendor init, caps: 0383fbff c1cbfbff 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU:     After generic, caps: 0383fbff c1cbfbff 00000000 00000000
CPU:             Common caps: 0383fbff c1cbfbff 00000000 00000000
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch ([EMAIL PROTECTED])
mtrr: detected mtrr type: Intel
CPU: Before vendor init, caps: 0383fbff c1cbfbff 00000000, vendor = 2
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
CPU: After vendor init, caps: 0383fbff c1cbfbff 00000000 00000000
Intel machine check reporting enabled on CPU#0.
CPU:     After generic, caps: 0383fbff c1cbfbff 00000000 00000000
CPU:             Common caps: 0383fbff c1cbfbff 00000000 00000000
CPU0: AMD Athlon(TM) MP 2000+ stepping 02
per-CPU timeslice cutoff: 731.44 usecs.
task migration cache decay timeout: 1 msecs.
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Booting processor 1/1 eip 2000
Initializing CPU#1
masked ExtINT on CPU#1
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Calibrating delay loop... 3197.94 BogoMIPS
CPU: Before vendor init, caps: 0383fbff c1cbfbff 00000000, vendor = 2
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
CPU: After vendor init, caps: 0383fbff c1cbfbff 00000000 00000000
Intel machine check reporting enabled on CPU#1.
CPU:     After generic, caps: 0383fbff c1cbfbff 00000000 00000000
CPU:             Common caps: 0383fbff c1cbfbff 00000000 00000000
CPU1: AMD Athlon(TM) MP 1900+ stepping 02
Total of 2 processors activated (6504.22 BogoMIPS).
ENABLING IO-APIC IRQs
Setting 2 in the phys_id_present_map
...changing IO-APIC physical APIC ID to 2 ... ok.
init IO_APIC IRQs
 IO-APIC (apicid-pin) 2-0, 2-4, 2-10, 2-11, 2-12, 2-20, 2-21, 2-22, 2-23 not
connected.
..TIMER: vector=0x31 pin1=2 pin2=0
number of MP IRQ sources: 16.
number of IO-APIC #2 registers: 24.
testing the IO APIC.......................

IO APIC #2......
.... register #00: 02000000
.......    : physical APIC id: 02
.... register #01: 00170011
.......     : max redirection entries: 0017
.......     : PRQ implemented: 0
.......     : IO APIC version: 0011
.... register #02: 00000000
.......     : arbitration: 00
.... IRQ redirection table:
 NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
 00 000 00  1    0    0   0   0    0    0    00
 01 003 03  0    0    0   0   0    1    1    39
 02 001 01  0    0    0   0   0    1    1    31
 03 003 03  0    0    0   0   0    1    1    41
 04 000 00  1    0    0   0   0    0    0    00
 05 003 03  0    0    0   0   0    1    1    49
 06 003 03  0    0    0   0   0    1    1    51
07 003 03  0    0    0   0   0    1    1    59
 08 003 03  0    0    0   0   0    1    1    61
 09 003 03  0    0    0   0   0    1    1    69 
 0a 000 00  1    0    0   0   0    0    0    00
 0b 000 00  1    0    0   0   0    0    0    00 
 0c 000 00  1    0    0   0   0    0    0    00 
 0d 003 03  0    0    0   0   0    1    1    71
 0e 003 03  0    0    0   0   0    1    1    79
 0f 003 03  0    0    0   0   0    1    1    81
 10 003 03  1    1    0   1   0    1    1    89
 11 003 03  1    1    0   1   0    1    1    91
 12 003 03  1    1    0   1   0    1    1    99
 13 003 03  1    1    0   1   0    1    1    A1
 14 000 00  1    0    0   0   0    0    0    00
 15 000 00  1    0    0   0   0    0    0    00
 16 000 00  1    0    0   0   0    0    0    00
 17 000 00  1    0    0   0   0    0    0    00
IRQ to pin mappings:
IRQ0 -> 0:2 
IRQ1 -> 0:1
IRQ3 -> 0:3
IRQ5 -> 0:5
IRQ6 -> 0:6
IRQ7 -> 0:7
IRQ8 -> 0:8      
IRQ9 -> 0:9
IRQ13 -> 0:13
IRQ14 -> 0:14
IRQ15 -> 0:15
IRQ16 -> 0:16
IRQ17 -> 0:17
IRQ18 -> 0:18
IRQ19 -> 0:19
.................................... done.
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 1666.0908 MHz.
..... host bus clock speed is 266.1238 MHz.
cpu: 0, clocks: 520736, slice: 173578
CPU0<T0:520736,T1:347152,D:6,S:173578,C:520736>
cpu: 1, clocks: 520736, slice: 173578
CPU1<T0:520736,T1:173568,D:12,S:173578,C:520736>
checking TSC synchronization across CPUs:
BIOS BUG: CPU#0 improperly initialized, has 646821 usecs TSC skew! FIXED.
BIOS BUG: CPU#1 improperly initialized, has -646821 usecs TSC skew! FIXED.
migration_task 0 on cpu=0
migration_task 1 on cpu=1
mtrr: your CPUs had inconsistent fixed MTRR settings
mtrr: probably your BIOS does not setup all CPUs
PCI: PCI BIOS revision 2.10 entry at 0xf1f20, last bus=2
PCI: Using configuration type 1    
PCI: Probing PCI hardware 
Unknown bridge resource 0: assuming transparent
PCI: Using IRQ router AMD768 [1022/7443] at 00:07.3
PCI->APIC IRQ transform: (B1,I5,P0) -> 16    
PCI->APIC IRQ transform: (B2,I5,P0) -> 18
PCI->APIC IRQ transform: (B2,I6,P0) -> 17
BIOS failed to enable PCI standards compliance, fixing this error.
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
speakup:  initialized device: /dev/synth, node (MAJOR 10, MINOR 25)
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
apm: BIOS version 1.2 Flags 0x0b (Driver version 1.16)
apm: disabled - APM is not SMP safe.
Starting kswapd
allocated 64 pages and 64 bhs reserved for the highmem bounces
VFS: Diskquotas version dquot_6.5.0 initialized
pty: 2048 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ
SERIAL_PCI ISAPNP enabled
ttyS0 at 0x03f8 (irq = 4) is a 16550A
Real Time Clock Driver v1.10e
block: 1024 slots per queue, batch=256
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
AMD7441: IDE controller on PCI bus 00 dev 39
AMD7441: chipset revision 4
AMD7441: not 100% native mode: will probe irqs later
AMD7441: disabling single-word DMA support (revision < C4)
    ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:pio, hdd:pio
hda: Maxtor 90680D4, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
blk: queue c0435b64, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c0435b64, I/O limit 4095Mb (mask 0xffffffff)
hda: 13281408 sectors (6800 MB) w/256KiB Cache, CHS=826/255/63, UDMA(33)
ide-floppy driver 0.99.newide
Partition check:
 hda: hda1 hda2 hda3 hda4 < hda5 >
floppy0: no floppy controllers found
NET4: Frame Diverter 0.46
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
ide-floppy driver 0.99.newide
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP: Hash tables configured (established 262144 bind 65536)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 130k freed
VFS: Mounted root (ext2 filesystem).
Journalled Block Device driver loaded
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Freeing unused kernel memory: 240k freed
EXT3 FS 2.4-0.9.18, 14 May 2002 on ide0(3,5), internal journal
Adding Swap: 2040244k swap-space (priority -1)
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.18, 14 May 2002 on ide0(3,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.18, 14 May 2002 on ide0(3,2), internal journal
EXT3-fs: mounted filesystem with ordered data mode.


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to