Dear all
can you give me command to show me last unexpected reboot time the date, month, and the year on solaris 10
i've tried
uptime
who-b
last reboot
but nothing give me the year last reboot only the date , month and time
Dear all
can you give me command to show me last unexpected reboot time the date, month, and the year on solaris 10
i've tried
uptime
who-b
last reboot
but nothing give me the year last reboot only the date , month and time
Usually, dates within the last six months are given with a time stamp, and dates beyond that print the year.
hey rudy
thanks for the answer
btw where i can find reboot log in solaris 10?
and what it the command tq,
Here is a simple way :
printf "%s\n" "$(perl -e "print scalar(localtime($(kstat -p unix:0:system_misc:boot_time | cut -f 2)))")"
hey jlliagre,
after i input your script
the output is like this:
# printf "%s\n" "$(perl -e "print scalar(localtime($(kstat -p unix:0:system_misc:boot_time | cut -f 2)))")"
syntax error: `(' unexpected
am i make mistake?
Your mistake is to use an obsolete shell.
Switch to ksh or bash.
Alternatively, run :
ksh -c 'printf "%s\n" "$(perl -e "print scalar(localtime($(kstat -p unix:0:system_misc:boot_time | cut -f 2)))")"'
hey jlliagre
you right, i foget to bash mode
thankyou very much
it's solve