Notities

Notities

ing. M.A.C.M. (Martijn) van den Boom

Computer Infrastructure Engineer
ingenieur, docent en mentor

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

If you are using a hosts file, make sure it contains FQDNs and pay close attention to the order in which they appear. Check the hosts file and adjust it if necessary: The FQDN must come first, followed by any aliases. /etc/hosts 10.0.0.1 server1.example.com server1 application1 If an alias is listed before the FQDN, you may encounter error messages that are not immediately traceable to this cause.

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

Below is the source code of a C program to create a Zombie process in Linux and analyse it. vim create_zombie_process.c #include <stdlib.h> #include <sys/types.h> #include <unistd.h> int main () { pid_t child_pid; child_pid = fork (); if (child_pid > 0) { sleep (60); } else { exit (0); } return 0; } Compile the C source code into an executable program: gcc create_zombie_process.c Start the program: ./a.out Open a second Terminal and view the process list. You will now see a...

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

See below an example script to display a SUCCESS message in green or a FAILED message in red, right-aligned at the end of the line. #!/bin/bash # Set the message success_message=&#34;Your command was successful&#34; failed_message=&#34;Your command failed&#34; # Set the &#34;OK&#34; string in green ok=&#34;$(tput setaf 2)[SUCCES]$(tput sgr0)&#34; failed=&#34;$(tput setaf 1)[FAILED]$(tput sgr0)&#34; # Get the width of the terminal term_width=$(tput cols)+9 # Calculate the number of dots needed...

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

Checkmk installation on Rocky Linux 9.3 dnf install epel-release setsebool -P httpd_can_network_connect 1 firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload wget https://download.checkmk.com/checkmk/2.2.0p18/check-mk-raw-2.2.0p18-el9-38.x86_64.rpm yum install check-mk-raw-2.2.0p18-el9-38.x86_64.rpm omd version omd create monitoring omd start monitoring http://localhost.localdomain/monitoring/ user: cmkadmin with password: <given> omd su monitoring (For command...

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

Installing the VirtualBox Guest Additions on Rocky Linux 9.3 dnf install epel-release dnf update --refresh dnf update kernel-* reboot (optional) dnf install dkms kernel-devel kernel-headers gcc make bzip2 perl elfutils-libelf-devel rpm -q kernel-devel uname -r Top menu: Devices -> Insert Guest Additions CD-Image Run (optional) cd /run/media/ ./VBoxLinuxAdditions.run

ing. M.A.C.M. (Martijn) van den Boom

1-Minute Read

PowerShell computer resource monitor script with cpu percentage and advanced memory information PowerShell Resource monitor $app=&#34;notepad&#34; $ids = Get-Process $app | Select-Object -Property Id | ForEach-Object {$_.Id} $filedate = Get-Date -format &#34;yyyy-MM-dd&#34; #echo $pids foreach ($id in $ids) { $date = Get-Date -format &#34;yyyy-MM-dd HH:mm:ss&#34; # process CPU information $ProcessId = $id $Process = Get-WmiObject -Query &#34;SELECT * FROM Win32_PerfFormattedData_PerfProc_Process...

Recent Posts:

Categories

About

Sponsor me link:
ko-fi.com/martijnvandenboom
paypal.me/ingmacmvandenboom
buymeacoffee.com/ingvdboom