C/C++… Profiling C/C++ with gprof 13 Dec 202113 Dec 2021 We will use the following flags: -g for debugging information-pg for profiling information Add the -g -pg flags to the compiler (either gcc or g++): gcc -g -pg -o my_executable…
Administration… Apache virtual hosts example 28 Nov 202128 Nov 2021 Overview To setup virtual hosts on Apache the standard procedure is the following: First, create the directories of the document root for each siteIn the directory /etc/apache2/sites-available, create a configuration…
How-To… How to count lines of source code 13 Jul 2020 Install cloc: sudo apt install cloc And then run the command: cloc .
C/C++… Use valgrind to debug C/C++ applications 14 Mar 201913 Dec 2021 To compile the program use the following flags: -g3-O0 (optional) To execute the program once you have compiled it: ./valgrind program For extensive testing you could also use the following…
How-To… Hints for debugging simple TCP applications 29 May 20182 Oct 2019 Summary of what you are going to install: ncatcurl Summary of the commands: sudo apt install ncat sudo apt install curl echo "hello world" > /dev/tcp/localhost/11111 echo "hello world" |…
Administration… IPCS Toolcase 9 Nov 201728 Nov 2021 View all segments and semaphore arrays $ ipcs -s -m View details of a memory segment $ ipcs -m -i <id> View details of a semaphore array $ ipcs -s…
How-To… Upload files with SCP 5 Nov 201725 Mar 2020 Prerequisites: scp (pre-installed on most Linux distributions) Let's say your student ID is sdiABCDEFG and lets say you have to upload your assignment to the following address: /home/users/kXX/projectN/sdiABCDEFG/ Here are…
How-To Computer maintenance and stability 4 Sep 20171 Aug 2021 Do not install software that advertises that it will speed up your computer or that it will magically repair and clean up your hard drive. Most of those programs do…