Skip to content

Tag: linux

yum install php-pear* on centos

I’m trying to install pear on my centos. I’ve used “*yum install php-pear**” to install pear and it seemed to install with success. No errors. I restart my server. However when I check out phpinfo(). I see that my php is still built using “–without-pear”. Isn’t …

Linux “install” command for wildcard installation

Is there a way to use “install” for installing multiple files at once using a “wildcard” pattern (and still have “install” create the leading directory hierarchy)? I’ve tried several different ways: install -D -t /dest/path /source/path/*.py install -D -t /dest/path/ …

Tracking down MySQL connection leaks

I have an application server (jetty 6 on a linux box) hosting 15 individuals applications (individual war’s). Every 3 or 4 days I get an alert from nagios regarding the number of open TCP connections. Upon inspection, I see that the vast majority of these connections are to the MySQL server. Shows 10,00…

Java: Graphics in Linux

Does X-Windows have to be installed on a Linux-box in order for Java to display fullscreen graphics? Answer Other answerers appear to assume that “full screen graphics in Java” necessarily means “a working implementation of AWT”. This is, of course, not necessarily true, as it is perfe…

Linux: How to put a load on system memory?

I’m working on a small function, that gives my users a picture of how occupied the CPU is. I’m using cat /proc/loadavg, which returns the well known 3 numbers. My problem is that the CPU doesn’t do anything, right now, while I’m developing. Is there a good way to generate some load on …

Drawing on the X root window

I’d like to be able to draw on the root window in Linux. I.e. make an OSD. I’m using Gnome. Code samples or links to them would be appreciated. Answer It is possible, but you will not see anything in GNOME. Nautilus, GNOME’s file manager, opens its own window on top of root X window to displ…

Display socket options

How I can see from shell what socket options are set? In particular I’m interesting to know if SO_BROADCAST is set? Answer You can use lsof(8). If PID is the process ID and FD is the file descriptor number of the socket you’re interested in, you can do this: To list all IPv4 sockets of a process: …

naming convention for shell script and makefile

I have a few makefiles that store shared variables, such as CC=gcc , how should I name them? The candidates are: .. which is more classic? Is there a standard? Similarly, I have some shell scripts, which should i choose among the following: Is there a generally accepted ‘case’ and suffix for these…