Linux performance problems and some helpful commands

On one of our RHEL systems we had an issue with high load. In some cases our java application crashed.

The following command helped us to find the reason (in our case it was the limit of processes per user).

vmstat -SM -t 10 10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ ---timestamp---
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0  12448    562  36934    0    0     0     3    3    2  0  0 100  0  0       2017-04-11 17:20:38 CEST
 0  0      0  12448    562  36934    0    0     0     4 1059 1975  0  0 100  0  0       2017-04-11 17:20:48 CEST
 0  0      0  12448    562  36934    0    0     0     3 1158 2038  0  0 100  0  0       2017-04-11 17:20:58 CEST

with ulimit we could see, that the „max user processes“ was set to a very low level. That was the reason why our application crashed (java could not open addidtional threads).

ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 257569
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1000000
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1200
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

 

# show load, currently running threas/process and ?
cat /proc/loadavg
0.00 0.00 0.00 1/1570 14415

 

# with this command you can count the number of processes (limited by "max user process" of ulimits command)
ps -elfT | grep philipp | wc -l

Install HP Printer (MultiFuncion Device – MFD) DeskJet 3050a on RHEL / Linux

For RedHat Enterprise Linux you need to install HPLIP manually:

http://hplipopensource.com/hplip-web/install/manual/distros/redhatenterprise.html

There is also the link to download the hplip-3.12.11_rhel-6.0.x86:64.rpm package.

Impotant: The hplip version that is provided by the RedHat Package manager is in version 3.10.9. That version DOES NOT support the DeskJet 3050a!

I used the installation manual from the link above. At Step 3 (Installing rpm package) I got the error :

file /usr/lib64/libhpip.so.0.0.1 from install of hplipfull-3.12.11-0.x86_64 conflicts with file from package hplip-libs-3.10.9-3.el6.x86_64

To solve this, I used the –replaceFiles parameter:

HP Lip

Then run

sudo hp-setup

Then you can find the printer by specifying the IP:

HP Device Manager - Setup

HP Device Manager - Setup

How to add (la-)Tex macros / plugins / modules to your tex installation

After you downloaded your necessary macros / plugins from CTAN, you can extract them to your local „tex repository“. This is located in you home folder (if it is not there, just create that structure):

/home/myUser/texmf/tex/latex/

Inside that directory you can create a directory with the name of the zip file. Here is an example for the macro „moderncv.zip“

/home/myUser/texmf/tex/latex/moderncv/

Extract the zip file in that directory. In my example this results in:

/home/myUser/texmf/tex/latex/
|-- moderncv
|   |-- moderncv
|   |   |-- CHANGELOG
|   |   |-- examples
|   |   |   |-- picture.eps
|   |   |   |-- picture.jpg
|   |   |   |-- publications.bib
|   |   |   |-- template_banking_black.pdf
|   |   |   |-- template_banking_red.pdf
|   |   |   |-- template_casual_orange.pdf
|   |   |   |-- template_classic_green.pdf
|   |   |   |-- template-es.pdf
|   |   |   |-- template-es.tex
|   |   |   |-- template_multibib.pdf
|   |   |   |-- template_oldstyle_grey.pdf
|   |   |   |-- template.pdf
|   |   |   |-- template.tex
|   |   |   |-- template-zh.pdf
|   |   |   `-- template-zh.tex
|   |   |-- KNOWN_BUGS
|   |   |-- moderncv.cls
|   |   |-- moderncvcolorblack.sty
|   |   |-- moderncvcolorblue.sty
|   |   |-- moderncvcolorgreen.sty
|   |   |-- moderncvcolorgrey.sty
|   |   |-- moderncvcolororange.sty
|   |   |-- moderncvcolorpurple.sty
|   |   |-- moderncvcolorred.sty
|   |   |-- moderncvcompatibility.sty
|   |   |-- moderncvstylebanking.sty
|   |   |-- moderncvstylecasual.sty
|   |   |-- moderncvstyleclassic.sty
|   |   |-- moderncvstyleempty.sty
|   |   |-- moderncvstyleoldstyle.sty
|   |   |-- README
|   |   `-- tweaklist.sty
|   `-- moderncv.zip

After you extracted the zip file, you have to register those files for tex (with root):

sudo texhash

After that your macros should be available for the tex compiler.

Eclipse Updates or Plugins are not working – Linux / RHEL

Few days ago I wrote an article about how to Install Eclipse on RHEL (https://philipp-boss.de/it/linux/how-to-install-svn-eclipse-on-redhat-6-3-rhel-6/)

After I installed some plugins I noticed, that they are not working with the „standard“ user. When installing the plugins as root they worked well.

I found a very good explanation on the Google GWT Plugin Page:

https://developers.google.com/eclipse/docs/faq?hl=de#multiuser

To avoid any problems with the installation and update of plugins, you should directly after you extracted the eclipse*.tar change the owner via:

sudo chown -R <user> eclipe

After I changed the owner to my current user, the installation and updates of my plugins worked perfectly fine.

I hope this tip can also help you 😉