I'm not sure you can simply overwrite /var/adm/utmpx in this way. I had an odd problems with /etc/security/failedlogin (on AIX) a while back and had to recreate the file as follows:-
fwtmp -ic </dev/null >/etc/security/failedlogin
Unfortunately, this resets everything to blank.
The other way is to look at process zero or process one. They start with the operating system, indeed if you kill them, everything on the machine goes very quiet and the phone rings..... as I found out one day.
I've done it... the issue is that I've only a day, not a year.
I've used vmstat -i, divided the interrupts clock by the indicated rate, and by 60(s)60(m)24(h) but I obtain a number of day that not coincide with init process day :-/
@vikash.rastogi (Who is not the original poster)
This thread is 3 months old.
I have noticed that the output from "uptime" has a variable format according to how long the machine has been up and whether any of the fields are a whole number (e.g. If you have been up an exact whole number of hours you don't see the minutes figure).
There is no maximum that I know of but I've not seen machines up for more than about 5 years.
Please give an example of your "uptime" and mention what Operating System you have. The "kstat" command is a Solaris command.