tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY:nologin-exception
@ 2004-02-10 16:26 koerfer
  2004-02-10 22:19 ` calculating elapsed time Rich Glazier
  0 siblings, 1 reply; 3+ messages in thread
From: koerfer @ 2004-02-10 16:26 UTC (permalink / raw)


Hi managers,

many thanks for the big response to my demand below;
first of all I want to apologize for the strange subject that is a rudiment of a
former demand !

As I wanted to keep additional partitions on dsk1 I tried to generate a
system-disk without the need of new labeling (you convinced me that this was not
possible)

Nevertheless finally I succeeded in backing up the additional data on those
partitions and typing:

disklabel -r dsk1 > dsk1_label
disklabel -rw -t advfs dsk1
disklabel  -R -t advfs dsk1 dsk1_label

building than the appropriate file-domains (see below) + the additional one I
succeded keeping all data after restoring 

Martin


----------------------------------------------
>we run Tru64 V5.1a PK4 on an AS using AdvFS.
>Due to hardware-errors on the system-disk (dsk0) I want to change the >system-disk.
>After partitioning a second disk (dsk1a, -g, -h), creating file-domains
>mkfdmn -r /dev/disk/disk1a root1_domain
>mkfdmn /dev/disk/disk1g usr1_domain
>mkfdmn /dev/disk/disk1h var1_domain
>and creating matching filesets
>I copied the the /, /usr, /var-partitions to dsk1.

>After modifying the /etc/fstab on dsk1 I wanted to boot from this disk.

>On the console after:

>-jumping to bootstrap code

>I got the message

>- can't open osf_boot

>- halted CPU 0

>- halt code = 5

>What am I doing wrong ???
>Any help would be appreciated


-- 
Dr.Martin Körfer
Max-Planck-Institut für Chemie
Elektronik
J.J.Becherweg 27
55128 Mainz
Tel.: -49-6131-305488
Fax:  -49-6131-305318



-------------------------------------------------
This mail sent through IMP: www.mpch-mainz.mpg.de


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

* calculating elapsed time
  2004-02-10 16:26 SUMMARY:nologin-exception koerfer
@ 2004-02-10 22:19 ` Rich Glazier
  2004-02-13 19:21   ` SUMMARY: " Rich Glazier
  0 siblings, 1 reply; 3+ messages in thread
From: Rich Glazier @ 2004-02-10 22:19 UTC (permalink / raw)



Does anyone have any good tricks for calculating
elapsed time in Tru64?  Other OSes have a %s flag to
the date command that is total elapsed Unix time
(since Jan 1 1970).  Is there an equivilant in Tru64?

Thanks,

Rich

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


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

* SUMMARY: calculating elapsed time
  2004-02-10 22:19 ` calculating elapsed time Rich Glazier
@ 2004-02-13 19:21   ` Rich Glazier
  0 siblings, 0 replies; 3+ messages in thread
From: Rich Glazier @ 2004-02-13 19:21 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 3113 bytes --]

Thanks to Bob Marcan, Charles Ballowe, Jeff Leafey,
Paul A. Sand, Martin Adolfsson, Tim Cutts, Spider
Boardman, Peyton Bland, and J.A. Gutierrez .

Perl seemed to be the favorite, and that is what I
ended up using.  A sampling of responses is included.

Here is my script for a vdump | vrestore, and to clock
the time it took.  I could precede the vdump with the
“time” command, but I like this better.  

#! /bin/ksh
#
DATE=`date  +"%r  %d  %h  %y  (%a)"` 
echo $DATE >> /usr/scripts/prod_on_mars.out
DATE1=`perl -e "print time()"`
/sbin/vdump -0f - /prod_on_mars | /sbin/vrestore -xf -
-D /prod 
DATE2=`perl -e "print time()"`
ELTIME=$(( $DATE2 - $DATE1 ))
ELTIMEMIN=$(( $ELTIME/60 ))
ELTIMEHRS=$(( $ELTIMEMIN/60 ))
ELTIMESEC=$(( $ELTIME%60 ))
echo "Elapsed Time (h:m:s) =
$ELTIMEHRS:$ELTIMEMIN:$ELTIMESEC" >>
/usr/scripts/prod_on_mars.out
df -k /prod /prod2 >> /usr/scripts/prod_on_mars.out
echo
"-----------------------------------------------------------------"
>> /usr/scripts/prod_on_mars.out
#
tail -49 /usr/scripts/prod_on_mars.out > /tmp/newfile
rm /usr/scripts/prod_on_mars.out
mv /tmp/newfile /usr/scripts/prod_on_mars.out
#
mailx -s "jupiter dump"  . . .


RESPONSES:
----------------------------------

you can always do
perl -e "print time"

or to get a newline after it:
perl -e '$x=time; print "$x\n"'

that will print seconds since epoch.

Charles Ballowe

-----------------------------------

Rich,

You can install GNU date, but since you've already got
Perl on board, 
try something like:

   perl -e 'print time()'

This returns the 'epoch' just like the %s flag to GNU
date.

Here's an example of using this to calculate the run
time of a program:

     START=`perl -e "print time()"`
     ./program-to-test
     END=`perl -e "print time()"`
     ELAPSED=$(( $#ND - $START ))
     echo "Program took $ELAPSED seconds to run"

It's a bit of a kludge, but it does let you do what
you need without 
installing anything else.  Hope that helps!
-- 
Jay Leafey

--------------------------

I've always just used 

    perl -e 'print time, "\n"'

(well, suitably aliased.)

-- 
-- Paul A. Sand

---------------------------

Hi,

Using Perl: perl -e 'print time()."\n"'

Good luck.
/Martin Adolfsson

----------------------------

It's actually the native way UNIX keeps time, so there
are any number 
of ways to do it, all of which ultimately access the
kernel's internal 
clock.  Here's one way:

perl -e 'print time(), "\n"'

Tim Cutts 

---------------------------

perl -le 'print time'

Spider Boardman



--- Rich Glazier <rglazier2002@yahoo.com> wrote:
> 
> Does anyone have any good tricks for calculating
> elapsed time in Tru64?  Other OSes have a %s flag to
> the date command that is total elapsed Unix time
> (since Jan 1 1970).  Is there an equivilant in
> Tru64?
> 
> Thanks,
> 
> Rich
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing
> online.
> http://taxes.yahoo.com/filing.html


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


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

end of thread, other threads:[~2004-02-13 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10 16:26 SUMMARY:nologin-exception koerfer
2004-02-10 22:19 ` calculating elapsed time Rich Glazier
2004-02-13 19:21   ` SUMMARY: " Rich Glazier

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