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
20s
task 2
20s
task 3..... etc
What would be the best to use?

logger.
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.

Similar Messages

  • HT201328 I have been given permission for unlocking my iphone 3 GS from Orange. I want to set up the phone for my wife to use with a new number and carrier. Do I unlock under my itunes account first or set one up for her and then unlock the phone.

    I have been given permission for unlocking my iphone 3 GS from Orange. I want to set up the phone for my wife to use with a new number and carrier. Do I unlock under my itunes account first ( I now have a new iphone on this account) or set one up for her and then unlock the phone. I am worried about upsetting the new phone.

    I would complete unlocking as is and then
    restore as new once you know the iPhone is unlocked
    Be aware Orange will process the request at their speed
    one of the reasons they usually reside at bottom of User Sat surveys
    will likely take weeks
    This may also help
    http://support.apple.com/kb/HT5014

  • Can I have Photoshop cc on two machines,for solely my own use,with a single subsription?

    My main computer is showing signs of failure,So have bought a new PC .
    Can I have Photoshop cc on two machines,for solely my own use,with a single subsription?

    Yes.
    Creative Cloud Help | Creative Cloud / Common Questions
    "Can I use the software I download from Creative Cloud on more than one machine?
    Yes. Creative Cloud desktop applications can be downloaded and installed on multiple computers, regardless of operating system. However, activation is limited to two machines per individual associated with the membership. See the terms of use for more information. Learn how to deactivate a Creative Cloud license on a machine."

  • What's the best method of burning CD/DVD using MBP?

    As per my title, what is the best method of burning CD/DVD using my MBP? Can I use iDVD, disk utility etc? I'm referring to burning stuff like music, photos, doc etc. I used Toast Titanium (shd be version 6) with my iBook G4 but it doesn't seem to work with MBP after data migration. Guess the version is too old and not supported in Snow Leopard. Is there any upgrade for Toast Titanium and how much would it cost?

    Hi tanvivien,
    The best method is really going to depend on what you're burning. All of the iLife applications (iPhoto, iDVD, iMovie, etc.) make it pretty easy to burn with the click of a couple of buttons via the "Share" menu drop down.
    You can use Finder for files/data as well as media but if it's multimedia then usually the programs where they're managed or stored is easier.
    Information on Toast and how to upgrade would be found here - http://www.roxio.com/enu/products/toast/titanium/overview.html

  • I have a power pc (g5) computer that I will soon be replacing with a current i5 or i7 mini. How do I transfer the Time Machine files from the internal hard drive on the G5 to an external drive that I will later use with the Mini?

    I have a Power PC G5 computer that I will soon be replacing with a current i5 or i7 Mini. How do I transfer the Time Machine files from the internal hard drive on the G5 to an external drive that I will later use with the Mini?

    Hi, likely the easiest is to just poll the drive & get something like this...
    Get MacScan...
    http://www.apple.com/downloads/macosx/networking_security/macscan.html
    http://eshop.macsales.com/item/NewerTech/U3NVSPATA/
    But if you have a good external drive already, just clone it.
    Get carbon copy cloner to make an exact copy of your old HD to the New one...
    http://www.bombich.com/software/ccc.html
    Or SuperDuper...
    http://www.shirt-pocket.com/SuperDuper/

  • Java with Perl scripts

    Hello,
    I would like to have my applet use a perl script. How do I embed a perl script in Java? Is there a special library? Thanks.
    [email protected]

    You could probably just use Runtime.exec() to execute the script on the server.
    - Sheepy

  • Best Method Of Import For Future Preservation

    I would like to import all my home movies through iMovie to an external hard drive, but am wondering if that is the best method to ensure that I will always be able to use/access them in the years to come. A couple of questions:
    **Does iMovie still preserve and save to the external drive the original format the movie was recorded in? Does it switch it to something that only iMovie can recognize and find?
    **What if iMovie quits being made in 10 years or if I switch to a different editing program down the road? Will I still be able to use/access my movies?
    **Would it be better to skip going through iMovie and just copy the movies/files directly to the external drive?
    Thank you for any info you can give me.
    Nkulu

    Nkulu wrote:
    .. Does iMovie still preserve and save to the external drive the original format the movie was recorded in?
    in iMHD≤6: yes, even after editing, the unaltered original video is kept untouched; in iM08 answer is more complicated: the Events store the original data, but it is unable to export without altering it.. And: mpeg2 and AVCHD files get automatically converted.. but into a lossless codec ..
    Does it switch it to something that only iMovie can recognize and find?
    the .mov digged deep into the file structure of iM (in iMHD6: in the project packages; in iM08: in the Events Folder) are playable without iM..
    .. What if iMovie quits being made in 10 years or if I switch to a different editing program down the road? Will I still be able to use/access my movies?
    very hard to tell; my experience: cross-app/cross-platform, accessability is .. small. compare with 'opening iMHD6 project with iM08' , or 'transfer iM08 to FCE' .... and those are actual apps from one manufacturer..
    .. Would it be better to skip going through iMovie and just copy the movies/files directly to the external drive?
    that's why I'm in the process of decision making come back to tape (HDV) - I'm storing about an terabyte of my son's life on video in a simple shoebox.. no copying, backup, no transfer.. as long as I get some service which is able to playback that worlwide standard, I can watch and use those videos..
    I often tell that situation: me being on Cuba, running out of 'storage space' ... 7$ and got a new tape, 60min.. imagine that with a fancy HDDcorder.. you need additionally in your travel luggage your Mac, power brick, prob. an ext. harddrive, just for 'emtpying' your camcorder .. honestly: not on MY vacations/my hotel rooms, tents.. ..
    and don't tell me '17h recording time' .. IF HiDef camcorder, than FullHD.. which is actually a max. of 3h per device.. and I do record more than 3h on a 2 weeks journey..

  • Any Recommendations for External HD to use with Time Machine?

    Have been using Time Capsule wireless as my drive for Time Machine back-ups for a couple of years with mixed success. It also serves as a wireless router for internet service between all devices in my household.
    Was recently recommended to me to invest in an external firewired hard drive to use for Time Machine so now I'm presented with a dilemma: Which one to choose?
    Need 3 Terabytes and I'm looking at the Iomega Mac Companion (3TB) but see that Apple has discontinued selling it from its store and there's an issue with using USB and FW simultaneously.
    Looking for feedback from anyone whose used this device and/or recommendations on another 3TB drive to purchase.
    Thanks in advance.

    From that broad page The hatter suggested, these specific enclosures (with or without a drive pre-installed) are pretty good.
    http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB
    The one at the bottom that says 0GB is the same enclosure empty, so that you can pick a separate drive mechanism to install in it. That way you can order the exact drive you want, instead of having them choose from what they have on hand.
    Wireheads will choose the 0GB and install the drive they prefer, most "regular" folks just buy it with a drive already installed and it works (after initializing) right out of the box, no assembly required.

  • Best speed External Hard Drive to use with Final Cut Pro X ?

    Hey all
    I'm looking at getting a new USB 2.0 external hard drive to use with FCPX, I was wondering what everyones thoughts were on minimum speeds and what everyone else uses.
    I am looking at least 1-2TB.

    I will warn you now that I am somewhat of a lone voice on these forums for recommending USB 2.0s.
    I have used the 7,200rpm types with their own mains supply over the last 6 years (and exclusively for the last 3) and had no problems of any kind.
    Having said that I am not a pro with tight schedules (or underwear!) but I have used DV, HDV, AVCHD with and without ProRes and AIC.
    Most of my projects are short though I have done a number of 2 hour projects with comparatively simple editing and a few effects etc. One ongoing project has some 12 hours of DV which I dip into  occasionally.
    I have a couple of LaCie FW HDs which I stopped using a couple of years ago in favour of the much cheaper USB 2.0s and didn't notice any difference, though as I said I don't have pro time constraints.
    Now is not the best time to buy HDs cheaply as the autumn floods in Asia knocked out many of the main suppliers, prices doubled overnight and have still not got back to last summers figures (2TB WD Essential £69 with free delivery).
    Look at the price now!
    http://www.amazon.co.uk/Western-Digital-Elements-External-Desktop/dp/B003IPC21Y/ ref=sr_1_11?ie=UTF8&qid=1330504588&sr=8-11

  • What's the best Gigabit Ethernet ADSL2  modem to use with the new Apple Extreme router?

    I Have upgraded to the new Apple Airport Extreme & need to update my old ADSL modem as it only has 10/100 ethernet. I don't want to spend a great deal as I will hopefully be upgrading to fibre later in the year. I find it strange that Apple have never sold them through the Apple Store.
    Thanks in advance.

    It would make no sense to recommend a modem that your Internet Service Provider (ISP) does not support, so your first task is to contact your ISP for a list of "approved" modems for use with their service.
    Once we have the list, it will be easy to eliminate the non-Gigabit models, since most, if not all, will be not be Gigabit rated.
    After all, the fastest speed that any ADSL provider might be able to deliver is maybe 30-40 Mbps.  Don't think that you will need 1,000 Mbps capability in a modem for that type of connection.
    Kind of like having a car that can go 1,000 miles per hour, but the streets are narrow, crooked, and won't allow much over 25 miles per hour.

  • Best version of Desktop Manager to use with Vista and Outlook 2007

    What is the best version of Desktop Manager to use on a new computer with Windows Vista and Outlook 2007?
    Solved!
    Go to Solution.

    Hi there!
    The most recent...v5.0. You can DL it here:
    http://na.blackberry.com/eng/services/desktop/
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Best method of formatting? - having trouble with iphoto/aperture thumbnails

    I've recently installed SL on my wife's MB - all good except now her iphoto thumbnails won't show. I've tried rebuilding the iPhoto library (and all other options - but nothing). When i installed SL i did a full reformatting of the HD and I wonder if i perhaps didn't choose the best method - anyone got any ideas??
    Message was edited by: Birmingham Mike (because he looked like a bad speller!)

    This here might be what you need to do.http://www.justanswer.com/mac-computers/4ahty-rebuild-iphoto-caches.html

  • Illegal character '%' at position 1 - need help with perl script!

    iTunes U Access Debugging
    Received
    Destination kean.edu
    Identity %22Jack Black%22 %3C%28jblack%29.%40kean.edu%3E %28jblack%29 %5B42%5D
    Credentials STUDENT%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    Time 1178737992
    Signature 8786768fc3ebf9d3faf404a42bdb8a8d14c481e270fb75f084ebdd815553e1e4
    Analysis
    The destination string is valid and the corresponding destination item was found.
    The identity string is invalid: Illegal character '%' at position 1.
    The credential string is valid but contains no known credentials.
    The credential string contains the following credential which is not used within iTunes U:
    STUDENT%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    The time string is valid and corresponds to 2007-05-09 19:13:12Z.
    The signature string is valid.
    Access
    Because the received signature and time were valid, the received identity and credentials were accepted by iTunes U.
    In addition, the following 2 credentials were automatically added by iTunes U:
    All@urn:mace:itunesu.com:sites:kean.edu
    Authenticated@urn:mace:itunesu.com:sites:kean.edu
    With these credentials, you have browsing and downloading access to the requested destination.

    Ken
    Thanks for lookiing into the issue.
    I am using the perl file downloaded from the iTunesU website.
    Here is the script:
    the only thing i replaced in this script is the shared secret, debug suffix, display name, email address and username with appropriate ones.
    use strict;
    use Digest::SHA qw(hmacsha256hex);
    use URI::Escape;
    use LWP::UserAgent;
    use Encode qw(encode);
    # to redirect errors to the browser
    use CGI::Carp qw(fatalsToBrowser);
    # to allow inputs from website using CGI scripting
    use CGI qw(:standard);
    sub main() {
    # Define your site's information. Replace these
    # values with ones appropriate for your site.
    my $siteURL = "https://deimos.apple.com/WebObjects/Core.woa/Browse/kean.edu";
    my $debugSuffix = "/abc123";
    my $sharedSecret = "YOURSHAREDSECRETKEYCODE";
    my $administratorCredential = "Administrator\@urn:mace:itunesu.com:sites:kean.edu";
    # Define the user information. Replace the credentials with the
    # credentials you want to grant to that user, and the optional
    # identity information with the identity of the current user.
    # For initial testing and site setup, use the singe administrator
    # credential defined when your iTunes U site was created. Once
    # you have access to your iTunes U site, you will be able to define
    # additional credentials and the iTunes U access they provide.
    my @credentialArray = ($administratorCredential);
    my $displayName = "Michael Searson";
    my $emailAddress = "msearson\@kean.edu";
    my $username = "msearson";
    my $userIdentifier = "42";
    # Append your site's debug suffix to the destination if you
    # want to receive an HTML page providing information about
    # the transmission of credentials and identity between this
    # program and iTunes U. Remove this code after initial
    # testing to instead receive the destination page requested.
    # uncomment the line below to access debug information from the
    # iTunes U server.
    $siteURL .= $debugSuffix;
    # Ready this data for transfer, the order must be correct!
    my $identity = getIdentityString($displayName, $emailAddress, $username, $userIdentifier);
    # turn the array of credentials into a semicolon delimited string
    my $credentials = getCredentialsString(@credentialArray);
    # time that this key is generated. The key is valid for 90 seconds.
    my $currentTime = time;
    my %token = getAuthorizationToken($identity, $credentials, $currentTime, $sharedSecret);
    invokeAction($siteURL, %token)
    sub getIdentityString()
    # Combine user identity information into an appropriately formatted string.
    # take the arguments passed into the function copy them to variables
    my ($displayName, $emailAddress, $username, $userIdentifier) = @_;
    # wrap the elements into the required delimiters.
    my $returnValue = sprintf('"%s" <%s> (%s) [%s]', $displayName,
    $emailAddress, $username, $userIdentifier);
    return $returnValue;
    sub getCredentialsString()
    # this is equivalent to join(';', @_); this function is present
    # for consistency with the Java example.
    # concatenates all the passed in credentials into a string
    # with a semicolon delimiting the credentials in the string.
    #make sure that at least one credential is passed in
    my $returnValue = "";
    my $credentialCount = @_;
    if ($credentialCount > 0) {
    for (my $i=0; $i < $credentialCount; $i++) {
    if ($i == 0) {
    $returnValue = sprintf('%s', $_[$i]);
    } else {
    $returnValue = sprintf('%s;%s', $returnValue, $_[$i]);
    } else {
    die "credentialArray must have at least one credential";
    return $returnValue;
    sub getAuthorizationToken()
    # Create a buffer with which to generate the authorization token.
    my ($identity, $credentials, $expriation, $key) = @_;
    my $signature;
    my $buffer;
    my %token_hash = ();
    my $escapedUTF8EncodedCredentials = uri_escape(encode("UTF-8", $credentials), "^A-Za-z0-9\-_.* ");
    my $escapedUTF8EncodedIdentity = uri_escape(encode("UTF-8", $identity), "^A-Za-z0-9\-_.* ");
    my $escapedUTF8EncodedExpiration = uri_escape(encode("UTF-8", $expriation), "^A-Za-z0-9\-_.* ");
    # create the POST Content and sign it
    $buffer .= "credentials=" . $escapedUTF8EncodedCredentials;
    $buffer .= "&identity=" . $escapedUTF8EncodedIdentity;
    $buffer .= "&time=" . $escapedUTF8EncodedExpiration;
    # This is necessary because uri_escape does encode spaces to pluses.
    $buffer =~ s/[ ]/+/g;
    # returns a signed message that is sent to the server
    $signature = hmacsha256hex($buffer, $key);
    $token_hash{'credentials'} = $escapedUTF8EncodedCredentials;
    $token_hash{'identity'} = $escapedUTF8EncodedIdentity;
    $token_hash{'time'} = $escapedUTF8EncodedExpiration;
    $token_hash{'signature'} = $signature;
    # append the signature to the POST content
    return %token_hash
    sub invokeAction()
    # Send a request to iTunes U and record the response.
    # Net:HTTPS is used to get better control of the encoding of the POST data
    # as HTTP::Request::Common does not encode parentheses and Java's URLEncoder
    # does.
    my ($siteURL, %token) = @_;
    #print "$token\n";
    my $ua = LWP::UserAgent->new;
    my $response = $ua->post($siteURL, \%token);
    print "Content-type: text/html\n\n";
    print $response->content;
    main();
    AND HERE IS THE OUTPUT
    Received
    Destination kean.edu
    Identity %22Michael Searson%22 %3Cmsearson%40kean.edu%3E %28msearson%29 %5B42%5D
    Credentials Administrator%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    Time 1178819683
    Signature 4d012f2cb6e465dbc4ae41b4905ad3c334c695e36b06e9ae406acf02f25387d1
    Analysis
    The destination string is valid and the corresponding destination item was found.
    The identity string is invalid: Illegal character '%' at position 1.
    The credential string is valid but contains no known credentials.
    The credential string contains the following credential which is not used within iTunes U:
    Administrator%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    The time string is valid and corresponds to 2007-05-10 17:54:43Z.
    The signature string is valid.
    Access
    Because the received signature and time were valid, the received identity and credentials were accepted by iTunes U.
    In addition, the following 2 credentials were automatically added by iTunes U:
    All@urn:mace:itunesu.com:sites:kean.edu
    Authenticated@urn:mace:itunesu.com:sites:kean.edu
    With these credentials, you have browsing, downloading, uploading, and editing access to the requested destination.

  • Amateur with perl script

    Trying to use the small perl script referred to in the message down below to send mail from the command line using unix mail. Any advice about what the error message immediately below refers to will be appreciated.
    "smtp.mac.com" is not exported by the Net::SMTP module
    Can't continue after import errors at myprogram.pl line 5
    BEGIN failed--compilation aborted at myprogram.pl line 5.
    Bill, below is a good example of how to do it with the perl script method. I use my verizon smtp server (outgoing.verizon.net) to send the mail. I haven't been able to use the postfix server on my own Mac to do it. Maybe someone can help us learn how to do that.
    http://members.toast.net/strycher/perl/examplenetsmtp.htm
    Boyd

    I suggest that you find a better
    source of information. I was finally able to make the
    date_r method work in this example but I had to write
    my own tz_offset function.
    I agree, I'd find a better example somewhere. Looking at that page, I'm fairly certain that those examples are simply taken out of much larger scripts without regard to whether they'd actually run as written.
    And the date_r subroutine is just plain odd, if you ask me. I'm not sure why he'd go to the trouble of writing it like that when he could do it with two lines of code. Unless he can't use POSIX on Windows...
    First, he'd just have to add
    <pre class="command">use POSIX qw(strftime);</pre>to the top of his script, then he could get the date/time formatted more or less like he had it with this:
    <pre class="command">my $date = strftime("%A, %e %B %Y %T %z", localtime(time));</pre>I'm not sure about the time zone offset being "-500" and not "-0500", which is more what I'm used to seeing.
    This page has a more straightforward explanation and example of how to use Net::SMTP. Just go through it down to just before "Other Neat Stuff with Net::SMTP."
    charlie

  • What is the best method to query for older GPIB equipment with ID? and newer with *IDN?

    Good day,
    I am writing a test executive where it needs to scan the bus for support of older (HP/Agilent 856x series) and newer (Agilent 440x and 444x series) spectrum analyzers. *NOTE* I originally posted this question in my NI Community blog. I apologize for redundancy but someone recommended I re-post here.
    The first frame looks for the newer analyzers with *IDN? then if that fails sets the boolean in the error cluster to TRUE. The next frame then uses the error cluster's boolean to decide whether an older HP analzer is connected instead using ID? query. Disclaimer: the second frame is a clone of the ID query of the 856x Initialize VI. I just want to use what already worked - no reinventing the same wheel?
    But, lo and behold, it doesn't work as expected. If I have the frames in this order and connect a HP8563E the GPIB time's out error. This code works with the newer 4407 or 4440 since the *IDN? query passes and the second frame is not executed.
    Now, when I move the second frame to become the first frame and run it with HP8563E the query works but will have a GPIB timeout if I have the 4407 or 4440 connected.
    Long story short, how do I support both older GPIB ID? and newer IDN? in my code?
    I have attached the query VI created with LV 2012.
    Many thanks!
    Aldrin
    Attachments:
    Query ID and IDN.vi ‏11 KB

    I think Michael Aivaliotis of JKI and NI have an elegant solution:
    https://decibel.ni.com/content/groups/large-labview-application-development/blog/2015/05/14/what-is-...
    Cheers!
    Aldrin

Maybe you are looking for

  • Does Apple upgrade my mid-2011 MacBook Air to 8GB RAM?

    I would like to upgrade my MacBook Air 13" mid-2011 to 8GB RAM after seeing that the 2012 model supports 8GB RAM.  Does Apple or anyone else offer this service?  Thanks for all your replies.

  • Hooking up external hd to airport express to use with Time Machine

    Hello, I would like to hook up my external HD to my airport Express and wirelessly still be able to use it for backing up and additional storage. Is this possible?? It will be hooked up via USB. It currently is sitting behind my iMac (2009) and hooke

  • Commision Agent & separate report for that.

    Hi SD Gurus, My client have typical requirement. He had routed 30 of his customers through commission agent. In this scenario, he sell(dispatch) material directly to the customer & also get the payment from customer. Billing is done to the customer.

  • Writing MBeans on Weblogic Server 8.1 sp5

    Hi, I am trying to write a standard mbean for managing my application. As of now its a simple MBean which just needs to print hello world on the server when a MBean Client invokes it. Let me discuss the apporach i have taken. Classes that have been d

  • Regarding Query/Where box in oracle forms

    Hi, I have a query regarding query/where box in oracle. When I enter ":" in one of the field query box pops up and when I enter some query and press F12 to execute query. The OK button has to be pressed twice to retrieve the result. Can anyone please