F5 - Monitor memory

 

Bash Script to monitor memory usage

 

You can use this bash script to monitor your F5 memory


#!/bin/bash

## Script for logging memory usage stats

while true; do
  DATE=`date -u`
  echo $DATE >> /shared/tmp/f5-mem-stats.log
  tmsh show /sys memory | egrep 'TMM Memory' -A 4 >> /shared/tmp/f5-mem-stats.log
  top -n 1 | egrep 'Swap' >> /shared/tmp/f5-mem-stats.log
  echo "-----------------------------------------------------" >> /shared/tmp/f5-mem-stats.log
  sleep 5
done