Solved

Did programmer complete the task as required?

Posted on 2014-07-23
37
1,166 Views
Last Modified: 2014-07-28
I am trying to understand the code that this programmer wrote. He says it is exactly as I wanted and therefore the job is complete.

The job was described as follows;

***SNIP***
Need help re-writing a function in a current script.
The function will use MTR so you must be familiar with MTR otherwise you will waste both our time.

"Very simply... I need this function to continuously run MTR in report mode while there is a problem, then spit out it's report so that it can be sent to php/mysql"

***SNIP***

I never once said that the networks were static because I would be wasting his time and mine. The networks certainly can and do change. I repeatedly said that I didn't want to use single cycles and was looking to run mtr continuously.

I repeatedly showed a basic description of what I needed as follows;

-Start of outage - timestamp

-Which hop is missing - obviously, the one after which ever is last reached
-Did any other hops go missing and if so, timestamp those changes
-Don't log anything else if nothing much has changed so don't use single cycle checking because that simply creates tons of useless logs.

-End of outage - timestamp

The following is the code he wrote for the function which he insists is what I asked for. I need the experts to tell me if you believe I received what I asked for.



function mtr_report() {
      mtr --no-dns --report --report-cycles=1 smartpet.com -p | awk '{printf "%s,%s,%s\n", $1,$2,$3}'
}
function outage()
{
    echo "Server is down looking for the problem"
    #while the network error persists check where is the error
    #this needs to be accurate in terms of timestamps

    # clean report file
    > $OUTAGE_REPORT

    while [ -z $(primary_check) ]; do
        NOW="$(date +"%F %T")#"
        mtr_report > ${FILE_TMP}
        if ! cmp -s $FILE_TMP $FILE_TMP_OLD  ; then
          echo -n "$NOW" >> ${OUTAGE_REPORT}
          # hop down
          grep -vf ${FILE_STATIC_TRACE} ${FILE_TMP} |head -n 1 | tr '\n' '#' | sed 's/#/,0#/'  >> ${OUTAGE_REPORT}
          # hop up
          grep -vf ${FILE_TMP} ${FILE_TMP_OLD} |head -n 1 | tr '\n' '#' | sed 's/#/,1#/'  >> ${OUTAGE_REPORT}
          #cat ${FILE_TMP} | tr '\n' '#' >> ${OUTAGE_REPORT}
          echo >> ${OUTAGE_REPORT}
        fi
        mv $FILE_TMP $FILE_TMP_OLD
    done
    rm "$FILE_TMP_OLD"

    # when server is back send a report
    $CURL -F function=outage  -F "level=@${OUTAGE_REPORT}" $SERVER_URL/app.php
}

Open in new window

I am also asking for help in the following question;
http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Q_28478579.html
0
Comment
Question by:projects
  • 18
  • 9
  • 6
  • +2
37 Comments
 

Author Comment

by:projects
ID: 40216841
Dang, I keep forgetting to do that. Thanks.
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 40217253
. . .
I never once said that the networks were static because I would be wasting his time and mine. The networks certainly can and do change. I repeatedly said that I didn't want to use single cycles and was looking to run mtr continuously.

I repeatedly showed a basic description of what I needed as follows;

-Start of outage - timestamp

-Which hop is missing - obviously, the one after which ever is last reached
-Did any other hops go missing and if so, timestamp those changes
-Don't log anything else if nothing much has changed so don't use single cycle checking because that simply creates tons of useless logs.

-End of outage - timestamp
If you did not put the above in writing, the programmer can deliver whatever original requirements correspond to the text between the "***SNIP***" tags regardless.

Any "verbal" requirements/instructions added afterwards should be considered "out of scope" and therefore billable.

Therefore if you did not provide clear requirements, the programmer delivered what was asked.
Sorry.
0
 
LVL 25

Expert Comment

by:Fred Marshall
ID: 40217291
I've written a few of these with pretty good results as far as I'm concerned.  Only the code context was a bit different but the objectives were the same.

I've read both threads and there is a lack of precision in the specification.  One specification is:
Which hop is missing - obviously, the one after which ever is last reached
Unless one knows what you're thinking, this specification could be labeled "impossible".  To avoid that, one needs to be more specific.  Such as:

Trace the path and record it.  Do this periodically so the "latest good path" is recorded, discarding the previous one.
When an error occurs, trace the path / or save the trace of the truncated path when an error occurs.
Compare the "good path" to the "truncated path".
Identify the "likely next hop that went missing".

Now, when I write my own tools for this I'm more interested in the last responding hop than the "missing" hop.
That's for the obvious reason that the missing hop is, well....., "missing" and all one can do for sure is to imply what went missing.
But you can surely define your requirements as I have above.
Even so, there still remains a problem:

Let us say that the "normal" path looks like this:
A-B-C-D-E-F
or
A-B-Q-Y-E-F
and, of course, there are other possibilities but I list 2 just as a short example.

Let us say that the last "normal" traced path is:
A-B-C-D-E-F
and the path fails directly thereafter.
The possibilities and possible "answers" which are implied are now:
A-B-C-D-E-*    >>   F has failed
A-B-C-D-*-*    >>   E has failed
A-B-C-*-*-*    >>   D or Y or ???? has failed
A-B-*-*-*-*    >>   C or Q or ???? has failed
A-*.*.*.*-*     >>   B has failed
*-*-*-*-*-*    >>   A has failed

Of course, this goes beyond the original specification in terms of what needs to be saved, for how long, etc.

I don't know if this helps much but I hope it may suggest possible items leading to confusion re: the specification.
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40217352
Your post seems - unhappy.  Do you feel you didn't get what you specified?  

I see this all the time - people give a programmer sketchy information, the programmer just jumps in and makes bunch of assumptions, and then the requester is not happy with the results.

Blame probably goes to both of you, if you ask me.

When you hire a programmer, you need to make sure they are crystal-clear on every one of your requirements.  You need to take a LOT more time to write up what you want done, and explain it in detail.  If you are automating a manual process, you need to show them the manual process.  You need to specify how the project will be tested, how the results will be validated, and exactly what the program needs to produce in order to consider the job done satisfactorily.

If you want a report, then sit down, take ten extra minutes, and type up a sample of EXACTLY what you want the report to look like - don't generalize.

Post your test results.  Does it do what you want it to do when you test it?  If not, you make a list of defects, give the defect list to the programmer,  and tell the programmer to fix the defects before he gets paid.  And do a good job of explaining the defect, and exactly what you need fixed.  Programmers aren't mind-readers.  This cycle continues until you have what you want.  You get it fastest if you do a great job of describing what you want up front.

That's just how you do a programing project.

I think these comments are indicative of the problem:

I never once said that the networks were static because I would be wasting his time and mine. The networks certainly can and do change

How is the developer supposed to know that is a requirement if you don't tell him?  You're the one who is specifying how this should work and what it should do.  Not all programmers are experienced network techs

I repeatedly said that I didn't want to use single cycles and was looking to run mtr continuously.

Looking at what you asked for, this looks about right.

I assume something calls outage() when an outage is originally detected.  Then it goes into a loop, running MTR over and over in single-cycle mode dumping output to a temp file, pulling some data out to a file on each pass, and deleting the temp file.  When the outage is over (primary_check succeeds), the resulting summary goes to the

I repeatedly showed a basic description of what I needed as follows;

-Start of outage - timestamp

-Which hop is missing - obviously, the one after which ever is last reached
-Did any other hops go missing and if so, timestamp those changes
-Don't log anything else if nothing much has changed so don't use single cycle checking because that simply creates tons of useless logs.

-End of outage - timestamp

I don't know what the endpoints are here, but some of your requirements don't make sense to me.  In a large network, there are multiple paths.  So on one pass through you might go one way, and on another you may go a different way.  Nothing wrong with that.  So the idea of a hop "going missing" is a mystery to me.  If you are trying to do outage detection, then you want to see the hop where packets stop going through.  What happens after that is probably moot.  So "did any other hops go missing" doesn't make any sense to me.

Run mtr, grab some output, edit it up the way you want, and show him exactly what you want:   Give this input, I want this output.

I don't know what agreement you had with the programmer.  I don't know what you actually gave him as a design document.  I don't know how you defined how the program would be tested.  I don't know how you defined the acceptance criteria.  Hopefully you wrote all that up on your contract.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 40217373
Don't let the title skew your thinking of the message in this video  https://www.youtube.com/watch?v=6h3RJhoqgK8
0
 

Author Comment

by:projects
ID: 40217374
My specs are usually just an outline of what I am looking for.
However, I spend a great deal of time communicating with the programmer about my requirements once someone has become interested.

When I communicated with the programmer, I very specifically explained what I was after, detailing exactly what I wanted to achieve which is pretty much what I explain in my original post. It's not that complicated.

His side is that he gave me exactly what I was after but I would never have said I wanted something static. If you look at the short description alone, it never says anything about statics.

The programmer threatened to post MY code publicly, asking for opinions so I told him that he might as well just keep the money and that I not only didn't really care if he did but that it was highly immature of him to act this way, very unprofessional.  

As for why I am asking this. I already took the loss but I wanted to better understand what went wrong which is why I posted the code he gave me along with explaining my side.

I just want to avoid nonsense like this in the future.
0
 

Author Comment

by:projects
ID: 40217514
@fmarshall; Maybe I need to use your description to explain my task next time I post it.

Going missing simply means it is no longer reachable.
0
 
LVL 25

Expert Comment

by:Fred Marshall
ID: 40217546
Well, "going missing" is probably more a British English term but I find it useful in a case like this.  
What I meant to convey was that a hop, that HAD responded earlier, was no longer responding - thus "missing" (along with all those that follow of course).
This is not to be confused with a hop that's working still doesn't respond in any case.  And, of course, there are those.

Whereas "no longer reachable" could connote the end destination.  It's probably a good idea to be more definite about this and the objectives related to it.
That is: I don't normally think of the hops being "reached", only the end destination.
But neither would I say that it's incorrect to say that "a hop is reached" but it could be confusing if not in context.
0
 

Author Comment

by:projects
ID: 40217610
@Gary Patterson
You are assuming that we didn't communicate but as I said, I spent a lot of time explaining and describing what I needed and asked repeatedly if he had any questions.
He misunderstood the requirements so built what you see which even if my short description above doesn't explain it well, doesn't seem to match up with what he wrote.

And yes, we did test the code, over and over again and I kept saying that this isn't what I am looking for as a result. I kept saying that single cycle will not work and that I am looking more for a way to continuously run mtr, killing it when the outage is over, without losing it's reports.

I've also been asking on this site over and over again if that can even be done. Running mtr continuously during a problem, then being able to kill it while still getting the reports.

@Scott Fell (padas). Can you just make the point. I don't have time to watch a 30 minute video to try and decipher what you mean? :)
0
 

Author Comment

by:projects
ID: 40217634
@fmarshall; I agree that things can always be defined better but in the end, if you are talking with someone who understands what you are talking about, it should not have to be so overly defined.

I do not believe the programmer really understood what I was asking, even though I repeatedly kept asking if he understood.
0
 
LVL 25

Expert Comment

by:Fred Marshall
ID: 40217754
The purpose of EE is to give answers and advice.  The 30 minute video cited is very much worth the time.

I've written a lot of contracts, statements of work, etc. etc.  You are describing a situation where there was a lack of understanding.  That calls for better definition so how can better and "overly" be reconciled?  It's your opinion that the other person "understands what you are talking about".  What did you do to ascertain if that was reasonably correct?

It's concerning that you "repeatedly asked if he understood".  A natural answer to this kind of question is "yes" .. period.  And that comes often enough without the person trying to be elusive.  What's important is to learn if understanding is there.  

Steven Covey advises: "Seek first to understand and then to be understood".  He advises this because people often focus on the latter at the expense of the former.
0
 

Author Comment

by:projects
ID: 40217853
It wasn't really a lack of understanding, more like the programmer was finding a way to justify that he did what was wanted when he knew full well that he didn't.

Either way, what I am really asking everyone is what does the code do?

Yes, it could have been better described and yes I did communicate my requirements but aside from all of that, what does the code do?

Does it even come close to what I asked for based on what I have described?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 40217903
It's a good reminder to get what you want done in writing before you start.  Breaks down why things go off.  It is mainly aimed at developers/designers.

It sounds like you had a lot of communication but it was after the fact.  I think 50% of getting what you expect is for both parties to interpret the problem in the same way before you start.  It is common for both parties to hear what they want to hear.  

I agree with what is already stated, sounds like both sides are to blame.
0
 

Author Comment

by:projects
ID: 40218004
No I communicated quite a lot before he started and during the task.
Anyhow, that isn't my question. My question is based on what I was asking for, did the programmer supply to required code?

His code seems to be overly complicate for what I wanted let alone that it just kept sending single cycles to the log.
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40218008
I've also been asking on this site over and over again if that can even be done. Running mtr continuously during a problem, then being able to kill it while still getting the reports.

MTR has two modes:  interactive mode and report mode.  In interactive mode, you run mtr interactively, and it runs continuously.  In report mode, it dumps a report after "x" number of cycles.  You can't use interactive mode in a script.  I'd need to see the actual program output to tell you much more.  Why don't you post the results of your last round of testing?
0
 

Author Comment

by:projects
ID: 40218016
I no longer have the log but it was simply single cycle results, testing over and over again then quitting once the outage was over. No time stamps, just repeatedly logging the results of one cycle.
I could easily do that and fill my drive with logs but I asked specifically that we only log differences, not every single cycle.
0
 
LVL 25

Expert Comment

by:Fred Marshall
ID: 40218036
I use a Windows command prompt script / .bat file which does this:

Runs and logs a traceroute one time for reference purposes.
Pings at set intervals.
If "n" sequential pings are missed, run and log a traceroute.
Loop / Go back to pinging.

So this approach logs numerous traceroute results IF the outage remains for a long period of time.
Yet, this sort of log is pretty useful and not really too voluminous.
The script could be modified to discard all but the first trace for each outage / followed by the first "good" trace thereafter for reference purposes.

This sounds like the sort of thing you want......
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40218042
"I just want to avoid nonsense like this in the future. "

Suggestions:

1) Hire a well-regarded professional (or firm).  

2) Consider hiring an experienced analyst the next few projects to turn your spoken requirements into professional written specifications.  Watch what they do so that you can learn to develop good specs yourself.  Good specifications always have report samples as part of the report specifications.

3) Spell out the deal in a good contract.  Pay particular attention to the testing, defect resolution, and acceptance criteria that you spell out.  Make sure there is a nondisclosure clause and a confidentiality clause, and contract with someone in a country where you can enforce your agreement if they do something foolish like "publish your code".  Professionals don't pull that kind of thing - I don't know where you found this person, but I wouldn't go back there again.

4) Don't pay up front - certainly not on small jobs like this.  On larger jobs, you'll typically pay a retainer and then for certain milestones, but save a significant payment for the end.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:projects
ID: 40218064
I do have a log of existing hops which is why I'm not too worried about knowing which is missing. More importantly for me is knowing if there are changes during an outage.

When looking at networks, I never see them as static no matter what because there is always the chance that something has changed so I simply make that assumption.

In the script, all I want to do is test to see which hop I cannot reach when something is down. However, sometimes, one hop might come back and another might go down. That second part is the only reason I want to log changed hops as well as the usual traceroute showing which hop is down.

My script will already tell me when the outage occurred and when it ended, I have time stamps for that. What I don't have is time stamps showing when/if hops changed condition during the outage.

That is why mtr is such a great tool. Because interactively at least, you can practically watch as networks go up and down but non interactively, I know of no way, hence, I was hoping to find some way of coming up with that data.
0
 

Author Comment

by:projects
ID: 40218076
@Gary Patterson

In this case, I just got this person from one of those programmer bidding sites. The kind where 99% of the programmers tell you they are experts but just like in this case, I could tell this guy was looking things up on the net while we were chatting.

I figured it was a simple job, it's not worth much, what could go wrong. I also figured since they escrow the funds, I don't have to pay until the task is completed but I decided to be nice and pay anyhow and I got taken. Not the first time on those sites, plenty of bad experiences. However, some good ones also if you can get through the baloney because there really are some great people out there and it's worth looking for them using small jobs.

I try to use these small jobs to find people who can really show their skills then I keep sending them work but in this case, this guy decided that he would play head games with me. While he can make a good argument all he wants, the bottom line is that he knows full well he didn't deliver what he was supposed to but doesn't seem to care.

After everything was said and done, I just wanted to get a little clarification by asking a real experts community what they felt in terms of requirement and solution given.

Yes, I could have explained it much better but I also felt it was a pretty small task and I really did try to express it so he understood, even using 'missing' as a term :)
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40218098
If that is an accurate description of the output you got, then I'd say "no, the programmer didn't give you what you asked for."  

I'd also qualify that with - "but, what you asked for wasn't reasonable based on the constraints you provided, since you can't run mtr in interactive mode in a script."

Your programmer should have told you that.

Personally, I'd just do something similar to what fmarshall suggests.  When you detect an outage, run mtr for a 60 cycles or something - that should be more than enough information to diagnose the cause of an outage.  There are hundreds - thousands of tools, many of them free, that do uptime monitoring - why not just use one of them?

Just one example: https://uptimerobot.com/

Free, checks every 5 minutes.  Notifies you various ways, and offers a simple API so you can interface with it (to get that mtr, for example).
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40218113
OK, say you have this during an outage:

                           My traceroute  [v0.71]
            example.lan                           Sun Mar 25 00:07:50 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. ae-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30
*** bad line here

Then a minute later, you have this

                           My traceroute  [v0.71]
            example.lan                           Sun Mar 25 00:07:50 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. alt-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30
***bad line here

Then this:

                           My traceroute  [v0.71]
            example.lan                           Sun Mar 25 00:07:50 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
***bad line here

Then this

                           My traceroute  [v0.71]
            example.lan                           Sun Mar 25 00:07:50 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. ae-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30
 6. ge-3-0-0-53.gar1.Washington1.Le    0%   11   11    18   18   20     36
 *** bad line here

How should the report look?
0
 

Author Comment

by:projects
ID: 40218117
I also kept telling the programmer that I was counting on him to ask me the proper questions if he was truly an mtr expert so there was an amount of trust I had to put in that person.

Yes, there are countless tools out there and we use many of the larger packages. I simply need a smaller version which is my own, where I can easily customize and add as I need.

Since mtr obviously doesn't do what I need, then I am still going to be hunting for something that does. Again, it will amount to a script but perhaps it will use traceroute or something else instead but achieve the same results I am after.
0
 
LVL 25

Expert Comment

by:Fred Marshall
ID: 40218139
This looks like a new specification in contrast to what's been said heretofore:
In the script, all I want to do is test to see which hop I cannot reach when something is down. However, sometimes, one hop might come back and another might go down. That second part is the only reason I want to log changed hops as well as the usual traceroute showing which hop is down.
So, the flow logic of this is:
Trace for path reference
LOOP Test for outage
IF an outage
THEN trace and log
   IF trace path is different than reference path
   THEN log path difference
              update path reference
END IF
LOOP

Is that it?
0
 

Author Comment

by:projects
ID: 40218141
@Gary Patterson; great example.

You have four tests and exactly as I've described, hops have changed. The logging I am wanting to accomplish would look like this;

outage - timestamp

timestamp - 5. ae-1.ebr1.Washington1.Level3.ne (last hop reachable)
or timestamp - hop 6 is down

timestamp - 4. ae-2.ebr2.Washington1.Level3.ne (last hop reachable)
or timestamp - hop 5 is down

timestamp - 6. ge-3-0-0-53.gar1.Washington1.Le (last hop reachable)
or timestamp hop 7 is down

end of outage - timestamp

My quest is to find out which hop was down. When it came back would be the 'end of outage' timestamp. If another hop changed condition, then I would have that timestamp. Etc.

Unfortunately, I have to rush out the door for an hour or two but I hope I got this right.
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40218170
Yeah, I did that on purpose since it is the complex case - path changed.

OK - I understand what you want.  I don't think the report you've described is really very useful, since the "last hop responding" is only really meaningful in the context of how you got there.  As a network guy, or as your ISP, I'd want to see the whole trace, up to the last hop responding.  So I'd recommend this:

OUTAGE: timestamp

Last hop responding: Sun Mar 25 00:07:50 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. ae-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30

Last hop responding: Sun Mar 25 00:07:51 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. alt-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30

Last hop responding: Sun Mar 25 00:07:52 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31

Last hop responding:  Sun Mar 25 00:07:50 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. ae-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30
 6. ge-3-0-0-53.gar1.Washington1.Le    0%   11   11    18   18   20     36

OUTAGE ENDED - TIMESTAMP

Of course you can trim headings and such to make it more compact, but I like them in there.  After all, how many outages do you have?
0
 

Author Comment

by:projects
ID: 40218473
Many many many outages when new circuits are put in. Can't tell you why but that's partly why I want my own tool to figure it out.

@marshall; Not sure what you mean about a spec change. I would have no reason to change the spec but it's possible I'm trying to describe it better and maybe that makes it sound different?
0
 
LVL 25

Expert Comment

by:Fred Marshall
ID: 40219478
In the script, all I want to do is test to see which hop I cannot reach when something is down.
I took this to be the original specification.

However, sometimes, one hop might come back and another might go down. That second part is the only reason I want to log changed hops as well as the usual traceroute showing which hop is down.
I took this as a new requirement, thus a change (add) to the specification.  As far as implementation is concerned this addition is a big deal.  

One really needs to try to be a literalist when writing specifications.  Phrases like: "obvious to one skilled in the art" can be used at cocktail parties but not in specifications.  If you *can* say it better then that means there's new and important information.  If added relative to an established specification then it's a change.  I think the quotes above are a great example of this.

Respectfully, If I might be so bold:  It seems that you may be removing yourself a bit from the issue.  *You* know what you want in some ethereal sense but may not have explained it to others very well.  That's not uncommon nor a criticism.  Conveying good specifications can be hard work.  (I have found that writing clearly and concisely about something you know a LOT about is harder than writing about something for which you have fewer things floating about in your brain as you write.  Assumptions and context are part of that difficulty.) My point here is that your contractors and the EE experts aren't the only responsible players.  You are one of those responsible players as well.  We or they can't be the only ones responsible for the end result.  So, if folks don't understand the specification then it's not axiomatic that they are at fault....

Why have you not responded to the questions that we've asked above?  They were intended to gain understanding.
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40219591
Many many many outages when new circuits are put in. Can't tell you why but that's partly why I want my own tool to figure it out.

That's certainly a problem.  You ought to open a question about that - that's not normal in a well-managed environment.
0
 

Author Comment

by:projects
ID: 40220034
I agree but it is actually a development environment so it's normal.

Still, the code I need is to do exactly what you posted as an example and my reply.
It doesn't have to be mtr, I just hoped that there might be a creative way of using mtr in a script which would allow for this kind of output. Running single cycles generates more logs than I can use and I need only what the examples you and I just did as output.

Thanks to that example, I can now better show what I am looking for. Based on the outage you showed, this is the output I would like to end up with using a script stripping everything else away.

id1 timestamp - outage
id2 timestamp - 5. ae-1.ebr1.Washington1.Level3.ne (last hop reachable) or hop 6 down
id3 timestamp - 4. ae-2.ebr2.Washington1.Level3.ne (last hop reachable) or hop 5 down
id4 timestamp - 6. ge-3-0-0-53.gar1.Washington1.Le (last hop reachable) or hop 7 down
id5 timestamp -end of outage

If only one hop went down, then it would look like;

id1 timestamp - outage
id2 timestamp - 4. ae-2.ebr2.Washington1.Level3.ne (last hop reachable) or hop 5 down
id3 timestamp -end of outage
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 40220091
So what about high packet loss as opposed to a completely unreachable hop?  

A few % packet loss is all it takes to interfere with some applications, and high packet loss will make most applications inaccessible, resulting in a "down" condition from the perspective of web site visitors.

And seeing packet loss on a "middle-of-thel-list" server isn't very useful as a diagnostic tool without seeing the packet loss above it, too.
0
 

Author Comment

by:projects
ID: 40220108
I already have that being logged. Mind you, that's also why I was hoping to use mtr, because of the way of both both ping and traceroute simultaneously.

Basically, I was trying to find a way to write my own version of mtr, one which can be killed as a process but still spit out it's log. That's why when I posted jobs looking for help, I always said mtr EXPERT :)
0
 

Author Comment

by:projects
ID: 40220124
I will open yet one more question based on ID: 40220034.
However, I would like to close this one.

Based on what you all have read, what is the consensus? Did the programmer provide the correct code to do anything even remotely close to what I was asking for?
0
 
LVL 34

Accepted Solution

by:
Gary Patterson earned 500 total points
ID: 40220400
I think what you really want is someone who can customize mtr for you to do what you want - not just wrap it in a script and manipulate the output.  I looked at the mtr source code, and based on a quick look, it looks do-able for an experienced developer with the right skill set.

mtr is a fairy simple tool that was written way back in back in 1997.  Original author no longer maintains it.  This is not a widely-modified tool.  So asking around for an "mtr expert" is most likely going to get you a bunch of network admin types who use mtr regularly as a troubleshooting tool.  That would explain the results you got - a script that looks like it was written by a system or netowrk administrator.  Nothing wrong with that if it does what you want it to do, but clearly this one doesn't

If you ask me, what you need is a developer who knows how to customize (or build) tools like this.  Good programmers can customize programs they have never seen or used before.  I'm not saying experience is bad - I'm just saying you aren't likely to find many people for hire that have actually touched this thing in the past.

Anyway, you don't need an "mtr expert".  The programmer that wrote mtr wasn't an mtr expert (until after he wrote it, I mean) - he was a programmer with an adequate understanding of network tools and programming to create such a tool.

If I was writing a posting for a developer to do this, I'd look for:

"An experienced Linux c programmer capable of modifying the open-source network troubleshooting tool "mtr" as follows:

(requirements go here)

Hopefully the experience here answering questions about your requirements will give you a good idea how that process should go with a qualified developer - this is basically the same process I go through with a new development client when we are going the early rounds of requirements definition.

Post back if I can be of any more help.

Check out my Experts Exchange profile:  http://www.experts-exchange.com/members/Gary_The_IT_Pro.html
0
 

Author Closing Comment

by:projects
ID: 40220496
I think that after going back and forth, considering the things I might have done wrong as well, the answer really is what I picked. The fact is that the programmer should not have pretended to understand what I needed and should have asked a lot more questions because I would have been very happy to answer everything I possibly could.

Lesson learned as you said.

Thanks.
0
 

Author Comment

by:projects
ID: 40220503
I am going to post my question one more time, this time, not using mtr but any other means to accomplish what we have described in this question.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now