HDD 79643 Power-On Hours

Model Family:     Hitachi Travelstar 5K160
Device Model:     Hitachi HTS541660J9AT00
Serial Number:    **************
LU WWN Device Id: **************
Firmware Version: SBBOA70H
User Capacity:    60,011,642,880 bytes [60.0 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA/ATAPI-7 T13/1532D revision 1
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     PO-R--   100   100   062    -    0
  2 Throughput_Performance  P-S---   100   100   040    -    0
  3 Spin_Up_Time            POS---   159   159   033    -    1
  4 Start_Stop_Count        -O--C-   100   100   000    -    99
  5 Reallocated_Sector_Ct   PO--CK   100   100   005    -    0
  7 Seek_Error_Rate         PO-R--   100   100   067    -    0
  8 Seek_Time_Performance   P-S---   100   100   040    -    0
  9 Power_On_Hours          -O--C-   001   001   000    -    79643
 10 Spin_Retry_Count        PO--C-   100   100   060    -    0
 12 Power_Cycle_Count       -O--CK   100   100   000    -    97
191 G-Sense_Error_Rate      -O-R--   100   100   000    -    0
192 Power-Off_Retract_Count -O--CK   100   100   000    -    38
193 Load_Cycle_Count        -O--C-   001   001   000    -    16330637
194 Temperature_Celsius     -O----   137   137   000    -    40 (Min/Max 20/48)
196 Reallocated_Event_Count -O--CK   100   100   000    -    0
197 Current_Pending_Sector  -O---K   100   100   000    -    0
198 Offline_Uncorrectable   ---R--   100   100   000    -    0
199 UDMA_CRC_Error_Count    -O-R--   200   200   000    -    0
223 Load_Retry_Count        -O-R--   100   100   000    -    0

Travelstar 5K160 (PATA) Hard Disk Drive Specification:
Service life of the drive is approximately 5 years or 20,000 power on hours, whichever comes first, under the
following assumptions:

  • Less than 333 power on hours per month.
  • Seeking/Writing/Reading operation is less than 20% of power on hours.

The product supports a minimum of 600,000 normal load/unloads.

Posted in Hardware | Tagged | Leave a comment

Rikomagic RKM MK36S Review

RKM_MK36S
Bought this just to find out if it can replace the more expensive big fat PC as a basic computer for light usage.
The expectation were not high but the bar was also low: Web browsing, email, photos, text editing, and full screen video. For the price it was cheaper than the retail Windows license alone.

The unit was bought from GearBest for 114 USD (Rikomagic RKM MK36S TV Box Cherry Trail Z8300 Windows 10 – EU PLUG BLACK).

This was the first time I ordered from GearBest. Delivery was on time. The box inside a padded envelope was a bit dented. Inside the box were the mini PC, a power supply, and an HDMI cable. All showed signs of usage. A bit of scratches and some dust and smudges. Not a big deal.

It did power up and booted into windows with user admin and no password.
The system was not stable though. The “start” menu, when clicked, flashed momentarily somewhere at the top of the screen but did not open. A few more clicks until it finally opened.

It took several attempts until installation of windows updates succeeded.
After that the system was still not stable. The “start” menu still did not open every time. Some blue screens with the message: “Your PC ran into a problem…” DRIVER_IRQL_NOT_LESS_OR_EQUAL usbxhci.sys.
Trying to check for updates again or install a language package, failed with no meaningful message. Running “sfc /scannow” did not report any problems.

On the positive side, the performance was mostly reasonable for web browsing, YouTube movies in full screen, and LibreOffice. Although web pages with many flash ads did bring the hardware to its knees.

But whether these problems were purely Win10’s or specific to this hardware, does not change the bottom line: unusable.

The troubleshoot tool for windows updates reported: “Windows update components must be repaired”. But how?

Found this script “Reset Windows Update Agent”, run option 2 “Reset Windows Update Components”, restarted, no change.
Run option 5 “Scan all protected system files”, this reported that it found and repaired some corrupted files, restarted, and no change. Tried most of the other options in that script but none helped.

As last resort, I tried the Windows recovery option to reset the PC.
It took several hours for the recovery to be done.
This has finally worked. The “start” menu works, no more blue screens, windows update completed successfully and the system seems to be stable.

There was a problem with LibreOffice failing to start with an error message “Cannot create folder (invalid path):”. It turned out that LibreOffice has a problem if the Windows user name (and the file paths) were not in English. Changing the user name solved that.

So can a cheap mini PC with the specs of a mid range tablet be a desktop replacement for modest requirements? I think the answer is yes.

Update 16-Nov-2016 After few months of use the system became unstable, Windows blue screen from time to time. It got worse and this PC is no longer usable after only 9 months of use.

Posted in Hardware | Tagged , , | Leave a comment

Drupal 6: New-forum-topic links fix

New forum topic links (i.e. node/add/forum/0) result in page not found.

There seems to missing a menu entry to handle the forum id. This patch in the node module hook_menu() adds such item and fixes the problem.

diff --git a/modules/node/node.module b/modules/node/node.module
index 4cc6bdf..1b94672 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1535,6 +1535,17 @@ function node_menu() {
       'type' => MENU_CALLBACK,
     );
   }
+  // patch for forum links
+  $items['node/add/forum/%'] = array(
+    'title' => drupal_ucfirst(t("Forum topic")),
+    'title callback' => 'check_plain',
+    'page callback' => 'node_add',
+    'page arguments' => array(2),
+    'access callback' => 'node_access',
+    'access arguments' => array('create', 'forum'),
+    'description' => "forum topic",
+    'file' => 'node.pages.inc',
+  );
   $items['node/%node'] = array(
     'title callback' => 'node_page_title',
     'title arguments' => array(1),
Posted in Drupal | Tagged , , | Leave a comment

Drupal 6: What argument names *not* to use in hook_theme

When defining hook_theme the choice of argument names that are passed to the theme’s template is important. These argument names share a namespace with some default argument names that are added by template_preprocess. Using any of these names will conflict with the default ones and a potentially wrong argument will be accessed in the preprocessing function and template.
In this example the argument name ‘user’ is in potential conflict:

/**
 * hook_theme
 */
function my_module_theme() {
  return array(
    'some_theme' => array(
      'template' => 'some_template',
      'path' => drupal_get_path('module', 'my_module').DIRECTORY_SEPARATOR.'templates',
      'arguments' => array('user' => NULL)
    )
  );
}

To avoid this potential conflict the arguments added by the module can be prefixed with the module’s name so instead of:

      'arguments' => array('user' => NULL)

the argument can be named:

      'arguments' => array('my_module_user' => NULL)

Alternatively, when there are more than one argument, all the arguments can be encapsulated in one array argument that server as a namespace:

      'arguments' => array('my_module_args' => NULL)

where the theme arguments are added as items in an array:

     theme('some_theme', array('user' => $my_user));

and then accessed:

function template_preprocess_some_theme(&$variables) {
  $default_user_arg = $variables['user'];
  $my_user_arg = $variables['my_module_args']['user'];
Posted in Drupal | Tagged , , , , | Leave a comment

hexdump for javascript binary string

hexdump -v -e '"\\\x" 1/1 "%02x" ""' utf8.bin

output format: \xbc\x8d\xd8\xda\x90\x15\x0f\x77\xc8\x0a\xcb\x60\xb9\x67\xac\x5e\x15\xdd\xde\x2c\x6c\xc6\x67\x2a\x3b\xfd\x6d\xb2

source: http://256.com/gray/docs/misc/hexdump_manual_how_to.html

Posted in Uncategorized | Tagged , , , | Leave a comment

Drupal 6: Allow authenticated users to comment anonymously

In a web site where only authenticated users have access to content and comments it may still be required to let authenticated users comment anonymously.
This small module adds the option for the administrator to allow anonymous commenting by authenticated users for specific roles on specific content types.
Where allowed, users get a choice, on the comment creation form, to post their comment anonymously.
Such comments are assigned the anonymous user id but the log will still show the creation of the comment by the authenticated user which makes it a bit less than completely anonymous and allows for some moderation. Within a trusted site membership such feature may encourage more participation with little risk of misuse.

Download Drupal 6 module: anonym_comment.tar.gz

Posted in Drupal | Tagged , | Leave a comment

Drupal 6: Restricting access to users-search

The core search in drupal 6 adds a “Users” search tab in the search page. Although it has permissions settings for content search and for advanced search, there seems to be no built-in option to restrict access to the users search.
One way of achieving this is by overriding the access callback of the search/user URL in hook_menu_alter.
For example, the following code replaces the access callback with user_access() and its argument with ‘administer users’, so only roles with this permission get access to the users search. As a side effect the users search tab is removed if the user doesn’t have this permission. The user/autocomplete path is also handled in the same way.

function mymodule_menu_alter(&$items) {
  if (isset($items['search/user/%menu_tail'])) {
    $menu_item =& $items['search/user/%menu_tail'];
 
    $menu_item['access callback'] = 'user_access';
    $menu_item['access arguments'] = array('administer users');
  }
 
  if (isset($items['user/autocomplete'])) {
    $menu_item =& $items['user/autocomplete'];
 
    $menu_item['access callback'] = 'user_access';
    $menu_item['access arguments'] = array('administer users');
  }
}

Other ways to achieve the same are discussed here.

Tested in Drupal 6.16 with core search.

Posted in Drupal | Tagged , , , | Leave a comment

Drupal 6: Customizing individual checkboxes in hook_form_alter()

When hook_form_alter() is called, form elements of type ‘checkboxes’ are not yet expanded to individual checkbox elements:

Array
(
    [#title] => Options
    [#type] => checkboxes
    [#options] => Array
        (
            [opt_1] => Option 1
            [opt_2] => Option 2
            [opt_3] => Option 3
            [opt_4] => Option 4
        )
 
    [#default_value] => Array
        (
        )
)


If for example we wanted to add a description to each of the checkboxes we could call expand_checkboxes() passing as an argument the checkboxes element.
Continue reading

Posted in Drupal | Tagged , , | Leave a comment

Drupal 6: Notifications and content type access interaction

The notifications module lets users subscribe to content types that they don’t have view access to.

Users that subscribe to such content types will not actually receive the notifications because at the time of assembling the notification message, the permissions on each specific node are tested.

This can be reproduced with the content access module, by granting view access rights for some content types and not others to a certain role and going to the user’s account page: /user/[uid]/notifications/nodetype.

There doesn’t seem to be any hook to override this and using the form alter hook seems too involved.

My work around is to add a hook call in notifications_content_page_nodetype()
Continue reading

Posted in Drupal | Tagged , , | Leave a comment

Welcome to IO Tide

Here you can find some random stuff by GeneticDrift.

Posted in Intro | Leave a comment