- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Show total number of objects in database
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×
Sign in with your Check Point UserCenter/PartnerMap account to access more great content and get a chance to win some Apple AirPods! If you don't have an account, create one now for free!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jump to solution
Show total number of objects in database
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.
Thx
1 Solution
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For SMS via CLI:
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
For MDS via CLI:
mdsenv <DOMAIN_NAME>
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
If needed, you can search for a specific table, like network_objects (for all network objects) or services (for all services).
echo -n "There are ";cat $FWDIR/conf/objects_5_0.C | grep -c ":table (network_objects)" | tr -d "\n"; echo " network objects."
Output:
Kind regards,
Jozko Mrkvicka
Jozko Mrkvicka
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For SMS via CLI:
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
For MDS via CLI:
mdsenv <DOMAIN_NAME>
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
If needed, you can search for a specific table, like network_objects (for all network objects) or services (for all services).
echo -n "There are ";cat $FWDIR/conf/objects_5_0.C | grep -c ":table (network_objects)" | tr -d "\n"; echo " network objects."
Output:
Kind regards,
Jozko Mrkvicka
Jozko Mrkvicka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jozko. That worked perfectly and was exactly what I needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad that I helped 🙂
Another way is to use a command 'cpmiquerybin' which is capable to do more stuff like finding all network ranges, all TCP ports, all time objects and so on.
Kind regards,
Jozko Mrkvicka
Jozko Mrkvicka
