Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000608.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: cclic_report year boundary problem</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000609.html" title="Checkpoint" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000610.html" title="Clearcase 7.0" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000609.html">&laquo; Checkpoint</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000610.html">Clearcase 7.0 &raquo;</a>
44                      </p>
45
46                      <a id="a000608"></a>
47                      <div class="entry" id="entry-608">
48                         <h3 class="entry-header">cclic_report year boundary problem</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <ul>
52   <li>Documented problem with cclic_report and crossing of the new year's boundary</li>
53 </ul>
54                            </div>
55                            <div id="more" class="entry-more">
56                               <h3>Year boundary problem</h3>
57
58 <p>I have been working resolving problems with the cclic_report for this month. The script to do this has been failing due to a subtle bug in the algorithm used for obtaining the necessary files to translate the various user IDs and map them to Org 9 numbers and the like.</p>
59
60 <p>The script looks in a series of files out on the file system in order to obtain information to build mapping tables it needs to do the translation. These files are of the form:</p>
61
62 <div class=code><pre>
63 /data/cmetrics/recv/&lt;<i>site</i>&gt;/&lt;<i>type&gt;.&lt;year</i>&gt;/&lt;<i>date</i>&gt;<br>
64 </pre></div>
65
66 <p>Where:</p>
67
68 <dl>
69   <dt>site</dt>
70   <dd>A site designator. This is one of: dal-design (Dallas), nice-design (Nice), tii-shared (Bangalore) or vorlagenkontoliste (Vorlagenkontoliste)</dd>
71   <dt>type</dt>
72   <dd>The type of map. This is one of: passwd, aids or sbes</dd>
73   <dt>year</dt>
74   <dd>The current year</dd>
75   <dt>date</dt>
76   <dd>The current date in YYYY-MM-DD format</dd>
77 </dl>
78
79 <p>These files are automatically generated by dsmetrics however they are not guaranteed to be up to the minute. The script attempts to workaround this by first starting with the current day then working backward one day at a time for up to 30 days. Thus if say /data/cmetrics/dal-design/passwd.2006/2006-12-31 has not yet be generated 2006-12-30 will be checked, then 2006-12-29 and so on.</p>
80
81 <p>Problem is that that algorithm <i>assumes</i> that the data store (e.g. /data/cmetrics/&lt;<i>site</i>&gt;/&lt;<i>type</i>&gt;.&lt;<i>year</i>&gt;) has at least 30 days of information. This assumption breaks when the year changes since the year is contained in the parent directory. So, for example, given today is 1/8/2007, if .../passwd.2007/2007-01-08 has not be generated we can only check for 07, 06, .., 01. Checking for .../paswd.<font color="#ff0000"><b>2007</b></font>/<font  color="#3333ff"><b>2006</b></font>-12-31 makes no sense and will never work.</p>
82
83 <p>Updating of the various files under /data/cmetrics seems sporadic. Currently the script is still not runnable as there is no /data/cmetrics/recv/tii-shared/password.2007 entries at all! The script is failing with:</p>
84
85 <div class=code><pre>
86 $ ./cclic_report.pl -v
87 cclic_report.pl (v{VERSION}) starting
88 Getting full path to data files
89 Unable to find /data/cmetrics/recv/tii-shared/passwd.2007/2006-12-10 at ./cclic_report.pl line 137
90         main::findFile('/data/cmetrics/recv/tii-shared/passwd.2007') called at ./cclic_report.pl line 249
91 </pre></div>
92
93 <p>I can see no real quick or easy solution for this except to wait for tii-shared's 2007 files to be generated...</p>
94                            </div>
95                         </div>
96                         <p class="entry-footer">
97                            <span class="post-footers">Posted by  on January  8, 2007  8:34 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000608.html">Permalink</a>
98                         </p>
99                      </div>
100
101                      
102
103                      
104                   </div>
105                </div>
106             </div>
107          </div>
108       </div>
109    </div>
110 </body>
111 </html>