Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 

Transceiver & Line Card Inventory - One-liner

Danny
MVP Platinum
MVP Platinum

🚀 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|
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free

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.




(2)
9 Replies

Oliver_Fink
Advisor
Advisor

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?

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


(1)

Danny
MVP Platinum
MVP Platinum

I'm glad that you like it.
The one-liner is intended to run on supported Gaia versions.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


the_rock
MVP Diamond
MVP Diamond

Will try it tomorrow on one of customer's firewalls.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

genisis__
MVP Silver
MVP Silver

Hi Danny,

I just ran this on a 9800 running R82 in VSX mode and got this:

Check Point 9800 (Serial: <removed>, MAC: <removed>)

Line cards

No network interfaces found!

Output from 'show asset all' below if that helps

Platform: RM-40-00
Model: Check Point 9800
Serial Number: <removed>
CPU Model: Intel(R) Xeon(R) Silver 4316 CPU
CPU Frequency: 2300.001 Mhz
Number of Cores: 40
CPU Hyperthreading: Enabled
Number of disks: 2
Disk 1 Model: SAMSUNG MZQL2960HCJR-00A07
Disk 1 Capacity: 960 GB
Disk 2 Mo

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Sergei_Shir
Employee
Employee

A link to this CheckMates post was added in https://support.checkpoint.com/results/sk/sk180812 

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Eric_Beasley
Employee
Employee

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 '
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
MVP Platinum
MVP Platinum

@Eric_Beasley : I updated the one-liner as Check Point changed from  hcp_optic_info.json  to  /etc/xcvr_list.csv

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

the_rock
MVP Diamond
MVP Diamond

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

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Marien
Employee
Employee

Hello Guys,

FYI, I tested the last version on a 9100 but I get the following : 
"

Check Point 9100 (Serial: XXXXBBXXXX, MAC: XX:XX:XX:XX:XX:XX)

Line cards
cat: /sys/class/net/eth1-01/device/subsystem_vendor: No such file or directory
cat: /sys/class/net/eth1-01/device/subsystem_device: No such file or directory
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.

find: /sys/class/net/*: No such file or directory
find: /sys/class/net/*: No such file or direct

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos