- Products
- Learn
- Local User Groups
- Partners
- More
Welcome to Maestro Masters!
Talk to Masters, Engage with Masters, Be a Maestro Master!
Join our TechTalk: Malware 2021 to Present Day
Building a Preventative Cyber Program
Be a CloudMate!
Check out our cloud security exclusive space!
Check Point's Cyber Park is Now Open
Let the Games Begin!
As YOU DESERVE THE BEST SECURITY
Upgrade to our latest GA Jumbo
CheckFlix!
All Videos In One Space
Here's a tool to quickly check the CoreXL allocation of all your VS.
Copy it on your VSX gateway and chmod+x, make sure to run it on the standby unit first to ensure it doesn't interfere with your systems.
It will take into account that you can have non-contiguous Virtual System ID. A sample output is visible below the code.
Developed on R80.40 VSX, likely compatible with upper versions.
#!/bin/bash
System variable definitions
---------------------------
t=0 #Assigned CoreXL instance counter
array_offset=1 #Since arrays begin with an index of 0 but VS count starts at 1
array_index=0 #Base array index is 0
#Initialize display and arrays
clear
echo "VSX CoreXL allocation summary"
echo "-----------------------------"
printf "\n"
readarray -t vs_index < <(vsx stat -v | awk '{if ($3 == "S") print $1}')
readarray -t vs_name < <(vsx stat -v | awk '{if ($3 == "S") print $4}')
declare -p vs_list &>/dev/null
declare -p vs_name &>/dev/null
#Initialize for loop and match array index
for i in ${vs_index[@]}
do
evaluator=$(($array_index+1))
#Verifiy if there is not a gap in VS index
if [[ ! " $evaluator -eq $array_index " ]]; then
array_index=$(($array_index + 2))
fi
#Display results
corecount=(`cpwd_admin list -ctx $i | grep _wd | awk {'print $11'}`)
conns_count=(`vsx stat -l $i | grep peak | awk '{print $3}'`)
conns_limit=(`vsx stat -l $i | grep limit | awk '{print $3}'`)
conns_ratio=(`echo "scale=2; ($conns_count / $conns_limit) * 100" | bc`)
if (( $(bc <<< "$conns_ratio<=75") )); then conn_color=2; elif
(( $(bc <<< "$conns_ratio>75 && $conns_ratio<=85") )); then conn_color=3; else
conn_color=1; fi
echo "Virtual System ID $i with name ${vs_name[$array_index]} has been assigned $corecount CoreXL instances"
echo "Peak connections#: $conns_count"
echo "Connections limit#: $conns_limit"
echo "Connections ratio: $(tput setaf $conn_color) $conns_ratio% $(tput setaf 7)"
echo "--"
array_index=$(($array_index+$array_offset))
t=$(($t + $corecount))
done
printf "\n"
echo "A total of $t CoreXL instances have been assigned between all virtual systems."
Code has been updated to also provide connections peak/limit per VS and provide a ratio with percentage, below 75%: OK, green, between 75% and 85% Warning, yellow, above 85% Critical, red, probably time to update that connections limit.
Can confirm this works on R81.10 with JHFA45 VSX system.
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY