You are not logged in.

#1 2013-02-27 22:06:57

From: Sweet home Alabama!
Registered: 2009-06-27
Posts: 356

Best method for timestamping? (for later use with perl script)

What is the best method that I can use to timestamp events in Linux for later use with perl script?

I am performing some energy measurements.. where I am running several tasks separated by 20 secs in between. Before I start any execution of tasks, I always place initial delay for me to start the script and start the measurement device.

My problem is that I don't know how long is that first delay exactly. So to solve this, I thought I could use date commands to time stamp all tasks.. or at least to timestamp first dela.

Here is example of what I am doing:
1st delay
task 1
task 2
task 3..... etc

What would be the best to use?


#2 2013-02-27 22:55:54

From: Pasadena, CA
Registered: 2009-07-13
Posts: 15,784

Re: Best method for timestamping? (for later use with perl script)


It posts messages straight to the system log.  You can see the message, in all its glory using tools like journalctl.  You will see the message, the date, time, host name, user name, and the PID of logger when it ran.

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
How to Ask Questions the Smart Way


Board footer

Powered by FluxBB