2

I'm running Linux Mint Maya 13.2 on a laptop from a USB stick, and SSHing onto that install from my own work computer.

When i'm editing a file with Vim, i keep getting a pause of about a minute where it becomes completely unresponsive. The cursor is blinking but i can't do anything. After a minute or two it comes back to normal, spontaneously.

This is not caused by me hitting Ctrl&S, eg like this question: https://stackoverflow.com/questions/3419820/sometimes-my-file-just-freezes-in-my-vi-vim-what-happened

When it happens, i'm often using the cursors to navigate around the file.

I never see this pause at any other time when i'm ssh'd onto the other computer in this way: it only happens when i'm editing a file with vim. The version of Vim i'm using is

VIM - Vi IMproved
version 7.3.429  

Grateful for any suggestions! max

  • 2
    The first thing to find out is whether the SSH connection or Vim is the culprit. To see what vim is doing, run strace -tt -o vim.strace vim; you get a timestamp with each system call. To see what SSH is doing, use wireshark to see what packets are sent and received over the connection (requires root). – Gilles Aug 4 '15 at 23:04
  • Thanks @Gilles. I'm monitoring vim now but i haven't used wireshark before. I've just installed it but i'm not sure whether i should be running it on my work computer or the USB Linux (aka the "other computer"), and what I shoiuld be looking for. Mind giving me a couple of pointers? thanks, Max – Max Williams Aug 5 '15 at 8:42
2
  1. network conditions. To detect if your network conditions are good exit to shell on remote machine and hold any character key. If you see that character flow is unstable or 'hangs' you have network problems.
  2. vim does autosave and target disk if NFS or something like that. To detect Either use sar to get data from the past or run vmstat in other ssh session to same server.
  3. target server overload. exit shell and run uptime immediately after the 'hang'. If target machine has sysstat installed, sar is even better.
  • I can't actually replicate this problem now, so i'll mark this as correct since it's definitely the best answer :) – Max Williams Aug 17 '15 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.