- Products
- Learn
- Local User Groups
- Partners
- More
The Great Exposure Reset
24 February 2026 @ 5pm CET / 11am EST
CheckMates Fest 2026
Watch Now!AI Security Masters
Hacking with AI: The Dark Side of Innovation
CheckMates Go:
CheckMates Fest
🚀 Runs on all Check Point Gaia systems.
🎓 Referenced in sk180812
One-liner (Bash) to show the inventory of plugged transceivers, DAC cables and line cards.
In expert mode run:
echo;if [[ -f "/etc/cp-release" ]] && ! [[ `grep Embed /etc/cp-release` ]];then stat=`cpstat os`;tput bold;echo -n "$stat"|grep "Appliance Name:"|sed 's/Appliance Name://'|tr -s ' '|tr -d '\n';if [[ `echo "$stat"|grep "Maestro"` ]] && [[ `grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"` ]];then echo; echo -n " ";grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"|tr -d '\n';fi;tput sgr0;if [[ `echo "$stat"|grep Manufacturer|grep CheckPoint` ]];then echo -n " (Serial: `echo "$stat"|grep "Appliance SN"|awk '{print $NF}'`, MAC: `dmidecode -t1|grep UUID|awk '{print $NF}' FS=-|sed 's/../&:/g; s/:$//'`)";fi;echo;echo;sfps=0;tput bold;echo " Line cards";tput sgr0;if [[ `find /sys/class/net -name eth*-01 2>/dev/null` ]]; then find /sys/class/net -name eth*-01 2>/dev/null|while read line;do sv=`cat "$line/device/subsystem_vendor" 2>/dev/null`;sd=`cat "$line/device/subsystem_device" 2>/dev/null`;if [[ -n "$sv" ]] && [[ -n "$sd" ]];then grep "$sv" /etc/hw_info/linecard.lst 2>/dev/null|grep "$sd"|awk -F ',' '{print "Model: "$3" Type: "$4}'|tr -d '"'|tr -s " "|tr -d "\t"|sed "s/\bModel\b/\x1b[1;1m&\x1b[m/g;s/\bType\b/\x1b[1;1m&\x1b[m/g;s/^/\t/";fi;done;else echo -e "\n\t-";fi;echo;nics=`ls -d /sys/class/net/*/device 2>/dev/null|awk -F '/' '{print $5}'`;if [[ -n "$nics" ]];then phys=`echo "$nics"|wc -l`;echo "$nics"|while read line;do if [[ `ethtool -m $line 2>/dev/null` ]];then sfps=1;tput bold;echo " "$line;tput sgr0;etht=`ethtool -m $line 2>/dev/null|awk '/Transceiver type/ && ++count==1{sub(/Transceiver type/,"Transceiver_type")} 1'|grep 'Identifier\|Transceiver_type\|Length\|Vendor name\|Vendor SN\|Vendor PN'|sed 's/Transceiver_type/Transceiver type/'|grep -v ': 0m\|: 0km'`;vendor=`ethtool -m $line 2>/dev/null|grep 'Vendor PN'|awk '{print $NF}'`;file=`find /etc/hcp/tests -name hcp_optic_info.json 2>/dev/null|head -n1`;if [[ -n "$file" ]] && [[ -s "$file" ]] && $CPDIR/jq/jq -e . "$file" >/dev/null 2>&1;then data=`$CPDIR/jq/jq -e -r ".transceivers.CheckPoint_PartNumber[\"$vendor\"]" "$file" 2>/dev/null`;elif [[ -f /etc/xcvr_list.csv ]];then data=`awk -F',' -v pn="$vendor" '$14==pn{print $3}' /etc/xcvr_list.csv|head -n1`;[[ -z "$data" ]] && false;else data="";false;fi;if [[ $? -ne 0 ]];then echo "$etht";else echo "$etht$data"|sed "s/^[ \t]*//"|tr -d '"{},'|tr -s " "|sed "s/:/@:/"|column -t -s '@'|sed "s/^/\t/"|grep -v "TBD"$;fi;echo;fi;((phys--));if [[ $phys -eq 0 ]] && [[ sfps -eq 0 ]];then echo -e " \033[1;31mNo SFPs/DACs found! \033[m\n";fi;done;else echo -e " \033[1;31mNo network interfaces found! \033[m\n";fi;unset stat sfps phys etht line data file vendor nics sv sd;else echo -e " \033[1;31mUnsupported OS! \033[m\n";fi
Integrated with our ccc script.
🚀 Runs on all Check Point Gaia systems.
🎓 Referenced in sk180812
One-liner (Bash) to show the inventory of plugged transceivers, DAC cables and line cards.
In expert mode run:
echo;if [[ -f "/etc/cp-release" ]] && ! [[ `grep Embed /etc/cp-release` ]];then stat=`cpstat os`;tput bold;echo -n "$stat"|grep "Appliance Name:"|sed 's/Appliance Name://'|tr -s ' '|tr -d '\n';if [[ `echo "$stat"|grep "Maestro"` ]] && [[ `grep original_name /etc/appliance_config.xml|Cool script. It noteworthy that it does not run on R80.30 (I know, that R80.30 is EoS!). Seems to work only on actual releases. Can you name the minimal version it runs on?
A link to this CheckMates post was added in https://support.checkpoint.com/results/sk/sk180812
A link to this CheckMates post was added in https://support.checkpoint.com/results/sk/sk180812
;Hi,
I get an error when running this.
There's a missing check if the "file=`find /etc/hcp/tests -name hcp_optic_info.json|head -n1`" element returns an empty result.
[Expert@CORE-GW-TE100X-01:0]# echo;if [[ -f "/etc/cp-release" ]] && ! [[ `grep Embed /etc/cp-release` ]];then stat=`cpstat os`;tput bold;echo -n "$stat"|grep "Appliance Name:"|sed 's/Appliance Name://'|tr -s ' '|tr -d '\n';if [[ `echo "$stat"|grep "Maestro"` ]] && [[ `grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"` ]];then echo; echo -n " ";grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"|tr -d '\n';fi;tput sgr0;if [[ `echo "$stat"|grep Manufacturer|grep CheckPoint` ]];then echo -n " (Serial: `echo "$stat"|grep "Appliance SN"|awk '{print $NF}'`, MAC: `dmidecode -t1|grep UUID|awk '{print $NF}' FS=-|sed 's/../&:/g; s/:$//'`)";fi;echo;echo;sfps=0;tput bold;echo " Line cards";tput sgr0;if [[ `find /sys/class/net -name eth*-01 2>/dev/null` ]]; then find /sys/class/net -name eth*-01 2>/dev/null|while read line;do grep `cat $line'/device/subsystem_vendor'` /etc/hw_info/linecard.lst|grep `cat $line'/device/subsystem_device'`|awk -F ',' '{print "Model: "$3" Type: "$4}'|tr -d '"'|tr -s " "|tr -d "\t"|sed "s/\bModel\b/\x1b[1;\t1m&\x1b[m/g;s/\bType\b/\x1b[1;1m&\x1b[m/g;";done;else echo -e "\n\t-";fi;echo;phys=`find /sys/class/net/*/device|awk -F '/' '{print $5}'|wc -l`;echo "`find /sys/class/net/*/device|awk -F '/' '{print $5}'`"|while read line;do if [[ `ethtool -m $line 2>/dev/null` ]];then sfps=1;tput bold;echo " "$line;tput sgr0;etht=`ethtool -m $line 2>/dev/null|awk '/Transceiver type/ && ++count==1{sub(/Transceiver type/,"Transceiver_type")} 1'|grep 'Identifier\|Transceiver_type\|Length\|Vendor name\|Vendor SN\|Vendor PN'|sed 's/Transceiver_type/Transceiver type/'|grep -v ': 0m\|: 0km'`;file=`find /etc/hcp/tests -name hcp_optic_info.json|head -n1`;data=`cat $file|$CPDIR/jq/jq -e -r ".transceivers.CheckPoint_PartNumber[\"$(ethtool -m $line 2>/dev/null|grep 'Vendor PN'|awk '{print $NF}')\"]"`;if [[ $? -eq 1 ]];then echo "$etht";if [[ `echo "$stat"|grep "Appliance Name"|grep "Check Point"` ]];then echo -e "\n\tSKU auto-detect failed. Manually retrieve SKU with this command:";tput bold;echo -e "\tgrep SKU $file|grep -v \"TBD\"";tput sgr0;fi;else echo "$etht$data"|sed "s/^[ \t]*//"|tr -d '"{},'|tr -s " "|sed "s/:/@:/"|column -t -s '@'|sed "s/^/\t/"|grep -v "TBD"$;fi;echo;fi;((phys--));if [[ $phys -eq 0 ]] && [[ sfps -eq 0 ]];then echo -e " \033[1;31mNo SFPs/DACs found! \033[m\n";fi;done;unset stat sfps phys etht line data file;else echo -e " \033[1;31mUnsupported OS! \033[m\n";fi
Check Point TE100X (Serial: -REDACTED-, MAC: -REDACTED-)
Line cards
Model: **bleep**-51081-090 Type: 8 ports 1GbE Copper
Model: CPAC-4-10F Type: 4 ports 10GbE SFP+
eth1-01
parse error: Invalid numeric literal at line 2, column 0
Identifier : 0x03 (SFP)
Transceiver type : Infiniband: 1X Copper Passive
Length (Copper) : 1m
Vendor name : 10Gtek
Vendor PN : CAB-10GSFP-P1M
Vendor SN : -REDACTED-
[Expert@CORE-GW-TE100X-01:0]
I get that this isn't a supported DAC, but the it affects the script plumbing providing more useful details.
BR
Eric
Hi,
I get an error when running this.
There's a missing check if the "file=`find /etc/hcp/tests -name hcp_optic_info.json|head -n1`" element returns an empty result.
[Expert@CORE-GW-TE100X-01:0]# echo;if [[ -f "/etc/cp-release" ]] && ! [[ `grep Embed /etc/cp-release` ]];then stat=`cpstat os`;tput bold;echo -n "$stat"|grep "Appliance Name:"|sed 's/Appliance Name://'|tr -s ' '|tr -d '\n';if [[ `echo "$stat"|grep "Maestro"` ]] && [[ `grep original_name /etc/appliance_config.xml|tr '...;
@Eric_Beasley : I updated the one-liner as Check Point changed from hcp_optic_info.json to /etc/xcvr_list.csv
@Eric_Beasley : I updated the one-liner as Check Point changed from hcp_optic_info.json to /etc/xcvr_list.csv
;Just tested it in the lab, worked fine.
[Expert@CP-GW:0]# echo;if [[ -f "/etc/cp-release" ]] && ! [[ `grep Embed /etc/cp-release` ]];then stat=`cpstat os`;tput bold;echo -n "$stat"|grep "Appliance Name:"|sed 's/Appliance Name://'|tr -s ' '|tr -d '\n';if [[ `echo "$stat"|grep "Maestro"` ]] && [[ `grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"` ]];then echo;echo -n " ";grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"|tr -d '\n';fi;tput sgr0;if [[ `echo "$stat"|grep Manufacturer|grep CheckPoint` ]];then echo -n " (Serial: `echo "$stat"|grep "Appliance SN"|awk '{print $NF}'`, MAC: `dmidecode -t1|grep UUID|awk '{print $NF}' FS=-|sed 's/../&:/g; s/:$//'`)";fi;echo;echo;sfps=0;tput bold;echo " Line cards";tput sgr0;if [[ `find /sys/class/net -name eth*-01 2>/dev/null` ]];then find /sys/class/net -name eth*-01 2>/dev/null|while read line;do grep `cat $line'/device/subsystem_vendor'` /etc/hw_info/linecard.lst|grep `cat $line'/device/subsystem_device'`|awk -F',' '{print "Model: "$3" Type: "$4}'|tr -d '"'|tr -s " "|tr -d "\t"|sed "s/\bModel\b/\x1b[1;1m&\x1b[m/g;s/\bType\b/\x1b[1;1m&\x1b[m/g;s/^/\t/";done;else echo -e "\n\t-";fi;echo;phys=`find /sys/class/net/*/device|awk -F'/' '{print $5}'|wc -l`;echo `find /sys/class/net/*/device|awk -F'/' '{print $5}'`|tr ' ' '\n'|while read line;do if [[ `ethtool -m $line 2>/dev/null` ]];then sfps=1;tput bold;echo " "$line;tput sgr0;etht=`ethtool -m $line 2>/dev/null|awk '/Transceiver type/ && ++count==1{sub(/Transceiver type/,"Transceiver_type")} 1'|grep 'Identifier\|Transceiver_type\|Length\|Vendor name\|Vendor SN\|Vendor PN'|sed 's/Transceiver_type/Transceiver type/'|grep -v ': 0m\|: 0km'`;vendor=`ethtool -m $line 2>/dev/null|grep 'Vendor PN'|awk '{print $NF}'|tr -d ' \t\r'`;data="";file=`find /etc/hcp/tests -name hcp_optic_info.json 2>/dev/null|head -n1`;if [[ -n "$file" ]] && [[ -s "$file" ]];then data=`$CPDIR/jq/jq -e -r ".transceivers.CheckPoint_PartNumber[\"$vendor\"]" "$file" 2>/dev/null`;elif [[ -f /etc/xcvr_list.csv ]];then data=`awk -F',' -v pn="$vendor" '{gsub(/[ \t\r]/,"",$14)}$14==pn{print $3}' /etc/xcvr_list.csv|head -n1`;fi;if [[ -n "$data" ]] && [[ "$data" != "null" ]];then echo -e "$etht\nCheck Point SKU : $data"|sed "s/^[ \t]*//"|tr -d '"{},'|tr -s " "|sed "s/:/@:/"|column -t -s '@'|sed "s/^/\t/"|grep -v "TBD";else echo "$etht";fi;echo;fi;((phys--));if [[ $phys -eq 0 ]] && [[ sfps -eq 0 ]];then echo -e " \033[1;31mNo SFPs/DACs found! \033[m\n";fi;done;unset stat sfps phys etht line data file vendor;else echo -e " \033[1;31mUnsupported OS! \033[m\n";fi
Standard PC (i440FX + PIIX, 1996)
Line cards
-
No SFPs/DACs found!
[Expert@CP-GW:0]#
Just tested it in the lab, worked fine.
[Expert@CP-GW:0]# echo;if [[ -f "/etc/cp-release" ]] && ! [[ `grep Embed /etc/cp-release` ]];then stat=`cpstat os`;tput bold;echo -n "$stat"|grep "Appliance Name:"|sed 's/Appliance Name://'|tr -s ' '|tr -d '\n';if [[ `echo "$stat"|grep "Maestro"` ]] && [[ `grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"` ]];then echo;echo -n " ";grep original_name /etc/appliance_config.xml|tr '<>' '\n'|grep "Check Point"|tr -d '\n';fi
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY