Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Converting time (since 01-01-1970) to Epoch
@ 1999-05-18 12:20 Franco Tassone
  1999-05-18 16:13 ` Michal Jaegermann
  0 siblings, 1 reply; 42+ messages in thread
From: Franco Tassone @ 1999-05-18 12:20 UTC (permalink / raw)
  To: axp-list

Sorry, this is a little bit off-topic, but ...
I'm porting some softwares running on SGI platform Irix 6.2 to AlphaLinux,
and I've got a uncredible problem:
SGI runs on time rapresentation a seconds size 01-01-1970, and I've to
convert various data files for Epoch's date rapresentation, as in Linux.
Does anybody can help me in doing this, please ?
Thanks in advance.
-------------------------------------------------------------
 Franco Tassone                       Tel: +39-085-4510954
 RGNetWork Internet Service Provider  Fax: +39-085-64070
 Via G. D'Annunzio, 162               e-mail: admin@rgn.it
 65127 PESCARA (ITALY)                URL: http://www.rgn.it
-------------------------------------------------------------


^ permalink raw reply	[flat|nested] 42+ messages in thread
* RE: Converting time (since 01-01-1970) to Epoch
@ 1999-05-18 13:27 Paul Jakma
  0 siblings, 0 replies; 42+ messages in thread
From: Paul Jakma @ 1999-05-18 13:27 UTC (permalink / raw)
  To: 'axp-list@redhat.com', 'franco@dns.rgn.it]'

hi franco,

You have little time work to do. Epoch is 00:00 01/01/70. It's a fairly
standard UNIX thing. The linux time system call returns the time in seconds
since epoch, just as SGI does. There is a more general time_t structure in
the C library which should be fairly identical between sgi and linux.

see the strftime strptime C library call's for more info on how to convert
and format time.

regards,

paul.

> ----------
> From: 	Franco Tassone[SMTP:franco@dns.rgn.it]
> Reply To: 	axp-list@redhat.com
> Sent: 	18 May 1999 13:20
> To: 	axp-list@redhat.com
> Subject: 	Converting time (since 01-01-1970) to Epoch
> 
> Sorry, this is a little bit off-topic, but ...
> I'm porting some softwares running on SGI platform Irix 6.2 to AlphaLinux,
> and I've got a uncredible problem:
> SGI runs on time rapresentation a seconds size 01-01-1970, and I've to
> convert various data files for Epoch's date rapresentation, as in Linux.
> Does anybody can help me in doing this, please ?
> Thanks in advance.
> -------------------------------------------------------------
>  Franco Tassone                       Tel: +39-085-4510954
>  RGNetWork Internet Service Provider  Fax: +39-085-64070
>  Via G. D'Annunzio, 162               e-mail: admin@rgn.it
>  65127 PESCARA (ITALY)                URL: http://www.rgn.it
> -------------------------------------------------------------
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread
* RE: Converting time (since 01-01-1970) to Epoch
@ 1999-05-18 14:16 Franco Tassone
  1999-05-18 15:18 ` Phil Carmody
  0 siblings, 1 reply; 42+ messages in thread
From: Franco Tassone @ 1999-05-18 14:16 UTC (permalink / raw)
  To: axp-list

Unfortunatelly, time_t in Irix is defined as long (4 bytes), while time_t
in AlphaLinux is 8 bytes long, though defined as long.
It seems to me that time/date info stores differently in a time_t
variable, from SGI to Linux.
-------------------------------------------------------------
 Franco Tassone                       Tel: +39-085-4510954
 RGNetWork Internet Service Provider  Fax: +39-085-64070
 Via G. D'Annunzio, 162               e-mail: admin@rgn.it
 65127 PESCARA (ITALY)                URL: http://www.rgn.it
-------------------------------------------------------------


^ permalink raw reply	[flat|nested] 42+ messages in thread
* RE: Converting time (since 01-01-1970) to Epoch
@ 1999-05-19  8:57 Paul Jakma
  0 siblings, 0 replies; 42+ messages in thread
From: Paul Jakma @ 1999-05-19  8:57 UTC (permalink / raw)
  To: 'axp-list@redhat.com'



> Perfect, here is the details:
> 
> I have a binary file with record fixed lenght, it has been written on an
> SGI
> box (Irix 6.2) using the following structure:
> 
> (/usr/include/rpcsvc/rusers.h)
> 
> struct rusers_utmp {
> 	char    ut_line[8];             /* tty name */
> 	char    ut_name[8];             /* user id */
> 	char    ut_host[16];            /* host name, if remote */
> 	long    ut_time;                /* time on */
> };
> 
> For the SGI box, sizeof(long) = 4.
> 
> 
> So I've converted the file, rewriting all the records on an Alpha-Linux
> box
> (kernel 2.2.7) using the following structure:
> 
> (/usr/include/rpcsvc/rusers.h)
> 
> struct ru_utmp {
>         char    ut_line[8];             /* tty name */
>         char    ut_name[8];             /* user id */
>         char    ut_host[16];            /* host name, if remote */
>         long    ut_time;                /* time on */
> };
> 
> For Alpha-Linux box, sizeof(long) = 8.
> My conversion program does only a field's level assignments, and rewrites
> the
> new file, due to different sizeof(long).
> The resulting dates (ut_time in ru_utmp) are all garbled.
> Any ideas ?
> 
how are you reading/parsing the input file? are you literally applying the
ru_utmp structure to the sgi binary file? or are you interpreting the binary
file and copying the values into the structure on the linux machine. 

looks like if you pad out the ut_time field with 4 MSB bytes then the file
should become binary compatible with linux.

i think you can either:

a) read and interpet the binary value, copying the values from the binary
value into the defined linux structure.

b) change the irix programme to use a double long for the time field.

c) write a utility to insert the padding.

regards,


Paul Jakma.


^ permalink raw reply	[flat|nested] 42+ messages in thread
* RE: Converting time (since 01-01-1970) to Epoch
@ 1999-05-19  9:54 Wessels, Hans
  0 siblings, 0 replies; 42+ messages in thread
From: Wessels, Hans @ 1999-05-19  9:54 UTC (permalink / raw)
  To: 'axp-list@redhat.com'

Hi Franco,

>I have a binary file with record fixed lenght, it has been written on an SGI
>box (Irix 6.2) using the following structure:
>
>(/usr/include/rpcsvc/rusers.h)
>
>struct rusers_utmp {
>	char    ut_line[8];             /* tty name */
>	char    ut_name[8];             /* user id */
>	char    ut_host[16];            /* host name, if remote */
>	long    ut_time;                /* time on */
>};
>
>For the SGI box, sizeof(long) = 4.
>
>
>So I've converted the file, rewriting all the records on an Alpha-Linux box
>(kernel 2.2.7) using the following structure:
>
>(/usr/include/rpcsvc/rusers.h)
>
>struct ru_utmp {
>        char    ut_line[8];             /* tty name */
>        char    ut_name[8];             /* user id */
>        char    ut_host[16];            /* host name, if remote */
>        long    ut_time;                /* time on */
>};
>
>For Alpha-Linux box, sizeof(long) = 8.
>My conversion program does only a field's level assignments, and rewrites the
>new file, due to different sizeof(long).
>The resulting dates (ut_time in ru_utmp) are all garbled.
>Any ideas ?

Is there maybe a big-little endian problem here? Alpha is little endian,
but I am not sure about the SGI box.

Hans
----------------------------------------------------------------------
   /|   /\/\/\   |\      ir. Hans Wessels
  / |  / /\/\ \  | \     H.Wessels@Energie-Delfland.nl
 /  | / / /\ \ \ |  \    tel.: 015 251 4397
/   |/ / /  \ \ \|   \   
\   |\ \ \  / / /|   /   prive:
 \  | \ \ \/ / / |  /    mr_ni@mbh.org
  \ |  \ \/\/ /  | /     Fidelus Bittus et Fuckus Clockcyclus!
   \|   \/\/\/   |/      


^ permalink raw reply	[flat|nested] 42+ messages in thread
* RE: Converting time (since 01-01-1970) to Epoch
@ 1999-05-20  0:14 Tom King
  0 siblings, 0 replies; 42+ messages in thread
From: Tom King @ 1999-05-20  0:14 UTC (permalink / raw)
  To: axp-list

Is it possible that the  SGI box is big-endian . The strings would be o.k.
but the number would be
byte reversed ( usually) I think MIPS have a mode setting where they can
either act big-or little endian

e.g
little endian bytes for one would be 0 0 0 1
big endian bytes for one would be  1 0 0 0


	----------
	From:  Franco Tassone
	Sent:  Wednesday, 19 May 1999 19:52
	To:  axp-list@redhat.com
	Subject:  Re: Converting time (since 01-01-1970) to Epoch

	On May 18, 10:13am, Michal Jaegermann wrote:
	> Every Unix (and Linux) machine starts its epoch for time keeping
	> at that date.  Watch this:
	>
	> perl -e 'print scalar gmtime 0, "\n";'
	> Thu Jan  1 00:00:00 1970
	>
	> > Does anybody can help me in doing this, please ?
	>
	> What is really the problem?

	Perfect, here is the details:

	I have a binary file with record fixed lenght, it has been written
on an SGI
	box (Irix 6.2) using the following structure:

	(/usr/include/rpcsvc/rusers.h)

	struct rusers_utmp {
		char    ut_line[8];             /* tty name */
		char    ut_name[8];             /* user id */
		char    ut_host[16];            /* host name, if remote */
		long    ut_time;                /* time on */
	};

	For the SGI box, sizeof(long) = 4.


	So I've converted the file, rewriting all the records on an
Alpha-Linux box
	(kernel 2.2.7) using the following structure:

	(/usr/include/rpcsvc/rusers.h)

	struct ru_utmp {
	        char    ut_line[8];             /* tty name */
	        char    ut_name[8];             /* user id */
	        char    ut_host[16];            /* host name, if remote */
	        long    ut_time;                /* time on */
	};

	For Alpha-Linux box, sizeof(long) = 8.
	My conversion program does only a field's level assignments, and
rewrites the
	new file, due to different sizeof(long).
	The resulting dates (ut_time in ru_utmp) are all garbled.
	Any ideas ?

	-- 
	-------------------------------------------------------------
	 Franco Tassone                       Tel: +39-085-4510954
	 RGNetWork Internet Service Provider  Fax: +39-085-64070
	 Via G. D'Annunzio, 162               e-mail: admin@rgn.it
	 65127 PESCARA (ITALY)                URL: http://www.rgn.it
	-------------------------------------------------------------

	-- 
	To unsubscribe: send e-mail to axp-list-request@redhat.com with
	'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


^ permalink raw reply	[flat|nested] 42+ messages in thread
* RE: Linux 2.4.18 vs. alphas with symbios SCSI cards
@ 2002-03-25 12:45 Heid Oliver
  2002-03-25 14:56 ` Michal Jaegermann
  0 siblings, 1 reply; 42+ messages in thread
From: Heid Oliver @ 2002-03-25 12:45 UTC (permalink / raw)
  To: 'axp-list@redhat.com'

I got the impression during recent power failures on two machines
(2.4.19-pre kernels, one
with a qlogic, one with a symbios controller) that fsck from the RH7.1
update e2fsprogs
package (e2fsprogs-1.23 AFAIR) destroyed the filesystems. I now use the
original
e2fsprogs-1.19-5 again, and had no problems so far.
	Oliver

> -----Original Message-----
> From:	Michal Jaegermann [SMTP:michal@ellpspace.math.ualberta.ca]
> Sent:	Sunday, March 24, 2002 5:52 PM
> To:	axp-list@redhat.com
> Subject:	Re: Linux 2.4.18 vs. alphas with symbios SCSI cards
> 
> On Sat, Mar 23, 2002 at 10:17:26PM -0800, Stephen Williams wrote:
> > 
> > I come to this conclusion from some trial and error. I was able to
> > patch the remains of /usr back together with fsck under the RedHat
> > 2.4.3-12 kernel,
> 
> To be sure fsck is not a part a kernel.
> 
> > One significant difference is that the 2.4.18 kernel has a new driver
> > for the Symbios SCSI controller
> 
> It is not likely that your problems lie there.  I was testing this
> driver (sym2) for quite a while both on Alpha and Intel and neither
> I have any complaints nor I recall any other reports of failure.  You
> have a Google provided interface to linux-kernel archives and you can
> quickly check that yourself.
> 
> IDE code could be a more likely candidate here but you are not using
> that.
> 
> > So I'm wondering if there is something specific to fsck's requirements
> > that is causing the stock 2.4.18 kernel to exhibit a bug.
> 
> There are "Current Minimal Requirements" on some elements of a user
> space listed in Documenation/Changes of your kernel sources.  I assume
> that all these are satisfied in your case?  They differ with kernel
> versions.
> 
> > It's all
> > pretty subtle, I'm not even certain its real, but I haven't seen any
> > error accessing the disk, just broken contents, especially after an
> > fsck gone wrong.
> 
> Although ext2 is pretty robust there are no guarantees that a file
> system will survive a power failure or other similar violent incidents.
> Incidents like that do happen.  Even journaling does not gives you
> absolute certainity (and may have other "interesting" failure modes on
> its own :-).  Yes, really messed up file system is not a pretty sight.
> 
>   Michal
> 
> 
> 
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list




^ permalink raw reply	[flat|nested] 42+ messages in thread
* new stock symbol: HPQ
@ 2002-05-02 19:37 Robert M. Riches Jr.
  2002-05-02 19:41 ` Peter Petrakis
  0 siblings, 1 reply; 42+ messages in thread
From: Robert M. Riches Jr. @ 2002-05-02 19:37 UTC (permalink / raw)
  To: axp-list

According to the business pages, the new post-merge stock
symbol for Hewlett Packard (and the bought-out Compaq) will
be HPQ.  I hope they don't try to pronounce it to rhyme
with the syrup used to treat accidental ingestion of poisons
by children.  :-)  :-)

Robert Riches
richesr1@inetarena.com




^ permalink raw reply	[flat|nested] 42+ messages in thread
* 2.4.18-0.26a kernel RPMS
@ 2002-05-03 21:29 Bob Lindell
  2002-05-03 22:35 ` Michal Jaegermann
  2002-05-03 23:25 ` Michal Jaegermann
  0 siblings, 2 replies; 42+ messages in thread
From: Bob Lindell @ 2002-05-03 21:29 UTC (permalink / raw)
  To: axp-list

I've patched, compiled, and built 2.4.18-0.26a kernel RPMS for the
alpha.  This is based on the 2.4.18-0.26 kernel from the RedHat rawhide
distribution.  A small patch includes back ports of some functions from
the 2.5 kernel to get it to compile.

Seems to running fine on my PC164 IDE and SCSI systems.  There are a few
modules with undefined symbols that I did not attempt to fix.  See below.

The r/w near the end of the filesystem is still present.  It is also
reproducible on my x86 machine running the same kernel.  The problem
seems to be sectors that are at the end of the disk that are less than
a multiple of the ext2 block size.  For example, on a filesystem with
4K blocks, the last 7, 512 byte sectors may not be readable.  This has
not caused any filesystem corruption problems for me to date, but
mke2fs doesn't like it.  I have to use a 2.2.19 kernel to make new
partitions on a disk.

See http://www.isi.edu/~lindell/linux/RPMS/ for both source and binary RPMS.

Bob

depmod: *** Unresolved symbols in /lib/modules/2.4.18-0.26a/kernel/drivers/char/
drm/sis.o
depmod:         sis_malloc_Ra3329ed5
depmod:         sis_free_Rced25333
depmod: *** Unresolved symbols in /lib/modules/2.4.18-0.26a/kernel/drivers/video
/pm3fb.o
depmod:         fbgen_switch
depmod:         fbgen_get_var
depmod:         fbgen_get_cmap
depmod:         fbgen_set_disp
depmod:         fbgen_pan_display
depmod:         fbgen_get_fix
depmod:         fbgen_install_cmap
depmod:         fbgen_update_var
depmod:         fbgen_do_set_var
depmod:         fbgen_blank
depmod:         fbgen_set_cmap
depmod:         fbgen_set_var
depmod: *** Unresolved symbols in /lib/modules/2.4.18-0.26a/kernel/net/ipv4/ipvs
/ip_vs.o
depmod:         sys_wait4
depmod: *** Unresolved symbols in /lib/modules/2.4.18-0.26a/kernel/net/tux/tux.o
depmod:         sys_wait4




^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2002-05-07  3:35 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-18 12:20 Converting time (since 01-01-1970) to Epoch Franco Tassone
1999-05-18 16:13 ` Michal Jaegermann
     [not found]   ` <michal@ellpspace.math.ualberta.ca>
1996-12-26  4:38     ` xload Bryan W. Headley
1996-12-30  9:16     ` Troubles with X and S3 Zarmfab Software Development
1997-05-09  6:41     ` Alpha Perl POSIX bug? Zarmfab Software Development
1997-12-01  6:13     ` Printer port problem!? Bryan W. Headley
1998-01-18 23:23     ` Is it possible: 32 bit env and also Wine/Alpha jhohertz
1999-05-19  9:51     ` Converting time (since 01-01-1970) to Epoch Franco Tassone
1999-05-19  9:23       ` Dr . David Alan Gilbert
1999-05-19  9:33       ` Phil Carmody
1999-05-20  4:06       ` Huw Davies
  -- strict thread matches above, loose matches on Subject: below --
1999-05-18 13:27 Paul Jakma
1999-05-18 14:16 Franco Tassone
1999-05-18 15:18 ` Phil Carmody
1999-05-19  8:57 Paul Jakma
1999-05-19  9:54 Wessels, Hans
1999-05-20  0:14 Tom King
2002-03-25 12:45 Linux 2.4.18 vs. alphas with symbios SCSI cards Heid Oliver
2002-03-25 14:56 ` Michal Jaegermann
2002-03-25 16:20   ` Mathieu MILLET
2002-03-25 16:25     ` Stephen Williams
2002-03-25 16:45       ` Mathieu MILLET
2002-03-25 19:49     ` Michal Jaegermann
2002-03-25 19:59       ` Stephen Williams
2002-03-25 20:16       ` Stephen Williams
2002-05-02 19:37 new stock symbol: HPQ Robert M. Riches Jr.
2002-05-02 19:41 ` Peter Petrakis
2002-05-02 20:46   ` dp264 disk or raid problem Mark Hansel
2002-05-02 21:22     ` Bob Lindell
2002-05-02 21:29     ` Peter Petrakis
2002-05-06 22:30       ` dp264 disk or raid problem (Solved) Mark Hansel
2002-05-07  1:32         ` Michal Jaegermann
2002-05-07  1:37           ` 'Bryce'
2002-05-07  3:29             ` Michal Jaegermann
2002-05-07  3:29               ` 'Bryce'
2002-05-07  2:13           ` Stephen Williams
2002-05-07  2:40             ` 'Bryce'
2002-05-03 21:29 2.4.18-0.26a kernel RPMS Bob Lindell
2002-05-03 22:35 ` Michal Jaegermann
2002-05-04  5:50   ` Bob Lindell
2002-05-03 23:25 ` Michal Jaegermann
2002-05-04  5:53   ` Bob Lindell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox