Cryptzone Support

 
If you wish to submit a support ticket please sign in to your customer portal or use the “submit a ticket” button at the top menu.
If you need to find documentation about our Sheriff Suite please login to the Hive- Click Here

 

Article

Process and CPU load on AppGate (classic)

« Go Back

Information

 
Article Number000001051
Article

How many CPUs and cores are on my server? What is the value of maximum system load on my server?

Use the attached script to determine these metrics. Example output:

NrPhysCPUs 1
NrCoresPerPhysCPU 4
NrHWThreadsPerCore: 1
NrVirtCPUs 4 1x4x1
NrTotalCores 4
SpeedGHz 2.20
MaxLoad 4.0
LoadAlertLevel 2.8
NrPhysCPUDisplays the number of processors
NrCoresPerPhysCPUDisplays the nymber of cores per processor
NrHWThreadsPerCoreDisplays the number of hard ware threads (strands) per core
NrVirtCPUsCalculates the number of virtuel CPUs avaialable: 
NrPhysCPU x NrCoresPerPhysCPU x NrHWThreadsPerCore
NrTotalCoresCalculates the sum of all cores:
NrPhysCPUs x NrCoresPerPhysCPU
MaxLoadCalculates the maximum CPU load for this machine (equals 100% tasking):
NrPhysCPUs x NrCoresPerPhysCPU
LoadAlertLevelCalculates the 70% of MaxLoad. If the current CPU load is higher than this value, the server needs attention.
SpeedGHzThe CPU frequency in GHz

 

What is the current system load on my server?

The load can be seen in the AppGate Console under "Monitor and status>system":

User-added image

 

You can retrieve more information from a terminal:

ag:~> uptime
 11:32am up 2 day(s), 2:41, 0 users, load average: 6.34, 6.37, 5.75

The output displays the average load over the last 1,5 and 15 minutes.

You can also us the command (the top equivalent on solaris):

prstat

which will show you the uptime and processor list.

In the example above the system's max load is 4.0 while the current load is 5.64 which is not good and needs immediate attention.

What is the current processor usage?

For a summary use the command vmstat:

ag:~> vmstat 1 3
 kthr memory page disk faults cpu
 r b w   swap    free   re mf pi po fr de sr s0 - - - in      sy    cs us  sy id
 0 0 0 39358416 7114496 77 715 0 0  0  0  5  3  0 0 0 1433   24469 1649  0  1 99
 3 0 0 39230700 7006808 26 74  0 0  0  0  0  3  0 0 0 1524 6103973 1623 26 74  0
 3 0 0 39230620 7006760 0  1   0 0  0  0  0  12 0 0 0 1611 6026441 1604 25 75  0

 

Use the command mpstat to get cpu stats per processor:

ag:~> mpstat 1 3
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
 0 182 0 3 507 204 435 0 10 6 0 2714 0 1 0 99
 1 170 0 3 289 132 409 1 9 6 0 3032 0 1 0 99
 2 177 0 3 274 120 405 1 9 6 0 2350 0 1 0 99
 3 186 0 3 361 203 400 1 9 6 0 2490 0 1 0 99
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
 0 0 0 0 569 221 524 230 28 2 0 1585093 27 73 0 0
 1 182 0 0 453 206 358 135 6 1 0 1586291 27 73 0 0
 2 0 0 0 175 39 258 98 27 5 0 1380538 24 76 0 0
 3 0 0 0 355 174 308 122 21 3 0 1592619 27 73 0 0
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
 0 0 0 0 620 241 596 249 27 2 0 1545389 26 74 0 0
 1 0 0 0 452 205 381 137 13 1 0 1595415 26 74 0 0
 2 0 0 3 182 42 245 92 16 1 0 1522732 25 75 0 0
 3 0 0 0 135 73 66 33 7 1 0 1470438 24 76 0 0

 

The metrics at the end of the lines: usr, sys and idl show instant usage of the overall cpu for cpu idle time and how much time the processor spends in user respectively system space. The values are in percentage. In the example above, you can see that there is no idle time meaning the cpu is fully exhausted. and most of the time the cpu is running system processes, whereas only about 25% are consumed by user processes.

What are the most process consuming processes?

Find the top 10 cpu consuming processes, ordered top down:

PID %CPU    STIME %MEM  VSZ  RSS COMMAND
ag:~> ps -eo pid,pcpu,stime,pmem,vsz,rss,comm | sort -rnk2 | head
 1663 98.7 Aug_04 0.1 8144 5696 /opt/APPGserv/sbin/ag_webproxy
 6538 0.1 Aug_04 0.1 11172 6536 /opt/APPGserv/sbin/sshd
 862 0.1 Aug_04 1.2 230048 96196 /usr/bin/../java/bin/java
 861 0.1 Aug_04 0.9 74708 70476 /opt/APPGserv/sbin/ag_logad
 728 0.1 Aug_04 0.2 13128 11428 /opt/APPGserv/sbin/ag_galed
 660 0.1 Aug_04 0.1 5768 3828 /opt/APPGserv/sbin/ag_logd
 642 0.1 Aug_04 0.1 16532 8124 /opt/APPGserv/sbin/ag_secmsgd
 3 0.1 Aug_04 0.0 0 0 fsflush
29581 0.0 15:47:54 0.1 10852 8780 agsh
29544 0.0 Aug_05 0.1 10948 8900 agsh

To display the header columns, remove the head command.

 

List the lightweight processes (threads) of a process and processor mappings

prstat -L -p PID 1 1 

Example showing all the threads of PID 1663:

PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/LWPID 
 1663 ag_webpd 8144K 5696K run 10 0 0:04:16 19% ag_webproxy/22
 1663 ag_webpd 8144K 5696K cpu0 20 0 0:05:16 17% ag_webproxy/18
 1663 ag_webpd 8144K 5696K run 10 0 0:08:27 17% ag_webproxy/5
 1663 ag_webpd 8144K 5696K cpu2 10 0 0:05:12 16% ag_webproxy/17
 1663 ag_webpd 8144K 5696K cpu3 10 0 0:04:17 15% ag_webproxy/20
 1663 ag_webpd 8144K 5696K run 10 0 0:04:20 15% ag_webproxy/19
 1663 ag_webpd 8144K 5696K sleep 59 0 0:00:00 0.0% ag_webproxy/1

 

Related File
Additional Files 

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255