From Mac OSX I login to a remote server that handles parallel computing jobs. I am not able to install anything on this server as it is administered by the university.
I have multiple jobs running and want to monitor the log file in the following way:
tail -f logfile.log
Right now I have four jobs running, I open four terminal windows, SSH four times into the server, and do the tail
command four times for the different logfiles (which are in different folders on the server).
I have the feeling that I'm doing this in a sub-optimal way and am looking to just SSH once, then from one terminal window open all the four log files in separate windows (or tabs) with the tail
command.
Is this possible? Or is it mandatory to sign in four times?
Best Answer
The screen utility will allow to have multiple windows in a session. (You will have to install it on the server end)
This guy shows you the commands for how to split your views within the same terminal window.
It's also useful for re-connecting to a dropped session.
UPDATE:
Note that screen and tmux sessions will all "live" within one session which will still only give you one window or tab on OSX terminal app itself (even though these utilities allow you to have multiple "windows/views" within that view). See comments from this user:
If you still desire to have multiple windows/tabs in the OSX terminal app itself you will need to "login" multiple times. Several users have created scripts to try to aid this process.
This users solution might work best for you. This user creates a menu for his remote connections.
Other solutions I've seen only work with local sessions, but the idea is similar.