Multiple DirTracer iterations - What not to do.

Hey all,

Quick tech tip here. 

We recently came across a situation where a Customer ran DirTracer 3 separate times in the same second; one for each of the three instances on a single system.  Each config file had the correct configuration for each instance but all three were used at the same time.

Example: Using a wrapper script to launch all 3 in the same second.

#!/bin/sh

nohup ./dirtracer -f ./dirtracer.config.1 &

nohup ./dirtracer -f ./dirtracer.config.2 &

nohup ./dirtracer -f ./dirtracer.config.3 &

As a result, DirTracer is launched 3 times in the same second and each see's that there is no existing sub-databin inside /var and only 1 sub-databin is created; i.e. /var/072309-01. 

<snip>

\* Using config file                     [./dirtracer.config.1]
\* Using config file                     [./dirtracer.config.2]
\* Using config file                     [./dirtracer.config.3]
\* Dirtracer mainloop will run for     \* Dirtracer mainloop will run for      \* Dirtracer mainloop will run for   

[100 sec. Between 1 & 2 min.]
[100 sec. Between 1 & 2 min.]
[100 sec. Between 1 & 2 min.]
\* Databin parameter check 1             \* Databin parameter check 1             \* Databin parameter check 1         

[success]
[success]
[success]
\* Databin parameter check 2             \* Databin parameter check 2             \* Databin parameter check 2         

[success]
[success]
[success]
\* Databin Found                         [/var]
\* Databin Found                         [/var]
\* Databin Found                         [/var]
\* Databin used is                       \* Databin used is                       \* Databin used is                   

[/var/072309-01]
[/var/072309-01]

[/var/072309-01]

<snip>

To ensure DirTracer runs properly and uses a separate sub databin (as intended) the following workaround can be used.

#!/bin/sh

nohup ./dirtracer -f ./dirtracer.config &

sleep 1

nohup ./dirtracer -f ./dirtracer.config &

sleep 1

nohup ./dirtracer -f ./dirtracer.config &

By giving DirTracer a 1 second delay between executions gives it enough time to notice there is an exiting sub-databin in the intended path and increment the sub-databin number.

Example:

myzone root[/var/tmp/data]# ls -l
drwxr-xr-x  11 root     root          30 Jul 23 14:48 072309-01
drwxr-xr-x  11 root     root          30 Jul 23 14:48 072309-02
drwxr-xr-x  11 root     root          30 Jul 23 14:48 072309-03

Hope this helps...

Cheers,

Lee


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

A Tech Blog about the Sun Java Systems Dirtracer Toolkit. Dirtracer and this blog written and maintained by Lee Trujillo an Oracle Senior Principal Support Engineer.

Search

Archives
« April 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
   
       
Today