The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for 2019

Linux shell / ESXi – scripts to get md5sum for sets of files in sorted and regular order

Posted by jpluimers on 2019/05/08

A few small scripts without any parameter checking are below.

The are based on these links:

find-in-datastores.sh

#!/bin/sh 
# Notes:
# the "find" parameter "-type l" only links, as they are the datastore aliases
# the "sed" appends a slash to all datastore paths
datastores_slashes=`find /vmfs/volumes/* -prune -type l | sed 's/$/\//' | xargs echo`
# find inside the datatastores with the arguments appended:
find $datastores_slashes $@

md5sum-sorted-and-regular.sh:

#!/bin/sh 
md5sums=`md5sum $@`
echo Regular:
echo "$md5sums"
echo Sorted:
echo "$md5sums" | sort

md5sum-of-find-in-datastores-by-name-sorted-and-regular.sh :

#!/bin/sh 
md5sum-sorted-and-regular.sh `find-in-datastores.sh -name $@`

Example usage:

# md5sum-of-find-in-datastores-by-name-sorted-and-regular.sh EN-10ENT-x64.vmx
Regular:
7f34fbceed59957a4b7feb13ef9327a1  /vmfs/volumes/Samsung512NVME/PSO.Template/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1  /vmfs/volumes/Samsung850-2TB-S2KMNCAGB04321L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1  /vmfs/volumes/Samsung850-2TB-S3D4NX0HA01043L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
Sorted:
7f34fbceed59957a4b7feb13ef9327a1  /vmfs/volumes/Samsung512NVME/PSO.Template/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1  /vmfs/volumes/Samsung850-2TB-S2KMNCAGB04321L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1  /vmfs/volumes/Samsung850-2TB-S3D4NX0HA01043L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx

–jeroen

Posted in Uncategorized | Leave a Comment »

Visual Studio direct download links

Posted by jpluimers on 2019/05/07

For my link archive:

–jeroen

Posted in .NET, Development, Software Development, Visual Studio and tools, vscode Visual Studio Code | Leave a Comment »

More Delphi debug visualizers

Posted by jpluimers on 2019/05/07

I hope that by now they are available for more Delphi versions:

Some other posts around the Debug Visualiser topic:

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

ESXi: console commands to digging through your hba/disk/datastore configuration

Posted by jpluimers on 2019/05/07

Two posts with interesting commands to help digging through your hba/disk/datastore configurations from the console:

One day I will write a script that – per datastore – lists all the devices related to it including their HBA and LUN.

For that, I will likely need these references:

For now this works:

  • Get the list of data stores (note the Device Name column has the NAA_ID you need below):
    esxcli storage vmfs extent list
  • Get the path information to find HBA, Channel, Target and LUN:
    esxcli storage core path list --device NAA_ID
  • Get the list of HBAs:
    esxcli storage core adapter list
  • Get device details (including Model and Revision):
    esxcli storage core device list --device NAA_ID

The example below (with most important output bolded) shows a drive connected to a SAS3008 based controller which storcli cannot access (nor MegaCli), but MegaRAID Storage Manager (MSM) can.

MSM allowed me to find the serial number of the drive by the Target Transport Details value 4433221106000000 as being on Slot number 6 (which seems to indicate Target numbers are 1-based whereas LUN is 0-based).

# esxcli storage vmfs extent list
Volume Name                     VMFS UUID                            Extent Number  Device Name                                                                 Partition
------------------------------  -----------------------------------  -------------  --------------------------------------------------------------------------  ---------
...
ST6000VX0001-1SH                59a33f7b-66df7c00-11b0-0cc47aaa9742              0  naa.5000c50087762d1b                                                                1
# esxcli storage core path list -d naa.5000c50087762d1b 
sas.500304801ce1d700-sas.4433221106000000-naa.5000c50087762d1b
   UID: sas.500304801ce1d700-sas.4433221106000000-naa.5000c50087762d1b
   Runtime Name: vmhba0:C0:T7:L0
   Device: naa.5000c50087762d1b
   Device Display Name: Local ATA Disk (naa.5000c50087762d1b)
   Adapter: vmhba0
   Channel: 0
   Target: 7
   LUN: 0
   Plugin: NMP
   State: active
   Transport: sas
   Adapter Identifier: sas.500304801ce1d700
   Target Identifier: sas.4433221106000000
   Adapter Transport Details: 500304801ce1d700
   Target Transport Details: 4433221106000000
   Maximum IO Size: 4194304
# esxcli storage core adapter list
HBA Name  Driver        Link State  UID                   Capabilities  Description                                                           
--------  ------------  ----------  --------------------  ------------  ----------------------------------------------------------------------
vmhba0    lsi_msgpt3    link-n/a    sas.500304801ce1d700                (0000:01:00.0) Avago (LSI Logic) Fusion-MPT 12GSAS SAS3008 PCI-Express
...
vmhba32   vmkusb        link-n/a    usb.vmhba32                         () USB  
# esxcli storage core device list --device naa.5000c50087762d1b 
naa.5000c50087762d1b
   Display Name: Local ATA Disk (naa.5000c50087762d1b)
   Has Settable Display Name: true
   Size: 5723166
   Device Type: Direct-Access 
   Multipath Plugin: NMP
   Devfs Path: /vmfs/devices/disks/naa.5000c50087762d1b
   Vendor: ATA     
   Model: ST6000VX0001-1SH
   Revision: VN02
   SCSI Level: 6
   Is Pseudo: false
   Status: on
   Is RDM Capable: true
   Is Local: true
   Is Removable: false
   Is SSD: false
   Is VVOL PE: false
   Is Offline: false
   Is Perennially Reserved: false
   Queue Full Sample Size: 0
   Queue Full Threshold: 0
   Thin Provisioning Status: unknown
   Attached Filters: 
   VAAI Status: unsupported
   Other UIDs: vml.02000000005000c50087762d1b535436303030
   Is Shared Clusterwide: false
   Is Local SAS Device: true
   Is SAS: true
   Is USB: false
   Is Boot USB Device: false
   Is Boot Device: false
   Device Max Queue Depth: 32
   No of outstanding IOs with competing worlds: 32
   Drive Type: physical
   RAID Level: NA
   Number of Physical Drives: 1
   Protection Enabled: false
   PI Activated: false
   PI Type: 0
   PI Protection Mask: NO PROTECTION
   Supported Guard Types: NO GUARD SUPPORT
   DIX Enabled: false
   DIX Guard Type: NO GUARD SUPPORT
   Emulated DIX/DIF Enabled: false

–jeroen

Posted in ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

chrome://settings/clearBrowserData to clear Chrome browser cache

Posted by jpluimers on 2019/05/06

The quickest way for me to clear the Chrome browser cache is to:

  1. navigate to chrome://settings/clearBrowserData,
  2. tick “Cached images and files”
  3. click “Clear Data”

Done.

Much faster than [WayBack] Clear cache & cookies – Computer – Google Account Help:  When you use a browser, like Chrome, it saves some information from websites in its cache and cookies. Clearing them fixes certain problems, like loading or formatting issues on sites.In Chrome

–jeroen

Posted in Uncategorized | Leave a Comment »

BorgBackup – Deduplicating archiver with compression and authenticated encryption

Posted by jpluimers on 2019/05/06

On my research list:

Borg

Deduplicating archiver
with compression and encryption

BorgBackup (short: Borg) gives you:

  • Space efficient storage of backups.
  • Secure, authenticated encryption.
  • Compression: LZ4, zlib, LZMA.
  • Mountable backups with FUSE.
  • Easy installation on multiple platforms: Linux, macOS, BSD, …
  • Free software (BSD license).
  • Backed by a large and active open source community.

Source: [WayBackBorgBackup – Deduplicating archiver with compression and authenticated encryption

Repositories:

–jeroen

Posted in *nix, *nix-tools, Development, Power User, Software Development | Leave a Comment »

Trying to temporarily lower the ESXi acceptance level when installing VIBs

Posted by jpluimers on 2019/05/06

This is an interesting question at [WayBackHow can I lower the ESXI acceptance level when a forced install has been done? – Server Fault.

The default level on ESXi 6.5 is this:

# esxcli software acceptance get
PartnerSupported

Since I had ghettoVCB installed with the -f option, installing any PartnerSupported VIB would result in this error:

 [DependencyError]
 VIB virtuallyGhetto_bootbank_ghettoVCB_1.0.0-0.0.0 violates extensibility rule checks: ['(line 24: col 0) Element vib failed to validate content']
 VIB virtuallyGhetto_bootbank_ghettoVCB_1.0.0-0.0.0's acceptance level is community, which is not compliant with the ImageProfile acceptance level partner
 To change the host acceptance level, use the 'esxcli software acceptance set' command.
 Please refer to the log file for more details.

This fails:

# esxcli software acceptance set --level=CommunitySupported
[AcceptanceConfigError]
Unable to set acceptance level of community due to installed VIBs virtuallyGhetto_bootbank_ghettoVCB_1.0.0-0.0.0 having a lower acceptance level.
Please refer to the log file for more details.

The workaround is to uninstall virtuallyGhetto_bootbank_ghettoVCB_1.0.0-0.0.0, then install thePartnerSupportedVIB, then re-install ghettoVCB with the --force option or with lowered acceptance level:

  1. Remove the ghettoVCB installation: esxcli software vib remove -n ghettoVCB
  2. Perform the steps that ghettoVBC install prevented (install a non-community VIB, upgrade your ESXi system, etc)
  3. Reinstall the ghettoVCB by either:

–jeroen

Posted in ESXi6.5, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

Flickr Free is limited to 1000 foto’s and will start deleting old photos in half a year…

Posted by jpluimers on 2019/05/04

A reminder to myself: about half a year ago, [WayBack] Flickr announces changes From http://flickr.com/lookingahead we note the following: Free accounts will soon be limited to 1,000 photos or videos. Flick… – Jeff Diver – Google+

Free members with more than 1,000 photos or videos uploaded to Flickr will no longer be able to upload new content after Tuesday, January 8, 2019 unless they upgrade to Pro. After February 5, 2019, free accounts that contain over 1,000 photos or videos will have content deleted — starting from oldest to newest date uploaded — to meet the new limit. Members may always choose to download content over the limit at any time prior to these dates.

I had been a Flickr Pro subscriber for a long time, but the social interactions where mweh, and I had far less storage than the free tier anyway, so I let the Pro expire.

With about 33k photos, I seem to have no other options than to:

  • download everything, and find a new place, including all meta-information
  • go pro

Time to make a decision in a month or so…

–jeroen

Posted in Flickr, Power User, SocialMedia | Leave a Comment »

Do not blur, but do randomly add noise or move pixels – Censoring image in GIMP – Graphic Design Stack Exchange

Posted by jpluimers on 2019/05/03

Blurring is like a hash function: it cannot be undone, but with enough plain text to blur examples, you can reconstruct the plain text: [WayBack] Why blurring sensitive information is a bad idea | dheera.net | Dheera Venkatraman’s web site

As an alternative, randomly add noise or move pixels. I used  [WayBack] Censoring image in GIMP – Graphic Design Stack Exchange. For the example on the right, I used “Filters → Noise → Spread” from the Stack Exchange answer.

With enough randomness, it is much harder to construct plain/hash combinations.

–jeroen

Posted in Image Editing, LifeHacker, Power User, Security, The Gimp | Leave a Comment »

Cleaning SILVER WITHOUT losing the Ag!

Posted by jpluimers on 2019/05/03

Interesting trick explained at [WayBackCleaning SILVER WITHOUT losing the Ag! which works very quickly as you can see in the below video.

What happens is that you transform Silver-Sulfide plus Aluminium into Silver plus Aluminium-Sulfide.

After that, the [WayBackAluminium-Sulfide reacts with water and transforms into Aluminium-Hydroxide and Hydrogen-Sulfide. The latter smells like rotten eggs, so better do this in a well ventilated area.

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »