From time to time one may receive a request from QA team in line of:
For testing purposes, I need that /opt/test/xxx directory be limited to 10 Megabytes. This directory is used by this zzz application ran as user tester.
How could the directory size be limited in Linux? Is it even possible? – these are fair questions and the answer is yes. One needs to:
-
Use the directory as a mount point for a size-limited storage device;
-
Use the proper mount options to allow full access to the non-root user specified;
-
Disable Selinux (easy) or allow that particular user to access data on mount points (complicated).
Let’s start with the beginning, the storage device. There are multiple options here:
-
A simple loop device (a regular file used as a file system);
-
A logical volume (LVM), assuming the disk setup is based on this technology and there is enough free space left to accomodate the new device;
-
Attaching a new storage device (e.g. in a Cloud environment like Amazon Web Services).
I just got myself LPIC-1 certified (verify). I’ll try to address a few issues here, if anybody else wants to do it and doesn’t know how.
Introduction
The LPIC-1 is granted upon passing 2 exams:
-
Exam 101 – more theoretically oriented, with many general questions.
-
Exam 102 – more practically oriented, with an emphasis on Scripting, Networking and Security.
The exams can be passed in any order, the certification is automatically granted upon passing both. Also, in order to get certified on the subsequent levels, you need to already have the lower level certification at hand. That is, for one of the LPIC-3 certifications you need to pass a total of 5 exams, in any order.
Logistics
The “official way” of taking exams is through a Pearson VUE test center. You need to first purchase an exam voucher (EUR 150 approx, might fluctuate with exchange rates) and then go take the exam on a computer in a controlled setup.
The “alternate way” is to attend a conference where pen/paper exams are offered. In Europe you may want to register your seat on this site, then attend that particular event. The cost for taking the exam in such setup is lower and may be the way to go if you plan to attend the conference for other reasons than taking the exams alone.
I have personally taken both 101 and 102 exams during the FOSDEM 2016 event in Bruxelles, Belgium, on January 30 and 31st.
1. Classification
Before getting into action, let’s split the “performance” problem in a couple of boxes, as the concept itself is quite general. First, deciding what we want to monitor (an entire system? a particular application?) – and second, deciding on what type of performance monitoring do we require (stats collection by the kernel? in-depth analysis?). Based on this particular classification, we may end up with 4 categories, each with its particular software selection:
Stats (Counters) |
Tracing / Profiling / Debugging |
|
System Wide |
||
Per Process |
NB:
-
netstat offers much more info beyond statistics on interface / protocol and may also be used to monitor individual connections.
-
dtrace and SystemTap can also trace individual applications.