- CheckMates
- :
- CheckMates Toolbox
- :
- Scripts
- :
- Re: ONELINER - SecureXL and CoreXL AVG Load
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
SecureXL and CoreXL AVG Load
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


This oneliner (see spoiler) shows you the average CPU time of all CoreXL and SecureXL instances.
SXLHACPU=`fw ctl affinity -l -a -v |grep Interface | awk '{print $6}' | sort |uniq | awk '{LINEHA = LINEHA "|CPU"$1} END {print LINEHA }' | sed s/\|//`;SXLHACPU_C=`sar -P ALL 1 1 | grep Average: |grep -v CPU |grep -v all | awk '{ print "CPU"$2 " " 100-$8}' |egrep $SXLHACPU |wc -l`; SXLHACPU_S=`sar -P ALL 1 1 | grep Average: |grep -v CPU |grep -v all | awk '{ print "CPU"$2 " " 100-$8}' |egrep $SXLHACPU | awk '{sum+=$2} END {print sum}'`; SXLHACPU_LOAD=`echo "scale=2; $SXLHACPU_S/$SXLHACPU_C" |bc `; echo; echo "SecureXL AVG Load: $SXLHACPU_LOAD %"; U=`cpprod_util FwIsUsermode`; if [ $U == "0" ]; then CXL_LOAD=`top -b -n 1 |grep fw_worker | awk '{sum+=$9}END{print sum}'`; else CXL_LOAD=`top -b -n 1 |grep fwk0_dev|awk '{print $9}'`; fi;if [ $CXL_LOAD == "0" ]; then CXL_LOAD="1"; fi ;typeset -i CXL_C; CXL_C=`fw ctl multik stat | wc -l`;CXL_C=$CXL_C-2; CXL_LOAD_INT=`echo "scale=2; $CXL_LOAD/$CXL_C" |bc -l`; echo "CoreXL AVG Load : $CXL_LOAD_INT %";
Output:
Or use this tool for much more information on all your gateways :
Easy View Tool - View System Info for All Gateways Simultaneously
This oneliner (see spoiler) shows you the average CPU time of all CoreXL and SecureXL instances.
Output:
Or use this tool for much more information on all your gateways :
Easy View Tool - View System Info for All Gateways Simultaneously
Disclaimer: Check Point does not provide maintenance services or technical or customer support for third party content provided on this Site, including in CheckMates Toolbox. See also our Third Party Software Disclaimer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


Hi @Norbert_Bohusch,
Now I check if the FW works as KMFW or as UMFW!
Accordingly I check the fw_worker or the fwk0_dev process.
THX
Heiko
Hi @Norbert_Bohusch,
Now I check if the FW works as KMFW or as UMFW!
Accordingly I check the fw_worker or the fwk0_dev process.
THX
Heiko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks Heiko, but there is still a bug 🙂
Here the output (securexl avg always 100%):
-bash: [: 6.2==: unary operator expected
CoreXL AVG Load : 2.06 %
I expect mpstat is different:
[Expert@nb-ckp-gw1:0]# mpstat -P ALL
Linux 3.10.0-957.21.3cpx86_64 (nb-ckp-gw1) 04/14/20 _x86_64_ (4 CPU)
14:07:53 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
14:07:53 all 1.55 0.00 1.60 0.03 0.26 0.20 0.00 0.00 0.00 96.36
14:07:53 0 0.12 0.00 0.05 0.03 0.31 0.55 0.00 0.00 0.00 98.94
14:07:53 1 1.53 0.00 1.95 0.02 0.22 0.09 0.00 0.00 0.00 96.18
14:07:53 2 2.08 0.00 2.02 0.05 0.24 0.08 0.00 0.00 0.00 95.53
14:07:53 3 2.47 0.01 2.36 0.05 0.25 0.09 0.00 0.00 0.00 94.77
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


With the 3.10 kernel idle is on position 12 and with the 2.6 kernel on position 10.
I will modify the script again soon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


Hi @Norbert_Bohusch ,
Now with "sar" instead of "mpstat".
Should work now.
Can you test it?
Thanks
Heiko
Hi @Norbert_Bohusch ,
Now with "sar" instead of "mpstat".
Should work now.
Can you test it?
Thanks
Heiko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

sar has the following syntax:
# sar [ options ] [ <interval> [ <count> ] ]
In kernel 3.10 R80.40 it is not using your "sar -P ALL 1" as count 1, but interval 1. But this should be correct according to the way the brackets are shown. In kernel 2.6 it is taken as count and therefor works.
You can fix it by using "sar -P ALL 1 1"
sar has the following syntax:
# sar [ options ] [ <interval> [ <count> ] ]
In kernel 3.10 R80.40 it is not using your "sar -P ALL 1" as count 1, but interval 1. But this should be correct according to the way the brackets are shown. In kernel 2.6 it is taken as count and therefor works.
You can fix it by using "sar -P ALL 1 1"
;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

