I have two virtual servers for hosting my web app. They are identical, running Debian 6 with 1.5GB of RAM. I configure the OS and Tomcat using a script from a fresh install, so I know they are identical. My webapp runs in Tomcat and I set 850M heap and 100M perm size. My app regularly dies on one of
Tag: linux
How to run nohup and write its pid file in a single bash statement
I want to run my script in background and then write its pid file. I am using nohup to do this. This is what i came up with, But this gives a syntax error. The following doesn’t give syntax error but the problem is echo $! doesn’t write the correct pid since nohup is run in a sub shell Any
ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
How to receive a file using sendfile?
send a file with sendfile is easy: but how to receive a file using sendfile? since I don’t know the length of the file, should I send the file length first? There seems to be two ways of doing this: send the filestat.len first use a loop in the receive end: Which one is better? Should I handle the buffe…
Epoll_wait returning events on closed file descriptor
I’m working with a multithreaded embedded application in which epoll is used for IO in one of the threads. I’m relying on a particular feature of epoll that specifies that closing a file descriptor automatically removes it from the epoll set (Question/Answer 6 in man 7 epoll). In this case, the fi…
how to identify names of the partitions
From below partitions how know which partitions is boot and which one is system. Is there any different command I need to execute to read the partitions names. with df command Answer You can use df command. This will display something like that: The second option would be to read the /proc/self/mountinfo file…
Disabling disk cache in linux
In a class project my teacher told us to make some code evaluations (C language) and to do so we need to disable the disk caching during the tests. Currently I’m using Ubuntu 12.04, how can I do this? Thanks. Answer You need root access to do this. You can run hdparm -W 0 /dev/sda command to disable wri…
Extract the Linux serial number without sudo
It is possible to extract the Linux serial number without using sudo? I know it is possible to do in Windows: wmic bios get serialnumber and in macOS: system_profiler | grep “r (system)”. Both of them do not require root privileges. In Linux this can be used: sudo dmidecode -s system-serial-number…
Perl one-liner is it possible to make END block execute for each file arg given
For Perl one-liners, when using the -p or -n flags is it possible to make the END {} block execute once per file, instead of only once for the entire program? In other words, when I write: I’d like to execute the END block once for each file, instead of just once globally at the end of the program’…
Python – how to get the import pjsua? giving no module named pjsua
How to get python pjsua? EDIT: p2p | registration | call Answer setup.py is trying to create shared library build/lib.linux-x86_64-2.7/_pjsua.so by dynamically linking pjsip’s libraries, but, those doesn’t provide a global offsets table(GOT) (check the link to see why this is needed). The problem …