Corestat

cmt.html

Corestat : Core Utilization reporting tool for UltraSPARC T1

Its been a while since I last talked to you. Last time we saw what is meant by core utilization of UltraSPARC T1 and why it is important to understand it separately from processor utilization reported by conventional tools like vmstat and mpstat. I had promised to make Corestat, the tool I developed for monitoring core utilization, available to you. Corestat is now released and can be downloaded from here .

    Usage :
       $ corestat
         corestat : Permission denied. Needs root privilege...

         Usage : corestat [-v] [-f <infile>] [-i <interval>] [-r <freq>]

                           -v               : Report version number
                          -f infile        : Filename containing sampled cpustat data
                          -i interval   : Reporting interval in sec (default = 10 sec)
                          -r freq         : CPU frequency in MHz (default = 1200 MHz)

  # corestat
                 Core Utilization
         CoreId     %Usr     %Sys     %Total
         ------        -----       -----       ------
         0               16.23     18.56     34.80
         1               26.09     13.42     39.52
         2               28.97     11.47     40.44
         3               28.63     11.74     40.38
         4               29.18     12.95     42.13
         5               29.25     11.31     40.56
         6               29.10     15.96     45.06
         7               23.97     12.55     36.51
         ------         -----       -----       ------
         Avg          26.43     13.50     39.92

Comments:

What is the syntax for cpustat to produce an input file for corestat?

Posted by Alan Wilson on September 12, 2006 at 01:18 PM IST #

RTFM: cpustat -n -c pic0=L2_dmiss_ld,pic1=Instr_cnt -c pic0=L2_dmiss_ld,pic1=Instr_cnt,nouser,sys 1

Posted by Alan Wilson on September 12, 2006 at 01:25 PM IST #

Great tool! One thought.. since the T2000/T1000 knows it's core speed, why not have the default be the speed reported in psrinfo -pv? Something like (this could be a lot cleaner, but it works..)
$frequency = `psrinfo -pv | grep MHz | sort -u | tail -1`;
$frequency =~ s/.\*clock ([0-9]\*) MHz.\*/$1/;

Posted by Kris Kasner on October 06, 2006 at 06:41 PM IST #

It's a very useful tool, but it doesn' t seem working with T2000 with 4 cores. Is it possible to include this in a next version ?

Posted by Julien Pouponnot on November 27, 2006 at 02:35 PM IST #

Updated corestat for T1 version with a new V1.1 version. It has a bug fix for the MIPS calculation. Please use the new version which can be downloaded using the same link as in the blog.

Posted by Ravindra Talashikar on November 19, 2007 at 08:19 AM IST #

Is it possible to use corestat within a non-global zone, particularly with dedicated processors (dedicated-cpu option in zonecfg)? With the pset defined, the dedicated cores are no longer visible in the global zone with corestat.

Posted by merill on February 06, 2008 at 04:21 AM IST #

corestats is nice, but I found I can run it as a SetUID program. I had chowned it to root, set the SetUID bit, taken away permissions for "other", and setup an ACL so that only the two groups I wanted to be able to run it had r-x permissions. However, if you try to run version 1.1 it you get:

Insecure $ENV{PATH} while running setuid at /dev/fd/4 line 111.

I found some info about this by running "perldoc perlsec", however, I'm not well versed enough with perl to be able to fix the script so that the PATH is not considered to be "tained". I set $PATH to just "/usr/bin" and I'm still considered to be "tainted".

I had to setup sudo to get this to work, which I can do, but next time you look at this, perhaps you could make it work SetUID?

Posted by Garry Garrett on March 28, 2008 at 08:37 PM IST #

Had a type-o. It should say "I found I can't run it as a SetUID program".

Posted by Garry Garrett on March 28, 2008 at 08:39 PM IST #

This is my second attempt at posting here.

We believe there is a bug in Corestat v1.1 that causes the program to give undue weight to the last instruction count in any interval such that if the counts were 50,55,60,65 & 70 the calculation yields an answer of 65.3125 and if the counts were reversed (70,65,60,55 & 50) it would now give an answer of 50.3125. The code segment is at at line 163 : $cpu_stat_pic1[$cpu_id][$mode] = ($cpu_stat_pic1[$cpu_id][$mode] + $instr_ctr)/2 ;

If we have misinterpreted what the code is meant to do, please could you explain it to us?

Posted by Ivan Ratschkewycz on April 08, 2010 at 11:42 AM IST #

Hi

I am interested to know if corestat is available for T3 processors.

Posted by karthik on February 01, 2011 at 03:11 AM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

travi

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today
Bookmarks