Tag: Linux

Linux is an open-source operating system kernel that forms the foundation of many Unix-like operating systems, known for its stability, security, and versatility.

  • How to enter ASCII control characters with your keyboard

    How to enter ASCII control characters with your keyboard

    Written by

    in

    How to enter ASCII control characters? Entering ASCII control characters depends on the specific keyboard layout and operating system you are using. Here’s a general guide for Linux, Windows, and macOS: Linux In most Linux terminals, you can enter ASCII control characters using the keys Ctrl + Shift + u in combination with a letter…

    Read more

  • Ping server on a specific port

    Ping server on a specific port

    Written by

    in

    You can’t ping ports, as Ping is using ICMP which doesn’t have the concept of ports. Ports belong to the transport layer protocols like TCP and UDP. However, you could use nmap to see whether ports are open or not: The output will look like this: Source: https://serverfault.com/questions/309357/ping-a-specific-port

    Read more

  • CUDART Error in Singularity Container Workaround

    Written by

    in ,

    Singularity is a Linux container system similar (and compatible to) Docker. It’s advantage over Docker is that is was designed to allow users without superuser privileges to run containers within their environment. I recently encountered the following error when running a Nvidia CUDA application within a Singularity container using “singularity run -nv <container>: CUDART: cudaGetDeviceCount(&deviceCount);…

    Read more

  • Finding the NUMA Node of a Nvidia CUDA GPU in Linux

    Written by

    in

    For some applications it might be useful to pin their CPU processes to the NUMA node which is connected to the GPU. To find out which GPU is located at which NUMA node one can use the following script: Pinning the CPU process to the right NUMA node can speed up your application significantly on…

    Read more

  • SPACK and Intel Parallel Studio: “error while loading shared libraries: libimf.so”

    Written by

    in

    Spack is a package manager for supercomputers, Linux, and macOS. It makes installing scientific software easy. With Spack, you can build a package with multiple versions, configurations, platforms, and compilers, and all of these builds can coexist on the same machine. However, when using the Intel Compiler as compiler, I got the following error for…

    Read more

  • Terminal: Größe eines Verzeichnisses ausgeben

    Written by

    in

    Um die Größe eines Verzeichnisses unter macOS im Terminal auszugeben, kann man den Befehl du verwenden. Hier ist ein Beispiel, wie man die Größe eines Verzeichnisses ausgeben lässt: Das -s-Option gibt die zusammengefasste Größe aller Unterverzeichnisse aus, während das -h-Option die Größe in einer lesbaren Form (z.B. KB, MB, GB) ausgibt. Oder ein Beispiel für…

    Read more

  • BASH Shell: Einen Wert zu einer hexadezimalen Zahl hinzuaddieren

    Written by

    in ,

    Die einfachste Möglichkeit einen Wert zu einer hexadezimalen Zahl wie bspw. einen Teil einer MAC-Adresse auf der Konsole hizuzufügen ist die printf Funktion:

    Read more

  • BASH: Nach jedem xten Zeichen ein Zeichen in einen String einfügen

    Written by

    in

    Mit sed “s/.\{x\}/& /g” kann man in eine Zeichenkette alle x Zeichen ein Leerzeichen automatisiert einfügen. Aber auch andere Zeichen sind möglich. So kann man bspw. alle zwei Zeichen einen Doppelpunkt in einen String einfügen: #~> echo “AA11CC22EE” | sed “s/.\{2\}/&:/g” AA:11:CC:22:EE: Sollte das letzte Zeichen stören, kann man dies wie folgt entfernen: #~> a…

    Read more

  • VI oder VIM beenden

    Written by

    in

    Um den bei vielen Linux und Unix Installationen und Tools (wie bspw. git) standardmäßig genutzten VI Editor zu beenden muss man mit der “ESC”-Taste in den Kommandomodus wechseln (am besten mehrfach drücken um ggf. schon eingegeben Kommandos abzubrechen). Und dort dann eingeben und Enter drücken.Dies beendet VIM wenn vorher nichts geändert wurde. Wurde etwas am…

    Read more

  • SLURM: Remove Dependency of a Queued Job

    Written by

    in

    To remove the dependency of a queued job in SLURM, use the scontrol command:

    Read more

  • NVIDIA CUDA on Ubuntu: unsupported GNU version! gcc versions later than 5 are not supported!

    Written by

    in

    After installing CUDA on Ubuntu, compiling CUDA applications with nvcc results in an error similar to this: In file included from /usr/local/cuda-8.0/bin/../targets/x86_64-linux/include/cuda_runtime.h:78:0, from <command-line>:0: /usr/local/cuda-8.0/bin/../targets/x86_64-linux/include/host_config.h:119:2: error: #error — unsupported GNU version! gcc versions later than 5 are not supported! #error — unsupported GNU version! gcc versions later than 5 are not supported! ^~~~~}}} Ubuntu comes…

    Read more

  • Turbo Modus der CPU unter Linux an- und ausschalten

    Written by

    in

    Wenn die Frequenzen der CPU über den “intel_pstate” Treiber¹ gesteuert werden und der Turbo Modus im BIOS angeschaltet ist, kann man den Turbomodus für alle CPUs / Cores mit dem folgenden Befehl ausschalten: echo “1” > /sys/devices/system/cpu/intel_pstate/no_turbo Und mit diesem Befehl wieder anschalten: echo “0” > /sys/devices/system/cpu/intel_pstate/no_turbo Dies hilft beim Energiesparen und verlängert die Akkulaufzeit…

    Read more

  • VIM: Zeichen durch Zeilenumbruch ersetzten

    Written by

    in ,

    Um in VI(M) Zeichen(ketten) bzw. Strings durch Zeilenumbrüche zu ersetzten, folgendes Kommando nutzen: :%s/Zeichenkette/\r/g Um andersherum einen Zeilenumbruch durch eine Zeichenkette zu ersetzten muss “\n” genutzt werden: :%s/\n/Zeichenkette/

    Read more

  • Linux / RHEL: Force Date Update with Chrony

    Written by

    in

    In the old days one was able to update the date of a machine by running ntpdate ntpserver.example.com With crony it is a bit more difficult: chronyc -a ‘burst 4/4’ sleep 10 chronyc -a makestep

    Read more

  • Konsole: prüfen ob ein Port geöffnet ist

    Written by

    in

    Mit folgendem Befehl kann man aus der Konsole heraus schnell prüfen, ob ein Port zu einem Server geöffnet ist: nc -z <host> <port>; echo $? Der Rückgabewert 0 heißt der Port ist offen. 1 wird bei geschlossenem Port zurückgegeben.

    Read more

  • CentOS 7 / RedHat 7 pxe boot fails with “ValueError: new value non-existent xfs filesystem is not valid as a default fs type”

    Written by

    in

    Error: When I tried to install a CentOS 7 server via pxe/netboot today, I encountered the following error: ValueError: new value non-existent xfs filesystem is not valid as a default fs type Pane is dead Solution: Use kernel, initrd and distribution files of the same release/update version. Description: This has nothing to do with the…

    Read more

  • mstflint Error: MFE_REG_ACCESS_FAILED

    Written by

    in

    Recently I tried to update the firmware of a Mellanox ConnectIB HCA. However, even trying to query the state of the hca was not possible: > mstflint -d 81:00.0 q -E- Cannot open Device: 81:00.0. No such device MFE_REG_ACCESS_FAILED dmesg reported: mlx5_ib: Mellanox Connect-IB Infiniband driver v1.0 (June 2013) mlx5_ib 0000:81:00.0: setting latency timer to…

    Read more

  • Ruby und “Insecure world writable dir …”

    Written by

    in

    Bei der Verwendung von Ruby kann es vorkommen, dass man eine Warnung “Insecure world writable dir …” erhält. Diese wird ausgegeben, wenn es sich bei den in $PATH angegebenen Pfaden um Verzeichnisse handelt, die schreibbar für alle Benutzer sind. Ruby gibt in einem solchen Fall beispielsweise für die Eingabe: folgende Warnung aus: Ein naheliegender Work-Arround…

    Read more