<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Show total number of objects in database in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For SMS via CLI:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For MDS via CLI:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mdsenv &amp;lt;DOMAIN_NAME&amp;gt;
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If needed, you can search for a specific table, like&amp;nbsp;&lt;STRONG&gt;network_objects &lt;/STRONG&gt;(for all network objects) or &lt;STRONG&gt;services &lt;/STRONG&gt;(for all services).&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo -n "There are ";cat $FWDIR/conf/objects_5_0.C | grep -c ":table (network_objects)" | tr -d "\n"; echo " network objects."&lt;/LI-CODE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/769i0B6992DA798984FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2019 20:55:49 GMT</pubDate>
    <dc:creator>JozkoMrkvicka</dc:creator>
    <dc:date>2019-04-11T20:55:49Z</dc:date>
    <item>
      <title>Show total number of objects in database</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603#M3313</link>
      <description>&lt;P&gt;Is there a way from either the command line or in the gui to show the total number of objects in the objects_5_0.C file? Specifically for R65 and R77.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 14:15:58 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603#M3313</guid>
      <dc:creator>J_Saun</dc:creator>
      <dc:date>2019-04-11T14:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Show total number of objects in database</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For SMS via CLI:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For MDS via CLI:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mdsenv &amp;lt;DOMAIN_NAME&amp;gt;
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If needed, you can search for a specific table, like&amp;nbsp;&lt;STRONG&gt;network_objects &lt;/STRONG&gt;(for all network objects) or &lt;STRONG&gt;services &lt;/STRONG&gt;(for all services).&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo -n "There are ";cat $FWDIR/conf/objects_5_0.C | grep -c ":table (network_objects)" | tr -d "\n"; echo " network objects."&lt;/LI-CODE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/769i0B6992DA798984FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 20:55:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2019-04-11T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Show total number of objects in database</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50740#M3315</link>
      <description>&lt;P&gt;Thanks Jozko. That worked perfectly and was exactly what I needed.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 11:44:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50740#M3315</guid>
      <dc:creator>J_Saun</dc:creator>
      <dc:date>2019-04-12T11:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Show total number of objects in database</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50817#M3316</link>
      <description>&lt;P&gt;Glad that I helped &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Another way is to use a command&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk65181" target="_blank" rel="noopener"&gt;'cpmiquerybin'&amp;nbsp;&lt;/A&gt;which is capable to do more stuff like finding all network ranges, all TCP ports, all time objects and so on.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2019 12:17:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50817#M3316</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2019-04-13T12:17:33Z</dc:date>
    </item>
  </channel>
</rss>

