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)
7 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

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