1

I need a way to display two multiple running processes periodically on a system console so that I don't need to manually type commands to switch between the virtual terminals running them.

So for example, I can switch between my long running process and top every 10 seconds to watch both at the same time.

I thought gnu-screen would be ideal for this but can't find a way to automatically and periodically switch between two virtual terminals. Is there a command line switch that allows for this?

1 Answer 1

3

After starting your screen session, run this (in another terminal):

while sleep 10s ; do screen -X next ; done

The -X option sends commands to an existing screen session, and next simply advances to the next window. So if your session only has the two windows, then this will switch from one to the other.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .