Great work Danny Jung !
@Checkpoint - give this man a medal !
Whilst deploying the script to our devices and executing on version R77.30 , we had to change the script a little to get the correct Hotfix.
For some devices the 77.30 hotfix output is not correct when for example the CPUSE wasn't updated before installation of HFA - there is no installed_jumbo_take command. ( sk115719)
Have an extra request -> is it possible to build in a fool proof protection for critical commands like "CPSTOP" ?
Just to be sure ... - asking confirmation when running a critical command is not going to hurt anybody .
Then some additional info (bold text ) i added to the startup screen, to get a complete overview on the first screen - so administration is made a little easier .
And that gives me this output atm :
--------------------------------------------- ccc v3.0 -
Hostname
--------------------------------------------------------
System Firewall Gateway
Type Check Point 2200
Serial Number 1111B1111
Version Check Point Gaia R77.30 JHF (Take 185)
CPUSE Build 1130
CPU 2 Cores | SMT: - | Load: 0.25%
RAM 2 GB (Free: 0 GB) | Swapping: 0 GB
SecureXL On | Multi-Queue Interfaces: -
CoreXL On (2 Cores) | Dynamic Dispatcher: Off
Uptime 80 days
--------------------------------------------------------
Managed by Some_Management (IP: 192.169.1.1)
--------------------------------------------------------
Policy Some_Policy_Name
Installed Aug 21 2018 - 09:48:02
--------------------------------------------------------
Blades FW, VPN
--------------------------------------------------------
Mac Address 00:11:FF:FF:FF:FF
--------------------------------------------------------
I used following commands to collect the data :
- Added Serial number info
SERIAL=`clish -c "show asset system" | grep "Serial Number:" | head -1 | cut -d ":" -f2 | sed 's/ //g'`;
- Changed JHF command
JUMBO=`cat $CPDIR/registry/HKLM_registry.data | grep Check_Point | grep -o -E '[0-9]+' | tail -1`; [ "$JUMBO" == '' ] && JUMBO="-"
(Command not tested yet for R80 , maybe we need to use the buildin OS verifier to check what command to use , but need more time ... )
- Added CPUSE build info - easy to verify builds on all gateways
CPUSE=`cpvinfo $DADIR/bin/DAService | grep -iE "Build|Minor" | grep -o -E '[0-9]+' | head -1`;
- Changed RAM info - gives now the correct number of Memory installed in GB
RAM=`dmidecode -t memory | grep Size: | grep -v "No Module Installed" | awk '{sum+=$2/1024}END{print sum}'`;
- Added Policy installation date -
PINST=`cpstat fw | grep "Install time" | awk '{print $4" "$5" "$7" - "$6}'`; echo -n .
- Added Mgmt Mac Address
MAC=`clish -c "show interface Mgmt" | grep "mac-addr" | awk '{print $2}'`;
Still need more more info when it's a VSX, come back on this later .
Regards,
Rolf