Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, When accessing my Linux Mint system remotely with SSH or Samba everything halts for about 20 seconds, then works again. This happens very often. When I run the command: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    20

    Remote connection with sudden delays


    Hi,

    When accessing my Linux Mint system remotely with SSH or Samba everything halts for about 20 seconds, then works again. This happens very often.

    When I run the command:

    # ping -i 5 -s 1 192.168.0.1 > /dev/null &

    Everything runs smoothly... But if I add this line to /etc/rc.local it has no effect... This bodge job worked perfectly with CentOS.

    Any advice?

    Thanks,
    Charlie.

  2. #2
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    932
    Quote Originally Posted by Chaslington View Post
    Hi,

    When accessing my Linux Mint system remotely with SSH or Samba everything halts for about 20 seconds, then works again. This happens very often.

    When I run the command:

    # ping -i 5 -s 1 192.168.0.1 > /dev/null &

    Everything runs smoothly... But if I add this line to /etc/rc.local it has no effect... This bodge job worked perfectly with CentOS.

    Any advice?

    Thanks,
    Charlie.
    Ping doesn't tell a lot becuase it only hits the bottom of the TCP/IP stack. I've seen hung sever respond to ping because the server was still powered on the the NIC card responded to ping, So ping can work even if network or a service is slow down. So may want to test your connection swith netstat -s. The more info you collect will help to determine you bottleneck.

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    20
    Thanks for your reply,

    It seems the Ethernet connection is hibernating when inactive for a very short period of time and I feel this is a problem with my router. I want my system to constantly ping the router purely to keep the connection awake, not for statistical reasons.

    The ping command is ignored on boot up scripts... Once I manually run the infinite ping command after boot up the system works like a dream.

    Code:
    [root@server]: netstat -s
    Ip:
        1128 total packets received
        0 forwarded
        0 incoming packets discarded
        1125 incoming packets delivered
        1215 requests sent out
        4 outgoing packets dropped
        2 dropped because of missing route
    Icmp:
        208 ICMP messages received
        0 input ICMP message failed.
        ICMP input histogram:
            destination unreachable: 8
            echo replies: 200
        213 ICMP messages sent
        0 ICMP messages failed
        ICMP output histogram:
            destination unreachable: 13
            echo request: 200
    IcmpMsg:
            InType0: 200
            InType3: 8
            OutType3: 13
            OutType8: 200
    Tcp:
        2 active connections openings
        33 passive connection openings
        2 failed connection attempts
        15 connection resets received
        3 connections established
        758 segments received
        856 segments send out
        23 segments retransmited
        0 bad segments received.
        25 resets sent
    Udp:
        177 packets received
        13 packets to unknown port received.
        0 packet receive errors
        131 packets sent
    UdpLite:
    TcpExt:
        11 invalid SYN cookies received
        2 TCP sockets finished time wait in fast timer
        39 delayed acks sent
        58 packets directly queued to recvmsg prequeue.
        430 bytes directly received in process context from prequeue
        112 packet headers predicted
        257 acknowledgments not containing data payload received
        43 predicted acknowledgements
        8 other TCP timeouts
        TCPLossProbes: 4
        TCPRcvCoalesce: 9
        TCPOFOQueue: 3
    IpExt:
        InNoRoutes: 3
        InMcastPkts: 52
        OutMcastPkts: 40
        InBcastPkts: 63
        OutBcastPkts: 47
        InOctets: 108182
        OutOctets: 276178
        InMcastOctets: 5521
        OutMcastOctets: 5173
        InBcastOctets: 8637
        OutBcastOctets: 6445

  4. #4
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    932
    You could put ping into cron that would ping every minute at the shortest.

Posting Permissions

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