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,860 other subscribers

Archive for April, 2019

Keeping your root visorfs clean: point the path to your own binaries stored on a vmfs volume

Posted by jpluimers on 2019/04/26

Some interesting commands derived from [WayBackESXi/ESX error: No free space left on device (1007638) | VMware KB:

  • finding large files:
    find / -path "/vmfs" -prune -o -type f -size +50000k -exec ls -lh '{}' \;
  • finding space on the root file system (which is not listed in df -h):
    stat -f /

This was in the process of trying to keep my local binaries out of [WayBackVisorFS: A Special-purpose File System for Efficient Handling of System Images – VMware Labs as it is inherently small in size (both total size and number of inodes) as it is a RAM disk based file system.

Based on that, at [WayBackTrouble shooting – esx.problem.visorfs.ramdisk.full – DefinIT I found this even more useful statement vdf -h | grep "%\|Ramdisk" which shows the exact usage of what’s in this filesystem. Example output on one of my systems:

# vdf -h | grep "%\|Ramdisk"
Ramdisk                   Size      Used Available Use% Mounted on
root                       32M        1M       30M   6% --
etc                        28M      184K       27M   0% --
opt                        32M        0B       32M   0% --
var                        48M      352K       47M   0% --
tmp                       256M        4K      255M   0% --
iofilters                  32M        0B       32M   0% --
hostdstats                678M        4M      673M   0% --

The easiest is not to store them in the root file system at all, but then you need to alter the default path:

# echo $PATH
/bin:/sbin

Since my local binaries are at /vmfs/volumes/Samsung512NVME/local-bin/, I wanted to persist this path change:

export PATH=$PATH:/vmfs/volumes/Samsung512NVME/local-bin/

Basically you can do this with any current directory on your system: export PATH=$PATH:`pwd`

The easiest way to persist that path is to ensure you can shoehorn the effect in a file that gets started during bootup.

The standard – but unsupported – way to do that is shown for instance by:

Final solution

So, edit vi /etc/rc.local.d/local.sh, then shutdown all your VMs and reboot the system to verify the effects. However inserting that export isn’t enough. This is the line you need to add before the exit 0:

sed -i -e 's!PATH=/bin:/sbin!PATH=/bin:/sbin:/vmfs/volumes/Samsung512NVME/local-bin/!' /etc/profile

Related

  • [WayBack] ESXi: Aliases definieren › /dev/blog/ID10T
  • [Archive.is] Solved: How to keep a .profile in / of ESXi? |VMware Communities

    ESXi does not remove that file on boot-up, it simply does not save it. ESXi runs from memory. So if you created some file (i.e. /.profile) it is only in “memory-disk”, not in disk-image which is loaded again at the next boot-up.

    Either create custom vib and install it as every other, or use rc.local which is persistent (any changes you make to this file survive boot-up). You can create & save that file somewhere else and use rc.local to copy it to /, or use rc.local with shell commands to create .profile at every boot-up.

    Wait a minute, you are using ESXi 6.0, right? I’m not sure if there is /etc/rc.local, but it used to be in 5.0/5.5…

    I edited /etc/rc.local.d/local.sh to copy the file that I keep on one of my datastores. After reboot, it worked fine. (So, yes, this does work in 6.0.) Thanks!

    I’m glad it worked for you. BTW you are right: instead of single file /etc/rc.local (as in 5.0) there is now the whole sub-dir /etc/rc.local.d/ but functionality is the same…

–jeroen

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

How to Find Out Top Directories and Files (Disk Space) in Linux

Posted by jpluimers on 2019/04/26

Cool list of ls , sort and find to get the largest files, directories: [WayBackHow to Find Out Top Directories and Files (Disk Space) in Linux.

–jeroen

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

Does anyone have the source from the book: The Tomes of Delphi: Algorithms and Data Structures…

Posted by jpluimers on 2019/04/25

Since I need this one day: [WayBack] Does anyone have the source from the book: The Tomes of Delphi: Algorithms and Data Structures by Julian Bucknall? – John Kouraklis – Google+

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | Leave a Comment »

Chris Bensen: macOS How to create an ISO from a CD or DVD

Posted by jpluimers on 2019/04/25

Yes, occasionally, people still use DVD or CD disks, so thanks [Archive.isChris Bensen: macOS How to create an ISO from a CD or DVD:

Put in your CD or DVD, Open Terminal, type:

ls /Volumes

Find the volume in the list, then type where /path/to/volume is the CD or DVD you want:

hdiutil makehybrid -iso -joliet -o Image.iso /path/to/volume

–jeroen

Posted in *nix, Apple, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Pro, macOS 10.12 Sierra, Power User | Leave a Comment »

UPDATE OR INSERT

Posted by jpluimers on 2019/04/25

I totally forgot that Firebird as of 2.5 supports [WayBackUPDATE OR INSERT, so as a reminder to self:

UPDATE OR INSERT INTO
   {target} [({column_list})]
   VALUES ({value_list})
   [MATCHING ({column_list})]
   [RETURNING {values} [INTO {variables}]]

{column_list}      ::=  colname    [, colname   ...]
{value_list}       ::=  value      [, value     ...]
{ret_values}       ::=  ret_value  [, ret_value ...]
{variables}        ::=  varname    [, varname   ...]

–jeroen

Posted in Database Development, Development, Firebird | Leave a Comment »

Getting rid of bugs: mark them as “new feature” – as cancelling a  THTTPClient.BeginGet() does not work as intended

Posted by jpluimers on 2019/04/24

I have seen this happen before, but it seems to be a habit on the Quality Portal: getting rid of bugs by marking them as “new feature”:

[WayBack] I’m using THTTPClient.BeginGet() to create an async get request to a webservice that holds a connection open until it has data to return (sort of like a… – Brian Ford – Google+. which basically was another person finding out about [RSP-20827] THTTPClient request can not be canceld – Embarcadero Technologies, which got marked (a month after submission!) as “Issue is reclassified as ‘New Feature'”.

I get why it happens (there was something exposed, but some of the functionality is missing a feature which needs to be added).

Marking it as such however sends the wrong signal to your users: we do not see bugs as bugs, so they get on the “new feature” pile with no estimate on when the feature will be done.

–jeroen

Posted in Delphi, Development, Issue/Bug tracking, Software Development | Leave a Comment »

Firefox 29 and up: “The connection has timed out”

Posted by jpluimers on 2019/04/24

A few years ago, Firefox changed the default “network.http.response.timeout” value from zero to 300 seconds (5 minutes).

Display style systems that show refreshing web pages, this can be a problem as when the connection to the web-server is unavailable for more than 5 minutes, then the page will show “The connection has timed out” and stop refreshing.

The solution – apart from fixing each and every connection problem – is to either restore the value or make it very long:

  • network.http.response.timeout=0
  • network.http.response.timeout=30000

Changing this works similarly like in A way to skip the Firefox “Well, this is embarrassing” during a sudden reboot « The Wiert Corner – irregular stream of stuff:

  • Open Firefox
  • Type about:config in the addressbar
  • Confirm the
    This might void your warranty!
    by clicking
    I accept the risk!
  • Search for network.http.response.timeout
  • Double click it so the value changes from the default value 0 to the user set value 0

–jeroen

Via:

Posted in Development, Firefox, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

Fixed by Code: Match of the Day

Posted by jpluimers on 2019/04/24

Interesting use of OpenCV: archiving the web comics.

–jeroen

 

 

Posted in Development, Software Development | Leave a Comment »

Should you convert your Visual Basic .NET project to C#? Why and why not… | Tim Anderson’s IT Writing

Posted by jpluimers on 2019/04/23

Since I get this question every now and then: [WayBackShould you convert your Visual Basic .NET project to C#? Why and why not… | Tim Anderson’s IT Writing.

Via [WayBack] Should you convert your Visual Basic .NET project to C#? Why and why not… https://www.itwriting.com/blog/11089-should-you-convert-your-visual-basic-net-… – Ondrej Kelle – Google+

–jeroen

Posted in .NET, C#, C# 6 (Roslyn), Development, Software Development, VB.NET | Leave a Comment »

On my research list: Event Sourcing

Posted by jpluimers on 2019/04/23

On my research list: [WayBackEvent Sourcing

Capture all changes to an application state as a sequence of events.

I got there via a very interesting thread [WayBack] A foreword===Hello everybody, the two major things that were recently introduced into my software architecture which led to significantly better main… – Edwin Yip – Google+

–jeroen

Posted in Design Patterns, Development, Software Development | Leave a Comment »