Operating System - HP-UX
1755678 Members
3848 Online
108837 Solutions
New Discussion юеВ

How to find the date on which pvcreate command ran

 
Torsten.
Acclaimed Contributor

Re: How to find the date on which pvcreate command ran

Sorry, I meant only the first part of the command before the pipe - but I forgot to say this clearly.

;-)

My intention was to highlight the difference between the commands (without the perl extension), because the pure result looks like this:

# xd -j8200 -N16 -tu /dev/rdsk/c0t6d0
0000000 2014063___ 1142329960 2014063___ 1142329961
0000010

The first timestamp is the pvcreation time, the second the vgcreation time.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: How to find the date on which pvcreate command ran

Hi (again):

> Torsten: My intention was to highlight the difference between the commands (without the perl extension)...

No problem, but note too that I used a different set of switches with 'xd'. Comparing the two on one server of mine:

# xd -An -j8200 -N16 -tu /dev/dsk/c2t6d0
1644472381 1204570092 1644472381 1204570092

# xd -j8200 -N16 -tu /dev/rdsk/c2t6d0
0000000 1644472381 1204570092 1644472381 1204570092
0000010

Hence, for me, the decimal epoch seconds for the PVID is the second (zero-relative) field, or a value of 1204570092.

Thus:

# perl -le 'print scalar localtime(1204570092)'
Mon Mar 3 13:48:12 2008

# echo "0d1204570092=Y"|adb
2008 Mar 3 13:48:12


...so, all is good :-)

Regards!

...JRF...
Vihang.
Trusted Contributor

Re: How to find the date on which pvcreate command ran

Deepak Kr
Respected Contributor

Re: How to find the date on which pvcreate command ran

James

You perl gem..

hehe
"There is always some scope for improvement"