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,706 other followers

Archive for the ‘*nix’ Category

Zabbix agent and long running scripts: Timeout parameter in zabbix_agentd.conf

Posted by jpluimers on 2019/08/12

The [WayBack] stock zabbix_agentd.conf is about 10k and the documentation quite a bit larger, so it can take a while to figure out a setting.

I needed one to ensure that scripts could take longer to execute than the default.

Searching for a per-script setting on the server side revealed no solution, so I had to solve it on the agent side. There, a per-script setting is also impossible: there is only the global Timeout (one word, no PascalCase like TimeOut) setting in zabbix_agentd.conf which is the same for Unix and Windows based Zabbix installations:

Unix: [WayBack] Zabbix Documentation 3.0 – 3 Zabbix agent (UNIX)

Parameter Mandatory Range Default Description
Timeout no 130 3 Spend no more than Timeout seconds on processing

Windows: [WayBack] Zabbix Documentation 3.0 – 9.4 Zabbix agent (Windows)

Parameter Mandatory Range Default Description
Timeout no 130 3 Spend no more than Timeout seconds on processing

In my case it was for a PowerShell script that ran twice a day to verify how recent the installations on a particular machine were. The Timeout value needed to be at least 15 for that:

### Option: Timeout
# Spend no more than Timeout seconds on processing.
#
# Mandatory: no
# Range: 1-30
# Default:
# Timeout=3
Timeout=15

–jeroen

Read the rest of this entry »

Posted in *nix, Monitoring, Power User, Zabbix | Leave a Comment »

sebastien/sink: Swiss army knife for directory comparison and synchronization

Posted by jpluimers on 2019/08/02

If you don’t have Beyond Compare available for your platform (or cannot connect via Beyond Compare to it): sebastien/sink: Swiss army knife for directory comparison and synchronization.

The Python script in it does 3-way directory compares on the console.

It is very similar to the Beyond Compare “folder merge” functionality.

–jeroen

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

Convert cURL command syntax to Python requests, Node.js code

Posted by jpluimers on 2019/07/26

Utility for converting curl commands to code

For my link archive: [WayBack] Convert cURL command syntax to Python requests, Node.js code

–jeroen

Posted in *nix, *nix-tools, cURL, Development, JavaScript/ECMAScript, Node.js, Power User, Python, Scripting, Software Development | Leave a Comment »

Transferring files from a Linux console: transfer.sh and anypaste.xyz

Posted by jpluimers on 2019/07/26

transfer.sh

anypaste.xyz

–jeroen

via: [WayBack] Interesting: Anypaste – Share And Upload Files To Compatible Hosting Sites Automatically… – DoorToDoorGeek “Stephen McLaughlin” – Google+

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

Introduction to Snapshots/Rollback with Snapper | ActiveDoc

Posted by jpluimers on 2019/07/01

The snapper documentation itself is big and hard to grasp at once, so start here for a few examples on how to get going, or how to assess your current configuration:

For a very good snapper introduction seems to be gone, but was present in the OpenSuSE documentation archive circa version 13.2 at [WayBackChapter 4. Snapshots/Rollback with Snapper | ActiveDoc which I’ve quoted below.

Between that version and LEAP, the retention got moved from “timeline” based to “number” based. More on that in these links:

Man pages:

Introduction

4.1.1 snapshots and Disk Space #

When a snapshot is created, both the snapshot and the original point to the same blocks in the file system. So, initially a snapshot does not occupy additional disk space. If data in the original file system is modified, changed data blocks are copied while the old data blocks are kept for the snapshot. Therefore, a snapshot occupies the same amount of space as the data modified. So, over time, the amount of space a snapshot allocates, constantly grows. As a consequence, deleting files from a Btrfs file system containing snapshots may not free disk space!

Note: Snapshot Location

Snapshots always reside on the same partition or subvolume that has been snapshotted. It is not possible to store snapshots on a different partition or subvolume.

As a result, partitions containing snapshots need to be larger than “normal” partitions. The exact amount strongly depends on the number of snapshots you keep and the amount of data modifications. As a rule of thumb you should consider using twice the size than you normally would.

Tip: Freeing space / Disk Usage

In order to free space on a Btrfs partition containing snapshots you need to delete unneeded snapshots rather than files. Older snapshots occupy more space than recent ones.

Since the df does not show the correct disk usage on Btrfs file systems, you need to use the command btrfs filesystem df MOUNT_POINT. Displaying the amount of disk space a snapshot allocates is currently not supported by the Btrfs tools.

–jeroen

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

 
%d bloggers like this: