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

How can I find Throughput statistics?

I am working on starting a Score Card for our gateways and I am trying to automate this as much as possible.  Does anyone know of a way to get the throughput value easily?   When you run CPview on the overview page there is a Bits/sec under the Network section.  This is the number I would like to get.   I intend to gather that data on interval and collect CPU data with the sar command.   I want to collect this data and report weekly on the Peak numbers.  Meaning the Peak throughput for the week and likely the Peak CPU usage for Worker_0.  I will likely grab the average CPU usage as well, but this stat ill be watered down since we use mainly open servers and have unlicensed cores diluting the result.

Or this already packaged nicely for me and I missed it?

Regards

Drew Larrick

0 Kudos
21 Replies
PhoneBoy
Admin
Admin

If you run cpview -p, everything from cpview will be output at once.

This output could be parsed for whatever you’re looking for.

Also possible the specific stats you’re after can be found another way (eg through other commands).

(1)
Andrew_Larrick
Participant

I can work with that.  Thanks!

0 Kudos
Andrew_Larrick
Participant

All the data I need is there in that print out.  However, I don't seem to be able to make cpview work from a Cron Job.   I have added path statement etc... and I get a little further through the script before it error each time.   Has anyone called cpview from a Cron before?

Thanks

Drew Larrick

0 Kudos
PhoneBoy
Admin
Admin

Keep in mind cpview is actually a shell script.

More specifically, it's an alias that runs the command /bin/cpview_start.sh

My guess is that you want to run that script directly in the cronjob.

Or maybe run it as /bin/sh /bin/cpview_start.sh -p and whatever other options.

0 Kudos
Andrew_Larrick
Participant

Correct.  I worked that part out.  I also had to make a copy of the cpview_start.sh and modify it, because it calls ifconfig which is actually an alias to cp-ifconfig.   It also can't populate the $CPDIR variable.   Once I got past this one, I now get 

" kiss_params: failed to create mutex (fwctl_set_mutex)
kiss_apps_internal_init: Unable to init kiss_apps module" as the output. 

At this point I stopped and came here so see if anyone has already done this.

0 Kudos
PhoneBoy
Admin
Admin

Have your version of the cpview script execute (near the top):

if [ -r /opt/CPshrd-R80.20/tmp/.CPprofile.sh ]; then

        . /opt/CPshrd-R80.20/tmp/.CPprofile.sh

fi

(Replace path with your version)

0 Kudos
Andrew_Larrick
Participant

Have a version that works on 77.20 and 77.30?

0 Kudos
PhoneBoy
Admin
Admin

Check /etc/profile.d/CP.sh for the exact syntax for your version (should be just replacing R80.20 with R77.20 or R77.30)

0 Kudos
Andrew_Larrick
Participant

The if statement in the profile.d worked like a champ.  However my next hurdle is it appears to be trying to find a Window site to display in, which from crontab there is none.

Here is the error I get.....

"cptop_main.c:308: Failed windows size ioctl with 22, Invalid argument"

Any thoughts here?'

Thanks again.

0 Kudos
PhoneBoy
Admin
Admin

What is the exact syntax which you are calling cpview?

0 Kudos
Andrew_Larrick
Participant

`cpview_start.sh -p &> /var/log/statscollect/cpv$tstamp`

0 Kudos
PhoneBoy
Admin
Admin

It might be worth a TAC case to see what's going on.

0 Kudos
iannis12
Participant

Hi, is there a way to see the average throughput for the past month on a Checkpoint R82 3600 device? I can see that cpview -t shows per minute, but I need an average. Thank you!

0 Kudos
PhoneBoy
Admin
Admin

Not sure you can see it in cpview.
You can take the export from cpview into DB Browser from SQLite and use it to figure that out.

0 Kudos
iannis12
Participant

Thanks for answer.

I figured out how to get the data, but now I don't know what is the unit of measure for the output. For 3600 firewall type I see in datasheet Gbps: 

NGFW Throughput 1.5, IPS Throughput 1.99 and Firewall  3.3.

I wonder which one I can spot with cpview? I used this command to search in "fw_network_stats" table where I see something related to throughput:

sqlite3 -column -header cpview_services.dat "SELECT * FROM fw_network_stats;"

(enclosed is the picture with the output).

Maybe I should look into another table?

Thank you!

 

0 Kudos
PhoneBoy
Admin
Admin

It looks like the throughput is captured in bytes.
To get the number of gigabits of throughput, divide by 1024^2. 
The timestamp is in seconds since the Epoch (Jan 1 1970 @ 00:00 UTC).

Vincent_Bacher
MVP Silver
MVP Silver

If this isn’t going to be the only time you need it, I’d actually consider setting up something like Prometheus and Grafana and then send the metrics using Skyline. Even for small environments, that should be quick and easy to set up; I don’t know how many devices you have.

and now to something completely different - CCVS, CCAS, CCTE, CCCS, CCSM elite
0 Kudos
iannis12
Participant

Thank you! I still need to find a match between NGFW Throughput 1.5, IPS Throughput 1.99 and Firewall  3.3.

If I order what I found till now (still missing one type of throughput), in descending order I would guess:
 
Firewall Throughput or IPS Throughput  is     total_outbound_throughput     0.026 GBps  (from fw_network_stats)
NGFW Throughput or IPS Throughput  is        outbound_throughput         0.013 GBps (from fw_network_stats_traffic_rate)
 
Any suggestions?
0 Kudos
PhoneBoy
Admin
Admin

Actually, I think the formula should be dividing the bytes by 1024^3 (what I gave previously was megabytes). 

The platform does not have 1.5 Gbps of NGFW throughput AND 1.99 Gbps AND 3.3 Gbps of firewall.
These are, instead, the expected total throughput given the software blades enabled on the gateway and associated configurations. 
Your actual throughput is reflected in total_outbound_throughput, which from what I can tell, is relatively low. 

0 Kudos
Martin_Valenta
Advisor

You should disable inactive CPU cores in BIOS or average CPU data based on licensed amount of CPU. Why throughout is needed? I personally prefer to monitor interfaces bandwidth and graph it..

0 Kudos
iannis12
Participant

I basically need to get the average of the current 3600 firewall (NGFW Throughput -preferrable) in order to plan a replacement. Any ideea if cpview displays this and in which table from cpview_services.dat ?

 

Thank you!

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events