The php for decoding Drobo diagnostics

Can someone please repost it here now that the old forums are gone?

Thanks much.

Here’s one.
The old forums had a wealth of information which I sincerely hope Data Robotics saved.

<?php $dir = dirname($_SERVER['SCRIPT_FILENAME']); $dp = opendir($dir); while($file = readdir($dp)) { $file = $dir.'/'.$file; if(preg_match('%\.log$%',$file) AND !file_exists($file.'.txt')) { $fp = fopen($file,'r'); $data = fread($fp,filesize($file)); fclose($fp); for($i=0; $i

Thanks, rdo. What is the syntax for using it? As I recall it was:

php whatyounamedthephpfile.php drobodiagnosticfile.txt > output.txt

or something like that. Is that right?

You’re exactly right, except that I can’t figure out how to run the script I just posted. :}
This one works fine:

<?php $fp = fopen("$argv[1]", r); while(!feof($fp)) { $array = str_split(fgets($fp)); foreach($array as $char) { echo chr(ord($char) ^ 0xC3); } } ?>

I too would be interested in decoding the the diagnostic files. Maybe an OSX-for-dummies step by step manual?

In OS X, you:

1.) Use Drobo Dashboard to dump the diagnostics file into a directory.

2.) Save the php code listed earlier in this thread to a text file, using TextEdit or your favorite text editor. Save it as decode.php or something similar. Put it in the same directory as the one that Drobo Dashboard dumps the diagnostics files into.

3.) Open up Terminal.

4.) Navigate to the directory with decode.php and your diagnostics file.

5.) Type php decode.php nameofdiagnosticsfile > output.txt

6.) Open output.txt in TextEdit or your favorite text editor.

7.) Viola. You now have a human-readable version of your diagnostic file.

Note that this script does not work with logs created by Dashboard 1.5.x, most unfortunately.

It would be nice if Drobo would provide a way to view the new version of the logs.

Whoa! Thanks for mentioning this, Mike.
There’s no mention of this change in the release notes. Something’s not right.

I’m running Dashboard 1.5.1 with Drobo v2 and I just pulled and “decoded” a log.

[quote=“avid, post:9, topic:247”]I’m running Dashboard 1.5.1 with Drobo v2 and I just pulled and “decoded” a log.

I have a DroboPro, maybe that’s the difference.

No, not for the Script rdo posted (which I coded) :wink:
It doesn’t have any parameters, it has to be run in the folder where your log-Files are placed.
It’s easy to use, create a decode.php file within your logs directory and paste the script into it.
After that, just “open with…” the script with php.exe
It decrypts all *.log files it can find an creates *.txt files for you.

Just to clarify, the instructions I posted were for users running OS X. I use them myself and it decodes the diagnostic files just fine for me. I’m running OS X 10.5.8 on a MacBook Pro.

Yes. It’s not DroboDash v1.5, but rather DProFW v1.1.1 which introduced the “improved” encoding format for the diag file.

Perhaps they’d consider restoring the feature when v1.3.3-ish comes to the Pro.

Not being able to examine log files is a disservice; almost Draconian in this era. Petition, anybody?

I have a DroboPro, maybe that’s the difference.

I must be doing something wrong as I can’t get it to work. Can someone confirm excatly what i need to do on a Mac running 10.5.8. I am a newbie at using terminal. Dashboard version 1.2.4.

Use the the second code that rdo posted…

<?php $fp = fopen("$argv[1]", r); while(!feof($fp)) { $array = str_split(fgets($fp)); foreach($array as $char) { echo chr(ord($char) ^ 0xC3); } } ?>

This was stated in a post from Avid earlier in this thread. I find using drag and drop helps with the file paths…

Save the above code in a text doc in plain text format. Save it as decode.php. Be sure the decode.php and the diagnostic file are in the same folder.

  1. Open terminal. Type, without the quotes, “cd [drag the folder containing the decode.php and diagnostic file to here]”

  2. Type "php [drag the decode.php file here] [drag the diagnostic file here] > output.txt

a few things on #2… there are spaces between all the commands, and the output.txt ends up being the name of the file that is created and if you did the “cd” command in step 1 the output.txt file will be saved in the same folder as the php file and the diagnostic files. If you don’t use the “cd” command I believe it will put the output.txt file in the root level of your user folder.

This worked for me using 10.5.8 on a PPC G5, Drobo Dashboard 1.5.1 and Firmware 1.3.4.

There was one version of Drobo Dashboard this didn’t work with… I don’t recall what version though, the result didn’t show the graphs correctly… they showed as a bunch of check marks like this: √√√√√√√√√√√√√√√

Once again, thanks to rdo and Avid.

thanks, i’ll give it a go when i get back home tomorrow. I’m on nights at the moment and away form the drobo

great, thanks. Got it working :slight_smile:

I really don’t understand why this diagnostic file is encrypted?

What is the purpose of that?

And it’s so easy to decrypt it, then why bother?

This doesn’t work for DroboPro. Has anyone cracked it?

Give me a diagnostic sample file. :slight_smile: