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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
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"$>" />
12 <title>Status for Andrew DeFaria: January 8, 2006 - January 14, 2006 Archives</title>
14 <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15 <link rel="prev" href="http://defaria.com/blogs/Status/archives/week_2006_01_01.html" title="January 1, 2006 - January 7, 2006" />
16 <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2006_01_15.html" title="January 15, 2006 - January 21, 2006" />
18 <body class="layout-one-column">
20 <div id="container-inner" class="pkg">
23 <div id="banner-inner" class="pkg">
24 <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25 <h2 id="banner-description">Searchable status reports and work log</h2>
30 <div id="pagebody-inner" class="pkg">
32 <div id="alpha-inner" class="pkg">
34 <p class="content-nav">
35 <a href="http://defaria.com/blogs/Status/archives/week_2006_01_01.html">« January 1, 2006 - January 7, 2006</a> |
36 <a href="http://defaria.com/blogs/Status/">Main</a>
37 | <a href="http://defaria.com/blogs/Status/archives/week_2006_01_15.html">January 15, 2006 - January 21, 2006 »</a>
43 <h2 class="date-header">January 13, 2006</h2>
45 <div class="entry" id="entry-516">
46 <h3 class="entry-header">Perl test</h3>
47 <div class="entry-content">
48 <div class="entry-body">
50 <li>Ray wanted an easy/medium/hard Perl test</li>
57 <li>What does Perl stand for?</li>
59 <p><font color="red">Practical Extraction and Reporting Language</font></p>
61 <li>What basic datatypes does Perl support?</li>
63 <p><font color="red">Scalar, Array, Hash, Typeglob</font></p>
65 <li>What does the following do:</li>
67 <div class="code"><pre>
68 my @output = <STDIN>;
71 print "$_\n" if /\d+/;
75 <p><font color="red">Echoes lines that have numbers in them)</font></p>
82 <li>What is <tt>use strict</tt> and why is it important to use?</li>
84 <p><font color="red">Strict requires that variable references are scoped - e.g. my $var)</font></p>
86 <li>What does the following code do:</li>
88 <div class="code"><pre>
94 foreach (sort (keys (%p))) {
96 print "$_: <password>\n";
98 print "$_: ${p {$_}}\n";
104 <p><font color="red">Displays the contents of the passed in hash %p substituting "<password>" if the hash happens to have a key of password</font></p>
106 <li>What do you do to enable Perl to find user written modules?</li>
108 <p><font color="red">You need to modify the @INC array to include the path to your modules)</font></p>
114 <li>What is the difference between <tt>require</tt> and <tt>use</tt>?</li>
116 <p><font color="red">See <a href="/blogs/Status/archives/000492.html">this article</a> for the answer</font></p>
118 <li>What is a better way to do the following and why:</li>
120 <div class="code"><pre>
124 <p><font color="red">See <a href="/blogs/Status/archives/000492.html">this article</a>) for the answer</font></p>
126 <li>What does the following print out when executed:</li>
128 <div class="code"><pre>
132 my @z = `$x 2>&1`; chomp @z;
137 print "$_\n" foreach (@z);
149 print "Worked!\n" if !$d;
152 <p><font color="red">(It will output:</p>
154 <div class="code"><pre>
158 <p>Yet nothing really worked at all! Key issues are:</p>
161 <li>Passing parameters to subroutines. Two parameters are passed in</li>
163 <li>Parameter return: Two parameters are returned</li>
165 <li>Evaluation of parameters: $y in foo is not passed in thus the print... foreach doesn't execute></li>
167 <li>Evaluation of true/false: foo returns $y which is errno,
168 which is not 0 thus not true but the !$d evaluates to true and the
169 print "Worked!\n" gets executed.</li>
174 <p class="entry-footer">
175 <span class="post-footers">Posted by at 11:59 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000516.html">Permalink</a>
185 <h2 class="date-header">January 12, 2006</h2>
187 <div class="entry" id="entry-517">
188 <h3 class="entry-header">Clearcase Merging/CQ Time Stamp problem/CQ Help problem</h3>
189 <div class="entry-content">
190 <div class="entry-body">
192 <li>Consulted with Ann Wisotzky regarding Clearcase Merging</li>
194 <li>Investigated email time stamp problem with PQA</li>
196 <li>Worked with Rational regarding Clearquest: Help problem</li>
199 <p class="entry-footer">
200 <span class="post-footers">Posted by at 10:25 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000517.html">Permalink</a>
210 <h2 class="date-header">January 11, 2006</h2>
212 <div class="entry" id="entry-515">
213 <h3 class="entry-header">Stglocs/replicating perftest</h3>
214 <div class="entry-content">
215 <div class="entry-body">
217 <li>Investigated stglocs</li>
219 <li>Replicated /vobs/perftest and set up log_activity, stats and pulse for all of:</li>
221 <li>ccase-rmna-3</li>
227 <li>ccase-irva-2</li>
231 <p>Chris, if you can spare a Windows machine to host the views (meaning to run the view_server processes on) then I believe the following stgloc would be your best answer:</p>
233 <div class="code"><pre>
234 $ your_filer=<your_filer>
235 $ your_share=<your_share>
236 $ your_windows_view_server=<your_windows_view_server>
237 $ p=\\\\$your_filer\\$your_share\\viewstore
238 $ cleartool mkstgloc -view -force -host $your_windows_view_server \
239 > -hpath $p -gpath $p viewstore $p
242 <p>This would create a "stgloc" which can be used in mkview:</p>
244 <div class="code"><pre>
245 $ cleartool mkview -tag <tag> -stgloc viewstore (or -auto)
248 <p>Users can also select this stgloc in the Clearcase Explorer GUI. Views will be placed on $your_filer and served by $your_windows_view_server (meaning view_server processes will run there and that that machine should have a static IP).</p>
250 <p>Views can be cross tagged into the Linux region with:</p>
252 <div class="code"><pre>
253 $ cleartool mktag -view -tag defaria2 -host 10.136.65.5 -hpath \\\\fs-rmna-01\\ccstgloc-cabu\\viewstore\\BROADCOM\\adefaria\\defaria2.vws -gpath /projects/ccstgloc-cabu/viewstore/BROADCOM/adefaria/defaria2.vws
254 /projects/ccstgloc-cabu/viewstore/BROADCOM/adefaria/defaria2.vws
255 cleartool: Warning: Storage pathname "/projects/ccstgloc-cabu/viewstore/BROADCOM/adefaria/defaria2.vws"
256 may not reside on host "10.136.65.5".
262 <li>I specified host as an IP address because the test "server" I was using was using DHCP (IOW nslookup pcrmna-ccrmt02 doesn't work from Unix)</li>
264 <li>Backslashes are doubled because bash collapses them</li>
266 <li>The host path (-hpath) must be a valid path <b>from the host's point of view</b>. The host (pcrmna-ccrmt02 in this case) is a Windows box thus a UNC style path is used for -hpath.</li>
268 <li>The global path (-gpath) must be a valid path <b>from the client's point of view</b>. Since we are cross tagging to Linux the path is a Unix style path (in the automount map) of /projects/ccstgloc-cabu/viewstore... You're directory under /projects would be different.</li>
270 <li>View creation and serving on Windows machines is Windows domain aware. What they do is create a directory for the domain (e.g. BROADCOM) then a directory for the user (e.g. adefaria) then the view directory is created (defaria2) with an appended .vws. This is Windows specific behavior, hence you see and additional
271 .../BROADCOM/adefaria/defaria2.vws.</li>
273 <li>You need not use the name or directory "viewstore". This is just an example. I've seen others user the directory name of say vws. Also the stgloc need not be named viewstore - you might use bt-filer-views or whatever.</li>
276 <p>Now you can similarly create a Unix oriented stgloc if you want:</p>
278 <div class="code"><pre>
279 $ your_share=<your_share>
280 $ your_linux_view_server=<your_linux_view_server>
281 $ p=/projects/$your_share/viewstore
282 $ cleartool <span>mkstgloc</span> -view -force -host $your_linux_view_server \
283 > -hpath $p -gpath $p viewstore $p
286 <p>And then your users can cross tag them into the Windows region using the Region Synchronize tool (Note: It will fail initially as it cannot determine what the UNC path needs to be so the users will have to specify that) or by the command line:</p>
288 <div class="code"><pre>
289 $ your_filer=<your_filer>
290 $ your_share=<your_share>
291 $ your_linux_view_server=<your_windows_linux_server>
292 $ p=\\\\$your_filer\\$your_share\\viewstore
293 $ cleartool mktag -view -tag adefaria_linux -host $your_linux_view_server \
294 > -hpath /projects/$your_share/viewstore/adefaria_linux.vws \
295 > -gpath $p\\adefaria_linux.vws $p\\adefaria_linux.vws
298 <p>The advantages here are:</p>
300 <li>Your Linux server bears the brunt of serving views since the view_server processes run there</li>
303 <p>The disadvantages are:</p>
306 <li>Users can't create views using this stgloc from Windows</li>
308 <li>Users must cross tag views to their Windows region</li>
310 <li>Windows users don't like the command line.</li>
314 <p class="entry-footer">
315 <span class="post-footers">Posted by at 3:01 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000515.html">Permalink</a>
325 <h2 class="date-header">January 10, 2006</h2>
327 <div class="entry" id="entry-514">
328 <h3 class="entry-header">Getting log_activity/stats and pulse to work</h3>
329 <div class="entry-content">
330 <div class="entry-body">
332 <li>Re-wrote most Clearcase modules to utilize Clearcase::cleartool and for Clearcase.pm to work out where cleartool resides</li>
334 <li>Changed Mail.pm to only attempt to use MIME:Entity and others if html is requested</li>
336 <lI>Got pulse working for /vobs/preftest. If the vob is not present it simply logs that and exists</li>
339 <p class="entry-footer">
340 <span class="post-footers">Posted by at 5:42 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000514.html">Permalink</a>
350 <h2 class="date-header">January 9, 2006</h2>
352 <div class="entry" id="entry-513">
353 <h3 class="entry-header">Mail.pm/pulse</h3>
354 <div class="entry-content">
355 <div class="entry-body">
357 <li>Worked on Mail.pm</li>
359 <li>Incorporated Mail.pm into Logger</li>
361 <li>Created Element.pm</li>
363 <li>Added code to pulse to mkelem and rmelem</li>
366 <p class="entry-footer">
367 <span class="post-footers">Posted by at 5:41 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000513.html">Permalink</a>