Peugeot 5008

Peugeot5008_03Peugeot5008_04

Peugeot5008_13

Peugeot5008_14Peugeot5008_15

http://www.peugeot.it/scopri/5008/break-loisirs/#!

Advertisement

Electromagnetic Radiation Detector

electromagnetic-radiation-detector-01

Features:

  • Simple operation, fast measurement of the electrical appliances, wires and industrial equipment around the intensity of electromagnetic radiation.
  • Test band width can be divided into high-frequency, low-frequency two steps of measurement.
  • Test accuracy, the lowest frequency of measurement of electromagnetic radiation up to 5Hz.
  • Value for money, easy to carry.
  • Designed to meet CE industrial standard.
  • For the environmental electromagnetic radiation testing: bedroom, office, computer room, control room, cable, power lines, monitors, transmitters and other sources of measurement.
  • Used in home electrical equipment, measurement of electromagnetic radiation: mobile phone, computers, televisions, copiers, fax machines, air conditioners and other power sources of test analysis.
  • Dimension: 13.5cm x 7cm x 3cm.
  • Display readings: three semi-liquid crystal display, maximum reading low-frequency 1999V/M / High Frequency 1999μW/cm2.
  • Level: low-frequency V/m, high-frequency: -μW/cm2.
  • Measurement time intervals: 0.4 seconds.
  • Operation voltage: 9V.
  • Measure frequency range: low frequency:5Hz-400KHz, high frequency: 30MHz-2000MHz.
  • Operation temperaturer: -15°C ~ +60°C.

10 Euros on Ebay

QNAP TS-212 – How to save RAID settings from telnet

Scenario = you have wrongly initialize a new HDD a single disk but you would like to be added as RAID1 disk.

QNap support team suggested to remove all partition and reboot NAS

This should be done connecting the second disk to a computer, delete volume and partition, and connect disk back into the NAS, which is quite boring.

Here is how to delete partition table from telnet:

  1. Open telnet
  2. Login as admin
  3. Check which disk is used as RAID to avoid a “wrong” delete
    mdadm –detail /dev/md0

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       8        3        1      active sync  /dev/sda3

  4. So we need to clean the /dev/sdb partitions
    fdisk -l /dev/sdb

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1          66      530125   83  Linux
    /dev/sdb2              67         132      530142   83  Linux
    /dev/sdb3             133      121538   975193693   83  Linux
    /dev/sdb4          121539      121600      498012   83  Linux

     

  5. Dismount the volume before starting the work
    umount /dev/sdb3
  6. So we have 4 partition, type the follow to enter in fdisk mode
    fdisk /dev/sdb
  7. If you need help type “m”
  8. List all partition as above, type “p
    Command (m for help): p

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1          66      530125   83  Linux
    /dev/sdb2              67         132      530142   83  Linux
    /dev/sdb3             133      121538   975193693   83  Linux
    /dev/sdb4          121539      121600      498012   83  Linux

  9. Press “p” to delete partitions and the number of partition to delete

    Command (m for help): d
    Partition number (1-4): 1

    Command (m for help): d
    Partition number (1-4): 2

    Command (m for help): d
    Partition number (1-4): 3

    Command (m for help): d
    Partition number (1-4): 4

  10. Print all partitions of the disk with “p"
    Command (m for help): p

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System

  11. Save the changes with “w
  12. You need to save RAID settings information in the /etc/config/raidtab file
  13. The easy way to save RAID configuration is this:
    more /etc/config/raidtab
    cp /etc/config/raidtab /share/Public 
  14. Change raidtab file like this one

    raiddev /dev/md0
            raid-level      1
            nr-raid-disks   2
            nr-spare-disks  0
            chunk-size      4
            persistent-superblock   1
            device  /dev/sda3
            raid-disk       0
            device  /dev/sdb3
            raid-disk       1

  15. save and copy back to original location
    cp raidtab /etc/config
    more /etc/config/raidtab
  16. Change also /etc/storage.conf file
    Set it only for RAID volume and clear all reference for single volume

    [VOLUME 1]
    device name = /dev/md0
    raid level = 1
    raid disks = 1,0
    spare raid disks =
    status = 0
    record_time = Thu Jul 19 22:53:14 2012

    filesystem = 104
    [Global]
    Available Disk = 2

  17. Reboot the NAS & Check if RAID was rebuilt correctly

QNAP TS-212 How to rebuild RAID manually from telnet

Scenario = replace a disk in QNAP TS-212 with RAID 1 configuration active

RAID rebuild should start automatically, but some times it could happen you got stuck with 1 Single Disk + 1 Mirroring Disk Volume:

SingleDisk

According to the QNAP Support – How can I migrate from Single Disk to RAID 0/1 in TS-210/TS-212? , TS-210/TS-212 does not support Online RAID Level Migration. Therefore, please backup the data on the single disk to another location, install the second hard drive, and then recreate the new RAID 0/1 array (hard drive must be formatted).

The workaround is this:

  1. Telnet to NAS as Admin
  2. Check your current disk configuration for Disk #1 and Disk #2 =
    fdisk -l /dev/sda

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1          66      530125   83  Linux
    /dev/sdb2              67         132      530142   83  Linux
    /dev/sdb3             133      121538   975193693   83  Linux
    /dev/sdb4          121539      121600      498012   83  Linux

    fdisk -l /dev/sdb

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1          66      530125   83  Linux
    /dev/sda2              67         132      530142   83  Linux
    /dev/sda3             133      121538   975193693   83  Linux
    /dev/sda4          121539      121600      498012   83  Linux

  3. SDA is the first disk, SDB is the second disk
  4. Verify the current status of RAID with this command =
    mdadm –detail /dev/md0

    /dev/md0:
            Version : 00.90.03
      Creation Time : Thu Sep 22 21:50:34 2011
         Raid Level : raid1
         Array Size : 486817600 (464.27 GiB 498.50 GB)
      Used Dev Size : 486817600 (464.27 GiB 498.50 GB)
       Raid Devices : 2
      Total Devices : 1
    Preferred Minor : 0
        Persistence : Superblock is persistent

      Intent Bitmap : Internal

        Update Time : Thu Jul 19 01:13:58 2012
              State : active, degraded
    Active Devices : 1
    Working Devices : 1
    Failed Devices : 0
      Spare Devices : 0

               UUID : 72cc06ac:570e3bf8:427adef1:e13f1b03
             Events : 0.1879365

        Number   Major   Minor   RaidDevice State
           0       0        0        0      removed
           1       8        3        1      active sync  /dev/sda3

  5. As you can see the /dev/sda3 is working, so disk #1 is OK, but disk #2 is missing from RAID
  6. Check if Disk #2 /dev/sdb is mounted (it should be) =
    mount

    /proc on /proc type proc (rw)
    none on /dev/pts type devpts (rw,gid=5,mode=620)
    sysfs on /sys type sysfs (rw)
    tmpfs on /tmp type tmpfs (rw,size=32M)
    none on /proc/bus/usb type usbfs (rw)
    /dev/sda4 on /mnt/ext type ext3 (rw)
    /dev/md9 on /mnt/HDA_ROOT type ext3 (rw)
    /dev/md0 on /share/MD0_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
    tmpfs on /var/syslog_maildir type tmpfs (rw,size=8M)
    /dev/sdt1 on /share/external/sdt1 type ufsd (rw,iocharset=utf8,dmask=0000,fmask=0111,force)
    tmpfs on /.eaccelerator.tmp type tmpfs (rw,size=32M)
    /dev/sdb3 on /share/HDB_DATA type ext3 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,noacl)

  7. Dismount the /dev/sdb3 Disk #2 with this command =
    umount /dev/sdb3
  8. Add Disk #2 into the RAID /dev/md0 =
    mdadm /dev/md0 –add /dev/sdb3

    mdadm: added /dev/sdb3

  9. Check the RAID status and the rebuild should be started automatically =
    mdadm –detail /dev/md0

    /dev/md0:
            Version : 00.90.03
      Creation Time : Thu Sep 22 21:50:34 2011
         Raid Level : raid1
         Array Size : 486817600 (464.27 GiB 498.50 GB)
      Used Dev Size : 486817600 (464.27 GiB 498.50 GB)
       Raid Devices : 2
      Total Devices : 2
    Preferred Minor : 0
        Persistence : Superblock is persistent

      Intent Bitmap : Internal

        Update Time : Thu Jul 19 01:30:27 2012
              State : active, degraded, recovering
    Active Devices : 1
    Working Devices : 2
    Failed Devices : 0
      Spare Devices : 1

    Rebuild Status : 0% complete

               UUID : 72cc06ac:570e3bf8:427adef1:e13f1b03
             Events : 0.1879848

        Number   Major   Minor   RaidDevice State
           2       8       19        0      spare rebuilding   /dev/sdb3
           1       8        3        1      active sync   /dev/sda3

  10. Check the NAS site for the rebuild % progress

    image

  11. After the RAID rebuild complete, restart NAS to clean all previous mount point folder for sdb3

Opticon OPN2001 – CSV file data manipulation using PowerShell

CSV file RAW data should be like this =

BarCode Number, Time of Scan, Date of Scan
20120711001, 21:00:00, 2012-07-11
321530, 21:01:01, 2012-07-11
123456, 21:02:02, 2012-07-11
20120711001, 22:00:00, 2012-07-11
123456, 22:01:01, 2012-07-11
321530, 22:02:02, 2012-07-11

After the table modification with the PowerShell script, it should result as follow =

Mission ID, Person ID, Start Time, Start Date, Stop Time, Stop Date
20120711001, 20120711001, 21:00:00, 2012-07-11, 22:00:00, 2012-07-11
20120711001, 321530, 21:01:01, 2012-07-11, 22:01:01, 2012-07-11
20120711001, 123456, 21:02:02, 2012-07-11, 22:02:02, 2012-07-11

The basic PowerShell cmdlet to read and write CSV file are:

  • Import-Csv Cmdlet – Read in a Comma-Separated Values File
    Import-Csv c:\scripts\test.txt
  • Export-Csv Cmdlet – Saving Data as a Comma-Separated Values File
    Export-Csv c:\scripts\test.txt
  • Filter result before Importing
    Import-Csv c:\scripts\test.txt | Where-Object {$_.department -eq "Finance"}
  • Get-Content Cmdlet – Reading a Text File
    Get-Content c:\scripts\test.txt

    Blog example to manipulate data inside PowerShell:

  • parse-textObject
  • Typecasting imported CSV data
    import-csv test.csv | set-type -type_hash @{id=[int];workingset=[int];cpu=[float]} | ogv
  • Append column data
    Import-Csv d:\temp\so\csv1.txt -Delimiter ‘;’ | % { $_.col3 = ‘append\’ +$_.col3; $_ } | Export-Csv d:\temp\so\csv2.txt -Delimiter ‘;’
    or
    Import-Csv -Delim ';' cols.csv | Foreach {$_.col3 = "prepend\$($_.col3)";$_} | Export-Csv cols2.csv -Delim ';' -NoTypeInformation
  • Replacing Data in .CSV Field
    $SCRIPT:IMP = Import-CSV C:\Tools\PSScripts\ShellAuditSubSet.csv
    $IMP | foreach-object { $_.Message
    $CleanReturn = (CleanData ($_.Message))
    if($Messy -cne "")
    {
    $_.Message = $CleanReturn
    Write-Host "MESSAGE DATA IS " + $_.Message
    }
    }
  • Manipulate array data gathered from import-csv
  • Opticon OPN2001 – Flow of bar code reader data output

    Firmware, Software and SDK is available on the Opticon website

    Barcodes.txt file is created automatically with OPN2001 x64 tool

    The format could be personalized with list of fields, best option is as follow:

    BarCode Number, Time of Scan, Date of Scan
    321530, 21:05:25, 2012-07-11
    123456, 21:06:26, 2012-07-11
    123456, 21:10:48, 2012-07-11
    321530, 21:11:49, 2012-07-11

    Need to associate a mission with a UID like YYYYmmDDnnn that should result:

    Mission ID, Person ID, Time of Scan, Date of Scan
    20120711001, 321530, 21:05:25, 2012-07-11
    20120711001, 123456, 21:06:26, 2012-07-11
    20120711001, 123456, 21:10:48, 2012-07-11
    20120711001, 321530, 21:11:49, 2012-07-11

    Procedure should be:

    1. Generate Mission ID code once confirmed, with format like YYYYmmDDnnn
    2. Print the bar code to take note of people available
    3. Once mission start, read first mission ID as marker
    4. Scan all people ID code at start
    5. Once mission end, read first mission ID as marker
    6. Scan all people ID code at end
    7. Connect to USB cable at headquarter
    8. Run the Opticon utility to download the data and create CSV file in PC
    9. Create a custom PowerShell script to modify the RAW data from this format

      BarCode Number, Time of Scan, Date of Scan
      20120711001, 21:00:00, 2012-07-11
      321530, 21:01:01, 2012-07-11
      123456, 21:02:02, 2012-07-11
      20120711001, 22:00:00, 2012-07-11
      123456, 22:01:01, 2012-07-11
      321530, 22:02:02, 2012-07-11

      After the table modification, it should result as follow:

      Mission ID, Person ID, Time of Scan, Date of Scan
      20120711001, 321530, 21:05:25, 2012-07-11
      20120711001, 123456, 21:06:26, 2012-07-11
      20120711001, 123456, 21:10:48, 2012-07-11
      20120711001, 321530, 21:11:49, 2012-07-11

    10. Then import CSV file into SharePoint automatically

    Create RSS Feed from static HTML webpage

    RSS Feed allow you to schedule pre-defined action thanks to www.IFTTT.com

    Some old or “formal” website didn’t rely on RSS Feed, causing problem of integration.

    The good news is that you can easily create RSS Feed from that “old” website using free online services like Feed43

    Most website create them analyzing the source code of the webpage, so you need to dig a little bit, to identify the “range” in the code that will identify your news, to publish in the feed.

    1. Paste HTML link into the source page, like =
      http://www.protezionecivile.regione.lombardia.it/cs/Satellite?c=Redazionale_P&childpagename=DG_ProtezioneCivile%2FDetail&cid=1213279840110&pagename=DG_PPPWrapper
    2. Global Search Pattern =
      <h2><a name="1213279842587"></a>Allerte meteo</h2>
      {*}
      <p>{%}</p>
    3. Item (repeatable) Search Pattern =
      {%}

    Then you got the HTML text inside the <p>{%}</p> right after the “Allerte meteo”  H2 title

    The rest of settings in the Feed43 page are used only to create a better RSS with title, link and file name.

     

    My Personal links =