all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* implementing a heartbeat for tramp
@ 2003-10-23 21:57 Matthew Kennedy
  2003-10-24  3:20 ` Dan Anderson
  2003-10-30 21:22 ` Kai Grossjohann
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Kennedy @ 2003-10-23 21:57 UTC (permalink / raw)



A router I have to work through frequently seems to kill inactive ssh
sessions after a few minutes for no apparent reason.  If I'm using
tramp with one of the ssh or scp methods, then this means my tramp
connection is killed, causing tramp to reconnect automatically and go
though its time-consuming initialization phase.

Based on my very effective hack where I run "xclock -update 10" to
cause some activity on the connection every 10 seconds during remote
shell sessions, I thought I might attempt something similar with
tramp... call it a "tramp heart-beat" if you will.

My idea was to create a timer, which walked all emacs buffers looking
for tramp buffers.  When it found one, it would (maybe)
`tramp-send-command' to send a heart-beat (I guess some kind of null
operation... touch /dev/null??? -- or maybe the command itself
suffices)

Does this sound reasonable?  Any other ways to approach this problem
perhaps?

Matt
-- 
Matthew Kennedy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: implementing a heartbeat for tramp
  2003-10-23 21:57 implementing a heartbeat for tramp Matthew Kennedy
@ 2003-10-24  3:20 ` Dan Anderson
  2003-10-30 21:22 ` Kai Grossjohann
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Anderson @ 2003-10-24  3:20 UTC (permalink / raw)
  Cc: help-gnu-emacs

> Does this sound reasonable?  Any other ways to approach this problem
> perhaps?

There's a LISP function to alias a command for another command.  So you
could alias tramp so that whenever it starts in a buffer it would work
on a timer.  Not sure of what it is though... :-(

-Dan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: implementing a heartbeat for tramp
  2003-10-23 21:57 implementing a heartbeat for tramp Matthew Kennedy
  2003-10-24  3:20 ` Dan Anderson
@ 2003-10-30 21:22 ` Kai Grossjohann
  2003-11-01  3:03   ` Matthew Kennedy
  1 sibling, 1 reply; 4+ messages in thread
From: Kai Grossjohann @ 2003-10-30 21:22 UTC (permalink / raw)


Matthew Kennedy <mkennedy@gentoo.org> writes:

> My idea was to create a timer, which walked all emacs buffers looking
> for tramp buffers.  When it found one, it would (maybe)
> `tramp-send-command' to send a heart-beat (I guess some kind of null
> operation... touch /dev/null??? -- or maybe the command itself
> suffices)

I think "echo heart-beat" would do fine :-)
Or maybe "echo hello", that's used in Tramp for other purposes
already, I think.

But maybe someone can come up with a really KEWL command that goes
well with the name Tramp?

Are you going to contribute your code?  That would be just great.

Hm.  Hmmm...  Isn't there a keep-alive option for ssh?  Just a
thought.

Kai

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: implementing a heartbeat for tramp
  2003-10-30 21:22 ` Kai Grossjohann
@ 2003-11-01  3:03   ` Matthew Kennedy
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Kennedy @ 2003-11-01  3:03 UTC (permalink / raw)


Kai Grossjohann <kai@emptydomain.de> writes:

> Matthew Kennedy <mkennedy@gentoo.org> writes:

[...]

> I think "echo heart-beat" would do fine :-)
> Or maybe "echo hello", that's used in Tramp for other purposes
> already, I think.
>
> But maybe someone can come up with a really KEWL command that goes
> well with the name Tramp?
>
> Are you going to contribute your code?  That would be just great.
>
> Hm.  Hmmm...  Isn't there a keep-alive option for ssh?  Just a
> thought.

[...]

Hi Kai,

Yes, I will try to write it in such a way that its contributable ;)

There is a keep alive option for ssh, unfortunately this router
somehow clobbers it.

Matt
-- 
Matthew Kennedy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-01  3:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-23 21:57 implementing a heartbeat for tramp Matthew Kennedy
2003-10-24  3:20 ` Dan Anderson
2003-10-30 21:22 ` Kai Grossjohann
2003-11-01  3:03   ` Matthew Kennedy

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.