I need a way to the used memory of a current tmux session. I am not sure if that is even possible. I am using tmux to start multiple minecraft servers I'd like to know each servers memory usage.
1 Answer
I recommend you to run pgrep server_binary to know the PID of each instance and then top -p PIDs to know all virtual memory, resident memory and shared memory used by each bash instance.
Example
#know PID of each bash instance
> pgrep bash
4301
4420
4426
4432
4438
4444
4450
4456
#list all resources used by each instance
> top -p 4301,4420,4426,4432,4438,4444,4450,4456

ps(as well as various system-specific tools).