Donate

Categories

Advert

XHTML

Valid XHTML 1.0 Transitional

Redirecting Output from a Running Process

Someone asked on a mailing list how to redirect output from a running process. They had a program which had been running for a long period of time without having stdout redirected to a file. They wanted to logout (to move the laptop that was used for the ssh session) but not kill the process […]

Load Average

Other Unix systems apparently calculate the load average differently to Linux. According to the Wikipedia page about Load(computing) [1] most Unix systems calculate it based on the average number of processes that are using a CPU or available for scheduling on a CPU while Linux also includes the count of processes that are blocked on […]

Swap Space

There is a wide-spread myth that swap space should be twice the size of RAM. This might have provided some benefit when 16M of RAM was a lot and disks had average access times of 20ms. Now disks can have average access times less than 10ms but RAM has increased to 1G for small machines […]

Out Of Memory Errors and Apache

I’ve been having problems with one of my Xen virtual servers crashing with kernel error messages regarding OOM conditions. One thing I had been meaning to do is to determine how to make a core dump of a Xen domain and then get data such as the process list from it. But tonight I ended […]

Pointers in Bash Shell Scripts

# foo=bar # name=foo # echo ${!name} bar

The above example shows how to make a bash environment variable reference the value of another.

# echo ${!f*} foo fs_abc_opts fs_name

The above example shows how to get a list of all variables beginning with “f” (NB the wildcard can only go at the end).

Related posts:

Heartbeat service scripts A service script for Heartbeat needs to support at least…
configuring a Heartbeat service In my last post about Heartbeat I gave an example…
Xephyr As part of my work on Xen I’ve been playing…