Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Delay between two commands in a terminal
Results 1 to 5 of 5

Thread: Delay between two commands in a terminal

  1. #1

    Delay between two commands in a terminal

    Hi,

    How can I know the time or delay between typing two commands in a terminal? Thanks...

  2. #2
    A simple work around would be to prefix the two commands with the date command. ie

    date; <command1>
    date; <command2>

    It all depends what you are trying to achieve...

  3. #3
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760
    Yeah, what are you doing? Time how long something takes? If that is the case:

    Code:
    [andrew@andrew-desktop-fedora ~]$ time ping -c 10 schotty.com
    PING schotty.com (64.202.166.232) 56(84) bytes of data.
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=1 ttl=43 time=73.4 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=2 ttl=43 time=73.6 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=3 ttl=43 time=76.3 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=4 ttl=43 time=72.5 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=5 ttl=43 time=75.0 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=6 ttl=43 time=75.6 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=7 ttl=43 time=74.0 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=8 ttl=43 time=74.3 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=9 ttl=43 time=75.2 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=10 ttl=43 time=74.6 ms
    
    --- schotty.com ping statistics ---
    10 packets transmitted, 10 received, 0% packet loss, time 9002ms
    rtt min/avg/max/mdev = 72.526/74.491/76.394/1.140 ms
    
    real    0m9.119s
    user    0m0.001s
    sys     0m0.001s
    [andrew@andrew-desktop-fedora ~]$

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


  4. #4
    Quote Originally Posted by Schotty View Post
    Yeah, what are you doing? Time how long something takes? If that is the case:

    Code:
    [andrew@andrew-desktop-fedora ~]$ time ping -c 10 schotty.com
    PING schotty.com (64.202.166.232) 56(84) bytes of data.
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=1 ttl=43 time=73.4 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=2 ttl=43 time=73.6 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=3 ttl=43 time=76.3 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=4 ttl=43 time=72.5 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=5 ttl=43 time=75.0 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=6 ttl=43 time=75.6 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=7 ttl=43 time=74.0 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=8 ttl=43 time=74.3 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=9 ttl=43 time=75.2 ms
    64 bytes from linhostjava04.prod.mesa1.secureserver.net (64.202.166.232): icmp_seq=10 ttl=43 time=74.6 ms
    
    --- schotty.com ping statistics ---
    10 packets transmitted, 10 received, 0% packet loss, time 9002ms
    rtt min/avg/max/mdev = 72.526/74.491/76.394/1.140 ms
    
    real    0m9.119s
    user    0m0.001s
    sys     0m0.001s
    [andrew@andrew-desktop-fedora ~]$
    Hi,

    Thanks. What I am actually looking for is the time gap between the execution of two commands in a terminal for example here are the two separate commands that I am typing

    rpm -qi php

    rpm -qi mysql

    I just want to see if there is any facility within Linux to for the user to know the execution time of commands and the time gap between them all for the sake of curiosity. Thanks

  5. #5
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760
    Hmm, perhaps doing something like:

    time command_a && time command_b

    or

    make a bash script of the list of commands and time that.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Similar Threads

  1. dynamically changing delay pool acl squid.conf
    By lasanthaindika in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 05-03-2009, 08:04 AM
  2. How to introduce delay in qos setup
    By frostbolt in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 08-07-2008, 11:04 PM
  3. Squid delay pools
    By Suhas! in forum Redhat / Fedora
    Replies: 0
    Last Post: 11-28-2007, 08:32 AM
  4. NIS commands
    By Tamil in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 01-18-2007, 10:29 PM
  5. Delay with MTA (Mail Transport Authority) with wireless
    By allelopath in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 01-16-2007, 02:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •