Sponsored Content
Operating Systems HP-UX I want to get machine boot up time Post 302308052 by pludi on Friday 17th of April 2009 02:14:51 AM
Old 04-17-2009
This could help:
Code:
uptime | \
perl -ne '/.*up (\d+) days, +(\d+):(\d+),.*/; $total=((($1*24+$2)*60+$3)*60);
$now=time(); $now-=$total; $now=localtime($now); print $now,"\n";'

It's not exact to the second, since uptime looses that information, but it's probably close enough.

Not relating to your problem, just in case anyone needs such a command for Linux:
Code:
date -d @$( awk "{print \"$(date +%s)-$1\"}" /proc/uptime )


Last edited by pludi; 04-17-2009 at 03:37 AM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Triple Boot Machine

I'm in a predicament right now! I have RedHat 7.2 ,Debian 2.2r5 ,and Windows ME. I am currently in a Sun Solaris 8 class and will soon acquire a copy of Solaris 8. I would like to start a small home network ,but 4 pc's for the house would be a little too expensive for me right now. What I was... (4 Replies)
Discussion started by: bilal_aa
4 Replies

2. UNIX for Dummies Questions & Answers

Cannot boot machine

I have a sun v240 running solaris 9. I recently changed the ip via the ifconfig command but made a mistake when running the command: ifconfig bge0 (ip address) netmask (ip address) when i meant to do: ifconfig bge0 (ip address) netmask ffff0000 broadcast (ip address) Now when I boot the... (4 Replies)
Discussion started by: GLJ@USC
4 Replies

3. Solaris

Sun machine boot up

Hi I am trying to bring up our Sun V100 machine remotely using hyper terminal. We have connected LOM port A to COM1 of our windows server and have lom promt available. Now when we type poweron it starts booting and goes through the booting process and stops at the following step... .... ... (7 Replies)
Discussion started by: chimpu
7 Replies

4. Shell Programming and Scripting

How do I Start JBoss automatically when boot my linux machine.

I have created a script file named 'start-jboss' ------------------------------------------------- #!/bin/sh # For starting Jboss JAVA_HOME=/home/argole/jdk/jdk1.6.0_10 export JAVA_HOME cd /home/argole/server/jboss-4.2.0.GA/bin echo "Starting JBOSS server" nohup ./run.sh -c... (25 Replies)
Discussion started by: shiraz
25 Replies

5. UNIX and Linux Applications

How do I Start postgre SQL automatically when boot my linux machine

Can any body give me the script to start postgre SQL 8.3.1 when boot linux? (2 Replies)
Discussion started by: shiraz
2 Replies

6. Ubuntu

What time did Ubuntu installed on machine?

How can I learn what time OS installed time and release information. (4 Replies)
Discussion started by: getrue
4 Replies

7. Solaris

After command setenv auto-boot false machine's console not displaying

hi Alll, I want to install solaris 10 on exixting solaris mahcine. I tried for OK boot cdrom-install but it gave me fatal error - disk not bootable , boot command disable so i tried with ok setenv auto-boot? false Ok reset-all after this server rebooted automatically and... (2 Replies)
Discussion started by: sunray
2 Replies

8. UNIX for Dummies Questions & Answers

CentOS machine does not boot!

Hello, one of my machine ,does not boot! check the pic and kindly help! Thx in advance! (0 Replies)
Discussion started by: ahmedamer12
0 Replies
SYSTEMD-MACHINE-ID-COMMIT.SERVICE(8)                     systemd-machine-id-commit.service                    SYSTEMD-MACHINE-ID-COMMIT.SERVICE(8)

NAME
systemd-machine-id-commit.service - Commit a transient machine ID to disk SYNOPSIS
systemd-machine-id-commit.service DESCRIPTION
systemd-machine-id-commit.service is an early boot service responsible for committing transient /etc/machine-id files to a writable disk file system. See machine-id(5) for more information about machine IDs. This service is started after local-fs.target in case /etc/machine-id is a mount point of its own (usually from a memory file system such as "tmpfs") and /etc is writable. The service will invoke systemd-machine-id-setup --commit, which writes the current transient machine ID to disk and unmount the /etc/machine-id file in a race-free manner to ensure that file is always valid and accessible for other processes. See systemd-machine-id-setup(1) for details. The main use case of this service are systems where /etc/machine-id is read-only and initially not initialized. In this case, the system manager will generate a transient machine ID file on a memory file system, and mount it over /etc/machine-id, during the early boot phase. This service is then invoked in a later boot phase, as soon as /etc has been remounted writable and the ID may thus be committed to disk to make it permanent. SEE ALSO
systemd(1), systemd-machine-id-setup(1), machine-id(5), systemd-firstboot(1) systemd 237 SYSTEMD-MACHINE-ID-COMMIT.SERVICE(8)
All times are GMT -4. The time now is 09:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy