07-04-2012 09:07 AM - edited 03-11-2019 04:26 PM
Hi Everyone,
I am currently working with ASA 5585 with several contexts and I would like to have an idea of what is the percentage of the CPU used per context.
I already have the opportunity to do it for the whole ASA (context admin) using the SNMP mib CISCO-PROCES but, unfortunalty, this mib doesn't allow us to know the percentage of used CPU per context.
I was able to know the number of core used per context but not the percentage of the CPU used.
Do you know if it is possible ?
Thank you for your help.
François.
Solved! Go to Solution.
07-04-2012 11:09 AM
Dear Francois,
Here's the answer for the snmp part:
The CPU usage is displayed per context (prior to 8.1) when queried by SNMP.
For example:
show cpu output:
shweta-asa-5520/coke(config)# show cpu CPU utilization for 5 seconds = 33.3%; 1 minute: 25.8%; 5 minutes: 8.7%
snmpwalk output:
root@sw8-ilinux root]# snmpwalk -OS -c public -v 2c 10.7.14.61 cpmCPUTotalTable CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.1 = 1 CISCO-PROCESS-MIB::cpmCPUTotal5sec.1 = Gauge32: 33 CISCO-PROCESS-MIB::cpmCPUTotal1min.1 = Gauge32: 26 CISCO-PROCESS-MIB::cpmCPUTotal5min.1 = Gauge32: 9
The output displayed here is information specific to the coke context.
Prior to 8.1 release, it is not possible to get the total CPU usage of the ASA using SNMP. This is because there is no SNMP agent in the system context. You can get CPU usage for each context present on the ASA.
To get the entire CPU usage you can run the command: show cpu context all on the CLI.
shweta-asa-5520(config)# show cpu context all 5 sec 1 min 5 min Context Name 3.2% 3.2% 3.1% system 0.0% 0.0% 0.0% admin 33.0% 33.1% 29.4% coke 0.0% 0.0% 0.0% pepsi
The sum of all the user context and system context gives the total CPU usage.
However, we did add change this behavior in 8.1 release and will also be present in the 8.2 release. With this change, you will be able to obtain aggregate device CPU load via the admin context. i.e. by polling the admin context, the customer will get the total cpu usage.
07-04-2012 09:30 AM
Dear Francois,
Its show cpu core
ASA23-19(config)# show cpu core
Core 5 sec 1 min 5 min
Core 0 0.4% 0.2% 0.2%
Core 1 0.4% 0.3% 0.2%
Core 2 0.2% 0.1% 0.0%
Core 3 0.2% 0.0% 0.0%
ASA23-19(config)# show ver
Cisco Adaptive Security Appliance Software Version 8.4(4)
Device Manager Version 6.4(5)
Compiled on Mon 21-May-12 12:03 by builders
System image file is "disk0:/asa844-smp-k8.bin"
Config file at boot was "startup-config"
Hardware: ASA5585-SSP-10, 6144 MB RAM, CPU Xeon 5500 series 2000 MHz
1 CPUs, 4 cores
Encryption hardware device : Cisco ASA-5585 on-board accelerator (revision 0x1)
Boot microcode : CNPx-MC-BOOT-2.00
SSL/IKE microcode: CNPx-MC-SSL-PLUS-0014
IPSec microcode : CNPx-MC-IPSEC-MAIN-0014
Number of accelerators: 1
This platform has an ASA5585-SSP-10 VPN Premium license.
07-04-2012 09:38 AM
Francois,
Sorry as i misread your question, what i gave you was cpu usage per core instead of per context. I don't see an easier way of doing this other than:
ch con
show cpu usage
But let me check if there is an easier way.
show resource usage all is a good command at system context level but does not report the CPU usage
07-04-2012 10:17 AM
Hi Gautam,
Thank you for your answer. The command you gave me (show cpu usage) does exactly what I need. However, I would like to know if there is a SNMP mib that allow you to get this value ?
I would like to use a monitoring tool to go get this value every minute.
Thank you !
07-04-2012 10:24 AM
Not really sure on the MIB part. Will try getting that info for you.
BTW: I found an easier command for you
BGL-M-16-ASA5500-2(config)# show cpu context all
5 sec 1 min 5 min Context Name
0.0% 3.4% 2.1% system
0.0% 0.4% 0.3% admin
0.0% 0.0% 0.0% abc
0.0% 0.0% 0.0% def
07-04-2012 11:09 AM
Dear Francois,
Here's the answer for the snmp part:
The CPU usage is displayed per context (prior to 8.1) when queried by SNMP.
For example:
show cpu output:
shweta-asa-5520/coke(config)# show cpu CPU utilization for 5 seconds = 33.3%; 1 minute: 25.8%; 5 minutes: 8.7%
snmpwalk output:
root@sw8-ilinux root]# snmpwalk -OS -c public -v 2c 10.7.14.61 cpmCPUTotalTable CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.1 = 1 CISCO-PROCESS-MIB::cpmCPUTotal5sec.1 = Gauge32: 33 CISCO-PROCESS-MIB::cpmCPUTotal1min.1 = Gauge32: 26 CISCO-PROCESS-MIB::cpmCPUTotal5min.1 = Gauge32: 9
The output displayed here is information specific to the coke context.
Prior to 8.1 release, it is not possible to get the total CPU usage of the ASA using SNMP. This is because there is no SNMP agent in the system context. You can get CPU usage for each context present on the ASA.
To get the entire CPU usage you can run the command: show cpu context all on the CLI.
shweta-asa-5520(config)# show cpu context all 5 sec 1 min 5 min Context Name 3.2% 3.2% 3.1% system 0.0% 0.0% 0.0% admin 33.0% 33.1% 29.4% coke 0.0% 0.0% 0.0% pepsi
The sum of all the user context and system context gives the total CPU usage.
However, we did add change this behavior in 8.1 release and will also be present in the 8.2 release. With this change, you will be able to obtain aggregate device CPU load via the admin context. i.e. by polling the admin context, the customer will get the total cpu usage.
07-04-2012 11:28 AM
Thank you Gautam,
That is exactly what I needed. It works very well with my monitoring sytem !
Have a good day.
03-09-2015 09:06 AM
Hi Francois,
Good to know that its working for you, Please can you share the name of the monitoring software?
I still don't find any SNMP mib to allow us to know the percentage of CPU used per context.
The cli command from Gautam (show cpu context all) does not have any SNMP mib.
Thanks in advance
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide